Browse Source

处理相同的修改

anderx 4 years ago
parent
commit
0b47f4d39c

+ 13 - 6
.idea/workspace.xml

@@ -10,10 +10,9 @@
     <option name="autoReloadType" value="SELECTIVE" />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="03bdfc55-71bf-4741-8c4c-e1a0c2a3c3ba" name="Default Changelist" comment="sql查询优化">
+    <list default="true" id="03bdfc55-71bf-4741-8c4c-e1a0c2a3c3ba" name="Default Changelist" comment="config整理">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/resources/props/config_local.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/props/config_local.properties" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/resources/props/config_test.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/props/config_test.properties" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java" afterDir="false" />
     </list>
     <list id="571ad643-3e7d-4437-aedf-999fc56d0449" name="updateBusinessScope" comment="" />
     <option name="SHOW_DIALOG" value="false" />
@@ -237,7 +236,7 @@
       <workItem from="1630888067668" duration="852000" />
       <workItem from="1630893291690" duration="11740000" />
       <workItem from="1630976664603" duration="14614000" />
-      <workItem from="1631062478856" duration="10617000" />
+      <workItem from="1631062478856" duration="13605000" />
     </task>
     <task id="LOCAL-00001" summary="修改客户跟进列表">
       <created>1630486551669</created>
@@ -421,7 +420,14 @@
       <option name="project" value="LOCAL" />
       <updated>1631081049069</updated>
     </task>
-    <option name="localTasksCounter" value="27" />
+    <task id="LOCAL-00027" summary="config整理">
+      <created>1631081269129</created>
+      <option name="number" value="00027" />
+      <option name="presentableId" value="LOCAL-00027" />
+      <option name="project" value="LOCAL" />
+      <updated>1631081269129</updated>
+    </task>
+    <option name="localTasksCounter" value="28" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -463,7 +469,8 @@
     <MESSAGE value="1、发送邮件BUG修复&#10;2、部门列表新增后未显示BUG修复&#10;3、新增转交客户时转交资料" />
     <MESSAGE value="1、资料列表修改" />
     <MESSAGE value="sql查询优化" />
-    <option name="LAST_COMMIT_MESSAGE" value="sql查询优化" />
+    <MESSAGE value="config整理" />
+    <option name="LAST_COMMIT_MESSAGE" value="config整理" />
     <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
   </component>
   <component name="XDebuggerManager">

+ 8 - 5
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -2281,11 +2281,14 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public int updateuserBusinessScope(String id, String businessScope) {
 		Date date =new Date();
 		OrganizationIdentity use=organizationIdentityMapper.selectByPrimaryKey(id);
-		updateBusinessScope(use.getUid(),businessScope,use.getBusinessScope(),date);
-		OrganizationIdentity oi=new OrganizationIdentity();
-		oi.setId(id);
-		oi.setBusinessScope(businessScope);
-		return organizationIdentityMapper.updateByPrimaryKeySelective(oi);
+		if(!businessScope.equals(use.getBusinessScope())){
+			updateBusinessScope(use.getUid(),businessScope,use.getBusinessScope(),date);
+			OrganizationIdentity oi=new OrganizationIdentity();
+			oi.setId(id);
+			oi.setBusinessScope(businessScope);
+			return organizationIdentityMapper.updateByPrimaryKeySelective(oi);
+		}
+		return 0;
 	}
 
 	@Override