| | |
| | | public R<TSysEducationalInfo> getDetailById(@RequestParam String id) { |
| | | TSysEducationalInfo sysEducationalInfo = sysEducationalInfoService.getById(id); |
| | | // 查询次数自增 使用数据库原子更新操作 |
| | | sysEducationalInfoService.update( |
| | | Wrappers.<TSysEducationalInfo>lambdaUpdate() |
| | | .setSql("click_count = click_count + 1") |
| | | .eq(TSysEducationalInfo::getId, id) |
| | | ); |
| | | sysEducationalInfo.setClickCount(sysEducationalInfo.getClickCount()+1); |
| | | sysEducationalInfoService.updateById(sysEducationalInfo); |
| | | // 如果是诊所 |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType == 5){ |