liujie
2025-12-03 a96bf618330cf23208e77cf3107b335891eb8237
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysProductIntroductionController.java
@@ -66,11 +66,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);
        return R.ok(sysProductIntroduction);
    }