剔除国际中医师、针灸师同时获得的人

This commit is contained in:
wuchunlei
2025-07-02 09:17:22 +08:00
parent 7c6972a0cb
commit 6a77daa0d1

View File

@@ -50,13 +50,14 @@ public class UserCertificateController {
//小班自考证书列表
@RequestMapping("/userClassAndZKCertificateList")
public R userClassAndZKCertificateList(@RequestBody Map<String,Object> params) {
MPJLambdaWrapper<UserCertificate> wrapper = new MPJLambdaWrapper();
wrapper.leftJoin(MyUserEntity.class,MyUserEntity::getId,UserCertificate::getUserId);
MPJLambdaWrapper<MyUserEntity> wrapper = new MPJLambdaWrapper();
wrapper.leftJoin(UserCertificate.class,UserCertificate::getUserId,MyUserEntity::getId);
wrapper.in(UserCertificate::getLabelId,5,8);
wrapper.notExists("select 1 from (select count(1) c,user_id from user_certificate where label_id in (13,19) group by user_id having c>1) s where s.user_id = t.id ");
wrapper.select("count(1) as count,user_id userId,name,tel,email");
wrapper.groupBy(UserCertificate::getUserId);
wrapper.orderByDesc("count");
Page<Map<String,Object>> certificatePage = userCertificateService.pageMaps(new Page<>(
Page<Map<String,Object>> certificatePage = myUserService.pageMaps(new Page<>(
Long.parseLong(params.get("current").toString()),Long.parseLong(params.get("limit").toString())),wrapper);
for (Map<String,Object> map:certificatePage.getRecords()){
map.put("certificate",userCertificateService.list(new LambdaQueryWrapper<UserCertificate>()