Parcourir la source

20211123后端更新代码_1

mashengyi il y a 3 ans
Parent
commit
d40e9ec006

+ 17 - 0
src/main/java/com/jkcredit/invoice/model/entity/customer/CustomerRec.java

@@ -144,6 +144,11 @@ public class CustomerRec {
      */
     private String contrantNum;
 
+    /**
+     *  企业注册失败原因
+     */
+    private String fileMessage;
+
     public Long getId() {
         return id;
     }
@@ -376,6 +381,15 @@ public class CustomerRec {
         this.serviceEndTimeEnd = serviceEndTimeEnd;
     }
 
+
+    public String getFileMessage() {
+        return fileMessage;
+    }
+
+    public void setFileMessage(String fileMessage) {
+        this.fileMessage = fileMessage;
+    }
+
     @Override
     public String toString() {
         return "CustomerRec{" +
@@ -399,6 +413,8 @@ public class CustomerRec {
                 ", bussinessType='" + bussinessType + '\'' +
                 ", serviceStartTime='" + serviceStartTime + '\'' +
                 ", serviceEndTime='" + serviceEndTime + '\'' +
+                ", serviceEndTimeStart='" + serviceEndTimeStart + '\'' +
+                ", serviceEndTimeEnd='" + serviceEndTimeEnd + '\'' +
                 ", serviceType=" + serviceType +
                 ", contractFileName='" + contractFileName + '\'' +
                 ", base64Str='" + base64Str + '\'' +
@@ -406,6 +422,7 @@ public class CustomerRec {
                 ", lowerFileName='" + lowerFileName + '\'' +
                 ", contractSuc=" + contractSuc +
                 ", contrantNum='" + contrantNum + '\'' +
+                ", fileMessage='" + fileMessage + '\'' +
                 '}';
     }
 }

+ 2 - 1
src/main/java/com/jkcredit/invoice/service/customer/impl/CustomerServiceImpl.java

@@ -125,7 +125,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper,Customer> im
     public RespR customeRec(CustomerRec customerRec){
         log.info("开始客户注册:CustomerServiceImpl.customeRec{}",customerRec);
         CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyReference(customerRec);
-        if(customerRec1.getRecStatus() == 1){
+        if(null != customerRec1){
             return new RespR(false,"客户已经备案成功,无需备案");
         }
         customerRecMapper.updateByPrimaryKeySelective(customerRec);
@@ -148,6 +148,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper,Customer> im
         if(respR.getCode() == 1){
             log.info("客户上游注册失败:CustomerServiceImpl.customeRec{},msg{}",customerRec,respR.getMsg());
             customerRec.setRecStatus(2);
+            customerRec.setFileMessage(respR.getMsg());
             customerRecMapper.updateByPrimaryKeySelective(customerRec);
             return new RespR(false,respR.getMsg());
         }

+ 4 - 1
src/main/resources/mapper/customer/CustomerRecMapper.xml

@@ -34,7 +34,7 @@
     id, customerName,company_leader, company_leader_Phone, company_name, company_referenceNum, company_openbank,
     company_openbank_acc, company_adress, company_phone, createTime, company_belong_name, 
     rec_status, inter_type,bussiness_type,company_type,operating_rangeType,company_num,service_startTime
-    ,service_endTime,service_type,contractFileName,contractSuc,contrantNum,lowerFileName
+    ,service_endTime,service_type,contractFileName,contractSuc,contrantNum,lowerFileName,fileMessage
   </sql>
 
   <select id="selectAllByPage" resultMap="BaseResultMap">
@@ -333,6 +333,9 @@
       <if test="lowerBase64Str != null" >
         lowerBase64Str = #{lowerBase64Str,jdbcType=VARCHAR},
       </if>
+      <if test="fileMessage != null" >
+        fileMessage = #{fileMessage,jdbcType=VARCHAR},
+      </if>
     </set>
     where company_name = #{companyName,jdbcType=VARCHAR} and  bussiness_type = #{bussinessType,jdbcType=INTEGER} and company_referenceNum = #{companyReferencenum,jdbcType=VARCHAR}
   </update>