Browse Source

渠道修改新增修改渠道别类

anderx 3 years ago
parent
commit
b0249eb759

+ 3 - 0
src/main/java/com/goafanti/common/mapper/UserMidMapper.xml

@@ -188,6 +188,9 @@
       <if test="dateUpdateTime != null">
         date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="channelType != null">
+        channel_type = #{channelType,jdbcType=INTEGER},
+      </if>
     </set>
     where `uid` = #{uid,jdbcType=VARCHAR}
   </update>

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

@@ -1457,10 +1457,11 @@ public class AdminCustomerApiController extends BaseApiController{
 
 	/** 修改客户关键资料 **/
 	@RequestMapping(value = "/updateUserDate", method = RequestMethod.POST)
-	public Result updateUserDate(String uid,Integer province,Integer city,Integer area,String businessScope,String intendedProject,String introduction){
+	public Result updateUserDate(String uid,Integer province,Integer city,Integer area,String businessScope,String intendedProject,String introduction
+	,Integer channelType){
 		Result res = new Result();
 
-		res.data(customerService.updateUserDate(uid, province, city, area, businessScope, intendedProject,introduction));
+		res.data(customerService.updateUserDate(uid, province, city, area, businessScope, intendedProject,introduction,channelType));
 		return res;
 	}
 

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

@@ -539,7 +539,7 @@ public interface CustomerService {
 
 	boolean checkData(String uid, String aid);
 
-    int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject,String introduction);
+    int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject,String introduction,Integer channelType);
 
 	Pagination<OutChannelListBo> channelUserList(InputChannelListBo in);
 

+ 7 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -2393,7 +2393,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 	@Override
-	public int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject,String introduction) {
+	public int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject,String introduction,Integer channelType) {
 		OrganizationIdentity oi =new OrganizationIdentity();
 		oi.setUid(uid);
 		if (province!=null ||city !=null ||area!=null|| businessScope!=null ||intendedProject!=null){
@@ -2414,6 +2414,12 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			user.setIntroduction(introduction);
 			userMapper.updateByPrimaryKeySelective(user);
 		}
+		if (channelType !=null){
+			UserMid um =new UserMid();
+			um.setUid(uid);
+			um.setChannelType(channelType);
+			userMidMapper.updateByUid(um);
+		}
 		return 1;
 	}