Просмотр исходного кода

1、修改修改客户信息接口
2、开发客户资料列表
3、开发客户资料日志列表

anderx лет назад: 4
Родитель
Сommit
aaad40896a

+ 1 - 0
.gitignore

@@ -7,3 +7,4 @@
 /build/
 /src/main/resources/generatorConfig.xml
 /.gitignore
+/.idea

+ 14 - 0
.idea/artifacts/kede_server_war.xml

@@ -0,0 +1,14 @@
+<component name="ArtifactManager">
+  <artifact type="war" name="kede-server:war">
+    <output-path>$PROJECT_DIR$/target</output-path>
+    <properties id="maven-jee-properties">
+      <options>
+        <module>kede-server</module>
+        <packaging>war</packaging>
+      </options>
+    </properties>
+    <root id="archive" name="local.war">
+      <element id="artifact" artifact-name="kede-server:war exploded" />
+    </root>
+  </artifact>
+</component>

+ 1 - 0
.idea/compiler.xml

@@ -6,6 +6,7 @@
         <sourceOutputDir name="target/generated-sources/annotations" />
         <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
         <outputRelativeToContentRoot value="true" />
+        <module name="kede-server" />
       </profile>
     </annotationProcessing>
     <bytecodeTargetLevel>

+ 42 - 0
.idea/free-mybatis-generator-config.xml

@@ -26,6 +26,48 @@
             </Config>
           </value>
         </entry>
+        <entry key="user_data_log">
+          <value>
+            <Config>
+              <option name="comment" value="true" />
+              <option name="daoMvnPath" value="src/main/java" />
+              <option name="daoName" value="UserDataLogMapper" />
+              <option name="daoPackage" value="com.goafanti.common.dao" />
+              <option name="daoPostfix" value="Mapper" />
+              <option name="modelMvnPath" value="src/main/java" />
+              <option name="modelName" value="UserDataLog" />
+              <option name="modelPackage" value="com.goafanti.common.model" />
+              <option name="name" value="user_data_log" />
+              <option name="primaryKey" value="id" />
+              <option name="projectFolder" value="$PROJECT_DIR$" />
+              <option name="tableName" value="user_data_log" />
+              <option name="useSchemaPrefix" value="true" />
+              <option name="xmlMvnPath" value="src/main/java" />
+              <option name="xmlPackage" value="com.goafanti.common.mapper" />
+            </Config>
+          </value>
+        </entry>
+        <entry key="user_mid">
+          <value>
+            <Config>
+              <option name="comment" value="true" />
+              <option name="daoMvnPath" value="src/main/java" />
+              <option name="daoName" value="UserMidMapper" />
+              <option name="daoPackage" value="com.goafanti.common.dao" />
+              <option name="daoPostfix" value="Mapper" />
+              <option name="modelMvnPath" value="src/main/java" />
+              <option name="modelName" value="UserMid" />
+              <option name="modelPackage" value="com.goafanti.common.model" />
+              <option name="name" value="user_mid" />
+              <option name="primaryKey" value="id" />
+              <option name="projectFolder" value="$PROJECT_DIR$" />
+              <option name="tableName" value="user_mid" />
+              <option name="useSchemaPrefix" value="true" />
+              <option name="xmlMvnPath" value="src/main/resources" />
+              <option name="xmlPackage" value="com.goafanti.common.mapper" />
+            </Config>
+          </value>
+        </entry>
       </map>
     </option>
   </component>

+ 7 - 0
.idea/misc.xml

@@ -3,6 +3,13 @@
   <component name="FrameworkDetectionExcludesConfiguration">
     <file type="web" url="file://$PROJECT_DIR$" />
   </component>
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/target/classes" />
   </component>

+ 37 - 2
.idea/workspace.xml

@@ -10,9 +10,28 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="03bdfc55-71bf-4741-8c4c-e1a0c2a3c3ba" name="Default Changelist" comment="1、修改修改客户信息接口&#10;2、开发客户资料列表&#10;3、开发客户资料日志列表">
+      <change afterPath="$PROJECT_DIR$/.idea/artifacts/kede_server_war.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/bo/OutUserDateLogList.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/free-mybatis-generator-config.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/free-mybatis-generator-config.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/HELP.md" beforeDir="false" afterPath="$PROJECT_DIR$/HELP.md" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/kede-server.iml" beforeDir="false" afterPath="$PROJECT_DIR$/kede-server.iml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/constant/ErrorConstants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/constant/ErrorConstants.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/dao/UserDataLogMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/dao/UserDataLogMapper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/dao/UserMidMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/dao/UserMidMapper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/UserDataLogMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/UserDataLogMapper.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/UserMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/UserMapper.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/UserMidMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper/UserMidMapper.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/common/model/UserMid.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/common/model/UserMid.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/bo/OutUserMianProducts.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/bo/OutUserMianProducts.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/service/CustomerService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/goafanti/customer/service/CustomerService.java" 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" />
+      <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" />
     </list>
     <list id="571ad643-3e7d-4437-aedf-999fc56d0449" name="updateBusinessScope" comment="" />
     <option name="SHOW_DIALOG" value="false" />
@@ -66,9 +85,10 @@
     <property name="Repository.Attach.Sources" value="false" />
     <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
+    <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/src/main/java/com/goafanti/common/mapper" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
     <property name="node.js.detected.package.eslint" value="true" />
     <property name="node.js.detected.package.tslint" value="true" />
     <property name="node.js.selected.package.eslint" value="(autodetect)" />
@@ -77,6 +97,7 @@
     <property name="project.structure.proportion" value="0.15" />
     <property name="project.structure.side.proportion" value="0.2" />
     <property name="settings.editor.selected.configurable" value="preferences.keymap" />
+    <property name="two.files.diff.last.used.folder" value="$PROJECT_DIR$" />
   </component>
   <component name="RecentsManager">
     <key name="CreateClassDialog.RecentsKey">
@@ -87,6 +108,19 @@
     </key>
   </component>
   <component name="RunManager">
+    <configuration default="true" type="ArquillianTestNG" factoryName="" nameIsGenerated="true">
+      <option name="arquillianRunConfiguration">
+        <value>
+          <option name="containerStateName" value="" />
+        </value>
+      </option>
+      <option name="TEST_OBJECT" value="CLASS" />
+      <properties />
+      <listeners />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
     <configuration name="Tomcat 8.5.59" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat 8.5.59" ALTERNATIVE_JRE_ENABLED="false" nameIsGenerated="true">
       <option name="OPEN_IN_BROWSER" value="false" />
       <option name="COMMON_VM_ARGUMENTS" value="-Dprofiles.activation=&quot;local&quot; -Djdbc.worker.id=&quot;1001&quot;" />
@@ -302,7 +336,8 @@
     <MESSAGE value="修改客户跟进列表" />
     <MESSAGE value="idea" />
     <MESSAGE value="1、修改修改客户信息接口" />
-    <option name="LAST_COMMIT_MESSAGE" value="1、修改修改客户信息接口" />
+    <MESSAGE value="1、修改修改客户信息接口&#10;2、开发客户资料列表&#10;3、开发客户资料日志列表" />
+    <option name="LAST_COMMIT_MESSAGE" value="1、修改修改客户信息接口&#10;2、开发客户资料列表&#10;3、开发客户资料日志列表" />
     <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
   </component>
 </project>

+ 6 - 2
kede-server.iml

@@ -17,7 +17,11 @@
       </configuration>
     </facet>
     <facet type="Spring" name="Spring">
-      <configuration />
+      <configuration>
+        <fileset id="web aft servlet context" name="MVC aft servlet context" removed="true">
+          <file>file://$MODULE_DIR$/src/main/resources/applicationContext.xml</file>
+        </fileset>
+      </configuration>
     </facet>
   </component>
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
@@ -25,8 +29,8 @@
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
       <excludeFolder url="file://$MODULE_DIR$/target" />
     </content>
     <orderEntry type="inheritedJdk" />

+ 1 - 1
src/main/java/com/goafanti/common/constant/ErrorConstants.java

@@ -15,7 +15,7 @@ public class ErrorConstants {
 	public static final String	PARAM_ERROR							= "PARAM_ERROR";
 	/** **必须为数字*/
 	public static final String	PARAM_INTEGER_ERROR					= "PARAM_INTEGER_ERROR";
-	/** **必须指定*/
+	/** **必须指定*/
 	public static final String	PARAM_EMPTY_ERROR					= "PARAM_EMPTY_ERROR";
 	/** **已存在*/
 	public static final String	PARAM_BEING_ERROR					= "PARAM_BEING_ERROR";

+ 5 - 0
src/main/java/com/goafanti/common/dao/UserDataLogMapper.java

@@ -1,6 +1,9 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.UserDataLog;
+import com.goafanti.customer.bo.OutUserDateLogList;
+
+import java.util.List;
 
 public interface UserDataLogMapper {
     int deleteByPrimaryKey(Integer id);
@@ -14,4 +17,6 @@ public interface UserDataLogMapper {
     int updateByPrimaryKeySelective(UserDataLog record);
 
     int updateByPrimaryKey(UserDataLog record);
+
+    List<OutUserDateLogList> userDateLogList(String uid);
 }

+ 1 - 37
src/main/java/com/goafanti/common/dao/UserMidMapper.java

@@ -3,53 +3,17 @@ package com.goafanti.common.dao;
 import com.goafanti.common.model.UserMid;
 
 public interface UserMidMapper {
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_mid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     int deleteByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_mid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     int insert(UserMid record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_mid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     int insertSelective(UserMid record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_mid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     UserMid selectByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_mid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     int updateByPrimaryKeySelective(UserMid record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_mid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     int updateByPrimaryKey(UserMid record);
 
-	int updateByUid(UserMid um);
+    int updateByUid(UserMid um);
 }

+ 9 - 1
src/main/java/com/goafanti/common/mapper/UserDataLogMapper.xml

@@ -16,7 +16,8 @@
     from user_data_log
     where id = #{id,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
     delete from user_data_log
     where id = #{id,jdbcType=INTEGER}
   </delete>
@@ -73,4 +74,11 @@
       remarks = #{remarks,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
+
+  <select id="userDateLogList" resultType="com.goafanti.customer.bo.OutUserDateLogList">
+    select id,uid,remarks ,create_time ,
+    date_format(create_time ,'%Y-%m-%d %H:%i:%s')createTimes
+    from user_data_log
+    where uid= #{uid}
+  </select>
 </mapper>

+ 44 - 7
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1765,14 +1765,51 @@
     </if>
   </select>
   <select id="findMainProductsList" resultType="com.goafanti.customer.bo.OutUserMianProducts">
-    select u.id uid,u.nickname userName,oi.business_scope businessScope from (select b.buyer_id from t_order_task a left join t_order_new b
-        on a.order_no =b.order_no where a.main =1 and a.split_status in (0,1)
-        and a.task_receiver = #{aid} group by b.buyer_id)t0
-    left join `user` u left join organization_identity oi on u.id=oi.uid on t0.buyer_id =u.id where u.share_type in(0,2,3)
+    select oi.id ,u.id uid, u.nickname userName, oi.business_scope businessScope,
+    um.update_name updateName,um.update_aid updateAid,
+    date_format(u.transfer_time ,'%Y-%m-%d %H:%i:%s')transferTimes,
+    date_format(um.date_update_time,'%Y-%m-%d %H:%i:%s')dateUpdateTimes
+    from `user` u
+        <if test="shiroType==0">
+        left join (select b.buyer_id from t_order_task a left join t_order_new b
+            on a.order_no = b.order_no where a.main = 1 and a.split_status in (0, 1)
+            and a.task_receiver = #{aid} group by b.buyer_id) t0 on t0.buyer_id = u.id
+        </if>
+    left join organization_identity oi on u.id = oi.uid left join user_mid um on u.id=um.uid
+    where u.share_type in (0, 2, 3) and u.source in(1,2,3)
+      <if test="shiroType==1">
+      and u.information_maintainer = #{aid}
+      </if>
+      <if test="userName != null">
+    and u.nickname like concat('%',#{userName},'%')
+      </if>
+      <if test="key !=null">
+    and oi.business_scope like concat('%',#{key},'%')
+      </if>
+      <if test="startTime !=null and endTime !=null">
+    and u.transfer_time between #{startTime} and #{endTime}
+      </if>
   </select>
   <select id="findMainProductsCount" resultType="java.lang.Integer">
-    select count(*) from (select b.buyer_id from t_order_task a left join t_order_new b on a.order_no =b.order_no
-        where a.main =1 and a.split_status in (0,1) and a.task_receiver = #{aid} group by b.buyer_id)t0
-    left join `user` u left join organization_identity oi on u.id=oi.uid on t0.buyer_id =u.id where u.share_type in(0,2,3)
+  select count(*) from `user` u
+  <if test="shiroType==0">
+    left join (select b.buyer_id from t_order_task a left join t_order_new b
+    on a.order_no = b.order_no where a.main = 1 and a.split_status in (0, 1)
+    and a.task_receiver = #{aid} group by b.buyer_id) t0 on t0.buyer_id = u.id
+  </if>
+  left join organization_identity oi on u.id = oi.uid
+  where u.share_type in (0, 2, 3) and u.source in(1,2,3)
+  <if test="shiroType==1">
+    and u.information_maintainer = #{aid}
+  </if>
+    <if test="userName != null">
+      and u.nickname like concat('%',#{userName},'%')
+    </if>
+    <if test="key !=null">
+      and oi.business_scope like concat('%',#{key},'%')
+    </if>
+    <if test="startTime !=null and endTime !=null">
+      and u.transfer_time between #{startTime} and #{endTime}
+    </if>
   </select>
 </mapper>

+ 55 - 57
src/main/java/com/goafanti/common/mapper/UserMidMapper.xml

@@ -2,11 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.UserMidMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 06 15:37:38 CST 2021.
-    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="uid" jdbcType="VARCHAR" property="uid" />
     <result column="aid" jdbcType="VARCHAR" property="aid" />
@@ -14,59 +9,37 @@
     <result column="last_sign_time" jdbcType="TIMESTAMP" property="lastSignTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="big_customer" jdbcType="INTEGER" property="bigCustomer" />
+    <result column="update_aid" jdbcType="VARCHAR" property="updateAid" />
+    <result column="update_name" jdbcType="VARCHAR" property="updateName" />
+    <result column="date_update_time" jdbcType="TIMESTAMP" property="dateUpdateTime" />
   </resultMap>
   <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 06 15:37:38 CST 2021.
-    -->
-    id, `uid`, aid, last_follow_time, last_sign_time, create_time, big_customer
+    id, `uid`, aid, last_follow_time, last_sign_time, create_time, big_customer, update_aid, 
+    update_name, date_update_time
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 06 15:37:38 CST 2021.
-    -->
     select 
     <include refid="Base_Column_List" />
     from user_mid
     where id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 06 15:37:38 CST 2021.
-    -->
     delete from user_mid
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.UserMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 06 15:37:38 CST 2021.
-    -->
-    insert into user_mid (id, `uid`, aid, 
-      last_follow_time, last_sign_time, create_time, 
-      big_customer)
-    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
-      #{lastFollowTime,jdbcType=TIMESTAMP}, #{lastSignTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{bigCustomer,jdbcType=INTEGER})
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.UserMid" useGeneratedKeys="true">
+    insert into user_mid (`uid`, aid, last_follow_time, 
+      last_sign_time, create_time, big_customer, 
+      update_aid, update_name, date_update_time
+      )
+    values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{lastFollowTime,jdbcType=TIMESTAMP}, 
+      #{lastSignTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{bigCustomer,jdbcType=INTEGER}, 
+      #{updateAid,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR}, #{dateUpdateTime,jdbcType=TIMESTAMP}
+      )
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.UserMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 06 15:37:38 CST 2021.
-    -->
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.UserMid" useGeneratedKeys="true">
     insert into user_mid
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
       <if test="uid != null">
         `uid`,
       </if>
@@ -85,11 +58,17 @@
       <if test="bigCustomer != null">
         big_customer,
       </if>
+      <if test="updateAid != null">
+        update_aid,
+      </if>
+      <if test="updateName != null">
+        update_name,
+      </if>
+      <if test="dateUpdateTime != null">
+        date_update_time,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="uid != null">
         #{uid,jdbcType=VARCHAR},
       </if>
@@ -108,14 +87,18 @@
       <if test="bigCustomer != null">
         #{bigCustomer,jdbcType=INTEGER},
       </if>
+      <if test="updateAid != null">
+        #{updateAid,jdbcType=VARCHAR},
+      </if>
+      <if test="updateName != null">
+        #{updateName,jdbcType=VARCHAR},
+      </if>
+      <if test="dateUpdateTime != null">
+        #{dateUpdateTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 06 15:37:38 CST 2021.
-    -->
     update user_mid
     <set>
       <if test="uid != null">
@@ -136,25 +119,31 @@
       <if test="bigCustomer != null">
         big_customer = #{bigCustomer,jdbcType=INTEGER},
       </if>
+      <if test="updateAid != null">
+        update_aid = #{updateAid,jdbcType=VARCHAR},
+      </if>
+      <if test="updateName != null">
+        update_name = #{updateName,jdbcType=VARCHAR},
+      </if>
+      <if test="dateUpdateTime != null">
+        date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 06 15:37:38 CST 2021.
-    -->
     update user_mid
     set `uid` = #{uid,jdbcType=VARCHAR},
       aid = #{aid,jdbcType=VARCHAR},
       last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
       last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
       create_time = #{createTime,jdbcType=TIMESTAMP},
-      big_customer = #{bigCustomer,jdbcType=INTEGER}
+      big_customer = #{bigCustomer,jdbcType=INTEGER},
+      update_aid = #{updateAid,jdbcType=VARCHAR},
+      update_name = #{updateName,jdbcType=VARCHAR},
+      date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=INTEGER}
   </update>
-  
   <update id="updateByUid" parameterType="com.goafanti.common.model.UserMid">
     update user_mid
     <set>
@@ -173,6 +162,15 @@
       <if test="bigCustomer != null">
         big_customer = #{bigCustomer,jdbcType=INTEGER},
       </if>
+      <if test="updateAid != null">
+        update_aid = #{updateAid,jdbcType=VARCHAR},
+      </if>
+      <if test="updateName != null">
+        update_name = #{updateName,jdbcType=VARCHAR},
+      </if>
+      <if test="dateUpdateTime != null">
+        date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where `uid` = #{uid,jdbcType=VARCHAR}
   </update>

+ 47 - 174
src/main/java/com/goafanti/common/model/UserMid.java

@@ -3,267 +3,140 @@ package com.goafanti.common.model;
 import java.io.Serializable;
 import java.util.Date;
 
+/**
+ * user_mid
+ * @author 
+ */
 public class UserMid implements Serializable {
     /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_mid.id
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
+     * 任务编号
      */
     private Integer id;
 
     /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_mid.uid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
+     * 用户ID
      */
     private String uid;
 
     /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_mid.aid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
+     * 管理员ID
      */
     private String aid;
 
     /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_mid.last_follow_time
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
+     * 最后跟进时间
      */
     private Date lastFollowTime;
 
     /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_mid.last_sign_time
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
+     * 最后锁定时间
      */
     private Date lastSignTime;
 
     /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_mid.create_time
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
+     * 添加时间
      */
     private Date createTime;
 
     /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_mid.big_customer
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
+     * 大客户 0否 1是
      */
     private Integer bigCustomer;
 
     /**
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database table user_mid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
+     * 修改人编号
      */
-    private static final long serialVersionUID = 1L;
+    private String updateAid;
+
+    /**
+     * 修改人名称
+     */
+    private String updateName;
 
     /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_mid.id
-     *
-     * @return the value of user_mid.id
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
+     * 用户资料修改时间
      */
+    private Date dateUpdateTime;
+
+    private static final long serialVersionUID = 1L;
+
     public Integer getId() {
         return id;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_mid.id
-     *
-     * @param id the value for user_mid.id
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public void setId(Integer id) {
         this.id = id;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_mid.uid
-     *
-     * @return the value of user_mid.uid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public String getUid() {
         return uid;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_mid.uid
-     *
-     * @param uid the value for user_mid.uid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public void setUid(String uid) {
-        this.uid = uid == null ? null : uid.trim();
+        this.uid = uid;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_mid.aid
-     *
-     * @return the value of user_mid.aid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public String getAid() {
         return aid;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_mid.aid
-     *
-     * @param aid the value for user_mid.aid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public void setAid(String aid) {
-        this.aid = aid == null ? null : aid.trim();
+        this.aid = aid;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_mid.last_follow_time
-     *
-     * @return the value of user_mid.last_follow_time
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public Date getLastFollowTime() {
         return lastFollowTime;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_mid.last_follow_time
-     *
-     * @param lastFollowTime the value for user_mid.last_follow_time
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public void setLastFollowTime(Date lastFollowTime) {
         this.lastFollowTime = lastFollowTime;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_mid.last_sign_time
-     *
-     * @return the value of user_mid.last_sign_time
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public Date getLastSignTime() {
         return lastSignTime;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_mid.last_sign_time
-     *
-     * @param lastSignTime the value for user_mid.last_sign_time
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public void setLastSignTime(Date lastSignTime) {
         this.lastSignTime = lastSignTime;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_mid.create_time
-     *
-     * @return the value of user_mid.create_time
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public Date getCreateTime() {
         return createTime;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_mid.create_time
-     *
-     * @param createTime the value for user_mid.create_time
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_mid.big_customer
-     *
-     * @return the value of user_mid.big_customer
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public Integer getBigCustomer() {
         return bigCustomer;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_mid.big_customer
-     *
-     * @param bigCustomer the value for user_mid.big_customer
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
     public void setBigCustomer(Integer bigCustomer) {
         this.bigCustomer = bigCustomer;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_mid
-     *
-     * @mbg.generated Thu May 06 15:37:38 CST 2021
-     */
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getClass().getSimpleName());
-        sb.append(" [");
-        sb.append("Hash = ").append(hashCode());
-        sb.append(", id=").append(id);
-        sb.append(", uid=").append(uid);
-        sb.append(", aid=").append(aid);
-        sb.append(", lastFollowTime=").append(lastFollowTime);
-        sb.append(", lastSignTime=").append(lastSignTime);
-        sb.append(", createTime=").append(createTime);
-        sb.append(", bigCustomer=").append(bigCustomer);
-        sb.append(", serialVersionUID=").append(serialVersionUID);
-        sb.append("]");
-        return sb.toString();
+    public String getUpdateAid() {
+        return updateAid;
+    }
+
+    public void setUpdateAid(String updateAid) {
+        this.updateAid = updateAid;
+    }
+
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName;
+    }
+
+    public Date getDateUpdateTime() {
+        return dateUpdateTime;
+    }
+
+    public void setDateUpdateTime(Date dateUpdateTime) {
+        this.dateUpdateTime = dateUpdateTime;
     }
 }

+ 16 - 0
src/main/java/com/goafanti/customer/bo/OutUserDateLogList.java

@@ -0,0 +1,16 @@
+package com.goafanti.customer.bo;
+
+import com.goafanti.common.model.UserDataLog;
+
+public class OutUserDateLogList extends UserDataLog {
+
+    private String createTimes;
+
+    public String getCreateTimes() {
+        return createTimes;
+    }
+
+    public void setCreateTimes(String createTimes) {
+        this.createTimes = createTimes;
+    }
+}

+ 46 - 0
src/main/java/com/goafanti/customer/bo/OutUserMianProducts.java

@@ -1,9 +1,23 @@
 package com.goafanti.customer.bo;
 
 public class OutUserMianProducts {
+    private String id;
     private String uid;
     private String userName;
     private String businessScope;
+    private String updateName;
+    private String updateAid;
+    private String transferTimes;
+    private String dateUpdateTimes;
+
+    public String getTransferTimes() {
+        return transferTimes;
+    }
+
+    public void setTransferTimes(String transferTimes) {
+        this.transferTimes = transferTimes;
+    }
+
 
     public String getUid() {
         return uid;
@@ -13,6 +27,38 @@ public class OutUserMianProducts {
         this.uid = uid;
     }
 
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName;
+    }
+
+    public String getUpdateAid() {
+        return updateAid;
+    }
+
+    public void setUpdateAid(String updateAid) {
+        this.updateAid = updateAid;
+    }
+
+    public String getDateUpdateTimes() {
+        return dateUpdateTimes;
+    }
+
+    public void setDateUpdateTimes(String dateUpdateTimes) {
+        this.dateUpdateTimes = dateUpdateTimes;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String uid) {
+        this.id = uid;
+    }
+
     public String getUserName() {
         return userName;
     }

+ 39 - 3
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -1374,12 +1374,48 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 
-	/** 客户主营产品列表 **/
+	/**
+	 * 客户主营产品列表
+	 * @param shiroType 0 营销员 1咨询师
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
 	@RequestMapping(value = "/mainProductsList", method = RequestMethod.GET)
-	public Result mainProductsList(Integer pageNo,Integer pageSize){
+	public Result mainProductsList(String userName,String key,String startTime,String endTime,
+								   Integer shiroType,Integer pageNo,Integer pageSize){
 		Result res = new Result();
 
-		res.data(customerService.mainProductsList(pageNo,pageSize));
+		res.data(customerService.mainProductsList(userName,key,startTime,endTime,shiroType,pageNo,pageSize));
+		return res;
+	}
+
+	/**
+	 * 用户信息日志
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/userDateLogList",method = RequestMethod.GET)
+	public Result userDateLogList(String uid){
+		Result res =new Result();
+		res.data(customerService.userDateLogList(uid));
+		return res;
+	}
+
+	/**
+	 * 修改用户主营产品
+	 * @param id
+	 * @param businessScope
+	 * @return
+	 */
+	@RequestMapping(value = "/updateUserBusinessScope",method = RequestMethod.POST)
+	public Result updateUserBusinessScope(String id,String businessScope){
+		Result res=new Result();
+		if (id==null||businessScope==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"参数","参数"));
+			return res;
+		}
+		res.data(customerService.updateuserBusinessScope(id,businessScope));
 		return res;
 	}
 }

+ 5 - 2
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -455,7 +455,6 @@ public interface CustomerService {
 	/**
 	 * 再次签订项目任务
 	 * @param aid 
-	 * @param id
 	 * @return
 	 */
 	int updateAgainProjectTask(String uid, String projectId, String aid);
@@ -540,5 +539,9 @@ public interface CustomerService {
 	boolean checkUserName(String userName);
 	Object getUserByNames(String name, Integer pageNo, Integer pageSize);
 
-	Pagination<OutUserMianProducts> mainProductsList(Integer pageNo,Integer pageSize);
+	Pagination<OutUserMianProducts> mainProductsList(String userName, String key, String startTime, String endTime, Integer shiroType, Integer pageNo, Integer pageSize);
+
+	List<OutUserDateLogList> userDateLogList(String uid);
+
+	int updateuserBusinessScope(String id, String businessScope);
 }

+ 76 - 53
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -16,6 +16,8 @@ import java.util.UUID;
 import javax.annotation.Resource;
 
 import com.goafanti.admin.bo.AdminListBo;
+import com.goafanti.common.dao.*;
+import com.goafanti.common.model.*;
 import com.goafanti.customer.bo.*;
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.PropertyUtils;
@@ -30,25 +32,6 @@ import com.goafanti.common.bo.Error;
 import com.goafanti.common.bo.userDaysBo;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.dao.AdminMapper;
-import com.goafanti.common.dao.BusinessGlossoryMapper;
-import com.goafanti.common.dao.BusinessProjectMapper;
-import com.goafanti.common.dao.OrganizationAnnualReportMapper;
-import com.goafanti.common.dao.OrganizationApplicationInfoMapper;
-import com.goafanti.common.dao.OrganizationBusinessScopeMapper;
-import com.goafanti.common.dao.OrganizationContactBookMapper;
-import com.goafanti.common.dao.OrganizationIdentityMapper;
-import com.goafanti.common.dao.OrganizationSalesTargetMapper;
-import com.goafanti.common.dao.OrganizationYearProjectMapper;
-import com.goafanti.common.dao.UserBusinessMapper;
-import com.goafanti.common.dao.UserChannelMapper;
-import com.goafanti.common.dao.UserFollowBusinessMapper;
-import com.goafanti.common.dao.UserFollowMapper;
-import com.goafanti.common.dao.UserIdentityMapper;
-import com.goafanti.common.dao.UserLockReleaseMapper;
-import com.goafanti.common.dao.UserMapper;
-import com.goafanti.common.dao.UserNamesMapper;
-import com.goafanti.common.dao.UserTransferLogMapper;
 import com.goafanti.common.enums.ChannelStatus;
 import com.goafanti.common.enums.CustomerStatusFiled;
 import com.goafanti.common.enums.DeleteStatus;
@@ -57,20 +40,6 @@ import com.goafanti.common.enums.UserLevel;
 import com.goafanti.common.enums.UserLockReleaseStatus;
 import com.goafanti.common.enums.UserType;
 import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.OrganizationApplicationInfo;
-import com.goafanti.common.model.OrganizationBusinessScope;
-import com.goafanti.common.model.OrganizationContactBook;
-import com.goafanti.common.model.OrganizationIdentity;
-import com.goafanti.common.model.OrganizationSalesTarget;
-import com.goafanti.common.model.User;
-import com.goafanti.common.model.UserBusiness;
-import com.goafanti.common.model.UserFollow;
-import com.goafanti.common.model.UserFollowBusiness;
-import com.goafanti.common.model.UserIdentity;
-import com.goafanti.common.model.UserLockRelease;
-import com.goafanti.common.model.UserNames;
-import com.goafanti.common.model.UserTransferLog;
 import com.goafanti.common.utils.BeanUtilsExt;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.ExportExcelUtil;
@@ -124,6 +93,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	private UserChannelMapper userChannelMapper;
 	@Resource
 	private UserNamesMapper	userNamesMapper;
+	@Resource
+	private UserMidMapper userMidMapper;
+	@Resource
+	private UserDataLogMapper	userDataLogMapper;
 	@Value(value = "${upload.path}")
 	private String uploadPath = null;
 
@@ -468,24 +441,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		} catch (IllegalAccessException | InvocationTargetException e) {
 			e.printStackTrace();
 		}
-		organizationBusinessScopeMapper.deleteByUid(bo.getUid());
 		if (bo.getBusinessScope() != null) {
-			if (bo.getBusinessScope().contains(",")) {
-				String[] ss = bo.getBusinessScope().split(",");
-				List<OrganizationBusinessScope> list = new ArrayList<>();
-				for (int i = 0; i < ss.length; i++) {
-					String string = ss[i];
-					OrganizationBusinessScope obs = new OrganizationBusinessScope();
-					obs.setUid(bo.getUid());
-					obs.setKeyword(string);
-					list.add(obs);
-				}
-				organizationBusinessScopeMapper.insertBatch(list);
-			} else {
-				OrganizationBusinessScope obs = new OrganizationBusinessScope();
-				obs.setUid(bo.getUid());
-				obs.setKeyword(bo.getBusinessScope());
-				organizationBusinessScopeMapper.insertSelective(obs);
+			OrganizationIdentity use=organizationIdentityMapper.selectByPrimaryKey(bo.getId());
+			if (!bo.getBusinessScope().equals(use.getBusinessScope())){
+			updateBusinessScope(bo.getUid(),bo.getBusinessScope() ,use.getBusinessScope(), date);
 			}
 		}
 		organizationSalesTargetMapper.deleteByUid(bo.getUid());
@@ -513,6 +472,52 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return 1;
 	}
 
+	/**
+	 *
+	 * @param uid
+	 * @param businnessScope
+	 * @param useBusinnessScope
+	 * @param date
+	 */
+	private void updateBusinessScope( String uid, String businnessScope,String useBusinnessScope, Date date) {
+		if(date==null)date=new Date();
+		organizationBusinessScopeMapper.deleteByUid(uid);
+		if (businnessScope.contains(",")) {
+			String[] ss = businnessScope.split(",");
+			List<OrganizationBusinessScope> list = new ArrayList<>();
+			for (int i = 0; i < ss.length; i++) {
+				String string = ss[i];
+				OrganizationBusinessScope obs = new OrganizationBusinessScope();
+				obs.setUid(uid);
+				obs.setKeyword(string);
+				list.add(obs);
+			}
+			organizationBusinessScopeMapper.insertBatch(list);
+
+		} else {
+			OrganizationBusinessScope obs = new OrganizationBusinessScope();
+			obs.setUid(uid);
+			obs.setKeyword(businnessScope);
+			organizationBusinessScopeMapper.insertSelective(obs);
+		}
+		UserMid um=new UserMid();
+		um.setDateUpdateTime(date);
+		um.setUid(uid);
+		String aid=TokenManager.getAdminId();
+		um.setUpdateAid(aid);
+		Admin a=adminMapper.selectByPrimaryKey(aid);
+		um.setUpdateName(a.getName());
+		int i=userMidMapper.updateByUid(um);
+		if (i==0) {
+			um.setAid(aid);
+			userMidMapper.insertSelective(um);
+		}
+		StringBuffer str=new StringBuffer(a.getName()).append("修改了主营产品");
+		if (useBusinnessScope==null){useBusinnessScope="无";}
+		str.append("[").append(useBusinnessScope).append("=> ").append(businnessScope).append("]");
+		userDataLogMapper.insertSelective(new UserDataLog(uid,str.toString()));
+	}
+
 	public Float countIntegrity(CustomerOrganizationDetailBo bo) {
 		// 完整资料总数
 		int max = 10;
@@ -2241,15 +2246,33 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 	@Override
-	public Pagination<OutUserMianProducts> mainProductsList(Integer pageNo,Integer pageSize) {
+	public Pagination<OutUserMianProducts> mainProductsList(String userName, String key, String startTime, String endTime, Integer shiroType, Integer pageNo, Integer pageSize) {
 		Map<String,Object> map =new HashMap<>();
 		map.put("aid",TokenManager.getAdminId());
+		if (userName!=null)map.put("userName",userName);
+		if(key!=null)map.put("key",key);
+		if(startTime!=null)map.put("startTime",startTime);
+		if (endTime!=null)map.put("endTime",endTime+" 23:59:59");
+		if (shiroType==null)shiroType=0;
+		map.put("shiroType",shiroType);
 		return (Pagination<OutUserMianProducts>) findPage("findMainProductsList","findMainProductsCount",map,pageNo,pageSize);
 	}
 
+	@Override
+	public List<OutUserDateLogList> userDateLogList(String uid) {
+		return userDataLogMapper.userDateLogList(uid);
+	}
 
-	
+	@Override
+	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);
+	}
 
-	
 
 }

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -2,7 +2,7 @@ dev.name=local
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 #本地
-jdbc.url=jdbc\:mysql://localhost:3306/aft20210820?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 jdbc.username=root
 jdbc.password=123456
 #•#