修改生成证书编号

This commit is contained in:
wuchunlei
2025-04-03 16:36:54 +08:00
parent 49351eb1f8
commit 630bdbb1ab
2 changed files with 12 additions and 6 deletions

View File

@@ -350,7 +350,7 @@ public class ClassEntityServiceImpl extends ServiceImpl<ClassEntityDao, ClassEnt
if(lock) {
try {
List<UserCertificate> userCertificateList = userCertificateDao.selectList(new LambdaQueryWrapper<UserCertificate>()
.orderByDesc(UserCertificate::getId));
.orderByDesc(UserCertificate::getCreateTime));
String res = "";
if (userCertificateList.size() > 0){
UserCertificate u0 = userCertificateList.get(0);

View File

@@ -2,7 +2,9 @@ package com.peanut.modules.master.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.common.entity.MyUserEntity;
import com.peanut.modules.common.entity.UserCertificate;
import com.peanut.modules.common.entity.UserCertificateLabel;
import com.peanut.modules.common.service.MyUserService;
@@ -42,10 +44,14 @@ public class UserCertificateController {
//标签下证书列表
@RequestMapping("/userCertificateListByLabel")
public R userCertificateListByLabel(@RequestBody Map<String,Object> params) {
MPJLambdaWrapper<UserCertificate> wrapper = new MPJLambdaWrapper();
wrapper.leftJoin(MyUserEntity.class,MyUserEntity::getId,UserCertificate::getUserId);
wrapper.selectAll(UserCertificate.class);
wrapper.eq(UserCertificate::getLabelId,params.get("labelId"));
wrapper.like(MyUserEntity::getTel,params.get("tel"));
wrapper.like(UserCertificate::getTitle,params.get("title"));
Page<UserCertificate> certificatePage = userCertificateService.page(new Page<>(
Long.parseLong(params.get("current").toString()),
Long.parseLong(params.get("limit").toString())),new LambdaQueryWrapper<UserCertificate>()
.eq(UserCertificate::getLabelId,params.get("labelId")));
Long.parseLong(params.get("current").toString()),Long.parseLong(params.get("limit").toString())),wrapper);
for (UserCertificate certificate:certificatePage.getRecords()){
certificate.setUser(myUserService.getById(certificate.getUserId()));
}
@@ -56,7 +62,7 @@ public class UserCertificateController {
@RequestMapping("/saveUserCertificateLabel")
public R saveUserCertificate(@RequestBody UserCertificateLabel label) {
userCertificateLabelService.save(label);
return R.ok();
return R.ok().put("labelId",label.getId());
}
//修改标签
@@ -78,7 +84,7 @@ public class UserCertificateController {
}
}
userCertificateLabelService.updateById(label);
return R.ok();
return R.ok().put("labelId",label.getId());
}
//删除标签