liujie
2025-12-03 a96bf618330cf23208e77cf3107b335891eb8237
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSysProductIntroductionController.java
@@ -120,11 +120,8 @@
    public R<TSysProductIntroduction> getDetailById(@RequestParam String id) {
        TSysProductIntroduction sysProductIntroduction = sysProductIntroductionService.getById(id);
        // 查询次数自增 使用数据库原子更新操作
        sysProductIntroductionService.update(
                Wrappers.<TSysProductIntroduction>lambdaUpdate()
                        .setSql("click_count = click_count + 1")
                        .eq(TSysProductIntroduction::getId, id)
        );
        sysProductIntroduction.setClickCount(sysProductIntroduction.getClickCount()+1);
        sysProductIntroductionService.updateById(sysProductIntroduction);
        // 如果是诊所
        Integer roleType = tokenService.getLoginUser().getUser().getRoleType();
        if(roleType == 5){