门店号管理

master
LegnaYet 6 years ago
parent b43498d6ae
commit c96bd945b7

@ -363,7 +363,7 @@ public class WxResponseService {
String res = WeixinApi.getExternalContactInfo(externalUserID); String res = WeixinApi.getExternalContactInfo(externalUserID);
log.info(res); log.info(res);
//添加客户并添加店铺企业微信信息 //添加客户并添加店铺企业微信信息
addExternalContact(res,state); addExternalContact(res,userID,state);
// welcomeCodeNode = root.getElementsByTagName("WelcomeCode"); // welcomeCodeNode = root.getElementsByTagName("WelcomeCode");
// welcomeCode = welcomeCodeNode.item(0).getTextContent(); // welcomeCode = welcomeCodeNode.item(0).getTextContent();
@ -372,15 +372,19 @@ public class WxResponseService {
break; break;
case "add_half_external_contact": case "add_half_external_contact":
// NodeList stateNode2 = root.getElementsByTagName("State"); NodeList stateNodeHalf = root.getElementsByTagName("State");
// if(stateNode2.getLength() > 0){ String statehalf = "";
// String state2 = stateNode2.item(0).getTextContent(); if(stateNodeHalf.getLength() > 0) {
// log.info(state2); statehalf = stateNodeHalf.item(0).getTextContent();
// } log.info(statehalf);
log.info("add_half_external_contact 外部联系人添加了配置了客户联系功能且开启了免验证的成员时(此时成员尚未确认添加对方为好友),回调该事件"); }
log.info("add_external_contact 配置了客户联系功能的成员添加外部联系人时,回调该事件");
// 调用外部联系人详情接口 查看state字段 // 调用外部联系人详情接口 查看state字段
String res2 = WeixinApi.getExternalContactInfo(externalUserID); String reshalf = WeixinApi.getExternalContactInfo(externalUserID);
log.info(res2); log.info(reshalf);
//添加客户并添加店铺企业微信信息
addExternalContact(reshalf,userID,statehalf);
break; break;
case "del_external_contact": case "del_external_contact":
log.info("del_external_contact 配置了客户联系功能的成员删除外部联系人时,回调该事件"); log.info("del_external_contact 配置了客户联系功能的成员删除外部联系人时,回调该事件");
@ -456,7 +460,7 @@ public class WxResponseService {
* *
* @param res * @param res
*/ */
public void addExternalContact(String res,String state) throws WxErrorException { public void addExternalContact(String res,String cpUserId,String state) throws WxErrorException {
OpCustomerEnterpriseWechat ocew = analyticCustomerEnterprise(res); OpCustomerEnterpriseWechat ocew = analyticCustomerEnterprise(res);
ocew.setState(state); ocew.setState(state);
CustomerDTO customerDTO = new CustomerDTO(); CustomerDTO customerDTO = new CustomerDTO();
@ -469,8 +473,7 @@ public class WxResponseService {
customerDTO.setShopCode(split[0]); customerDTO.setShopCode(split[0]);
customerDTO.setStaffCode(split[1]); customerDTO.setStaffCode(split[1]);
}else{ }else{
String cpuserId = ocew.getUserid(); Long storeId = privilageCpUserStoreDOMapper.selectOneByCpUserId(cpUserId);
Long storeId = privilageCpUserStoreDOMapper.selectOneByCpUserId(cpuserId);
PoiStore poiStore = poiStoreDOMapper.selectById(storeId); PoiStore poiStore = poiStoreDOMapper.selectById(storeId);
customerDTO.setShopCode(poiStore.getCode()); customerDTO.setShopCode(poiStore.getCode());
String staffCode = poiStoreStaffDOMapper.selectShopManagerByShop(storeId); String staffCode = poiStoreStaffDOMapper.selectShopManagerByShop(storeId);

@ -1,3 +1,7 @@
logging:
level:
root: info
mybatis: mybatis:
mapperLocations: classpath:mapper/*.xml mapperLocations: classpath:mapper/*.xml
@ -7,7 +11,14 @@ logging:
spring: spring:
datasource: datasource:
url: jdbc:mysql://10.173.32.71:3306/p2p?characterEncoding=utf8&allowMultiQueries=true url: jdbc:mysql://10.101.8.44/ic?characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
username: kiisoo username: root
password: QS_db_123 password: root
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
##开发环境
server:
port: 8080
servlet:
context-path: /kiisoo-ic

@ -28,7 +28,7 @@
group by t1.staff_code group by t1.staff_code
</select> </select>
<select id="selectShopManagerByShop" resultType="java.lang.String"> <select id="selectShopManagerByShop" resultType="java.lang.String">
select staff_code from poi_store_staff where store_id = #{shopId} and status = 1 and type = 1 select staff_code from poi_store_staff where store_id = #{shopId} and status = 1 and type = 1 and user_id != 0
limit 1 limit 1
</select> </select>

Loading…
Cancel
Save