证书列表
This commit is contained in:
@@ -11,6 +11,7 @@ import com.peanut.modules.common.service.MyUserService;
|
||||
import com.peanut.modules.common.service.UserCertificateLabelService;
|
||||
import com.peanut.modules.common.service.UserCertificateService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -41,15 +42,24 @@ public class UserCertificateController {
|
||||
return R.ok().put("labelList", labelList);
|
||||
}
|
||||
|
||||
//标签下证书列表
|
||||
@RequestMapping("/userCertificateListByLabel")
|
||||
public R userCertificateListByLabel(@RequestBody Map<String,Object> params) {
|
||||
//证书列表
|
||||
@RequestMapping("/userCertificateList")
|
||||
public R userCertificateList(@RequestBody Map<String,Object> params) {
|
||||
MPJLambdaWrapper<UserCertificate> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.leftJoin(MyUserEntity.class,MyUserEntity::getId,UserCertificate::getUserId);
|
||||
wrapper.selectAll(UserCertificate.class);
|
||||
if (params.containsKey("labelId")&&StringUtils.isNotBlank(params.get("labelId").toString())) {
|
||||
wrapper.eq(UserCertificate::getLabelId,params.get("labelId"));
|
||||
}
|
||||
if (params.containsKey("userId")&&StringUtils.isNotBlank(params.get("userId").toString())) {
|
||||
wrapper.eq(MyUserEntity::getId,params.get("userId"));
|
||||
}
|
||||
if (params.containsKey("tel")&&StringUtils.isNotBlank(params.get("tel").toString())) {
|
||||
wrapper.like(MyUserEntity::getTel,params.get("tel"));
|
||||
}
|
||||
if (params.containsKey("title")&&StringUtils.isNotBlank(params.get("title").toString())) {
|
||||
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())),wrapper);
|
||||
for (UserCertificate certificate:certificatePage.getRecords()){
|
||||
|
||||
Reference in New Issue
Block a user