Authored by caoyan

营业执照

... ... @@ -4,6 +4,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -39,6 +40,12 @@ public class BusinessLicenseController {
@RequestParam(value = "license_copy_image", required = true) String licenseCopyImage,
@RequestParam(value = "cert_face_image", required = true) String certFaceImage,
@RequestParam(value = "cert_reverse_image", required = true) String certReverseImage) {
if(StringUtils.isEmpty(businessName) || StringUtils.isEmpty(socialCreditCode) || StringUtils.isEmpty(certName) || StringUtils.isEmpty(certNo)
|| StringUtils.isEmpty(startTime) || StringUtils.isEmpty(expireTime) || StringUtils.isEmpty(licenseOriginalImage)
|| StringUtils.isEmpty(licenseCopyImage) || StringUtils.isEmpty(certFaceImage) || StringUtils.isEmpty(certReverseImage)
|| null == uid || null == businessType) {
return new ApiResponse.ApiResponseBuilder().code(500).message("有参数为空").build();
}
BusinessLicense bl = new BusinessLicense();
bl.setUid(uid);
bl.setBusinessType(businessType);
... ...
... ... @@ -2,6 +2,7 @@ package com.yohoufo.order.service.impl;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -25,6 +26,15 @@ public class BusinessLicenseServiceImpl implements IBusinessLicenseService {
@Override
public int save(BusinessLicense bl) {
//查询是否存在
List<BusinessLicense> dbList = businessLicenseMapper.selectByUid(bl.getUid());
if(CollectionUtils.isNotEmpty(dbList)) {
for(BusinessLicense item : dbList) {
if(item.getAuditStatus().intValue() != 2) {//不是审核不通过的记录,待审核或审核通过
return 0;
}
}
}
return businessLicenseMapper.insert(bl);
}
... ...