mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-23 03:58:35 +08:00
2026 马(码)年大吉
This commit is contained in:
@@ -1,34 +0,0 @@
|
|||||||
package com.zbkj.common.utils;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Auther: 大粽子
|
|
||||||
* @Date: 2023/9/9 15:19
|
|
||||||
* @Description: For SCRM
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class SCRMUtils {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RestTemplateUtil restTemplateUtil;
|
|
||||||
|
|
||||||
private String scrm_addUser_URL = "http://api.scrm.crmeb.com/api/contactBatchAdd";
|
|
||||||
|
|
||||||
public void addUserForSCRM(String phone, String nikename){
|
|
||||||
String type = "java单商户";
|
|
||||||
HashMap addUserPram = new HashMap<>();
|
|
||||||
addUserPram.put("phone", phone);
|
|
||||||
addUserPram.put("nikename", nikename);
|
|
||||||
addUserPram.put("type", type);
|
|
||||||
String result = restTemplateUtil.postMapData(scrm_addUser_URL, addUserPram);
|
|
||||||
System.out.println("result:"+result);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -121,9 +121,6 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|||||||
@Autowired
|
@Autowired
|
||||||
private FrontTokenComponent tokenComponent;
|
private FrontTokenComponent tokenComponent;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SCRMUtils scrmUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推广数据接口(昨天的佣金 累计提现金额 当前佣金)
|
* 推广数据接口(昨天的佣金 累计提现金额 当前佣金)
|
||||||
*/
|
*/
|
||||||
@@ -892,11 +889,6 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|||||||
loginResponse.setUid(user.getUid());
|
loginResponse.setUid(user.getUid());
|
||||||
loginResponse.setNikeName(user.getNickname());
|
loginResponse.setNikeName(user.getNickname());
|
||||||
loginResponse.setPhone(user.getPhone());
|
loginResponse.setPhone(user.getPhone());
|
||||||
try {
|
|
||||||
scrmUtils.addUserForSCRM(user.getPhone(), user.getNickname());
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("SCRM用户同步失败: phone={}, nickname={}", user.getPhone(), user.getNickname(), e);
|
|
||||||
}
|
|
||||||
return loginResponse;
|
return loginResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,10 +121,6 @@ public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserS
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SystemAttachmentService systemAttachmentService;
|
private SystemAttachmentService systemAttachmentService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SCRMUtils scrmUtils;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页显示用户表
|
* 分页显示用户表
|
||||||
@@ -810,11 +806,6 @@ public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserS
|
|||||||
if (!execute) {
|
if (!execute) {
|
||||||
throw new CrmebException("创建用户失败!");
|
throw new CrmebException("创建用户失败!");
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
scrmUtils.addUserForSCRM(user.getPhone(), user.getNickname());
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("SCRM用户同步失败: phone={}, nickname={}", user.getPhone(), user.getNickname(), e);
|
|
||||||
}
|
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user