Browse Source

企业认证代码修改 ,目前可以了。

xuxuan 5 năm trước cách đây
mục cha
commit
a5a17d7204

+ 5 - 17
core/src/main/java/com/mooctest/crowd/domain/domainobject/EnterpriseAuthentication.java

@@ -14,6 +14,7 @@ import java.sql.Timestamp;
 @Data
 public class EnterpriseAuthentication {
     private  String isDaOrEa;//是研发机构还是评测机构
+    private  String   enterpriseName;
     private Long id;
     private Long userId;
     private String IDCardNum;//身份证号码
@@ -21,8 +22,9 @@ public class EnterpriseAuthentication {
     private String businessLicensePhoto;
     private String unifiedSocialCreditCode;
     private String sex;//2.0新加性别
-    private String IDcardPositivePhoto;//身份证正面照
-    private String IDCardBackPhoto;//身份证反面照
+    private String idCardPositivePhoto;//身份证正面照
+    private String idCardBackPhoto;//身份证反面照
+    private String address;
     private int isDeleted;
     private int isAuthentication;
     private String explain;
@@ -30,21 +32,7 @@ public class EnterpriseAuthentication {
     private Timestamp checkTime;
     private Timestamp IDCardDeadTime;//身份证过期时间
 
-    @Override
-    public String toString() {
-        return "CompanyAuth{" +
-                "id=" + id +
-                ", userId=" + userId +
-                ", legalPersonName='" + legalPersonName + '\'' +
-                ", businessLicensePhoto='" + businessLicensePhoto + '\'' +
-                ", unifiedSocialCreditCode='" + unifiedSocialCreditCode + '\'' +
-                ", isDeleted=" + isDeleted +
-                ", isAuthentication=" + isAuthentication +
-                ", explain=" + explain +
-                ", applyTime='" + applyTime + '\'' +
-                ", checkTime='" + checkTime + '\'' +
-                '}';
-    }
+
 
     public EnterpriseAuthentication getByPo(EnterpriseAuthenticationPO enterpriseAuthenticationPO) {
         this.applyTime = enterpriseAuthenticationPO.getApplyTime();

+ 2 - 2
core/src/main/java/com/mooctest/crowd/domain/model/EnterpriseAuthenticationPO.java

@@ -57,8 +57,8 @@ public class EnterpriseAuthenticationPO {
 
 
     @Column(name = "DA_ID_CARD_BACK_PHOTO")
-    private String IDCardBackPhoto;
+    private String idCardBackPhoto;
     @Column(name = "DA_ID_CARD_POS_PHOTO")
-    private String IDcardPositivePhoto;
+    private String idCardPositivePhoto;
 
 }

+ 12 - 2
core/src/main/java/com/mooctest/crowd/domain/repository/UserRepo.java

@@ -274,10 +274,20 @@ public class UserRepo implements IUserRepo {
         /*企业认证保存企业信息*/
         if(user.getEnterpriseAuthentication() != null){
             if(user.getEnterpriseAuthentication().getIsDaOrEa().equals("研发机构")){
-            enterpriseAuthenticationDao.save(Converter.convert(EnterpriseAuthenticationPO.class, user.getEnterpriseAuthentication()));
+                System.out.println("认证消息为==========="+user.getPersonalAuthentication());
+                EnterpriseAuthenticationPO authenticationPO = Converter.convert(EnterpriseAuthenticationPO.class, user.getEnterpriseAuthentication());
+                System.out.println("认证消息为PO==========="+authenticationPO);
+            enterpriseAuthenticationDao.save(authenticationPO);
         }
+
+
             else if(user.getEnterpriseAuthentication().getIsDaOrEa().equals("评测机构")){
-                agencyDao.save(Converter.convert(EvaluationAgencyPO.class,user.getEnterpriseAuthentication()));
+                EvaluationAgencyPO evaluationAgencyPO=new EvaluationAgencyPO();
+                 evaluationAgencyPO.setUserId(user.getId());
+                 evaluationAgencyPO.setAddress(user.getEnterpriseAuthentication().getAddress());
+                 evaluationAgencyPO.setEvaluationAgencyName(user.getEnterpriseAuthentication().getEnterpriseName());
+                 evaluationAgencyPO.setUpdateTime(new Timestamp(System.currentTimeMillis()));
+                agencyDao.save(evaluationAgencyPO);
             }
 
 

+ 1 - 0
site/src/main/java/com/mooctest/crowd/site/command/ApplyEnterpriseAuthCommand.java

@@ -42,6 +42,7 @@ public class ApplyEnterpriseAuthCommand {
         EnterpriseAuthentication enterpriseAuthentication = new EnterpriseAuthentication();
         BeanUtils.copyProperties(this, enterpriseAuthentication);
         enterpriseAuthentication.setApplyTime(new Timestamp(System.currentTimeMillis()));
+        System.out.println(enterpriseAuthentication + "哈哈哈哈哈哈");
         return enterpriseAuthentication;
     }
 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/service/impl/UserServiceImpl.java


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác