代码备份

cert
1178634255 2 years ago
parent 2fcae8d05f
commit 6fc18f6a92

@ -79,19 +79,19 @@ public class SupCertController {
@Resource
private SystemPDFModuleService systemPDFModuleService;
// @GetMapping("/sup/company/cert/filterList")
// public BaseResponse filterCompanyCert(certRequest certRequest, BindingResult bindingResult) {
// if (bindingResult.hasErrors()) {
// return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
// }
// List<UserCertEntity> userCertEntities = supCertService.selectBybId(certRequest);
// PageInfo<UserCertEntity> pageInfo;
// pageInfo = new PageInfo<>(userCertEntities);
// PageSimpleResponse<UserCertEntity> pageSimpleResponse = new PageSimpleResponse<>();
// pageSimpleResponse.setTotal(pageInfo.getTotal());
// pageSimpleResponse.setList(userCertEntities);
// return ResultVOUtils.success(pageSimpleResponse);
// }
@GetMapping("/sup/company/cert/filterList")
public BaseResponse filterCompanyCert(certRequest certRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<SupCertEntity> supCertEntities = supCertService.selectBybId(certRequest);
PageInfo<SupCertEntity> pageInfo;
pageInfo = new PageInfo<>(supCertEntities);
PageSimpleResponse<SupCertEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(supCertEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")

@ -311,19 +311,20 @@ public class UserRegisterController extends BaseController {
userCheckEntity.setResultExplain(registComPerResponse.getReason());
}
userCheckEntity.setCreateTime(new Date());
UserCompanyEntity company = userCompanyService.getById(registComPerResponse.getUcId());
userRegisterEntity.setId(Long.valueOf(registComPerResponse.getId()));
userRegisterEntity.setCheckStatus(registComPerResponse.getCheckStatus());
userCompanyEntity.setId(Long.valueOf(registComPerResponse.getUcId()));
userCompanyEntity.setCustomerId(registComPerResponse.getUcId());
userCompanyEntity.setCheckStatus(registComPerResponse.getCheckStatus());
userCompanyEntity.setReason(registComPerResponse.getReason());
userCompanyEntity.setAuditStatus(Integer.valueOf(company.getCheckStatus()));
String queueName = "fanout_" + userCompanyEntity.getId() + "";
rabbitQueueService.createQueue(queueName);
userRegisterService.updateById(userRegisterEntity);
userCompanyService.updateById(userCompanyEntity);
userCheckService.insert(userCheckEntity);
UserCompanyEntity company = userCompanyService.getById(registComPerResponse.getUcId());
supCompanyEntity.setCustomerId(String.valueOf(company.getId()));
supCompanyEntity.setCompanyName(company.getCompanyName());
supCompanyEntity.setAuditStatus(Integer.valueOf(userCompanyEntity.getCheckStatus()));

@ -4,7 +4,9 @@ package com.glxp.api.dao.purchase;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.entity.sup.UserCertEntity;
import com.glxp.api.req.purchase.FilterSupCertRequest;
import com.glxp.api.req.purchase.certRequest;
import com.glxp.api.req.purchase.purPlanPrintRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -13,7 +15,7 @@ import java.util.List;
@Mapper
public interface SupCertDao extends BaseMapperPlus<SupCertDao, SupCertEntity, SupCertEntity> {
List<SupCertEntity> filterCert(certRequest certRequest);
List<SupCertEntity> filterCompanyCert(FilterSupCertRequest filterSupCertRequest);
List<SupCertEntity> filterUserCompanyCert(FilterSupCertRequest filterSupCertRequest);

@ -5,13 +5,15 @@ package com.glxp.api.service.purchase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.entity.sup.UserCertEntity;
import com.glxp.api.req.purchase.FilterSupCertRequest;
import com.glxp.api.req.purchase.certRequest;
import com.glxp.api.req.purchase.purPlanPrintRequest;
import java.util.List;
public interface SupCertService extends IService<SupCertEntity> {
List<SupCertEntity> selectBybId(certRequest certRequest);
List<SupCertEntity> filterCompanyCert(FilterSupCertRequest filterSupCertRequest);
List<SupCertEntity> filterUserCompanyCert(FilterSupCertRequest filterSupCertRequest);

@ -6,7 +6,9 @@ import com.github.pagehelper.PageHelper;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.dao.purchase.SupCertDao;
import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.entity.sup.UserCertEntity;
import com.glxp.api.req.purchase.FilterSupCertRequest;
import com.glxp.api.req.purchase.certRequest;
import com.glxp.api.req.purchase.purPlanPrintRequest;
import com.glxp.api.service.purchase.SupCertService;
import org.springframework.stereotype.Service;
@ -22,7 +24,18 @@ public class SupCertServiceImpl extends ServiceImpl<SupCertDao, SupCertEntity> i
@Resource
SupCertDao supCertDao;
@Override
public List<SupCertEntity> selectBybId(certRequest certRequest) {
if (certRequest == null) {
return Collections.emptyList();
}
if (certRequest.getPage() != null) {
int offset = (certRequest.getPage() - 1) * certRequest.getLimit();
PageHelper.offsetPage(offset, certRequest.getLimit());
}
return supCertDao.filterCert(certRequest);
}
@Override
public List<SupCertEntity> filterCompanyCert(FilterSupCertRequest filterSupCertRequest) {
if (filterSupCertRequest == null) {

@ -2,10 +2,44 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.purchase.SupCertDao">
<select id="filterCert" parameterType="com.glxp.api.req.purchase.FilterSupCertRequest"
resultType="com.glxp.api.entity.purchase.SupCertEntity">
select * from sup_cert
<where>
<if test="businessId != '' and businessId!=null">
and businessId = #{businessId}
</if>
<if test="customerId != '' and customerId!=null">
and customerId = #{customerId}
</if>
<if test="manufacturerIdFk != '' and manufacturerIdFk!=null">
and manufacturerIdFk = #{manufacturerIdFk}
</if>
<if test="productIdFk != '' and productIdFk!=null">
and productIdFk = #{productIdFk}
</if>
<if test="type != '' and type!=null">
and `type` = #{type}
</if>
<if test="auditStatus != null and auditStatus !=20 and auditStatus !=24 and auditStatus !=25" >
and auditStatus = #{auditStatus}
</if>
<if test="auditStatus ==20">
and (auditStatus = 1 or auditStatus=4)
</if>
<if test="auditStatus ==24">
and (auditStatus = 2 or auditStatus=3 or auditStatus=5 or auditStatus=6)
</if>
<if test="auditStatus ==25">
and (auditStatus !=0)
</if>
</where>
ORDER BY id DESC
</select>
<select id="filterCompanyCert" parameterType="com.glxp.api.req.purchase.FilterSupCertRequest"
resultType="com.glxp.api.entity.purchase.SupCertEntity">
select * from user_cert
select * from sup_cert
<where>
<if test="customerId != '' and customerId!=null">
and customerId = #{customerId}

@ -33,7 +33,7 @@
</select>
<select id="filterCompanyCert" parameterType="com.glxp.api.req.purchase.FilterSupCertRequest"
resultType="com.glxp.api.entity.sup.UserCertEntity">
select * from sup_cert
select * from user_cert
<where>
<if test="businessId != '' and businessId!=null">
and businessId = #{businessId}

Loading…
Cancel
Save