企业资质审核代码更新备份

cert
1178634255 2 years ago
parent aa4fcfea24
commit e9887c2cb7

@ -93,7 +93,19 @@ public class SupCertController {
pageSimpleResponse.setList(userCertEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@GetMapping("sup/company/cert/filterZcList")
public BaseResponse filterZcCert(certRequest certRequest , BindingResult bindingResult){
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<UserCertEntity> userCertEntities = userCertService.selectByzcId(certRequest);
PageInfo<UserCertEntity> pageInfo;
pageInfo = new PageInfo<>(userCertEntities);
PageSimpleResponse<UserCertEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(userCertEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@GetMapping("/sup/company/cert/filter")
public BaseResponse filterUserCompanyCert(FilterSupCertRequest filterSupCertRequest,

@ -16,7 +16,7 @@ public interface SupCertDao extends BaseMapperPlus<SupCertDao, SupCertEntity, Su
List<SupCertEntity> filterCompanyCert(FilterSupCertRequest filterSupCertRequest);
List<SupCertEntity> filterUserCompanyCert(FilterSupCertRequest filterSupCertRequest);
SupCertEntity findCompanyCertByName(String name);
List<SupCertEntity> getCompanyCert(FilterSupCertRequest filterSupCertRequest);

@ -16,4 +16,5 @@ public interface UserCertMapper extends BaseMapper<UserCertEntity> {
List<UserCertEntity> selectByRegisterId(@Param("registerId") String registerId);
List<UserCertEntity> filterCompanyCert(certRequest certRequest);
List<UserCertEntity> filterZcCert(certRequest certRequest);
}

@ -8,6 +8,7 @@ import lombok.Data;
public class FilterSupCertRequest extends ListPageRequest {
private String code;
private String businessId;
private String customerId;
private String name;
private String manufacturerIdFk;

@ -13,6 +13,7 @@ import java.util.List;
public interface SupCertService extends IService<SupCertEntity> {
List<SupCertEntity> filterCompanyCert(FilterSupCertRequest filterSupCertRequest);
List<SupCertEntity> filterUserCompanyCert(FilterSupCertRequest filterSupCertRequest);
SupCertEntity findCompanyCertByName(String name);

@ -34,6 +34,18 @@ public class SupCertServiceImpl extends ServiceImpl<SupCertDao, SupCertEntity> i
}
return supCertDao.filterCompanyCert(filterSupCertRequest);
}
@Override
public List<SupCertEntity> filterUserCompanyCert(FilterSupCertRequest filterSupCertRequest) {
if (filterSupCertRequest == null) {
return Collections.emptyList();
}
if (filterSupCertRequest.getPage() != null) {
int offset = (filterSupCertRequest.getPage() - 1) * filterSupCertRequest.getLimit();
PageHelper.offsetPage(offset, filterSupCertRequest.getLimit());
}
return supCertDao.filterUserCompanyCert(filterSupCertRequest);
}
@Override
public List<SupCertEntity> selectCompanyCert(FilterSupCertRequest filterSupCertRequest) {

@ -11,6 +11,7 @@ public interface UserCertService extends IService<UserCertEntity>{
List<UserCertEntity> selectByRegisterId(String registerId);
List<UserCertEntity> selectBybId(certRequest certRequest);
List<UserCertEntity> selectByzcId(certRequest certRequest);
boolean insertCert(UserCertEntity userCert);

@ -24,6 +24,18 @@ public class UserCertServiceImpl extends ServiceImpl<UserCertMapper, UserCertEnt
return userCertDao.selectByRegisterId(registerId);
}
@Override
public List<UserCertEntity> selectByzcId(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 userCertDao.filterZcCert(certRequest);
}
@Override
public List<UserCertEntity> selectBybId(certRequest certRequest) {

@ -36,6 +36,18 @@
ORDER BY id DESC
</select>
<select id="filterUserCompanyCert" parameterType="com.glxp.api.req.purchase.FilterSupCertRequest"
resultType="com.glxp.api.entity.purchase.SupCertEntity">
select * from user_cert
<where>
<if test="businessId != '' and businessId!=null">
and businessId = #{businessId}
</if>
</where>
ORDER BY id DESC
</select>
<select id="selectCompanyCert" parameterType="com.glxp.api.req.purchase.FilterSupCertRequest"
resultType="com.glxp.api.entity.purchase.SupCertEntity">
SELECT * FROM sup_cert

@ -7,7 +7,7 @@
<select id="findCompany" parameterType="java.lang.String"
resultType="com.glxp.api.entity.purchase.SupCompanyEntity">
SELECT *
FROM sup_company
FROM user_company
where customerId = #{CustomerId}
</select>
@ -164,7 +164,7 @@
<update id="modifyCompany" parameterType="com.glxp.api.entity.purchase.SupCompanyEntity">
UPDATE sup_company
UPDATE user_company
<trim prefix="set" suffixOverrides=",">
<if test="companyName != null">companyName=#{companyName},</if>
<if test="bussinessStatus != null">bussinessStatus=#{bussinessStatus},</if>

@ -63,4 +63,16 @@
</where>
ORDER BY id DESC
</select>
<select id="filterZcCert" parameterType="com.glxp.api.req.purchase.FilterSupCertRequest"
resultType="com.glxp.api.entity.sup.UserCertEntity">
select * from user_cert
<where>
<if test="businessId != '' and businessId!=null">
and businessId = #{businessId}
</if>
</where>
ORDER BY id DESC
</select>
</mapper>

Loading…
Cancel
Save