Explorar o código

用户档案新增与修改

anderx hai 1 ano
pai
achega
4c4a3ef1f1

+ 1 - 1
src/main/java/com/goafanti/customer/controller/UserArchivesController.java

@@ -52,7 +52,7 @@ public class UserArchivesController {
 
 
     /**
-     * 编辑数据
+     * 编辑用户档案数据
      *
      * @param userArchives 实体
      * @return 编辑结果

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

@@ -101,6 +101,13 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
      */
     @Override
     public UserArchives update(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.update(userArchives);
         return this.queryById(userArchives.getId());
     }