Quellcode durchsuchen

修改C端页面是否显示业务菜单

liangbo.huang vor 2 Monaten
Ursprung
Commit
6aded20f01

+ 6 - 6
trade-client/src/main/java/com/trade/client/enterprise/dto/EnterpriseStatusDto.java

@@ -6,9 +6,9 @@ public class EnterpriseStatusDto {
      */
     private String certificationStatus;
     /**
-     * 是否提交说明
+     * 是否显示所有功能菜单
      */
-    private String submitHint;
+    private Boolean showAllFunctions;
 
     public String getCertificationStatus() {
         return certificationStatus;
@@ -18,11 +18,11 @@ public class EnterpriseStatusDto {
         this.certificationStatus = certificationStatus;
     }
 
-    public String getSubmitHint() {
-        return submitHint;
+    public Boolean getShowAllFunctions() {
+        return showAllFunctions;
     }
 
-    public void setSubmitHint(String submitHint) {
-        this.submitHint = submitHint;
+    public void setShowAllFunctions(Boolean showAllFunctions) {
+        this.showAllFunctions = showAllFunctions;
     }
 }

+ 7 - 10
trade-client/src/main/java/com/trade/client/enterprise/service/impl/EnterpriseServiceImpl.java

@@ -68,19 +68,16 @@ public class EnterpriseServiceImpl implements EnterpriseService {
     @Override
     public EnterpriseStatusDto queryCertificationStatus() {
         EnterpriseStatusDto enterpriseStatusDto = new EnterpriseStatusDto();
+        enterpriseStatusDto.setCertificationStatus(DictConstants.CERTIFICATION_STATUS_UNSUBMITTED);
+        enterpriseStatusDto.setShowAllFunctions(Boolean.FALSE);
         Long customerUserId = UserUtils.getCustomerUserId();
-        Enterprise enterprise = enterpriseBaseService.getEnterpriseByCustomerId(customerUserId);
-        if (enterprise != null) {
-            enterpriseStatusDto.setCertificationStatus(enterprise.getCertificationStatus());
-        }
         EnterpriseChangeRecord record = enterpriseChangeRecordBaseService.getLatestRecord(customerUserId, null);
-        if (record != null && DictConstants.CERTIFICATION_STATUS_UNSUBMITTED.equals(record.getCertificationStatus())) {
-            if (enterprise == null) {
-                enterpriseStatusDto.setSubmitHint("未提交");
-            } else {
-                enterpriseStatusDto.setSubmitHint("资料更新未提交");
-            }
+        if (record != null) {
+            enterpriseStatusDto.setCertificationStatus(record.getCertificationStatus());
         }
+        Enterprise enterprise = enterpriseBaseService.getEnterpriseByCustomerId(customerUserId);
+        enterpriseStatusDto.setShowAllFunctions(enterprise != null
+                && DictConstants.CERTIFICATION_STATUS_PASSED.equals(enterprise.getCertificationStatus()));
         return enterpriseStatusDto;
     }