Forráskód Böngészése

用户档案新增与修改

anderx 1 éve%!(EXTRA string=óta)
szülő
commit
31950ebe9f

+ 12 - 12
src/main/java/com/goafanti/common/model/UserArchives.java

@@ -74,8 +74,8 @@ public class UserArchives implements Serializable {
         this.uid = uid;
     }
 
-    public Integer patentCount() {
-        if (patentCount == null) return 0;
+    public Integer getPatentCount() {
+        if (patentCount == null)return 0;
         return patentCount;
     }
 
@@ -83,8 +83,8 @@ public class UserArchives implements Serializable {
         this.patentCount = patentCount;
     }
 
-    public Integer inventionPatentCount() {
-        if (inventionPatentCount == null) return 0;
+    public Integer getInventionPatentCount() {
+        if (inventionPatentCount == null)return 0;
         return inventionPatentCount;
     }
 
@@ -92,8 +92,8 @@ public class UserArchives implements Serializable {
         this.inventionPatentCount = inventionPatentCount;
     }
 
-    public Integer utilityModelCount() {
-        if (utilityModelCount == null) return 0;
+    public Integer getUtilityModelCount() {
+        if (utilityModelCount == null)return 0;
         return utilityModelCount;
     }
 
@@ -101,8 +101,8 @@ public class UserArchives implements Serializable {
         this.utilityModelCount = utilityModelCount;
     }
 
-    public Integer appearancePatentCount() {
-        if (appearancePatentCount == null) return 0;
+    public Integer getAppearancePatentCount() {
+        if (appearancePatentCount == null)return 0;
         return appearancePatentCount;
     }
 
@@ -110,8 +110,8 @@ public class UserArchives implements Serializable {
         this.appearancePatentCount = appearancePatentCount;
     }
 
-    public Integer softwareWorksCount() {
-        if (softwareWorksCount == null) return 0;
+    public Integer getSoftwareWorksCount() {
+        if (softwareWorksCount == null)return 0;
         return softwareWorksCount;
     }
 
@@ -119,8 +119,8 @@ public class UserArchives implements Serializable {
         this.softwareWorksCount = softwareWorksCount;
     }
 
-    public Integer otherCount() {
-        if (otherCount == null) return 0;
+    public Integer getOtherCount() {
+        if (otherCount == null)return 0;
         return otherCount;
     }
 

+ 7 - 0
src/main/java/com/goafanti/customer/service/impl/UserArchivesServiceImpl.java

@@ -77,6 +77,13 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
      */
     @Override
     public UserArchives insert(UserArchives userArchives) {
+        int count = 0;
+        count+=userArchives.getAppearancePatentCount();
+        count+=userArchives.getInventionPatentCount();
+        count+=userArchives.getUtilityModelCount();
+        count+=userArchives.getSoftwareWorksCount();
+        count+=userArchives.getOtherCount();
+        userArchives.setPatentCount(count);
         this.userArchivesMapper.insert(userArchives);
         return userArchives;
     }