Commit 84d961e3 by 徐高华

绑定迁移到运维

parent f4df5aff
...@@ -202,6 +202,11 @@ ...@@ -202,6 +202,11 @@
<artifactId>gic-wechat-api</artifactId> <artifactId>gic-wechat-api</artifactId>
<version>${gic-wechat-api}</version> <version>${gic-wechat-api}</version>
</dependency> </dependency>
<dependency>
<groupId>com.gic.authcenter</groupId>
<artifactId>gic-authcenter-commons</artifactId>
<version>${gic-authcenter-commons}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
package com.gic.haoban.manage.web.controller; package com.gic.haoban.manage.web.controller;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.DictDTO; import com.gic.haoban.manage.api.dto.DictDTO;
import com.gic.haoban.manage.api.service.DictApiService; import com.gic.haoban.manage.api.service.DictApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
@RestController @RestController
public class DictController extends WebBaseController{ public class DictController extends WebBaseController{
private static final String LOGIN_URL = "/haoban-manage3-web/yw-login"; private static final String LOGIN_URL = "/haoban-manage3-web/yw-login";
private static Logger logger = LoggerFactory.getLogger(DictController.class); private static Logger logger = LoggerFactory.getLogger(DictController.class);
@Autowired @Autowired
private DictApiService dictApiService; private DictApiService dictApiService;
//获取字典列表 //获取字典列表
@RequestMapping("get-dict-list") @RequestMapping("get-dict-list")
public HaobanResponse getDictList(BasePageInfo pageInfo) { public HaobanResponse getDictList(BasePageInfo pageInfo) {
Page<DictDTO> page = dictApiService.pageList(pageInfo); Page<DictDTO> page = dictApiService.pageList(pageInfo);
return resultResponse(HaoBanErrCode.ERR_1,page); return resultResponse(HaoBanErrCode.ERR_1,page);
} }
//保存字典 //保存字典
@RequestMapping("save-dict") @RequestMapping("save-dict")
public HaobanResponse saveDict(DictDTO dto) { public HaobanResponse saveDict(DictDTO dto) {
int i = dictApiService.saveDict(dto); int i = dictApiService.saveDict(dto);
if(i == 8){ if(i == 8){
return resultResponse(HaoBanErrCode.ERR_10006); return resultResponse(HaoBanErrCode.ERR_10006);
} }
if(i == 9){ if(i == 9){
return resultResponse(HaoBanErrCode.ERR_10007); return resultResponse(HaoBanErrCode.ERR_10007);
} }
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
//查看字典详情 //查看字典详情
@RequestMapping("find-dict-detail") @RequestMapping("find-dict-detail")
public HaobanResponse findDictDetail(String dictId) { public HaobanResponse findDictDetail(String dictId) {
DictDTO dictDTO = dictApiService.findOneDict(dictId); DictDTO dictDTO = dictApiService.findOneDict(dictId);
return resultResponse(HaoBanErrCode.ERR_1,dictDTO); return resultResponse(HaoBanErrCode.ERR_1,dictDTO);
} }
//删除字典 //删除字典
@RequestMapping("del-dict") @RequestMapping("del-dict")
public HaobanResponse deleteDict(String dictId) { public HaobanResponse deleteDict(String dictId) {
dictApiService.deleteOne(dictId); dictApiService.deleteOne(dictId);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
} }
package com.gic.haoban.manage.web.controller; package com.gic.haoban.manage.web.controller;
import cn.hutool.core.collection.CollectionUtil; import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.authcenter.commons.dto.AuthcenterUserDetails;
import com.gic.authcenter.commons.util.SessionContextUtil;
import com.gic.commons.util.GlobalVar; import com.gic.commons.util.GlobalVar;
import com.gic.enterprise.api.dto.EnterpriseAndUserDTO;
import com.gic.enterprise.api.dto.EnterpriseDTO; import com.gic.enterprise.api.dto.EnterpriseDTO;
import com.gic.enterprise.api.dto.PowerStoreGroupDTO;
import com.gic.enterprise.api.dto.StoreDTO; import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.EnterpriseService; import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.enterprise.api.service.StoreGroupService;
import com.gic.enterprise.api.service.StoreService; import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService; import com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.PageResult; import com.gic.haoban.base.api.common.PageResult;
import com.gic.haoban.base.api.common.ServiceResponse; import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.utils.AuthWebRequestUtil;
import com.gic.haoban.common.utils.EntityUtil; import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.common.utils.UuidUtil; import com.gic.haoban.common.utils.UuidUtil;
import com.gic.haoban.manage.api.dto.BindStoreInfoDTO;
import com.gic.haoban.manage.api.dto.DepartmentDTO; import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO; import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO;
import com.gic.haoban.manage.api.dto.StoreOrGroupInfoDTO;
import com.gic.haoban.manage.api.dto.StoreRangeInfoDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO; import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseRelationDetailDTO;
import com.gic.haoban.manage.api.dto.YwWxEnterpriseDTO; import com.gic.haoban.manage.api.dto.YwWxEnterpriseDTO;
import com.gic.haoban.manage.api.service.DepartmentApiService; import com.gic.haoban.manage.api.service.DepartmentApiService;
import com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService; import com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseApiService; import com.gic.haoban.manage.api.service.WxEnterpriseApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService; import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.qo.WxEnterpriseBindQo;
import com.gic.haoban.manage.web.vo.EnterpriseDetailVo; import com.gic.haoban.manage.web.vo.EnterpriseDetailVo;
import com.gic.haoban.manage.web.vo.EnterpriseSearchVO;
import com.gic.haoban.manage.web.vo.StoreGroupVo;
import com.gic.haoban.task.manage.api.service.GroupSendOperateApiService; import com.gic.haoban.task.manage.api.service.GroupSendOperateApiService;
import com.gic.redis.data.util.RedisUtil; import com.gic.redis.data.util.RedisUtil;
import com.gic.wechat.api.service.qywx.QywxUserApiService; import com.gic.wechat.api.service.qywx.QywxUserApiService;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import org.apache.commons.collections.CollectionUtils; import cn.hutool.core.collection.CollectionUtil;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
@RestController @RestController
public class EnterpriseController extends WebBaseController { public class EnterpriseController extends WebBaseController {
...@@ -68,6 +94,8 @@ public class EnterpriseController extends WebBaseController { ...@@ -68,6 +94,8 @@ public class EnterpriseController extends WebBaseController {
private QywxUserApiService qywxUserApiService; private QywxUserApiService qywxUserApiService;
@Autowired @Autowired
private GroupSendOperateApiService groupSendOperateApiService; private GroupSendOperateApiService groupSendOperateApiService;
@Autowired
private StoreGroupService storeGroupService ;
private static final String QYWX_TAG_OPRN_KEY = "qywx-tag-open"; private static final String QYWX_TAG_OPRN_KEY = "qywx-tag-open";
private static final String QYWX_TAG_OPRN_KEY_LOCK = "qywx-tag-open-lock"; private static final String QYWX_TAG_OPRN_KEY_LOCK = "qywx-tag-open-lock";
...@@ -462,5 +490,114 @@ public class EnterpriseController extends WebBaseController { ...@@ -462,5 +490,114 @@ public class EnterpriseController extends WebBaseController {
groupSendOperateApiService.sendStockMemberRelationMessage(wxEnterpriseId); groupSendOperateApiService.sendStockMemberRelationMessage(wxEnterpriseId);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
// 绑定门店列表
@RequestMapping("bind-store-list")
public HaobanResponse bindStoreList(String enterpriseId, String search, BasePageInfo basePageInfo) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = login.getWxEnterpriseId();
Page<BindStoreInfoDTO> retPage = wxEnterpriseRelatedApiService.pageBindStoreByEnterpriseId(wxEnterpriseId, enterpriseId, search, basePageInfo);
return resultResponse(HaoBanErrCode.ERR_1, retPage);
}
//企业信息
@RequestMapping("wxEnterprise-detail")
public HaobanResponse enterpriseDetail(String wxEnterpriseId) {
if (StringUtils.isEmpty(wxEnterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_1);
}
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseApiService.getOne(wxEnterpriseId);
if (wxEnterpriseDTO == null) {
return this.fail("微信企业差不到") ;
}
wxEnterpriseDTO.setSmallVersion("免费版");
wxEnterpriseDTO.setStoreTotal(departmentApiService.totalStoreCountByEnterpriseId(wxEnterpriseId));
return resultResponse(HaoBanErrCode.ERR_1, wxEnterpriseDTO);
}
//gic企业列表
@RequestMapping("enterprise-search")
public HaobanResponse gicEnterpriseDetail(String enterpriseName) {
if (StringUtils.isEmpty(enterpriseName)) {
return resultResponse(HaoBanErrCode.ERR_1);
}
EnterpriseAndUserDTO dto = enterpriseService.getEnterpriseAndUserByName(enterpriseName);
EnterpriseSearchVO vo = EntityUtil.changeEntityByJSON(EnterpriseSearchVO.class, dto);
if (vo != null) {
String enterpriseId = vo.getEnterpriseId();
EnterpriseDTO enterprise = enterpriseService.getEnterpriseById(enterpriseId);
if (enterprise != null) {
vo.setBrandName(enterprise.getBrandName());
}
}
return resultResponse(HaoBanErrCode.ERR_1, vo);
}
@RequestMapping("gic-store-group-list")
public HaobanResponse storeGroupList(String enterpriseId, String keyWord) {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
List<PowerStoreGroupDTO> departmentList = storeGroupService.getStoreGroupList(enterpriseId, keyWord);
List<StoreRangeInfoDTO> rangeInfoDTOList = wxEnterpriseRelatedApiService.listAllBindStoreOrGroup(enterpriseId);
Map<String, StoreRangeInfoDTO> storeRangeMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(rangeInfoDTOList)) {
List<WxEnterpriseDTO> wxEnterpriseDTOS = wxEnterpriseRelatedApiService.listWxEnterpriseByEid(enterpriseId);
if (CollectionUtils.isNotEmpty(wxEnterpriseDTOS)) {
Map<String, WxEnterpriseDTO> wxEnterpriseDTOMap = wxEnterpriseDTOS.stream().collect(Collectors.toMap(WxEnterpriseDTO::getWxEnterpriseId, dto -> dto));
storeRangeMap = rangeInfoDTOList.stream()
.filter(dto -> (!dto.getWxEnterpriseId().equals(wxEnterpriseId))
&& dto.getRelationType() == 1
&& wxEnterpriseDTOMap.get(dto.getWxEnterpriseId()) != null)
.peek(dto -> dto.setWxEnterpriseName(wxEnterpriseDTOMap.get(dto.getWxEnterpriseId()).getCorpName()))
.collect(Collectors.toMap(StoreRangeInfoDTO::getRelationId, dto -> dto));
}
}
Map<String, StoreRangeInfoDTO> finalStoreRangeMap = storeRangeMap;
List<StoreGroupVo> ret = departmentList.stream().map(dto -> {
StoreRangeInfoDTO mid = finalStoreRangeMap.get(dto.getStoreGroupId());
StoreGroupVo storeGroupVo = new StoreGroupVo();
storeGroupVo.setRelationId(dto.getStoreGroupId());
storeGroupVo.setParentRelationId(dto.getParentGroupId());
if (mid != null) {
storeGroupVo.setIsBind(1);
storeGroupVo.setWxEnterpriseId(mid.getWxEnterpriseId());
storeGroupVo.setWxEnterpriseName(mid.getWxEnterpriseName());
}
storeGroupVo.setRelationType(1);
storeGroupVo.setRelationName(dto.getStoreGroupName());
return storeGroupVo;
}).collect(Collectors.toList());
return resultResponse(HaoBanErrCode.ERR_1, ret);
}
//微信企业绑定接口 - 迁移到运维
@RequestMapping("wx-enterprise-bind")
public HaobanResponse wxEnterpriseBind(HttpServletRequest request , WxEnterpriseBindQo bindQo) {
if (org.apache.commons.lang3.StringUtils.isAnyBlank(bindQo.getEnterpriseId(), bindQo.getVersion())) {
return resultResponse(HaoBanErrCode.ERR_2);
}
String wxEnterpriseId = bindQo.getWxEnterpriseId();
if(StringUtils.isBlank(wxEnterpriseId)) {
return this.fail("微信企业ID未传") ;
}
AuthcenterUserDetails loginUser = (AuthcenterUserDetails) SessionContextUtil.getUser(request) ;
String staffName = loginUser.getRealName() ;
WxEnterpriseRelationDetailDTO detailDTO = new WxEnterpriseRelationDetailDTO();
detailDTO.setWxEnterpriseRelatedId(bindQo.getWxEnterpriseRelatedId());
detailDTO.setEnterpriseId(bindQo.getEnterpriseId());
detailDTO.setWxEnterpriseId(wxEnterpriseId);
detailDTO.setStaffId(null);
detailDTO.setStaffName(staffName);
detailDTO.setMemberOpenCardFlag(bindQo.getMemberOpenCardFlag());
detailDTO.setWxEnterpriseType(bindQo.getWxEnterpriseType());
List<StoreOrGroupInfoDTO> storeOrGroupInfoDTOS = JSONObject.parseArray(bindQo.getRelations(), StoreOrGroupInfoDTO.class);
detailDTO.setRelations(storeOrGroupInfoDTOS);
ServiceResponse resp = wxEnterpriseRelatedApiService.wxEnterpriseBind(detailDTO);
if (resp.getCode() != 1) {
HaoBanErrCode.ERR_DEFINE.setMsg(resp.getMessage());
return resultResponse(HaoBanErrCode.ERR_DEFINE);
}
return resultResponse(HaoBanErrCode.ERR_1);
}
} }
package com.gic.haoban.manage.web.controller; package com.gic.haoban.manage.web.controller;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.DictDTO; import com.gic.haoban.manage.api.dto.DictDTO;
import com.gic.haoban.manage.api.dto.HelpDTO; import com.gic.haoban.manage.api.dto.HelpDTO;
import com.gic.haoban.manage.api.service.DictApiService; import com.gic.haoban.manage.api.service.DictApiService;
import com.gic.haoban.manage.api.service.HelpApiService; import com.gic.haoban.manage.api.service.HelpApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
@RestController @RestController
public class HelpController extends WebBaseController{ public class HelpController extends WebBaseController{
private static final String LOGIN_URL = "/haoban-manage3-web/yw-login"; private static final String LOGIN_URL = "/haoban-manage3-web/yw-login";
private static Logger logger = LoggerFactory.getLogger(HelpController.class); private static Logger logger = LoggerFactory.getLogger(HelpController.class);
@Autowired @Autowired
private HelpApiService helpApiService; private HelpApiService helpApiService;
//获帮助列表 //获帮助列表
@RequestMapping("get-help-list") @RequestMapping("get-help-list")
public HaobanResponse getDictList(BasePageInfo pageInfo) { public HaobanResponse getDictList(BasePageInfo pageInfo) {
Page<HelpDTO> page = helpApiService.pageList(pageInfo); Page<HelpDTO> page = helpApiService.pageList(pageInfo);
return resultResponse(HaoBanErrCode.ERR_1,page); return resultResponse(HaoBanErrCode.ERR_1,page);
} }
//保存帮助 //保存帮助
@RequestMapping("save-help") @RequestMapping("save-help")
public HaobanResponse saveHelp(HelpDTO dto) { public HaobanResponse saveHelp(HelpDTO dto) {
int i = helpApiService.saveHelp(dto); int i = helpApiService.saveHelp(dto);
if(i == 8){ if(i == 8){
return resultResponse(HaoBanErrCode.ERR_10006); return resultResponse(HaoBanErrCode.ERR_10006);
} }
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
//查看帮助详情 //查看帮助详情
@RequestMapping("find-help-detail") @RequestMapping("find-help-detail")
public HaobanResponse findDictDetail(String helpId) { public HaobanResponse findDictDetail(String helpId) {
HelpDTO helpDTO = helpApiService.findOneHelp(helpId); HelpDTO helpDTO = helpApiService.findOneHelp(helpId);
return resultResponse(HaoBanErrCode.ERR_1,helpDTO); return resultResponse(HaoBanErrCode.ERR_1,helpDTO);
} }
//删除帮助 //删除帮助
@RequestMapping("del-help") @RequestMapping("del-help")
public HaobanResponse deleteDict(String helpId) { public HaobanResponse deleteDict(String helpId) {
helpApiService.deleteOne(helpId); helpApiService.deleteOne(helpId);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
} }
package com.gic.haoban.manage.web.controller; package com.gic.haoban.manage.web.controller;
import java.util.List; import java.util.List;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.MaidianDictDTO; import com.gic.haoban.manage.api.dto.MaidianDictDTO;
import com.gic.haoban.manage.api.dto.MaidianDictModuleDTO; import com.gic.haoban.manage.api.dto.MaidianDictModuleDTO;
import com.gic.haoban.manage.api.dto.MaidianDictPageDTO; import com.gic.haoban.manage.api.dto.MaidianDictPageDTO;
import com.gic.haoban.manage.api.service.MaidianDictApiService; import com.gic.haoban.manage.api.service.MaidianDictApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
@RequestMapping("/maidian") @RequestMapping("/maidian")
@RestController @RestController
public class MaidianDictController extends WebBaseController{ public class MaidianDictController extends WebBaseController{
private static final String LOGIN_URL = "/haoban-manage3-web/yw-login"; private static final String LOGIN_URL = "/haoban-manage3-web/yw-login";
private static Logger logger = LoggerFactory.getLogger(MaidianDictController.class); private static Logger logger = LoggerFactory.getLogger(MaidianDictController.class);
@Autowired @Autowired
private MaidianDictApiService maidianDictApiService; private MaidianDictApiService maidianDictApiService;
//保存模块 //保存模块
@RequestMapping("save-module") @RequestMapping("save-module")
public HaobanResponse saveModule(MaidianDictModuleDTO dto) { public HaobanResponse saveModule(MaidianDictModuleDTO dto) {
maidianDictApiService.saveModule(dto); maidianDictApiService.saveModule(dto);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
//保存字典 //保存字典
@RequestMapping("save-page") @RequestMapping("save-page")
public HaobanResponse savePage(MaidianDictDTO dto) { public HaobanResponse savePage(MaidianDictDTO dto) {
if(StringUtils.isEmpty(dto.getModuleId())){ if(StringUtils.isEmpty(dto.getModuleId())){
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
maidianDictApiService.savePage(dto); maidianDictApiService.savePage(dto);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
//删除模块 //删除模块
@RequestMapping("del-module") @RequestMapping("del-module")
public HaobanResponse delModule(String moduleId) { public HaobanResponse delModule(String moduleId) {
maidianDictApiService.delModule(moduleId); maidianDictApiService.delModule(moduleId);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
//删除字典 //删除字典
@RequestMapping("del-page") @RequestMapping("del-page")
public HaobanResponse delPage(String dictId) { public HaobanResponse delPage(String dictId) {
maidianDictApiService.delPage(dictId); maidianDictApiService.delPage(dictId);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
//字典页面 //字典页面
@RequestMapping("dict-page") @RequestMapping("dict-page")
public HaobanResponse dictPage( ) { public HaobanResponse dictPage( ) {
List<MaidianDictPageDTO> result = maidianDictApiService.dictPage(); List<MaidianDictPageDTO> result = maidianDictApiService.dictPage();
return resultResponse(HaoBanErrCode.ERR_1,result); return resultResponse(HaoBanErrCode.ERR_1,result);
} }
} }
package com.gic.haoban.manage.web.controller; package com.gic.haoban.manage.web.controller;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.clerk.api.dto.ClerkListDTO; import com.gic.clerk.api.dto.ClerkListDTO;
import com.gic.clerk.api.service.ClerkService; import com.gic.clerk.api.service.ClerkService;
import com.gic.enterprise.api.dto.EnterpriseDTO; import com.gic.enterprise.api.dto.EnterpriseDTO;
import com.gic.enterprise.api.dto.StoreDTO; import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.dto.StoreSearchDTO; import com.gic.enterprise.api.dto.StoreSearchDTO;
import com.gic.enterprise.api.service.EnterpriseService; import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.enterprise.api.service.StoreService; import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.common.utils.EntityUtil; import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.*; import com.gic.haoban.manage.api.dto.*;
import com.gic.haoban.manage.api.service.StaffApiService; import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.StaffClerkRelationApiService; import com.gic.haoban.manage.api.service.StaffClerkRelationApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseApiService; import com.gic.haoban.manage.api.service.WxEnterpriseApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService; import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.qo.StoreListQo; import com.gic.haoban.manage.web.qo.StoreListQo;
import com.gic.haoban.manage.web.vo.EnterpriseVo; import com.gic.haoban.manage.web.vo.EnterpriseVo;
import com.gic.haoban.manage.web.vo.StaffClerkInfoVo; import com.gic.haoban.manage.web.vo.StaffClerkInfoVo;
import com.gic.haoban.manage.web.vo.WxClerkInfoVO; import com.gic.haoban.manage.web.vo.WxClerkInfoVO;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* Created 2020/6/3. * Created 2020/6/3.
* *
* @author hua * @author hua
*/ */
@RestController @RestController
@RequestMapping("/pay") @RequestMapping("/pay")
public class PayController extends WebBaseController { public class PayController extends WebBaseController {
private static final Logger logger= LoggerFactory.getLogger(PayController.class); private static final Logger logger= LoggerFactory.getLogger(PayController.class);
@Autowired @Autowired
private StaffApiService staffApiService; private StaffApiService staffApiService;
@Autowired @Autowired
private WxEnterpriseApiService wxEnterpriseApiService; private WxEnterpriseApiService wxEnterpriseApiService;
@Autowired @Autowired
private StaffClerkRelationApiService staffClerkRelationApiService; private StaffClerkRelationApiService staffClerkRelationApiService;
@Autowired @Autowired
private ClerkService clerkService; private ClerkService clerkService;
@Autowired @Autowired
private StoreService storeService; private StoreService storeService;
@Autowired @Autowired
private WxEnterpriseRelatedApiService wxEnterpriseRelatedApiService; private WxEnterpriseRelatedApiService wxEnterpriseRelatedApiService;
@Autowired @Autowired
private EnterpriseService enterpriseService; private EnterpriseService enterpriseService;
/** /**
* 微信成员列表 * 微信成员列表
* @param userId * @param userId
* @param corpId * @param corpId
* @return * @return
*/ */
@RequestMapping("/wx-user-list") @RequestMapping("/wx-user-list")
public HaobanResponse userList(String userId,String corpId) { public HaobanResponse userList(String userId,String corpId) {
if (StringUtils.isAnyBlank(userId,corpId)) { if (StringUtils.isAnyBlank(userId,corpId)) {
logger.info("参数异常"); logger.info("参数异常");
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
WxEnterpriseDTO enterpriseDTO = wxEnterpriseApiService.getEnterpriseBycorpId(corpId); WxEnterpriseDTO enterpriseDTO = wxEnterpriseApiService.getEnterpriseBycorpId(corpId);
if (enterpriseDTO==null) { if (enterpriseDTO==null) {
logger.info("不存在商户"); logger.info("不存在商户");
return resultResponse(HaoBanErrCode.ERR_20001); return resultResponse(HaoBanErrCode.ERR_20001);
} }
StaffDTO staffDTO = staffApiService.selectByUserIdAndEnterpriseId(userId, enterpriseDTO.getWxEnterpriseId()); StaffDTO staffDTO = staffApiService.selectByUserIdAndEnterpriseId(userId, enterpriseDTO.getWxEnterpriseId());
if (staffDTO==null) { if (staffDTO==null) {
logger.info("不存在成员"); logger.info("不存在成员");
return resultResponse(HaoBanErrCode.ERR_6); return resultResponse(HaoBanErrCode.ERR_6);
} }
List<StaffClerkInfoDTO> list = staffClerkRelationApiService.listBindDetailByStaffId(staffDTO.getStaffId()); List<StaffClerkInfoDTO> list = staffClerkRelationApiService.listBindDetailByStaffId(staffDTO.getStaffId());
List<StaffClerkInfoVo> infoVos = EntityUtil.changeEntityListByJSON(StaffClerkInfoVo.class, list); List<StaffClerkInfoVo> infoVos = EntityUtil.changeEntityListByJSON(StaffClerkInfoVo.class, list);
if (CollectionUtils.isNotEmpty(infoVos)) { if (CollectionUtils.isNotEmpty(infoVos)) {
infoVos.forEach(staffClerkInfoVo -> { infoVos.forEach(staffClerkInfoVo -> {
com.gic.clerk.api.dto.ClerkDTO clerkDTO = clerkService.getClerkByClerkId(staffClerkInfoVo.getClerkId()); com.gic.clerk.api.dto.ClerkDTO clerkDTO = clerkService.getClerkByClerkId(staffClerkInfoVo.getClerkId());
StoreDTO store = storeService.getStore(staffClerkInfoVo.getStoreId()); StoreDTO store = storeService.getStore(staffClerkInfoVo.getStoreId());
if (null != clerkDTO) { if (null != clerkDTO) {
staffClerkInfoVo.setClerkType(clerkDTO.getClerkType()); staffClerkInfoVo.setClerkType(clerkDTO.getClerkType());
} }
if (null != store) { if (null != store) {
staffClerkInfoVo.setStoreCode(store.getStoreCode()); staffClerkInfoVo.setStoreCode(store.getStoreCode());
} }
staffClerkInfoVo.setWxEnterpriseName(enterpriseDTO.getCorpName()); staffClerkInfoVo.setWxEnterpriseName(enterpriseDTO.getCorpName());
}); });
} }
return resultResponse(HaoBanErrCode.ERR_1,infoVos); return resultResponse(HaoBanErrCode.ERR_1,infoVos);
} }
/** /**
* 微信成员列表 * 微信成员列表
* @param storeId * @param storeId
* @return * @return
*/ */
@RequestMapping("/store-clerk-list") @RequestMapping("/store-clerk-list")
public HaobanResponse storeList(String storeId,String corpId) { public HaobanResponse storeList(String storeId,String corpId) {
WxEnterpriseDTO enterpriseDTO = wxEnterpriseApiService.getEnterpriseBycorpId(corpId); WxEnterpriseDTO enterpriseDTO = wxEnterpriseApiService.getEnterpriseBycorpId(corpId);
if (enterpriseDTO==null) { if (enterpriseDTO==null) {
logger.info("不存在商户"); logger.info("不存在商户");
return resultResponse(HaoBanErrCode.ERR_20001); return resultResponse(HaoBanErrCode.ERR_20001);
} }
StoreDTO store = storeService.getStore(storeId); StoreDTO store = storeService.getStore(storeId);
if (store==null) { if (store==null) {
logger.info("不存在门店"); logger.info("不存在门店");
return resultResponse(HaoBanErrCode.ERR_20002); return resultResponse(HaoBanErrCode.ERR_20002);
} }
List<ClerkListDTO> list = clerkService.getClerkByStoreId(store.getEnterpriseId(), storeId); List<ClerkListDTO> list = clerkService.getClerkByStoreId(store.getEnterpriseId(), storeId);
List<WxClerkInfoVO> retList = EntityUtil.changeEntityListByJSON(WxClerkInfoVO.class, list); List<WxClerkInfoVO> retList = EntityUtil.changeEntityListByJSON(WxClerkInfoVO.class, list);
if (CollectionUtils.isNotEmpty(retList)) { if (CollectionUtils.isNotEmpty(retList)) {
List<StaffClerkRelationDTO> relationDTOS = staffClerkRelationApiService.listByStoreId(storeId); List<StaffClerkRelationDTO> relationDTOS = staffClerkRelationApiService.listByStoreId(storeId);
Map<String, StaffClerkRelationDTO> maps = relationDTOS.stream().collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, mid -> mid)); Map<String, StaffClerkRelationDTO> maps = relationDTOS.stream().collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, mid -> mid));
retList.stream().forEach(wxClerkInfoVO -> { retList.stream().forEach(wxClerkInfoVO -> {
StaffClerkRelationDTO relationDTO = maps.get(wxClerkInfoVO.getClerkId()); StaffClerkRelationDTO relationDTO = maps.get(wxClerkInfoVO.getClerkId());
if (null!=relationDTO) { if (null!=relationDTO) {
wxClerkInfoVO.setStaffId(relationDTO.getStaffId()); wxClerkInfoVO.setStaffId(relationDTO.getStaffId());
wxClerkInfoVO.setWxUserId(relationDTO.getWxUserId()); wxClerkInfoVO.setWxUserId(relationDTO.getWxUserId());
} }
}); });
} }
return resultResponse(HaoBanErrCode.ERR_1,retList); return resultResponse(HaoBanErrCode.ERR_1,retList);
} }
/** /**
* 微信企业列表 * 微信企业列表
* @return * @return
*/ */
@RequestMapping("/enterprise-list") @RequestMapping("/enterprise-list")
public HaobanResponse enterpriseList() { public HaobanResponse enterpriseList() {
List<EnterpriseDetailDTO> list = wxEnterpriseRelatedApiService.queryAllHasGicEnterpriseId(); List<EnterpriseDetailDTO> list = wxEnterpriseRelatedApiService.queryAllHasGicEnterpriseId();
Set<String> wxEnterpriseIds = list.stream().map(enterpriseDetailDTO -> { Set<String> wxEnterpriseIds = list.stream().map(enterpriseDetailDTO -> {
return enterpriseDetailDTO.getWxEnterpriseId(); return enterpriseDetailDTO.getWxEnterpriseId();
}).collect(Collectors.toSet()); }).collect(Collectors.toSet());
List<String> enterpriseIds = list.stream().map(enterpriseDetailDTO -> { List<String> enterpriseIds = list.stream().map(enterpriseDetailDTO -> {
return enterpriseDetailDTO.getEnterpriseId(); return enterpriseDetailDTO.getEnterpriseId();
}).collect(Collectors.toList()); }).collect(Collectors.toList());
List<EnterpriseDTO> enterpriseDTOS = enterpriseService.listEnterpriseByIds(enterpriseIds); List<EnterpriseDTO> enterpriseDTOS = enterpriseService.listEnterpriseByIds(enterpriseIds);
Map<String, EnterpriseDTO> gicEntMap = enterpriseDTOS.stream().collect(Collectors.toMap(EnterpriseDTO::getEnterpriseId, _t -> _t)); Map<String, EnterpriseDTO> gicEntMap = enterpriseDTOS.stream().collect(Collectors.toMap(EnterpriseDTO::getEnterpriseId, _t -> _t));
List<EnterpriseVo> enterpriseVos = EntityUtil.changeEntityListByJSON(EnterpriseVo.class, list); List<EnterpriseVo> enterpriseVos = EntityUtil.changeEntityListByJSON(EnterpriseVo.class, list);
List<YwWxEnterpriseDTO> ywWxEnterpriseDTOS = wxEnterpriseApiService.listByIds(wxEnterpriseIds); List<YwWxEnterpriseDTO> ywWxEnterpriseDTOS = wxEnterpriseApiService.listByIds(wxEnterpriseIds);
Map<String, YwWxEnterpriseDTO> map = ywWxEnterpriseDTOS.stream().collect(Collectors.toMap(YwWxEnterpriseDTO::getWxEnterpriseId, _t -> _t)); Map<String, YwWxEnterpriseDTO> map = ywWxEnterpriseDTOS.stream().collect(Collectors.toMap(YwWxEnterpriseDTO::getWxEnterpriseId, _t -> _t));
enterpriseVos.forEach(enterpriseVo -> { enterpriseVos.forEach(enterpriseVo -> {
YwWxEnterpriseDTO enterpriseDTO = map.get(enterpriseVo.getWxEnterpriseId()); YwWxEnterpriseDTO enterpriseDTO = map.get(enterpriseVo.getWxEnterpriseId());
EnterpriseDTO gicEnt = gicEntMap.get(enterpriseVo.getEnterpriseId()); EnterpriseDTO gicEnt = gicEntMap.get(enterpriseVo.getEnterpriseId());
if (null!=enterpriseDTO) { if (null!=enterpriseDTO) {
enterpriseVo.setWxEnterpiseName(enterpriseDTO.getCorpName()); enterpriseVo.setWxEnterpiseName(enterpriseDTO.getCorpName());
} }
if (null!=gicEnt) { if (null!=gicEnt) {
enterpriseVo.setEnterpriseName(gicEnt.getEnterpriseName()); enterpriseVo.setEnterpriseName(gicEnt.getEnterpriseName());
} }
}); });
return resultResponse(HaoBanErrCode.ERR_1,enterpriseVos); return resultResponse(HaoBanErrCode.ERR_1,enterpriseVos);
} }
/** /**
* 微信企业列表 * 微信企业列表
* @return * @return
*/ */
@RequestMapping("/store-list") @RequestMapping("/store-list")
public HaobanResponse storeList(@RequestBody StoreListQo qo) { public HaobanResponse storeList(@RequestBody StoreListQo qo) {
if (StringUtils.isBlank(qo.getEnterpriseId())){ if (StringUtils.isBlank(qo.getEnterpriseId())){
resultResponse(HaoBanErrCode.ERR_2); resultResponse(HaoBanErrCode.ERR_2);
} }
StoreSearchDTO searchDTO = EntityUtil.changeEntityByOrika(StoreSearchDTO.class, qo); StoreSearchDTO searchDTO = EntityUtil.changeEntityByOrika(StoreSearchDTO.class, qo);
Page page = new Page(); Page page = new Page();
page.setCurrentPage(qo.getPageNum()); page.setCurrentPage(qo.getPageNum());
page.setPageSize(qo.getPageSize()); page.setPageSize(qo.getPageSize());
Page ret = storeService.storeListPage(page, searchDTO); Page ret = storeService.storeListPage(page, searchDTO);
return resultResponse(HaoBanErrCode.ERR_1,ret); return resultResponse(HaoBanErrCode.ERR_1,ret);
} }
} }
...@@ -34,5 +34,17 @@ public class WebBaseController { ...@@ -34,5 +34,17 @@ public class WebBaseController {
response.setErrorCode(errCode.getCode()); response.setErrorCode(errCode.getCode());
return response; return response;
} }
public HaobanResponse success(Object obj) {
return resultResponse(HaoBanErrCode.ERR_1, obj, null);
}
public HaobanResponse fail(String message) {
HaobanResponse response = new HaobanResponse();
response.setMessage(message);
response.setErrorCode(HaoBanErrCode.ERR_OTHER.getCode());
response.setDetailError(message);
return response;
}
} }
package com.gic.haoban.manage.web.controller.test; package com.gic.haoban.manage.web.controller.test;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.commons.util.RandomUtil; import com.gic.commons.util.RandomUtil;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse; import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.ExternalUserDTO; import com.gic.haoban.manage.api.dto.ExternalUserDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO; import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.StaffDTO; import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.enums.ChannelCodeEnum; import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService; import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService;
import com.gic.haoban.manage.api.service.StaffApiService; import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.StaffClerkRelationApiService; import com.gic.haoban.manage.api.service.StaffClerkRelationApiService;
import com.gic.haoban.manage.web.controller.WebBaseController; import com.gic.haoban.manage.web.controller.WebBaseController;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.qo.ImportMemberQo; import com.gic.haoban.manage.web.qo.ImportMemberQo;
import com.gic.haoban.task.manage.api.dto.MarketClueTaskDTO; import com.gic.haoban.task.manage.api.dto.MarketClueTaskDTO;
import com.gic.haoban.task.manage.api.service.IMarketClueTaskApiService; import com.gic.haoban.task.manage.api.service.IMarketClueTaskApiService;
import com.gic.haoban.task.manage.api.service.IMarketTaskMemberApiService; import com.gic.haoban.task.manage.api.service.IMarketTaskMemberApiService;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Random; import java.util.Random;
import static org.slf4j.LoggerFactory.getLogger; import static org.slf4j.LoggerFactory.getLogger;
/** /**
* Created 2021/6/21. * Created 2021/6/21.
* *
* @author hua * @author hua
*/ */
@RestController @RestController
@RequestMapping("/test-data") @RequestMapping("/test-data")
public class TestDataImportController extends WebBaseController { public class TestDataImportController extends WebBaseController {
private static final Logger logger = getLogger(TestDataImportController.class); private static final Logger logger = getLogger(TestDataImportController.class);
@Autowired @Autowired
private StaffApiService staffApiService; private StaffApiService staffApiService;
@Autowired @Autowired
private StaffClerkRelationApiService staffClerkRelationApiService; private StaffClerkRelationApiService staffClerkRelationApiService;
@Autowired @Autowired
private MemberUnionidRelatedApiService memberUnionidRelatedApiService; private MemberUnionidRelatedApiService memberUnionidRelatedApiService;
@Autowired @Autowired
private IMarketClueTaskApiService iMarketClueTaskApiService; private IMarketClueTaskApiService iMarketClueTaskApiService;
@Autowired @Autowired
private IMarketTaskMemberApiService iMarketTaskMemberApiService; private IMarketTaskMemberApiService iMarketTaskMemberApiService;
/** /**
* 导入会员好友 * 导入会员好友
* *
* @param qo * @param qo
* @return * @return
*/ */
@RequestMapping("/friend-import") @RequestMapping("/friend-import")
public HaobanResponse importFriend(ImportMemberQo qo) { public HaobanResponse importFriend(ImportMemberQo qo) {
if (StringUtils.isAnyBlank(qo.getClerkCode(), qo.getClerkId(), qo.getDepartmentId(), qo.getEnterpriseId(), qo.getMemberId() if (StringUtils.isAnyBlank(qo.getClerkCode(), qo.getClerkId(), qo.getDepartmentId(), qo.getEnterpriseId(), qo.getMemberId()
, qo.getPhoneNumber(), qo.getStoreId(), qo.getUnionid(), qo.getWxEnterpriseId())) { , qo.getPhoneNumber(), qo.getStoreId(), qo.getUnionid(), qo.getWxEnterpriseId())) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
StaffDTO staffDTO = staffApiService.selectByUserIdAndEnterpriseId(qo.getWxUserId(), qo.getWxEnterpriseId()); StaffDTO staffDTO = staffApiService.selectByUserIdAndEnterpriseId(qo.getWxUserId(), qo.getWxEnterpriseId());
if (null == staffDTO) { if (null == staffDTO) {
StaffDTO staff = new StaffDTO(); StaffDTO staff = new StaffDTO();
staff.setPhoneNumber(qo.getPhoneNumber()); staff.setPhoneNumber(qo.getPhoneNumber());
staff.setWxUserId(qo.getWxUserId()); staff.setWxUserId(qo.getWxUserId());
staff.setWxEnterpriseId(qo.getWxEnterpriseId()); staff.setWxEnterpriseId(qo.getWxEnterpriseId());
staff.setStaffName(qo.getClerkCode()); staff.setStaffName(qo.getClerkCode());
staff.setSex(1); staff.setSex(1);
staff.setNationCode("86"); staff.setNationCode("86");
staff.setActiveFlag(1); staff.setActiveFlag(1);
ServiceResponse add = staffApiService.add(staff, qo.getDepartmentId()); ServiceResponse add = staffApiService.add(staff, qo.getDepartmentId());
if (add.getCode() == 1) { if (add.getCode() == 1) {
staffDTO = staffApiService.selectById(add.getResult().toString()); staffDTO = staffApiService.selectById(add.getResult().toString());
} }
} }
StaffClerkRelationDTO clerkRelationDTO = staffClerkRelationApiService.getOneByStoreIdAndStaffId(qo.getStoreId(), staffDTO.getStaffId()); StaffClerkRelationDTO clerkRelationDTO = staffClerkRelationApiService.getOneByStoreIdAndStaffId(qo.getStoreId(), staffDTO.getStaffId());
if (clerkRelationDTO == null) { if (clerkRelationDTO == null) {
StaffClerkRelationDTO staffClerkRelationDTO = new StaffClerkRelationDTO(); StaffClerkRelationDTO staffClerkRelationDTO = new StaffClerkRelationDTO();
staffClerkRelationDTO.setStoreId(qo.getStoreId()); staffClerkRelationDTO.setStoreId(qo.getStoreId());
staffClerkRelationDTO.setClerkId(qo.getClerkId()); staffClerkRelationDTO.setClerkId(qo.getClerkId());
staffClerkRelationDTO.setClerkCode(qo.getClerkCode()); staffClerkRelationDTO.setClerkCode(qo.getClerkCode());
staffClerkRelationDTO.setWxUserId(staffDTO.getWxUserId()); staffClerkRelationDTO.setWxUserId(staffDTO.getWxUserId());
staffClerkRelationDTO.setStaffId(staffDTO.getStaffId()); staffClerkRelationDTO.setStaffId(staffDTO.getStaffId());
staffClerkRelationDTO.setWxEnterpriseId(qo.getWxEnterpriseId()); staffClerkRelationDTO.setWxEnterpriseId(qo.getWxEnterpriseId());
staffClerkRelationDTO.setEnterpriseId(qo.getEnterpriseId()); staffClerkRelationDTO.setEnterpriseId(qo.getEnterpriseId());
ServiceResponse response = staffClerkRelationApiService.bindStaffClerk(staffClerkRelationDTO, "-1", ChannelCodeEnum.ADMIN_BIND.getCode()); ServiceResponse response = staffClerkRelationApiService.bindStaffClerk(staffClerkRelationDTO, "-1", ChannelCodeEnum.ADMIN_BIND.getCode());
} }
//新增好友 //新增好友
ExternalUserDTO dto = new ExternalUserDTO(); ExternalUserDTO dto = new ExternalUserDTO();
dto.setUnionId(qo.getUnionid()); dto.setUnionId(qo.getUnionid());
dto.setWxUserId(qo.getWxUserId()); dto.setWxUserId(qo.getWxUserId());
dto.setWxEnterpriseId(qo.getWxEnterpriseId()); dto.setWxEnterpriseId(qo.getWxEnterpriseId());
dto.setMemberId(qo.getMemberId()); dto.setMemberId(qo.getMemberId());
dto.setExternalUserId(qo.getMemberId()); dto.setExternalUserId(qo.getMemberId());
dto.setClerkId(qo.getClerkId()); dto.setClerkId(qo.getClerkId());
dto.setStoreId(qo.getStoreId()); dto.setStoreId(qo.getStoreId());
dto.setEnterpriseId(qo.getEnterpriseId()); dto.setEnterpriseId(qo.getEnterpriseId());
dto.setName("测试会员" + RandomUtil.getRandomString(5)); dto.setName("测试会员" + RandomUtil.getRandomString(5));
dto.setStaffId(staffDTO.getStaffId()); dto.setStaffId(staffDTO.getStaffId());
dto.setAddCreateTime(Long.valueOf(System.currentTimeMillis() / 1000).toString()); dto.setAddCreateTime(Long.valueOf(System.currentTimeMillis() / 1000).toString());
memberUnionidRelatedApiService.addExternal(dto); memberUnionidRelatedApiService.addExternal(dto);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
/** /**
* 处理任务 * 处理任务
* *
* @param ecmId 计划id * @param ecmId 计划id
* @param enterpriseId 企业id * @param enterpriseId 企业id
* @param touchFinishType 完成类型 任务完成触达方式, 1 : 企业微信, 2 : 企业电话, 3 : 私人电话, 4 : 私人短信', * @param touchFinishType 完成类型 任务完成触达方式, 1 : 企业微信, 2 : 企业电话, 3 : 私人电话, 4 : 私人短信',
* @param rate 0-100 完成百分比 * @param rate 0-100 完成百分比
* @return * @return
*/ */
@RequestMapping("/deal-task") @RequestMapping("/deal-task")
public HaobanResponse dealTask(String ecmId, String enterpriseId, String touchFinishType, int rate) { public HaobanResponse dealTask(String ecmId, String enterpriseId, String touchFinishType, int rate) {
if (StringUtils.isAnyBlank(ecmId, enterpriseId, touchFinishType)) { if (StringUtils.isAnyBlank(ecmId, enterpriseId, touchFinishType)) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
if (rate <= 0) { if (rate <= 0) {
logger.info("rate大于0需要"); logger.info("rate大于0需要");
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
BasePageInfo basePageInfo = new BasePageInfo(); BasePageInfo basePageInfo = new BasePageInfo();
basePageInfo.setPageSize(2000); basePageInfo.setPageSize(2000);
int num = 1; int num = 1;
Page<MarketClueTaskDTO> page = iMarketClueTaskApiService.pageMarketClueTaskDTO(ecmId, enterpriseId, basePageInfo); Page<MarketClueTaskDTO> page = iMarketClueTaskApiService.pageMarketClueTaskDTO(ecmId, enterpriseId, basePageInfo);
while (CollectionUtils.isNotEmpty(page.getResult())) { while (CollectionUtils.isNotEmpty(page.getResult())) {
page.getResult().forEach(dto -> { page.getResult().forEach(dto -> {
Random random = new Random(100); Random random = new Random(100);
int i = random.nextInt(); int i = random.nextInt();
if (i <= rate) { if (i <= rate) {
logger.info("处理:{}", com.alibaba.fastjson.JSONObject.toJSONString(dto)); logger.info("处理:{}", com.alibaba.fastjson.JSONObject.toJSONString(dto));
iMarketTaskMemberApiService.detailsRefresh(enterpriseId, dto.getTaskId(), true); iMarketTaskMemberApiService.detailsRefresh(enterpriseId, dto.getTaskId(), true);
} }
}); });
num++; num++;
basePageInfo.setPageNum(num); basePageInfo.setPageNum(num);
page = iMarketClueTaskApiService.pageMarketClueTaskDTO(ecmId, enterpriseId, basePageInfo); page = iMarketClueTaskApiService.pageMarketClueTaskDTO(ecmId, enterpriseId, basePageInfo);
} }
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
} }
package com.gic.haoban.manage.web.controller.test; package com.gic.haoban.manage.web.controller.test;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.service.HandoverOperationApiService; import com.gic.haoban.manage.api.service.HandoverOperationApiService;
import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService; import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService;
import com.gic.haoban.manage.web.controller.WebBaseController; import com.gic.haoban.manage.web.controller.WebBaseController;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.task.manage.api.service.TaskQuartzCallbackApiService; import com.gic.haoban.task.manage.api.service.TaskQuartzCallbackApiService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
/** /**
* Created 2018/12/17. * Created 2018/12/17.
* *
* @author hua * @author hua
*/ */
@Controller @Controller
@RequestMapping("/test") @RequestMapping("/test")
public class TestTaskController extends WebBaseController { public class TestTaskController extends WebBaseController {
@Autowired @Autowired
private TaskQuartzCallbackApiService taskQuartzCallbackApiService; private TaskQuartzCallbackApiService taskQuartzCallbackApiService;
@Autowired @Autowired
private HandoverOperationApiService handoverOperationApiService; private HandoverOperationApiService handoverOperationApiService;
@Autowired @Autowired
private MemberUnionidRelatedApiService memberUnionidRelatedApiService; private MemberUnionidRelatedApiService memberUnionidRelatedApiService;
@RequestMapping("/groupSendCreateEnd") @RequestMapping("/groupSendCreateEnd")
@ResponseBody @ResponseBody
public HaobanResponse testListVo(String str) { public HaobanResponse testListVo(String str) {
if (StringUtils.isBlank(str)) { if (StringUtils.isBlank(str)) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
taskQuartzCallbackApiService.groupSendCreateEnd(str); taskQuartzCallbackApiService.groupSendCreateEnd(str);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
@RequestMapping("/sendMessageAfter") @RequestMapping("/sendMessageAfter")
@ResponseBody @ResponseBody
public HaobanResponse sendMessageAfter(String str) { public HaobanResponse sendMessageAfter(String str) {
if (StringUtils.isBlank(str)) { if (StringUtils.isBlank(str)) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
taskQuartzCallbackApiService.sendMessageAfter(str); taskQuartzCallbackApiService.sendMessageAfter(str);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
@RequestMapping("/setTest") @RequestMapping("/setTest")
@ResponseBody @ResponseBody
public HaobanResponse setTest(String enterpriseId) { public HaobanResponse setTest(String enterpriseId) {
if (StringUtils.isBlank(enterpriseId)) { if (StringUtils.isBlank(enterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
taskQuartzCallbackApiService.setTest(enterpriseId); taskQuartzCallbackApiService.setTest(enterpriseId);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
@RequestMapping("/delTest") @RequestMapping("/delTest")
@ResponseBody @ResponseBody
public HaobanResponse delTest() { public HaobanResponse delTest() {
taskQuartzCallbackApiService.delTest(); taskQuartzCallbackApiService.delTest();
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
@RequestMapping("/dealQywxEnterpriseHandover") @RequestMapping("/dealQywxEnterpriseHandover")
@ResponseBody @ResponseBody
public HaobanResponse dealQywxEnterpriseHandover(String wxEnterpriseId) { public HaobanResponse dealQywxEnterpriseHandover(String wxEnterpriseId) {
if (StringUtils.isBlank(wxEnterpriseId)) { if (StringUtils.isBlank(wxEnterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
handoverOperationApiService.dealQywxEnterpriseHandover(wxEnterpriseId); handoverOperationApiService.dealQywxEnterpriseHandover(wxEnterpriseId);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
@RequestMapping("/dealQywxEnterpriseHandoverResult") @RequestMapping("/dealQywxEnterpriseHandoverResult")
@ResponseBody @ResponseBody
public HaobanResponse dealQywxEnterpriseHandoverResult(String wxEnterpriseId) { public HaobanResponse dealQywxEnterpriseHandoverResult(String wxEnterpriseId) {
if (StringUtils.isBlank(wxEnterpriseId)) { if (StringUtils.isBlank(wxEnterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
handoverOperationApiService.dealQywxEnterpriseHandoverResult(wxEnterpriseId); handoverOperationApiService.dealQywxEnterpriseHandoverResult(wxEnterpriseId);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
/** /**
* 处理标签同步 * 处理标签同步
* @param params * @param params
* @return * @return
*/ */
@RequestMapping("/dealFriendTag") @RequestMapping("/dealFriendTag")
@ResponseBody @ResponseBody
public HaobanResponse dealFriendTag(String params) { public HaobanResponse dealFriendTag(String params) {
if (StringUtils.isBlank(params)) { if (StringUtils.isBlank(params)) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
memberUnionidRelatedApiService.dealQywxExternalUser(params); memberUnionidRelatedApiService.dealQywxExternalUser(params);
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
} }
package com.gic.haoban.manage.web.errCode; package com.gic.haoban.manage.web.errCode;
/** /**
* Created by fudh on 2018/3/4. * Created by fudh on 2018/3/4.
*/ */
public enum HaoBanErrCode { public enum HaoBanErrCode {
//update by 牧峰 2018-7-25 19:58:06 //update by 牧峰 2018-7-25 19:58:06
/** /**
* 操作失败 * 操作失败
*/ */
ERR_0(0, "操作失败"), ERR_0(0, "操作失败"),
/** /**
* 操作成功 * 操作成功
*/ */
ERR_1(1, "操作成功"), ERR_1(1, "操作成功"),
/** /**
* 缺少参数 * 缺少参数
*/ */
ERR_2(2, "缺少参数"), ERR_2(2, "缺少参数"),
/** /**
* 系统异常 * 系统异常
*/ */
ERR_3(3, "系统异常"), ERR_3(3, "系统异常"),
/** /**
* 登录异常 * 登录异常
*/ */
ERR_4(4, "登录异常"), ERR_4(4, "登录异常"),
/** /**
* 输入参数错误 * 输入参数错误
*/ */
ERR_5(5, "输入参数错误"), ERR_5(5, "输入参数错误"),
/** /**
* 该企业登录用户不存在 * 该企业登录用户不存在
*/ */
ERR_6(6, "该企业登录用户不存在"), ERR_6(6, "该企业登录用户不存在"),
/** /**
* 该用户缺少该权限 * 该用户缺少该权限
*/ */
ERR_7(7, "该用户缺少该权限"), ERR_7(7, "该用户缺少该权限"),
/** /**
* 查无数据 * 查无数据
*/ */
ERR_8(8, "查无数据"), ERR_8(8, "查无数据"),
/** /**
* 非法操作 * 非法操作
*/ */
ERR_9(9, "非法操作"), ERR_9(9, "非法操作"),
/** /**
* 用户已经登录 * 用户已经登录
*/ */
ERR_10(10, "用户已经登录"), ERR_10(10, "用户已经登录"),
/** /**
* 验证码发送失败 * 验证码发送失败
*/ */
ERR_11(11, "验证码发送失败"), ERR_11(11, "验证码发送失败"),
/** /**
* 验证码校验失败 * 验证码校验失败
*/ */
ERR_12(12, "验证码校验失败"), ERR_12(12, "验证码校验失败"),
ERR_10001(10001,"父部门不存在"), ERR_10001(10001,"父部门不存在"),
ERR_10002(10002,"门店类型部门不能新增子节点"), ERR_10002(10002,"门店类型部门不能新增子节点"),
ERR_10003(10003,"部门不存在"), ERR_10003(10003,"部门不存在"),
ERR_10004(10004,"成员名称不能为空"), ERR_10004(10004,"成员名称不能为空"),
ERR_10005(10005,"成员已存在"), ERR_10005(10005,"成员已存在"),
ERR_10006(10006,"字典key已存在"), ERR_10006(10006,"字典key已存在"),
ERR_10007(10007,"字典名称已存在"), ERR_10007(10007,"字典名称已存在"),
ERR_10008(10008,"title已存在"), ERR_10008(10008,"title已存在"),
ERR_10020(10020,"模板名称已存在"), ERR_10020(10020,"模板名称已存在"),
ERR_20001(20001,"企业微信商户不存在"), ERR_20001(20001,"企业微信商户不存在"),
ERR_20002(20002,"门店不存在"), ERR_20002(20002,"门店不存在"),
ERR_30001(30001,"已存在同步任务, 无法关闭"), ERR_30001(30001,"已存在同步任务, 无法关闭"),
ERR_40001(40001,"企业已操作会员关联, 请7天后重试"), ERR_40001(40001,"企业已操作会员关联, 请7天后重试"),
ERR_DEFINE(-888, "自定义错误"), ERR_DEFINE(-888, "自定义错误"),
ERR_OTHER(-999, "未知错误code"); ERR_OTHER(-999, "未知错误code");
private int code; private int code;
private String msg; private String msg;
private HaoBanErrCode(int code, String value) { private HaoBanErrCode(int code, String value) {
this.code = code; this.code = code;
this.msg = value; this.msg = value;
} }
public static HaoBanErrCode getValue(int code) { public static HaoBanErrCode getValue(int code) {
for (HaoBanErrCode sec : HaoBanErrCode.values()) { for (HaoBanErrCode sec : HaoBanErrCode.values()) {
if (code == sec.getCode()) { if (code == sec.getCode()) {
return sec; return sec;
} }
} }
ERR_OTHER.setMsg("未知错误code:" + code); ERR_OTHER.setMsg("未知错误code:" + code);
return ERR_OTHER; return ERR_OTHER;
} }
public int getCode() { public int getCode() {
return code; return code;
} }
public void setCode(int code) { public void setCode(int code) {
this.code = code; this.code = code;
} }
public String getMsg() { public String getMsg() {
return msg; return msg;
} }
public void setMsg(String msg) { public void setMsg(String msg) {
this.msg = msg; this.msg = msg;
} }
} }
package com.gic.haoban.manage.web.exception; package com.gic.haoban.manage.web.exception;
/** /**
* Created 2018/7/24. * Created 2018/7/24.
* *
* @author hua * @author hua
*/ */
public class ControllerException extends Exception { public class ControllerException extends Exception {
} }
package com.gic.haoban.manage.web.exception; package com.gic.haoban.manage.web.exception;
import com.gic.haoban.base.api.common.ShowFrontMessageException; import com.gic.haoban.base.api.common.ShowFrontMessageException;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.web.controller.WebBaseController; import com.gic.haoban.manage.web.controller.WebBaseController;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** /**
* Created 2018/7/24. * Created 2018/7/24.
* *
* @author hua * @author hua
*/ */
@ControllerAdvice @ControllerAdvice
public class GlobalExceptionHandler extends WebBaseController { public class GlobalExceptionHandler extends WebBaseController {
private static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class); private static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
private static final Pattern pattern = Pattern.compile("(.*: )(.*)(\\n.*)"); private static final Pattern pattern = Pattern.compile("(.*: )(.*)(\\n.*)");
@ResponseBody @ResponseBody
@ExceptionHandler(ShowFrontMessageException.class) @ExceptionHandler(ShowFrontMessageException.class)
public HaobanResponse ControllerException(HttpServletResponse response, ShowFrontMessageException ex) { public HaobanResponse ControllerException(HttpServletResponse response, ShowFrontMessageException ex) {
HaobanResponse res = new HaobanResponse(); HaobanResponse res = new HaobanResponse();
res.setErrorCode(HaoBanErrCode.ERR_0.getCode()); res.setErrorCode(HaoBanErrCode.ERR_0.getCode());
res.setMessage(ex.getMessage()); res.setMessage(ex.getMessage());
return res; return res;
} }
// @ResponseBody // @ResponseBody
// @ExceptionHandler(RuntimeException.class) // @ExceptionHandler(RuntimeException.class)
// public HaobanResponse ControllerException(HttpServletResponse response, RuntimeException ex) { // public HaobanResponse ControllerException(HttpServletResponse response, RuntimeException ex) {
// HaobanResponse res = new HaobanResponse(); // HaobanResponse res = new HaobanResponse();
// res.setErrorCode(HaoBanErrCode.ERR_3.getCode()); // res.setErrorCode(HaoBanErrCode.ERR_3.getCode());
// String message = ex.getMessage(); // String message = ex.getMessage();
// if (message != null && message.indexOf(ShowFrontMessageException.class.getName()) > -1) { // if (message != null && message.indexOf(ShowFrontMessageException.class.getName()) > -1) {
// Matcher matcher = pattern.matcher(message); // Matcher matcher = pattern.matcher(message);
// while (matcher.find()) { // while (matcher.find()) {
// message = (matcher.group(2)); // message = (matcher.group(2));
// } // }
// } else { // } else {
// message = HaoBanErrCode.ERR_3.getMsg(); // message = HaoBanErrCode.ERR_3.getMsg();
// } // }
// res.setMessage(message); // res.setMessage(message);
// return res; // return res;
// } // }
// @ResponseBody // @ResponseBody
// @ExceptionHandler(Exception.class) // @ExceptionHandler(Exception.class)
// public HaobanResponse ControllerException(HttpServletResponse response, Exception ex) { // public HaobanResponse ControllerException(HttpServletResponse response, Exception ex) {
// logger.error("err"); // logger.error("err");
// ex.printStackTrace(); // ex.printStackTrace();
// HaoBanErrCode errCode = HaoBanErrCode.ERR_3; // HaoBanErrCode errCode = HaoBanErrCode.ERR_3;
// StringBuilder sb = new StringBuilder(); // StringBuilder sb = new StringBuilder();
// ByteArrayOutputStream baos = new ByteArrayOutputStream(); // ByteArrayOutputStream baos = new ByteArrayOutputStream();
// try (PrintWriter printWriter = new PrintWriter(baos)) { // try (PrintWriter printWriter = new PrintWriter(baos)) {
// ex.printStackTrace(printWriter); // ex.printStackTrace(printWriter);
// } // }
// try { // try {
// sb.append(baos.toString()); // sb.append(baos.toString());
// } catch (Exception ignored) { // } catch (Exception ignored) {
// } // }
// if (sb.length() == 0) { // if (sb.length() == 0) {
// sb.append(ex.getMessage()); // sb.append(ex.getMessage());
// } // }
// //
// // 输出详细错误信息,便于调试 // // 输出详细错误信息,便于调试
// return resultResponse(errCode, null, sb.toString()); // return resultResponse(errCode, null, sb.toString());
// } // }
@ResponseBody @ResponseBody
@ExceptionHandler(NoLoginException.class) @ExceptionHandler(NoLoginException.class)
public HaobanResponse ControllerException(HttpServletResponse response, NoLoginException ex) { public HaobanResponse ControllerException(HttpServletResponse response, NoLoginException ex) {
return resultResponse(HaoBanErrCode.ERR_4); return resultResponse(HaoBanErrCode.ERR_4);
} }
} }
package com.gic.haoban.manage.web.exception; package com.gic.haoban.manage.web.exception;
/** /**
* 用户未登陆异常 * 用户未登陆异常
* *
* @author zhurz * @author zhurz
*/ */
public class NoLoginException extends RuntimeException { public class NoLoginException extends RuntimeException {
} }
package com.gic.haoban.manage.web.init; package com.gic.haoban.manage.web.init;
import com.gic.dict.api.dto.GlobalDictMap; import com.gic.dict.api.dto.GlobalDictMap;
import com.gic.dict.api.service.ManagerDictService; import com.gic.dict.api.service.ManagerDictService;
import com.gic.quartz.api.dto.QuartzTaskDTO; import com.gic.quartz.api.dto.QuartzTaskDTO;
import com.gic.quartz.api.service.QuartzService; import com.gic.quartz.api.service.QuartzService;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware; import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component @Component
public class MyApplicationContextAware implements ApplicationContextAware { public class MyApplicationContextAware implements ApplicationContextAware {
private Logger log = LogManager.getLogger(MyApplicationContextAware.class); private Logger log = LogManager.getLogger(MyApplicationContextAware.class);
private static ApplicationContext applicationContext; private static ApplicationContext applicationContext;
@Override @Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
} }
package com.gic.haoban.manage.web.qo; package com.gic.haoban.manage.web.qo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import java.io.Serializable;
/** /**
* Created 2021/6/21. * Created 2021/6/21.
* *
* @author hua * @author hua
*/ */
public class ImportMemberQo implements Serializable { public class ImportMemberQo implements Serializable {
private String wxEnterpriseId; private String wxEnterpriseId;
private String enterpriseId; private String enterpriseId;
private String memberId; private String memberId;
private String unionid; private String unionid;
private String clerkId; private String clerkId;
private String clerkCode; private String clerkCode;
private String storeId; private String storeId;
private String wxUserId; private String wxUserId;
private String phoneNumber; private String phoneNumber;
private String departmentId; private String departmentId;
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
public void setEnterpriseId(String enterpriseId) { public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public String getDepartmentId() { public String getDepartmentId() {
return departmentId; return departmentId;
} }
public void setDepartmentId(String departmentId) { public void setDepartmentId(String departmentId) {
this.departmentId = departmentId; this.departmentId = departmentId;
} }
public String getPhoneNumber() { public String getPhoneNumber() {
return phoneNumber; return phoneNumber;
} }
public void setPhoneNumber(String phoneNumber) { public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber; this.phoneNumber = phoneNumber;
} }
public String getWxEnterpriseId() { public String getWxEnterpriseId() {
return wxEnterpriseId; return wxEnterpriseId;
} }
public void setWxEnterpriseId(String wxEnterpriseId) { public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId; this.wxEnterpriseId = wxEnterpriseId;
} }
public String getMemberId() { public String getMemberId() {
return memberId; return memberId;
} }
public void setMemberId(String memberId) { public void setMemberId(String memberId) {
this.memberId = memberId; this.memberId = memberId;
} }
public String getUnionid() { public String getUnionid() {
return unionid; return unionid;
} }
public void setUnionid(String unionid) { public void setUnionid(String unionid) {
this.unionid = unionid; this.unionid = unionid;
} }
public String getClerkId() { public String getClerkId() {
return clerkId; return clerkId;
} }
public void setClerkId(String clerkId) { public void setClerkId(String clerkId) {
this.clerkId = clerkId; this.clerkId = clerkId;
} }
public String getClerkCode() { public String getClerkCode() {
return clerkCode; return clerkCode;
} }
public void setClerkCode(String clerkCode) { public void setClerkCode(String clerkCode) {
this.clerkCode = clerkCode; this.clerkCode = clerkCode;
} }
public String getStoreId() { public String getStoreId() {
return storeId; return storeId;
} }
public void setStoreId(String storeId) { public void setStoreId(String storeId) {
this.storeId = storeId; this.storeId = storeId;
} }
public String getWxUserId() { public String getWxUserId() {
if (StringUtils.isBlank(wxUserId)) { if (StringUtils.isBlank(wxUserId)) {
return clerkCode; return clerkCode;
} }
return wxUserId; return wxUserId;
} }
public void setWxUserId(String wxUserId) { public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId; this.wxUserId = wxUserId;
} }
} }
package com.gic.haoban.manage.web.qo; package com.gic.haoban.manage.web.qo;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
* Created 2021/7/19. * Created 2021/7/19.
* *
* @author hua * @author hua
*/ */
public class QywxTagSyncInfoQo implements Serializable { public class QywxTagSyncInfoQo implements Serializable {
/** /**
* 任务id * 任务id
*/ */
private String taskId; private String taskId;
/** /**
* 任务类型 0标签同步 1会员标签同步 * 任务类型 0标签同步 1会员标签同步
* #taskTypeEnum * #taskTypeEnum
*/ */
private int taskType; private int taskType;
/** /**
* 数据id 对应memberId * 数据id 对应memberId
*/ */
private String dataId; private String dataId;
/** /**
* 同步类型 * 同步类型
*/ */
private int syncType; private int syncType;
private Integer times = 0; private Integer times = 0;
/** /**
* 批量导入时 * 批量导入时
*/ */
private List<String> memberIds; private List<String> memberIds;
/** /**
* 非必传 * 非必传
*/ */
private String wxEnterpriseId; private String wxEnterpriseId;
/** /**
* 非必传 * 非必传
*/ */
private String enterpriseId; private String enterpriseId;
public String getWxEnterpriseId() { public String getWxEnterpriseId() {
return wxEnterpriseId; return wxEnterpriseId;
} }
public void setWxEnterpriseId(String wxEnterpriseId) { public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId; this.wxEnterpriseId = wxEnterpriseId;
} }
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
public void setEnterpriseId(String enterpriseId) { public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public List<String> getMemberIds() { public List<String> getMemberIds() {
return memberIds; return memberIds;
} }
public void setMemberIds(List<String> memberIds) { public void setMemberIds(List<String> memberIds) {
this.memberIds = memberIds; this.memberIds = memberIds;
} }
public int getSyncType() { public int getSyncType() {
return syncType; return syncType;
} }
public void setSyncType(int syncType) { public void setSyncType(int syncType) {
this.syncType = syncType; this.syncType = syncType;
} }
/** /**
* 同步的id * 同步的id
*/ */
private Integer syncLogId; private Integer syncLogId;
public Integer getTimes() { public Integer getTimes() {
return times; return times;
} }
public void setTimes(Integer times) { public void setTimes(Integer times) {
this.times = times; this.times = times;
} }
public Integer getSyncLogId() { public Integer getSyncLogId() {
return syncLogId; return syncLogId;
} }
public void setSyncLogId(Integer syncLogId) { public void setSyncLogId(Integer syncLogId) {
this.syncLogId = syncLogId; this.syncLogId = syncLogId;
} }
public String getTaskId() { public String getTaskId() {
return taskId; return taskId;
} }
public void setTaskId(String taskId) { public void setTaskId(String taskId) {
this.taskId = taskId; this.taskId = taskId;
} }
public int getTaskType() { public int getTaskType() {
return taskType; return taskType;
} }
public void setTaskType(int taskType) { public void setTaskType(int taskType) {
this.taskType = taskType; this.taskType = taskType;
} }
public String getDataId() { public String getDataId() {
return dataId; return dataId;
} }
public void setDataId(String dataId) { public void setDataId(String dataId) {
this.dataId = dataId; this.dataId = dataId;
} }
} }
package com.gic.haoban.manage.web.qo; package com.gic.haoban.manage.web.qo;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
* Created 2020/9/16. * Created 2020/9/16.
* *
* @author hua * @author hua
*/ */
public class StoreListQo extends BasePageInfo { public class StoreListQo extends BasePageInfo {
private String storeGroupId; private String storeGroupId;
private String searchName; private String searchName;
private String enterpriseId; private String enterpriseId;
private String provinceId; private String provinceId;
private String cityId; private String cityId;
private String countyId; private String countyId;
private Integer storeType; private Integer storeType;
private List<String> storeIdList; private List<String> storeIdList;
private List<String> notStoreIdList; private List<String> notStoreIdList;
private String storeId; private String storeId;
public List<String> getStoreIdList() { public List<String> getStoreIdList() {
return storeIdList; return storeIdList;
} }
public void setStoreIdList(List<String> storeIdList) { public void setStoreIdList(List<String> storeIdList) {
this.storeIdList = storeIdList; this.storeIdList = storeIdList;
} }
public List<String> getNotStoreIdList() { public List<String> getNotStoreIdList() {
return notStoreIdList; return notStoreIdList;
} }
public void setNotStoreIdList(List<String> notStoreIdList) { public void setNotStoreIdList(List<String> notStoreIdList) {
this.notStoreIdList = notStoreIdList; this.notStoreIdList = notStoreIdList;
} }
public String getStoreGroupId() { public String getStoreGroupId() {
return storeGroupId; return storeGroupId;
} }
public void setStoreGroupId(String storeGroupId) { public void setStoreGroupId(String storeGroupId) {
this.storeGroupId = storeGroupId; this.storeGroupId = storeGroupId;
} }
public String getSearchName() { public String getSearchName() {
return searchName; return searchName;
} }
public void setSearchName(String searchName) { public void setSearchName(String searchName) {
this.searchName = searchName; this.searchName = searchName;
} }
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
public void setEnterpriseId(String enterpriseId) { public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public String getProvinceId() { public String getProvinceId() {
return provinceId; return provinceId;
} }
public void setProvinceId(String provinceId) { public void setProvinceId(String provinceId) {
this.provinceId = provinceId; this.provinceId = provinceId;
} }
public String getCityId() { public String getCityId() {
return cityId; return cityId;
} }
public void setCityId(String cityId) { public void setCityId(String cityId) {
this.cityId = cityId; this.cityId = cityId;
} }
public String getCountyId() { public String getCountyId() {
return countyId; return countyId;
} }
public void setCountyId(String countyId) { public void setCountyId(String countyId) {
this.countyId = countyId; this.countyId = countyId;
} }
public Integer getStoreType() { public Integer getStoreType() {
return storeType; return storeType;
} }
public void setStoreType(Integer storeType) { public void setStoreType(Integer storeType) {
this.storeType = storeType; this.storeType = storeType;
} }
public String getStoreId() { public String getStoreId() {
return storeId; return storeId;
} }
public void setStoreId(String storeId) { public void setStoreId(String storeId) {
this.storeId = storeId; this.storeId = storeId;
} }
} }
package com.gic.haoban.manage.web.qo; package com.gic.haoban.manage.web.qo;
import com.gic.haoban.base.api.common.AppJSONField; import com.gic.haoban.base.api.common.AppJSONField;
import java.io.Serializable; import java.io.Serializable;
/** /**
* Created 2018/10/22. * Created 2018/10/22.
* *
* @author hua * @author hua
*/ */
public class TestQo implements Serializable { public class TestQo implements Serializable {
private String id; private String id;
@AppJSONField(format = "ignore") @AppJSONField(format = "ignore")
private String name; private String name;
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public String getId() { public String getId() {
return id; return id;
} }
public void setId(String id) { public void setId(String id) {
this.id = id; this.id = id;
} }
} }
package com.gic.haoban.manage.web.qo;
import java.io.Serializable;
/**
* Created 2021/4/13.
*
* @author hua
*/
public class WxEnterpriseBindQo implements Serializable {
private String wxEnterpriseRelatedId;
private String wxEnterpriseId;
private String enterpriseId;
private String version;
private int rangeType = 1;
private String relations;
/**
* 0 自动开卡同一开平 1加好友不开卡
*/
private int memberOpenCardFlag;
/**
* 企业微信类型 0 总部 1代理
*/
private int wxEnterpriseType;
public String getWxEnterpriseRelatedId() {
return wxEnterpriseRelatedId;
}
public void setWxEnterpriseRelatedId(String wxEnterpriseRelatedId) {
this.wxEnterpriseRelatedId = wxEnterpriseRelatedId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public int getRangeType() {
return rangeType;
}
public void setRangeType(int rangeType) {
this.rangeType = rangeType;
}
public String getRelations() {
return relations;
}
public void setRelations(String relations) {
this.relations = relations;
}
public int getMemberOpenCardFlag() {
return memberOpenCardFlag;
}
public void setMemberOpenCardFlag(int memberOpenCardFlag) {
this.memberOpenCardFlag = memberOpenCardFlag;
}
public int getWxEnterpriseType() {
return wxEnterpriseType;
}
public void setWxEnterpriseType(int wxEnterpriseType) {
this.wxEnterpriseType = wxEnterpriseType;
}
}
package com.gic.haoban.manage.web.response; package com.gic.haoban.manage.web.response;
import com.gic.haoban.manage.api.dto.EnterpriseDTO; import com.gic.haoban.manage.api.dto.EnterpriseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
* Created 2018/12/28. * Created 2018/12/28.
* *
* @author hua * @author hua
*/ */
public class WebLoginResponse implements Serializable { public class WebLoginResponse implements Serializable {
private String userId; private String userId;
private List<EnterpriseDTO> enterpriseList; private List<EnterpriseDTO> enterpriseList;
public String getUserId() { public String getUserId() {
return userId; return userId;
} }
public void setUserId(String userId) { public void setUserId(String userId) {
this.userId = userId; this.userId = userId;
} }
public List<EnterpriseDTO> getEnterpriseList() { public List<EnterpriseDTO> getEnterpriseList() {
return enterpriseList; return enterpriseList;
} }
public void setEnterpriseList(List<EnterpriseDTO> enterpriseList) { public void setEnterpriseList(List<EnterpriseDTO> enterpriseList) {
this.enterpriseList = enterpriseList; this.enterpriseList = enterpriseList;
} }
} }
package com.gic.haoban.manage.web.utils; package com.gic.haoban.manage.web.utils;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.FileReader; import java.io.FileReader;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.FilenameFilter; import java.io.FilenameFilter;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.Reader; import java.io.Reader;
import java.io.Writer; import java.io.Writer;
public class IOUtils { public class IOUtils {
/** /**
* 6.编写一个程序,将D:\\java目录下的所有.java文件复制到D:\\jad目录下, * 6.编写一个程序,将D:\\java目录下的所有.java文件复制到D:\\jad目录下,
* 并将原来文件的扩展名从.java改为.jad。 * 并将原来文件的扩展名从.java改为.jad。
*/ */
// public static class FileCopy { // public static class FileCopy {
// public static void main(String[] args) { // public static void main(String[] args) {
// //
// File oriFile = new File("D:\\java");//原文件目录 // File oriFile = new File("D:\\java");//原文件目录
// //file.exists():判断文件目录是否存在 // //file.exists():判断文件目录是否存在
// //file.isDirectory():判断文件目录是否是一个目录 // //file.isDirectory():判断文件目录是否是一个目录
// if(!(oriFile.exists() && oriFile.isDirectory())){ // if(!(oriFile.exists() && oriFile.isDirectory())){
// System.out.println("文件目录不存在!"); // System.out.println("文件目录不存在!");
// } // }
// //
// File[] files = oriFile.listFiles( // File[] files = oriFile.listFiles(
// new FilenameFilter(){ //文件名称过滤器 // new FilenameFilter(){ //文件名称过滤器
// public boolean accept(File file, String name) { // public boolean accept(File file, String name) {
// return name.endsWith(".java"); // return name.endsWith(".java");
// } // }
// } // }
// ); // );
// System.out.println(files.length);//原文件个数 // System.out.println(files.length);//原文件个数
// //
// File objFile = new File("D:\\jad");//目标文件目录 // File objFile = new File("D:\\jad");//目标文件目录
// //objFile.exists():判断目标文件目录是否存在 // //objFile.exists():判断目标文件目录是否存在
// //objFile.mkdir():创建目标文件目录 // //objFile.mkdir():创建目标文件目录
// if(!objFile.exists()){ // if(!objFile.exists()){
// objFile.mkdir(); // objFile.mkdir();
// } // }
// //
// //copyByte(files,objFile); // //copyByte(files,objFile);
// copyChar(files,objFile); // copyChar(files,objFile);
// System.out.println("写入完成!"); // System.out.println("写入完成!");
// //
// } // }
//使用字节流进行文件复制(字节缓冲流可以不使用,使用其目的主要是为了提高性能) //使用字节流进行文件复制(字节缓冲流可以不使用,使用其目的主要是为了提高性能)
private static void copyByte(File[] files,File objFile){ private static void copyByte(File[] files,File objFile){
InputStream inputStream = null; InputStream inputStream = null;
OutputStream outputStream = null; OutputStream outputStream = null;
BufferedInputStream bufferedInputStream = null; BufferedInputStream bufferedInputStream = null;
BufferedOutputStream bufferedOutputStream = null; BufferedOutputStream bufferedOutputStream = null;
for(File f : files){ for(File f : files){
//替换文件后缀 //替换文件后缀
String objFileName = f.getName().replaceAll("\\.ACC$", ".mp3"); String objFileName = f.getName().replaceAll("\\.ACC$", ".mp3");
try { try {
inputStream = new FileInputStream(f); inputStream = new FileInputStream(f);
outputStream = new FileOutputStream(new File(objFile,objFileName)); outputStream = new FileOutputStream(new File(objFile,objFileName));
bufferedInputStream = new BufferedInputStream(inputStream); bufferedInputStream = new BufferedInputStream(inputStream);
bufferedOutputStream = new BufferedOutputStream(outputStream); bufferedOutputStream = new BufferedOutputStream(outputStream);
int c = 0; int c = 0;
while((c = bufferedInputStream.read()) != -1){ while((c = bufferedInputStream.read()) != -1){
bufferedOutputStream.write(c); bufferedOutputStream.write(c);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
try { try {
bufferedOutputStream.close(); bufferedOutputStream.close();
bufferedInputStream.close(); bufferedInputStream.close();
outputStream.close(); outputStream.close();
inputStream.close(); inputStream.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
} }
//使用字符流进行文件复制(字符缓冲流可以不使用,使用其目的主要是为了提高性能) //使用字符流进行文件复制(字符缓冲流可以不使用,使用其目的主要是为了提高性能)
public static void copyChar(File file,File objFile){ public static void copyChar(File file,File objFile){
Reader reader = null; Reader reader = null;
Writer writer = null; Writer writer = null;
BufferedReader bufferedReader = null; BufferedReader bufferedReader = null;
BufferedWriter bufferedWriter = null; BufferedWriter bufferedWriter = null;
//替换文件后缀 //替换文件后缀
String objFileName = file.getName().replaceAll("\\.AAC$", ".mp3"); String objFileName = file.getName().replaceAll("\\.AAC$", ".mp3");
try { try {
reader = new FileReader(file); reader = new FileReader(file);
writer = new FileWriter(new File(objFile,objFileName)); writer = new FileWriter(new File(objFile,objFileName));
bufferedReader = new BufferedReader(reader); bufferedReader = new BufferedReader(reader);
bufferedWriter = new BufferedWriter(writer); bufferedWriter = new BufferedWriter(writer);
int c = 0; int c = 0;
while ((c=bufferedReader.read()) != -1) { while ((c=bufferedReader.read()) != -1) {
bufferedWriter.write(c); bufferedWriter.write(c);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
try { try {
bufferedWriter.close(); bufferedWriter.close();
bufferedReader.close(); bufferedReader.close();
writer.close(); writer.close();
reader.close(); reader.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
} }
package com.gic.haoban.manage.web.utils; package com.gic.haoban.manage.web.utils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
/** /**
* @author yao * @author yao
* NationCodePhoneFormater * NationCodePhoneFormater
*/ */
public class NationCodePhoneFormater { public class NationCodePhoneFormater {
/** /**
* 大陆手机号码 * 大陆手机号码
*/ */
public static final String CHINA = "86"; public static final String CHINA = "86";
public static String format(String nationCode, String phone) { public static String format(String nationCode, String phone) {
if (CHINA.equals(nationCode)) { if (CHINA.equals(nationCode)) {
return phone; return phone;
} }
if (StringUtils.isBlank(phone)){ if (StringUtils.isBlank(phone)){
return ""; return "";
} }
return StringUtils.isBlank(nationCode)? phone: ("+" + nationCode + "-" + phone); return StringUtils.isBlank(nationCode)? phone: ("+" + nationCode + "-" + phone);
} }
} }
package com.gic.haoban.manage.web.vo;
import java.io.Serializable;
public class EnterpriseSearchVO implements Serializable{
private String enterpriseId;
private String enterpriseName;
private String clerkId;
private String clerkCode;
private String clerkName;
private String phoneNumber;
private String nationCode;
private String brandName;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public String getClerkCode() {
return clerkCode;
}
public void setClerkCode(String clerkCode) {
this.clerkCode = clerkCode;
}
public String getClerkName() {
return clerkName;
}
public void setClerkName(String clerkName) {
this.clerkName = clerkName;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getNationCode() {
return nationCode;
}
public void setNationCode(String nationCode) {
this.nationCode = nationCode;
}
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
}
package com.gic.haoban.manage.web.vo; package com.gic.haoban.manage.web.vo;
import java.io.Serializable; import java.io.Serializable;
/** /**
* Created 2018/10/22. * Created 2018/10/22.
* *
* @author hua * @author hua
*/ */
public class EnterpriseVo implements Serializable { public class EnterpriseVo implements Serializable {
/** /**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String wxEnterpriseId; private String wxEnterpriseId;
private String enterpriseId; private String enterpriseId;
private String enterpriseName; private String enterpriseName;
private String wxEnterpiseName; private String wxEnterpiseName;
public String getWxEnterpriseId() { public String getWxEnterpriseId() {
return wxEnterpriseId; return wxEnterpriseId;
} }
public void setWxEnterpriseId(String wxEnterpriseId) { public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId; this.wxEnterpriseId = wxEnterpriseId;
} }
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
public void setEnterpriseId(String enterpriseId) { public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public String getEnterpriseName() { public String getEnterpriseName() {
return enterpriseName; return enterpriseName;
} }
public void setEnterpriseName(String enterpriseName) { public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName; this.enterpriseName = enterpriseName;
} }
public String getWxEnterpiseName() { public String getWxEnterpiseName() {
return wxEnterpiseName; return wxEnterpiseName;
} }
public void setWxEnterpiseName(String wxEnterpiseName) { public void setWxEnterpiseName(String wxEnterpiseName) {
this.wxEnterpiseName = wxEnterpiseName; this.wxEnterpiseName = wxEnterpiseName;
} }
} }
package com.gic.haoban.manage.web.vo; package com.gic.haoban.manage.web.vo;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
public class StaffClerkInfoVo implements Serializable{ public class StaffClerkInfoVo implements Serializable{
private String staffClerkRelationId; private String staffClerkRelationId;
private String staffId; private String staffId;
private String wxEnterpriseId; private String wxEnterpriseId;
private String wxEnterpriseName; private String wxEnterpriseName;
private String wxUserId; private String wxUserId;
private String enterpriseId; private String enterpriseId;
private String enterpriseName; private String enterpriseName;
private String storeId; private String storeId;
private String storeName; private String storeName;
private String storeCode; private String storeCode;
private Integer clerkType; private Integer clerkType;
private String clerkId; private String clerkId;
private String clerkName; private String clerkName;
private String clerkCode; private String clerkCode;
private Integer statusFlag; private Integer statusFlag;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
private String clerkPhoneNumber; private String clerkPhoneNumber;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public String getWxEnterpriseName() { public String getWxEnterpriseName() {
return wxEnterpriseName; return wxEnterpriseName;
} }
public void setWxEnterpriseName(String wxEnterpriseName) { public void setWxEnterpriseName(String wxEnterpriseName) {
this.wxEnterpriseName = wxEnterpriseName; this.wxEnterpriseName = wxEnterpriseName;
} }
public String getStoreCode() { public String getStoreCode() {
return storeCode; return storeCode;
} }
public void setStoreCode(String storeCode) { public void setStoreCode(String storeCode) {
this.storeCode = storeCode; this.storeCode = storeCode;
} }
public Integer getClerkType() { public Integer getClerkType() {
return clerkType; return clerkType;
} }
public void setClerkType(Integer clerkType) { public void setClerkType(Integer clerkType) {
this.clerkType = clerkType; this.clerkType = clerkType;
} }
public String getEnterpriseName() { public String getEnterpriseName() {
return enterpriseName; return enterpriseName;
} }
public void setEnterpriseName(String enterpriseName) { public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName; this.enterpriseName = enterpriseName;
} }
public String getStoreName() { public String getStoreName() {
return storeName; return storeName;
} }
public void setStoreName(String storeName) { public void setStoreName(String storeName) {
this.storeName = storeName; this.storeName = storeName;
} }
public String getClerkName() { public String getClerkName() {
return clerkName; return clerkName;
} }
public void setClerkName(String clerkName) { public void setClerkName(String clerkName) {
this.clerkName = clerkName; this.clerkName = clerkName;
} }
public String getClerkPhoneNumber() { public String getClerkPhoneNumber() {
return clerkPhoneNumber; return clerkPhoneNumber;
} }
public void setClerkPhoneNumber(String clerkPhoneNumber) { public void setClerkPhoneNumber(String clerkPhoneNumber) {
this.clerkPhoneNumber = clerkPhoneNumber; this.clerkPhoneNumber = clerkPhoneNumber;
} }
public String getStaffClerkRelationId() { public String getStaffClerkRelationId() {
return staffClerkRelationId; return staffClerkRelationId;
} }
public void setStaffClerkRelationId(String staffClerkRelationId) { public void setStaffClerkRelationId(String staffClerkRelationId) {
this.staffClerkRelationId = staffClerkRelationId == null ? null : staffClerkRelationId.trim(); this.staffClerkRelationId = staffClerkRelationId == null ? null : staffClerkRelationId.trim();
} }
public String getStaffId() { public String getStaffId() {
return staffId; return staffId;
} }
public void setStaffId(String staffId) { public void setStaffId(String staffId) {
this.staffId = staffId == null ? null : staffId.trim(); this.staffId = staffId == null ? null : staffId.trim();
} }
public String getWxEnterpriseId() { public String getWxEnterpriseId() {
return wxEnterpriseId; return wxEnterpriseId;
} }
public void setWxEnterpriseId(String wxEnterpriseId) { public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim(); this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim();
} }
public String getWxUserId() { public String getWxUserId() {
return wxUserId; return wxUserId;
} }
public void setWxUserId(String wxUserId) { public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId == null ? null : wxUserId.trim(); this.wxUserId = wxUserId == null ? null : wxUserId.trim();
} }
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
public void setEnterpriseId(String enterpriseId) { public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId == null ? null : enterpriseId.trim(); this.enterpriseId = enterpriseId == null ? null : enterpriseId.trim();
} }
public String getStoreId() { public String getStoreId() {
return storeId; return storeId;
} }
public void setStoreId(String storeId) { public void setStoreId(String storeId) {
this.storeId = storeId == null ? null : storeId.trim(); this.storeId = storeId == null ? null : storeId.trim();
} }
public String getClerkId() { public String getClerkId() {
return clerkId; return clerkId;
} }
public void setClerkId(String clerkId) { public void setClerkId(String clerkId) {
this.clerkId = clerkId == null ? null : clerkId.trim(); this.clerkId = clerkId == null ? null : clerkId.trim();
} }
public String getClerkCode() { public String getClerkCode() {
return clerkCode; return clerkCode;
} }
public void setClerkCode(String clerkCode) { public void setClerkCode(String clerkCode) {
this.clerkCode = clerkCode == null ? null : clerkCode.trim(); this.clerkCode = clerkCode == null ? null : clerkCode.trim();
} }
public Integer getStatusFlag() { public Integer getStatusFlag() {
return statusFlag; return statusFlag;
} }
public void setStatusFlag(Integer statusFlag) { public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag; this.statusFlag = statusFlag;
} }
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
} }
package com.gic.haoban.manage.web.vo;
import java.io.Serializable;
/**
* Created 2021/4/17.
*
* @author hua
*/
public class StoreGroupVo implements Serializable {
private String relationId;
private Integer relationType;
private String relationName;
private int isBind = 0;
private String wxEnterpriseId;
private String wxEnterpriseName;
private String parentRelationId;
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getWxEnterpriseName() {
return wxEnterpriseName;
}
public void setWxEnterpriseName(String wxEnterpriseName) {
this.wxEnterpriseName = wxEnterpriseName;
}
public String getRelationId() {
return relationId;
}
public void setRelationId(String relationId) {
this.relationId = relationId;
}
public Integer getRelationType() {
return relationType;
}
public void setRelationType(Integer relationType) {
this.relationType = relationType;
}
public String getRelationName() {
return relationName;
}
public void setRelationName(String relationName) {
this.relationName = relationName;
}
public int getIsBind() {
return isBind;
}
public void setIsBind(int isBind) {
this.isBind = isBind;
}
public String getParentRelationId() {
return parentRelationId;
}
public void setParentRelationId(String parentRelationId) {
this.parentRelationId = parentRelationId;
}
}
package com.gic.haoban.manage.web.vo; package com.gic.haoban.manage.web.vo;
import java.io.Serializable; import java.io.Serializable;
/** /**
* Created 2020/6/4. * Created 2020/6/4.
* *
* @author hua * @author hua
*/ */
public class WxClerkInfoVO implements Serializable { public class WxClerkInfoVO implements Serializable {
private String enterpriseId; private String enterpriseId;
private String clerkId; private String clerkId;
private String staffId; private String staffId;
private String wxUserId; private String wxUserId;
private String clerkName; private String clerkName;
private int clerkType; private int clerkType;
private String clerkCode; private String clerkCode;
public String getClerkCode() { public String getClerkCode() {
return clerkCode; return clerkCode;
} }
public void setClerkCode(String clerkCode) { public void setClerkCode(String clerkCode) {
this.clerkCode = clerkCode; this.clerkCode = clerkCode;
} }
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
public void setEnterpriseId(String enterpriseId) { public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public String getClerkId() { public String getClerkId() {
return clerkId; return clerkId;
} }
public void setClerkId(String clerkId) { public void setClerkId(String clerkId) {
this.clerkId = clerkId; this.clerkId = clerkId;
} }
public String getStaffId() { public String getStaffId() {
return staffId; return staffId;
} }
public void setStaffId(String staffId) { public void setStaffId(String staffId) {
this.staffId = staffId; this.staffId = staffId;
} }
public String getWxUserId() { public String getWxUserId() {
return wxUserId; return wxUserId;
} }
public void setWxUserId(String wxUserId) { public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId; this.wxUserId = wxUserId;
} }
public String getClerkName() { public String getClerkName() {
return clerkName; return clerkName;
} }
public void setClerkName(String clerkName) { public void setClerkName(String clerkName) {
this.clerkName = clerkName; this.clerkName = clerkName;
} }
public int getClerkType() { public int getClerkType() {
return clerkType; return clerkType;
} }
public void setClerkType(int clerkType) { public void setClerkType(int clerkType) {
this.clerkType = clerkType; this.clerkType = clerkType;
} }
} }
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 --> <!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 -->
<context:component-scan base-package="com.gic.haoban.*" /> <context:component-scan base-package="com.gic.haoban.*" />
<!-- 启动对@AspectJ注解的支持 --> <!-- 启动对@AspectJ注解的支持 -->
<aop:aspectj-autoproxy /> <aop:aspectj-autoproxy />
<bean id="multipartResolver" <bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="defaultEncoding" value="UTF-8"></property> <property name="defaultEncoding" value="UTF-8"></property>
<property name="maxUploadSize" value="-1"></property> <property name="maxUploadSize" value="-1"></property>
</bean> </bean>
<bean class="com.gic.redis.data.aop.RedisCacheAop" id="redisCacheAop"/> <bean class="com.gic.redis.data.aop.RedisCacheAop" id="redisCacheAop"/>
<!-- 明确js/css/jpg/gif等静态资源的访问不通过Constroller --> <bean class="com.gic.authcenter.commons.util.AuthInterceptor"/>
<mvc:default-servlet-handler />
<!-- 明确js/css/jpg/gif等静态资源的访问不通过Constroller -->
<!-- 启动注解驱动的Spring MVC功能,注册请求url和注解POJO类方法的映射 --> <mvc:default-servlet-handler />
<mvc:annotation-driven>
<!-- 设置不使用默认的消息转换器 --> <!-- 启动注解驱动的Spring MVC功能,注册请求url和注解POJO类方法的映射 -->
<mvc:message-converters register-defaults="false"> <mvc:annotation-driven>
<bean class="com.gic.haoban.common.ext.MappingJackson2HttpMessagePropertyViewConverter"/> <!-- 设置不使用默认的消息转换器 -->
<bean class="org.springframework.http.converter.StringHttpMessageConverter"> <mvc:message-converters register-defaults="false">
<property name="supportedMediaTypes"> <bean class="com.gic.haoban.common.ext.MappingJackson2HttpMessagePropertyViewConverter"/>
<list> <bean class="org.springframework.http.converter.StringHttpMessageConverter">
<value>text/html;charset=UTF-8</value> <property name="supportedMediaTypes">
<value>application/x-www-form-urlencoded;charset=UTF-8</value> <list>
<!--默认是 iso-8859-1 --> <value>text/html;charset=UTF-8</value>
</list> <value>application/x-www-form-urlencoded;charset=UTF-8</value>
</property> <!--默认是 iso-8859-1 -->
</bean> </list>
<bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/> </property>
</mvc:message-converters> </bean>
</mvc:annotation-driven> <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/>
</mvc:message-converters>
<!-- 启动Spring MVC的注解功能,完成请求和注解POJO的映射 (解决中文乱码) --> </mvc:annotation-driven>
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters"> <!-- 启动Spring MVC的注解功能,完成请求和注解POJO的映射 (解决中文乱码) -->
<list> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<bean class="org.springframework.http.converter.StringHttpMessageConverter"> <property name="messageConverters">
<property name="supportedMediaTypes"> <list>
<list> <bean class="org.springframework.http.converter.StringHttpMessageConverter">
<value>text/html;charset=UTF-8</value> <property name="supportedMediaTypes">
<value>application/x-www-form-urlencoded;charset=UTF-8</value> <list>
<!--默认是 iso-8859-1 --> <value>text/html;charset=UTF-8</value>
</list> <value>application/x-www-form-urlencoded;charset=UTF-8</value>
</property> <!--默认是 iso-8859-1 -->
</bean> </list>
<bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/> </property>
</list> </bean>
</property> <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/>
</bean> </list>
</property>
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"> </bean>
<!-- 扩展名至mimeType的映射,即 /user.json => application/json -->
<property name= "favorPathExtension" value= "true" /> <bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<!-- 用于开启 /userinfo/123?format=json 的支持 --> <!-- 扩展名至mimeType的映射,即 /user.json => application/json -->
<property name= "favorParameter" value= "true" /> <property name= "favorPathExtension" value= "true" />
<property name= "parameterName" value= "format"/> <!-- 用于开启 /userinfo/123?format=json 的支持 -->
<!-- 是否忽略Accept Header --> <property name= "favorParameter" value= "true" />
<property name= "ignoreAcceptHeader" value= "false"/> <property name= "parameterName" value= "format"/>
<property name="mediaTypes"> <!-- 是否忽略Accept Header -->
<value> <property name= "ignoreAcceptHeader" value= "false"/>
html=text/html <property name="mediaTypes">
json=application/json <value>
</value> html=text/html
</property> json=application/json
<property name="defaultContentType" value="text/html"/> </value>
</bean> </property>
<property name="defaultContentType" value="text/html"/>
</bean>
<!-- 视图解析器配置 -->
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
<!-- If no extension matched, use JSP view --> <!-- 视图解析器配置 -->
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"> <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
<property name="order" value="0"/> <!-- If no extension matched, use JSP view -->
<property name="contentNegotiationManager" ref="contentNegotiationManager"/> <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="defaultViews"> <property name="order" value="0"/>
<list> <property name="contentNegotiationManager" ref="contentNegotiationManager"/>
<bean class="com.gic.haoban.common.ext.MappingJackson2JsonPropertyView" /> <property name="defaultViews">
</list> <list>
</property> <bean class="com.gic.haoban.common.ext.MappingJackson2JsonPropertyView" />
</bean> </list>
</property>
<!-- 跨域配置 --> </bean>
<mvc:cors>
<mvc:mapping path="/**" <!-- 跨域配置 -->
allowed-headers="*" <mvc:cors>
allowed-origins="*" <mvc:mapping path="/**"
allowed-methods="GET,POST,PUT,DELETE,OPTIONS" allowed-headers="*"
allow-credentials="true" allowed-origins="*"
max-age="3600" allowed-methods="GET,POST,PUT,DELETE,OPTIONS"
/> allow-credentials="true"
</mvc:cors> max-age="3600"
/>
</mvc:cors>
</beans> </beans>
\ No newline at end of file
import cn.hutool.core.thread.ConcurrencyTester; import cn.hutool.core.thread.ConcurrencyTester;
import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.thread.ThreadUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.gic.haoban.manage.api.service.DealSyncOperationApiService; import com.gic.haoban.manage.api.service.DealSyncOperationApiService;
import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService; import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService;
import com.gic.haoban.manage.api.service.StaffApiService; import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.StaffClerkRelationApiService; import com.gic.haoban.manage.api.service.StaffClerkRelationApiService;
import com.gic.haoban.manage.service.service.StaffService; import com.gic.haoban.manage.service.service.StaffService;
import com.gic.haoban.manage.service.service.TestService; import com.gic.haoban.manage.service.service.TestService;
import com.gic.wechat.api.dto.qywx.DepartmentDTO; import com.gic.wechat.api.dto.qywx.DepartmentDTO;
import com.gic.wechat.api.service.qywx.QywxDepartmentApiService; import com.gic.wechat.api.service.qywx.QywxDepartmentApiService;
import com.gic.wechat.api.service.qywx.QywxUserApiService; import com.gic.wechat.api.service.qywx.QywxUserApiService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.util.List; import java.util.List;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"}) @ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"})
public class DealSyncTest { public class DealSyncTest {
private static final Logger logger = LoggerFactory.getLogger(DealSyncTest.class); private static final Logger logger = LoggerFactory.getLogger(DealSyncTest.class);
@Autowired @Autowired
private DealSyncOperationApiService dealSyncOperationApiService; private DealSyncOperationApiService dealSyncOperationApiService;
@Autowired @Autowired
private StaffApiService staffApiService; private StaffApiService staffApiService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired @Autowired
private QywxUserApiService qywxUserApiService; private QywxUserApiService qywxUserApiService;
@Autowired @Autowired
private QywxDepartmentApiService qywxDepartmentApiService; private QywxDepartmentApiService qywxDepartmentApiService;
@Autowired @Autowired
private TestService testService; private TestService testService;
@Autowired @Autowired
private StaffClerkRelationApiService staffClerkRelationApiService; private StaffClerkRelationApiService staffClerkRelationApiService;
@Autowired @Autowired
private MemberUnionidRelatedApiService memberUnionidRelatedApiService; private MemberUnionidRelatedApiService memberUnionidRelatedApiService;
@Test @Test
public void test() { public void test() {
// dealSyncOperationApiService.test("ca66a01b79474c40b3e7c7f93daf1a3b", "49da12164c584fe8aabbb1094b25cfa5"); // dealSyncOperationApiService.test("ca66a01b79474c40b3e7c7f93daf1a3b", "49da12164c584fe8aabbb1094b25cfa5");
String str = "yepingyan||taoguangsheng||chennaikang||shaojiawen||yejia||wangjianfeng||wuxianghong||zhangmengdi||chenliang||1033a9ee238140c6a1583bc1cc05567a||e8a6560f17364e5d90fddd50c67baf52||60d2533e0fbc4b9fa4bde758171559b5||85a842a9daed414db85f53b93a684d47||deb2e2ad924f47fda530361a57a2070d||5a3793a4afc74a36a9c0a3cb2a1c9736||760d3af094664f02aa268cb41bfe3978||053003311ede477980cb8b97374e7005||0501be9ed34b4dfdaa74396f1f32514e||4c0461e8ec7145c8b1a228cc910393ab||5623623f1aae4a889cf60e6943f203dc||26b9fc69df6e44499884f775d815c7a2||4cd623e4f52d4ce3bd00acfc50991ff1||d17e0a36f1fd49048f1841b6eaa97cb7||cb188cc31b2c4b80af201e574d64eb37||0395ccfbca7543b7bb3093d7440a3f8f||6a84f35f9afd4e7894536ae000db3524||808e4d3152594ff592cc6baaa5f5650c||0197cca6898a4d1ebd365a9b54975e70||85366595188||95b6aabef90548168f7876bb695ac1b9||d6a5e64220834ef49f8514bb3726a30c||1c589b0e64ad426c948151b9b49f717f||554cc5bb6c3441edbbc667b217fe58cc||d9961b52cf9446f7b449f69429fa0889||8748b6095d23483b8ec45acff3443dda||17cfb61638e143289fb4ced4ef1e6f2e||279c33469a024131821f3568651848ec||5386237c5fe84864bee5e0d87f46acde||f8a4256454924ef481a51f4440eabd54||014b4dbce85940c49a402faa4606a7ef||87c419a151a64cef8d13d9964985cdb9||2590cd60cc364daebfa8321d3f3a3d9e||de2c33f2e8924ff884e0073ca2f2f711||cb512fe8adeb429fb5a99b444622d9e9||b498c162fec1487ca8d90c8208fb24c0||86917b76f1e341ad8d5862c2f4178a69||edde56b16fc741ff8b5345dc89f6ebe2||133a8b8e00b141c999691556994845f8||97e31402568c4084b7b2d17a109805d1||ba60284fb2294c8d8a2dfdc13e631224||2f73268b8ae94a50adc9be13948813f7||71af618e8b4c4d47b3d934d592bc27ac||8abec5614cc94544bf84d24e20c0f1c3||949d2191c3b74e1089e41dc19eef7f66||b6d091fa70bb461c99e50ed8a2e5f846||4d4d8a06b41245b48e8633efa32b56ed||57af656016e542c19a0ea207b6810264||a95524a9c3c94d77b7ba522ac697c889||f2cd9549515242239b52f389111ba003||afd07576885044668f7c6e88be80a54e||6318f71b46894644ab40a3dd2ce388b2||f73a4a768d0b4f78969704078302b676||7d6c41b297fa4341abed436c5d64048f||8927dc75226e481e98dee5b148a61be0||7fc33d65fa2d4822923cb6fa8ee6d7d5||37bea30fa18a44d68d341c34ae681c0c||fffc57772b6446f7b6b563c0c5e518d4||5c2406d8d742479196f0392f786c69c1||0e51b089f4b34d3d9a29d56d3d016c62||befaa12c69944ea4bbc1cd34f19aef40||cd28fd64b08a4db095c528a942f4c7fc||6d97f56f1e75434db49ce1e162c13c28||66672dc67c7a4dbcae2ae29e9698c31a||fc1b59cdab764da483749628bc91ea72||ee362b734411416ba44cb249714b6885||f5c98c7c087d4083bef0c748aad9ba90||8585cd13c42e4b33b021593f562d7619||31208ce7c16347a1afacfb50602c9ca1||7211ef07565d4d8ba8c45565c7d201dc||e6a1734037cc4b998aea57052eb31786||8db5edbdcf734b27a0bc2fa2fa420e5c||2294cc939f0b488690d7e95c7981e658||be2be0043b264b8c93808edf36e81d63||ca0f57a1f95146b4b9b0103800b03f10||80d248b51edc43d3959cc478e77b9de5||8e441d5ee59241b5b8a64ead1dd03daa||e1827273133247c4a17d65c9df4c2894||95fc56b9839a42878cbe7106e7bc9ff2||f8d893fd85844e199cc17fdce79f62b6||f23077c76a144507a5f5a91aa15e865e||f5c1321841da43c5b4ab8edf267c9e69||b2c5d9232e034eb69424fa238ea7f375||14a2c914e09045a59827a633f98fa5dc||64d58369915b4a69bb8306cddd41dd3a||39030ddf0a1e4db299085474b9809fa7||0817f586f81a4117b924b017f7a58718||32b4c694454f4ec0bb767f518b8be301||48c2b0ff0e234ef799cc067a05677cc7||b74bc661bf5547b5a962f8e0b2c7563d||4a8c6d8bb109414aab17983ae18459b2||a7778844a42b4df0834763481a401073||7df43c26decd4b9cae3ee957bd05ac52||6dacc32a48a940899dfc1be5378373b6||7edd8a500fde4b8db4393e514d0dc215||0140063f60ad458a9b35c32e80401834||af5151a9eb3f4563b9d20be1e682593e||fabc111e771340d5b7224973e2a3fa5d||f935cded097641519b1ef47fa8ec3687||3f410f5e6cf7498e969232f774691a59||ea236caa8ca0480cae6575512433286c||10a3ebd8d21942d8a55aac22da0d984b||19b0ec31274040d8b06845a6d7505028||7fa79a52aad6492db78f233d379fc526||07cac1d1f977484f919c1a1c84c0c4cb||03cb98bfabad4eb3886ea08003879412||015844c6a25e41ff9f2b1859dac6148e||aab1b82a96024584b706542be157c683||9510b742fb024efbb29002b1e6f78a3b||a618df6d09b74ada91ddcf362b0a2459||0a5c4b8aa6584ffbaf4fcab312b83e72||07e85dba485140d3899f481b7902ad03||999ebb3c09ea422086ae400bb0e4291e||fece2bfda3754029a97897fd7bcd15ba||5a8d2b7613394af588b7b98f4731b294||f9a8d038d6e349a5aff297208ac117f7||24a80b4c78924cb9b75a5649221a90fe||81057b5a7a5c4a3f83e31cc97a493c72||6b4461647e144969a68a39fdc54a728c||681170032ac84ca39dcc7ac5374a0bd4||1f6fea78cd244c239b8a6bbd76560f61||dd65cdd7594f4590b0addb80b08e23e7||44efc4fd2a7c4f0388ab038a7105a251||3f0bc6b120f54febb3fbfb242a6597b6||476f26533d5f4ffda54f9ac26073dd27||b151c6057d5545899b2a6261940327ef||d273990f0fd5436ea92b8aceae0e1915||7199240e63e047979523a7b7126b3763||699f8f67450e4d89b69eea35968f15cb||4c2924d70c7140488ba6d2e7146c48b7||cba0a50d125e4569af4982270fcd44d2||99ba985aa3e24188a2427a9674c2cee7||1ba154236289422eafc1494fb2cd5447||d850f273b8e94baea24e5a5c1e02c0ec||cd09819332b34b69af57d5bbbf242879||93d52e81a9d04166a441cc5bd8d528e9||80011bbeb65242b0b2947e3ce2d9a5e8||7cb4799a81bb42818868a9eca56ae364||9b1adf4c531547f5810837fe2ce871f3||fa7ba91175504d6486f3a14fbb54defb||b5b56dfc08d44d92a2968b7bfc9898cd||68c2a2b9c9af4d5ab5225f12eeca6afa||10421da78e3b47688103b59d9925fa05||d95fed7490a54c20af0710f1978bf614||b383dfb32c2f4871b38d47329ba436fe||fbb3c70fed1b4624aba506492c0261cd||22e74e0843004767bb26e9e0a575ea3a||6ca5062bf688459aacb2c3cc9a3c0c61||7b666e3eb28d4b809d76eb91cc8597f0||a49a7c9de5104fdf82df8a67dad41568||a0b37271746d4f61a7a25787ad221027||71cd6fbc9da54e9d8a1992172d92bee5||7ad527490c6a4ebe9093f45525340fd9||928640e07d4748a996d43024e3373aef||cacb6b3bf53e4766933665e8f5961f28||d23a0456250b4f86bfae673300cb38e2||b6e9e751a0b54a5cbef9e3a737f265a7||75d12123136a4da6b6134cdb5ca0e8f5||5a2851a0484e47d2a249785ba40f346d||3cb82820fdc9473fb104d725bf4924b4||dbe3002e90d44a52af0407584fdda2ea||0b3fd2002a424c5293ca8ec4c60bc977||0c1f60a0713d4791abdb94b425acc831||0758f5c6f4d34d3abc84962c81925ff8||caead448c45348c3b2d06df665ed0b43||babd7c07416247a08215df6e17e50733||18df396b8c0c417fbd79959faa528709||0d349f252c5d4527aee68a077baf11d1||70dbb5c3959e42e3bd4cf49f8d2b21a1||a27eed8d234240fb9c121211a2ffbfbf||8e0b5404bd3d4b95ad0a9fda7eafe5fd||9dffdaf42d6c4eb6a6e11255c5fadec2||00305613607f4cbb866cbc37b0bfede9||549b335ae8444bd6a3f12d7b2ecf82b1||d563bb9c21b148e9bcf3cb543662a6f6||2215b3679edd41b18212c28e7b392f80||a636c81d9442466c9a3c8c49e56db824||6a3ab6e564d344c0851139770ecd6762||9882c0d508d24a6faf6fddc2beb02c3c||2c55ce0fee3147119eec42bd8782af11||7aca61c45ffb4141b192c7c22aef7d2b||e218d4fc639f459193d8ef15476126a7||acf423a33d3d45c8b9a0ef893448795c||cbd99ad437ee4044845a0f6895b9453a||3975792146174b81bdce4bc7c4dbe517||04ab7c92e3a34a6caf33f80b3b938fe3||15eef83ce12142bcb8082005634292a2||41cae2681efa4437b27db6ee5aad939e||93b603f08902496e96ef3170c445bc54||9a42f047ebd34c3bb16eceb04f46ad94||058efe8f0e2041cd844a427714ac69b1||fa50138b9b8d49d8bf260885407cc9ef||bee4d5a331e541489c57e0403aff3c14||34efab9a18e64629be64bdda9fcb774a||a022810578794fd1be090e1ddb7850ea||5d23bea235d04487b3eefe64034d7fda||b8c5e55dcf0044d0b91f51a498c7c3b7||0bfb4a4625f0425c8242096acf9bc8a3||d71d62e137824bf8825f980e5574d2b5||db5af88546df4dae8fc3ea0f08cb6bc3||ca7cc04116614dcfae20c5dca061eb77||2d57998e8713452e93d2123da51b3c91||ac5a25b5179d4a8e84c8419026838a3f||36d15a3860cd493e9ba0c63d312a7ca8||cb0e00bed21c48c6894aa36b4cda6b2d||e9c096b95d7d47e0bb5103e66f1da2f3||d9b310ffca4e4561bfade2ead90e0a2d||2d761edec80b4119bb083686b348b21c||578ae551e59f42bda4ca48a130d76f5d||f25f6085ef6e4c0cb8014dbc4d0ddcd0||7e8751338e2248f589fe2163b2ae5a7b||5c1333648d2d42f2b2aa2011b9ffade9||76731c48496c4bffb3896b1918bfa3d0||f3642a263d674655ae1f9a7603e4ccb1||39133cd83c3a40b2adfd298404f5fab4||66efa290b15f4c08b28e7541cf933e2f||d672d66b04144b3cb6cbfca091c020e6||cb8169ebaae8481a8c5d4f6c1b22b142||586edbe496a747b18adc89ffc878cbab||f89d6b872fd040a9b6b3720076be24ff||8358c9d0c77f4ac091afd16cc1745ac5||d09c0eee96ac4461b1c1ff063cbca2af||82ad349d742f413f9c8c9ac5aa2d16ae||798db872fefe4addb1aa4efab993619f||775d0fa3641f4af2aa81f6889baa66ae||1eda003b63df48e6b8e8983aef1ace3f||336c8fad4859446abeaffc666ea0034d||c9aad1386f79409e9957a8ecc3426808||9ed8a8a0ad7e47edb387824822125b6b||d50969c86ae648f8af35ec29d9236379||afdf59e627e04e669207c1ba5a158426||e543b1c837314ff7919b911360726f33||41255ecec07747c4aaa12d0f4f763899||ad36dac9c0a7446bb63f92017099e5f7||e85ab29db71f4c3b8042b2f4059a4ac4||b897e51938f74d0e8357f5d3a73b6bb5||8ea2de06b14d4b358f11954ad36c15ed||219ac16136cf4b96b9756f69b9ae2b47||a74a1fe3b0804d6d83d2b1ed9a738996||9554e4f2d4154c06b35e9773806c1ab8||e73042840f994782b3c6470dd18a00a6||97c0a9a22a57465893534cb2a81766fb||cbeae827ba474a049d87f2d58096886f||76044e1707e942188f8af63b97a6f94e||97696bdba4484dfbb57def84f6195e50||b5c26472151d4c30a64f9955c3423dbc||ee6b2783d4954a1ca8bc247eb94b230e||ba7ecfc2837b438b872424cd5e0bfb72||899c6b944b2b444888ec08358bbeca7b||59d1eba6196d49278e4c380637434a53||97dec846fdd84280955d40f2e600d9ac||ae6de9e7c8774d499e5a7b670bdbedab||589a90409e584af5a7075904ad82a1ed||0d37ff8411d345bb9865ffd5b83df6b1||de27337c7183428bb365434dde67540e||ddb9462dfe384b1cac8dbc479c763509||586bf05203264df08a3ddb421b92fa13||8995fc636a26431f97fd95c1ffdb4914||3075e0c16569406184882a838101d895||ce6a630816fa4ff984db113288bdf1e8||4212642359404be885019d440889715a||3e8fa0da58184f94b7aba8e0772bc827||ecbcccd916bc44efb13a9c3f8f9d8161||0da8510241f640efbe443d964bee44ca||c886c0dbc7ff4b298a129a92616dfe79||9af0f5d24bd049339adb4c0e59f5a060||a7c47d1d913e449f954db18a6283fd5a||8e37f686502447599d3854a15fbb8ae5||ac64e5483d0f4344aadc39275824d687||88521354a4da4d1aa2f77186fdb54a89||9484a47b88084155973168cec9411d83||0c5a8a111c114b4391ba8a09f0f6ecc9||65b915cede2849c195ffa529f2ffdea1||05ebbc6fd10c4a2c8d6c39d1551ab7b8||f788aa33aecb43f18c08733bfc011a35||dfcca957bc814522b835b7cf55fff881||d84c1d854e0d473ea5c4f1d227db4cfe||5fa2a064c37d4e81b3ad69376ee2b2f1||74afac17a97548b8a7626427872a9ae0||8588f4747e1e4aa78b601e1fe3ba6ea4||06608784722d4ac4a44cd9d4147a89c7||c8bb92abf38949ff83cd5aaa4ae8407f||ea76f01ddec54c229e7f5d0af867e858||be28e4d2bcfb48cb81310d5e656af70e||de474557d8174c94905c81996890307e||799276a5c4e7451a86e77e09a85f1ca7||7648dcd80d724d7f9b2a633f95d4755c||c850338443094f5caaecc018ebf8d12a||edf10fda182d42649ae26f4c06375b3e||bec9e09c35c14a029f57693bd7b9f123||93eeff4394c24537975714c722a21538||5a3e092713a74425aa535d418776be7c||2cd9ad01cc6f427f84e5bcad2a6d8a20||bf168d8698ce4c90b9e92d64a49769bb||28cff42995fa4715992dbc7d4d51e54e||9ffab45c54bf4a1e8d0c15324af65def||DaoMi||niweizhong||81637ab67fd34698b26a0c84e57fb586||Jing||NiZhuanNvWang||e75fdc4bd465447f93500c94974d890a||842272ad140b4bebb09e74dfe35a1c3c||da41bf5e46544387a759744cea5e246a||ba86d976c2bc4bc6830d8a2fbedc4c4d||b384daa0ea33478b9420a9024ac2a73d||4fcced4527d24399815cc9fae33cf520||niweizhong1||8d09b2b788d44024ba00b75555829aab||311d11e804834115b32effca449bf344||239440e576ae498eaa355db03b40a359||826511a8c600414e82e6fc40ecb73091||7e0d277f5b3949bd850ffa41043fe94d||dbff4317ecff4d4daefe5328b0b1cc4b||300ea525053e4b53bf41ede2818a2843||4cb68f1c6637483dac5fb1b66fba1fb9||4422836b40cb48958165d66c3674772a||aea36f9a07f7441a8a65aa83a4c4f3ba||530fea4b44784875bdc1b22f95fd3e34||c95842ec1daa44dd93452efc98b0bd30||534cef2dd45c4f3987eec2ebb64b7b59||bc243d8115084d06a8638781ce1c464a||7c22c617875546e7997dd6f7e48ca122||702fd097e6c042eba95c29687046ab99||af4945ebc21d4d439526940221a65d6d||fae4414b9cb149f581a55d6f9bce6e7e||c0336c92864d4d26b9a5730d7090e945||aea46b0ad5a042908813338e676ad877||0a948550dbfd4caa91ca67e8f0290c64||8f8d07caa1964477a40057191c102170||b8fbefaaa83b4609a30b0d6c70b83cf6||83027b9db3dd466781f2ebd2918d07ba||71e411071ba44bb9a31ae59c690b45dd||b6abe9e5b60040fb87737af823d1e83a||605111ff896d491bb1e02fbf48bca00b||ecfd3f7a78ca4ddf833e3367e1d975dd||ff58b504b63a49dfa419978699556f12||a5b6ba045b884fef826e71aa5ac4eb83||5454884535fd402d8cd9476a5d8d3518||257e541a782848a6ab785968a4f09167||e1fd8563e9bc4f4abddc873691ce5667||75d368cf564d45c7a1c68673529c9517||c833339a311e4800b76357a5d798e99b||98daffb2f1864025bbde03d12421b3cc||f9cddf17dee34143a6d4cd982748922d||12ff0514985d433ba4a37cdd52d9a671||6aa0554079044d289976a58acdf3a90b||fdbf05bcffbb493ab3a240f09f2b6e4c||31d9126ca13340a6b3883a7717e6babd||a5cc23be2b834459b3887c5f51d6b4c0||56de1864ec3a4681853c4db5e83c0af0||ea96e22fa5be470db076f8bb42c047d3||b999e85e12c0403d8bc49c81ac9556eb||e30ea5d6efe249fbb59bf8db89994dac||f3617631f8574c1d82762b3c1609a393||45a8d654cd7648d69f54a844b0d7adb5||b81fed2d9f3c4093b70440dea7cd5ee9||1cdbcab1d6274f8f834319a30bd8c61c||18af85032c7747b0929cb51d4fd71f5e||ea36dacba6454a3789fc2ff195bd0e91||a1a03dd8448a4b5fb3206e4806523127||34c0e62a714e4be99ecd21449d0bb91f||ba996646249d4c1890270f17a80289ef||6f47bd244e0842f39e4d2e26fccd4882||9c10c1b3a1f64ac3ae69645c72ead06b||a06ff1bd53304dc4972365db3489bf19||84f0eb84578a4239ad83a20665b41fb2||792b180fa959405aaf9b0a40756cc074||a54a8cf734714ba5b92c827b23553a1b||2c6aa2625fd245cbb8abe629e5bf7831||5d319cc9d2be403cb1a762f002e599ae||8b7c0b4a75c9406b99b24820ff82191c||1f616f086823498bbb301ef59e0040e9||ec0b2f879755443aa15a71378110bc1d||27c6770b84b945d3971689a8c8810b00||f62182a37a054d69b170edd70e0518b5||20be22b288e8462b8c73b335924ecf73||ff7f0226278d47dcbb50c6344e8d6934||4e5ad54450644d44ad5c3dfc576b10bd||8084a2bc89eb4c84b41e30f59256a87c||a9cb6a0072b44a27b525079bcced1e8c||fde8ae4a13004c5b9ee1640e23bc1897||a7a23b58021f487597d1c80f694e2e2e||fed96eeecf874f7e8838254188944408||2299adbb0974456696c48fd6b81c378d||69ab423e932a44468223b05280e4fafe||7642dc4946a243f498a90e1b3857f5a4||982d4406d79a4bb4a61c97bc0365214c||6222d8255ee24bb889b865ad436ef8c2||45be0631645b4a1882f026fa3d2d2dfe||475b41e508ce4d638ea084f81c325fb5||9ecbb79b36a24252a0586228f3d3083c||f22faaef58be42858cbacb9ff9da800a||0aa5f83a291d4aa7ba8d4086915880ce||dabc53b452be4489b3e18a05b308f804||03e38aab6a804e78b95d309fa86b16f7||367cafd3a2374b778fd422970139e524||d01ac22eb1654a9da7753b257d7fb4a4||d3c89f38a5b3430c8232de55ebda30bc||48502e88c7634fd08db8d6805ccc7363||47576041020e47f497f946286ca77f47||c49cf412ea324f96b45ea7a115784fd6||e0fd386f532d490fa7fd2c096c7b39a1||507149fe42a74c7e8bbffad8979ae9d1||f636656b9f5243abb8f6ced135cd621f||3858da6bd5af4a9893bff132fbe46ac7||aee3752323054508a1c90bbf6cb80f9e||3a4090a41eab46c492e96f6b2e648eb7||7eb942cb4e58410982da35d47256422b||294bc70386904ce1a7fda5be14a20fb1||a4af8c884a4d405a8238b736cbe0fc21||dda20f0da0fb4812b56114a728b64190||ca75d30846424ebca5a51f79cb4bb2e7||862f3a38dd5840cba8500d2a59978722||88b5b9869f194f74907ee569792d3d54||543b08411e4b49adbec8624f9a6f5312||679d94e8e9314d7fa91365a11c7ed2c8||ea054a9055dc41668f61d53f71e68b7c||5b2e3efa32f8436bbaf0a9f695c02816||635a1682c6ba46fb95307413848ee6ba||29a76c6a4a6f43c5b71748c2738b3c3b||f6d46444bc9a4a2bb851497aaee27a78||65864af4280b4005b927476aa292d0d1||0fde3e5f79eb40d3b049f2481d4842bf||94244996bfa34c5b92a0d54295c9006e||dc8796ff0d4c4d2f91f744dc6892cb2f||05d7435e380f49698527d14d2fd1f844||362ba60dadf94a05b75dd52534188bb8||220f77530c944b5896c168dad23d903b||bb9d19c00d9c474ea53e30cbf7d1588e||144546c5a0d247a9900dd6a66ad8a1a0||39355b7e5bb94fae98c7ce54e1070c1a||9412384e179b496a9fc13818f67d60bd||5e8fe52031604159ab19f1985c2426ab||88c19a5e794548cebfb86ad8107e2377||10e7cb2e11bf43cba2460115232bb786||65621a4de96944a4b9e26263b9b1a114||8053185f6e1e4621842a325a491ac319||87cc068d582a49bcb583407f6607b946||993021ff177b4b66ae5e872ba2911184||9a13d2c9c74c4deab8f1fb52ff9339cc||c93291fad04541dba9ecb530af94d2cd||f330128f93b64cc09fb5ca8bafb1c36d||34295e97630c4205867e1753dc70f424||163abb196d1c44e99cee5fff0afff95a||45a3a51edacc414e9745766e66111cfd||c93ef08bfec04716b8c466c7469ac5f4||92e0e642e0a94f89afc49e89ba9f0b85||b58e1da4a15144e7b19b21fa2d3c238a||9030bac59e494da1afa7ee60b0526049||034e4bc479884e4bbc7e3c9e7ca164cd||12b39532617e47439748f2a8c98849b9||77b0431a372740f89ab2e334000f4c56||0819ebfe2dd0437dbdb50d86b82038a1||apple||1300000003||13000000004||13000000005||13000000006||13000000007||13000000008||a0ebf8b880284f48843a53028e591bee||d594fab192ad4e05b1be0d0dc545a286||b99e008fe0604434be878bf538939bc1||75af46085fff42a586fa4bb9cdc62d81||a8e66762075b41f99c718d98fd9907d6||d29b03052cb149de8a7648d0dbe1aeeb||5df4290abf614d57b914c42aace94f23||ce60b6218c13449284204ae1b9d566b7||81d2d6a3790d44669f5735abc20e7a6c||c92ed7f9933e4afe8fea199ca5084dad||c7ea4ca3be794553a076a7ec7c419f4a||5c9df482e773463e98dff755c2224c73||3273c6c8dde94874a06e64e25d6f7a95||511bdf383ca14816a29ce239a62679d1||0f76c21b93b641c0bb6599a23895ad84||4e5fd450d46a4d2cbf81e5c866e36417||a96b2115bda3413cb3de8be94679f952||a508e4b09b2141a69272a9d3e87b3fd3||CongYangXianMinLiangMaoGongSiLiJinLin||234243wsssw||be191efb9084458d906d7ec629f33e17||2224324sdftgret90||YiCengJing||5c8ebf4464b64ae8bd6c925cc19885e5||afc05c871ae04dd2bf357aecec57117c||b4aec1bb874a44af86b7a9c9aa25cb09||ff188b68bf264e5e9bdc1c7a7698de00||d3bd9f282439452e91a583adb930d2cc||a7273d6dde0640d393aa507ed891a81e||a67595000089494e820b01b4c5808962||589f6255c6584be7985cfb5289f6118c||3152ef42d7e34ee199ea596e1f4d15d9||bd8fbad3e2fb411581b0104d10fdf2e4||d2772d6125e84c1d9c2098fa67ae9ed1||3db29a5211394ca39f8755907784ef66||46439d60e9b241abaa3a9ba4689feff7||BaiSeSuDa||9b0810a99f442188af5e7a08bbae6664||ebffcb3ad86444e89512a47e809b72c4||zhl||6bd8db0277814280acf06fdb2767979d||8780badc46c54179852a373a6eddd5e6||ef8ccda25fc947db80a6e9cad0b6d5a6||b5b7070e5016407ab7d7d4e241c92dcb||aad9df53ec9e441dbe609aa2a2e1ec2b||6fbe1abeb44e477690ab89e5fda42fdb||c642ddae62b445efad4d8bbcf09b0875||369dabc48c8f411285353f70d74a964f||f31e5f0b47514a689ba7c6fe65e71f26||83cc05c827b946419c081c6a56855d98||fec9b7bcebc4493d92602d14a629281e||e9697f868bb541f2868e5d4a000d0fc4||d56859b154e54054921fda5ac6f849a4||572ab76c2c7149ca85c7263695bbf1d4||823add1ccde6453d8c1cdb7294e44d86||34c2878f3b6c469db1419f70498eda60||08795cfe5e044ecb995021d6f0ffaef7||4130490f6d424dc7901173cd61163832||5a55093cd3ae4397861cd39107fb5e5e||f10e8de1ccf04e5faa83cb228afdc4a9||c3909442c5a049cab5590f0446346643||zh15158019721||zh15658037030||2341578784||833f6e6445584b00bfd8a0112f8e3b48||536c4cdd71f04e499643d71c119db847||277e2d02a73a40cc92609c9ea67c7682||34038950338c46ea981e6edda3668b8c||d79e62c7969e43a5bb6b158b7222ca6f||4ab9625e71b844248a6fe255475b75a5||ChenXiaoRou||AXiao||Song||cammmmm1||wendy||XianChen||e1f42777a76ed6d94e80b87fc1e09ff5||lanting||ZaDiLe||NiZi13587548366||111111111111111111122||18758285875||zh18030146944||LuEr||HuanXi||d41d8cd98f00b204e9800998ecf8427e||emoji||min||sasa||LiangRenMeng||a.XiaoPangZhi||zh15158716336||LW01||ximei||12||1d9c0170f5ab2c799f2b4c1ac7859cc9||alina||YiZhiMao||15757150876||13989473881||YuanNiZuiHouYeNengTaShangXueShan||234324baishan||cengjin||kongwen116||1111111||HuangJinRong111||zh15869193754||alex||dingdang||ZengYing||HeYuQing||faywang||BoJunBaoZheng||XiaoChengZi||cocokou.||MiaoJie||YanWei||tmac||andy||littlechen||d41d8cd98f00b204e9800998ecf8427e01||ACaileonard||AiMi||ADeng||XiaoBoGe||JiaoJiao||alex01||feynman||c.||Shen||ZaiBuYunDongChengZhuLe||XiaoHei||AiHua||ZhuYanPinglita||e6797283781a4af4d285826372a5f650||JiuEr||jolie||LanLan||l_ch||nina||s.||YeKongZhongZuiLiangDeXing||Nie||MeiLing||FanXiQie||d41d8cd98f00b204e9800998ecf8427e03||ChenSiWeikenneth||hu-Lei||littleLan||javan||YangJun||jeffrey-ACheng||jarron||d41d8cd98f00b204e9800998ecf8427e04||3590cb8af0bbb9e78c343b52b93773c9||hiJing||GeShouDeXiaoSongShu||d41d8cd98f00b204e9800998ecf8427e06||audrey||YaoYaoYao||Jiao||a-jdvHangZhouChengXiYinTaiCheng||aTianTian||5058f1af8388633f609cadb75a75dc9d\",\"shawn||4f4431cd1ceca4aa1e1897c24b3f6c3c||53cdc0a710a3d1772cdcd1f6fc89b949||yesterdayisawalionkissadeer||gracehuang||d41d8cd98f00b204e9800998ecf8427e05||jdvHangZhouLeDiGangDian||LianShangFengDeQiu||l||yamii||YiZhiDaNiao||ZhongLiangJinLanYunDiRenXiang||ALiang||rayhu||ZhangYiDa||gugu||jdv-ChenTingHao||jeremyguan.||b6548d0b4d924b14919ad5f8370061e3||WuChengCheng@||GaoKui||YeSi.||WuShengZhiXi||DaDaDaDaDa||YeManRen||fcc||zh13758106974||234324||23456678723423||WuTianLongbesos||mr.Jiong||YaTou||zh18502066231||zh18628218679||XuWeiWuRao||alun||234234asdd||fuguang||9ae4c4f1277340a186b16a17d937c72c"; String str = "yepingyan||taoguangsheng||chennaikang||shaojiawen||yejia||wangjianfeng||wuxianghong||zhangmengdi||chenliang||1033a9ee238140c6a1583bc1cc05567a||e8a6560f17364e5d90fddd50c67baf52||60d2533e0fbc4b9fa4bde758171559b5||85a842a9daed414db85f53b93a684d47||deb2e2ad924f47fda530361a57a2070d||5a3793a4afc74a36a9c0a3cb2a1c9736||760d3af094664f02aa268cb41bfe3978||053003311ede477980cb8b97374e7005||0501be9ed34b4dfdaa74396f1f32514e||4c0461e8ec7145c8b1a228cc910393ab||5623623f1aae4a889cf60e6943f203dc||26b9fc69df6e44499884f775d815c7a2||4cd623e4f52d4ce3bd00acfc50991ff1||d17e0a36f1fd49048f1841b6eaa97cb7||cb188cc31b2c4b80af201e574d64eb37||0395ccfbca7543b7bb3093d7440a3f8f||6a84f35f9afd4e7894536ae000db3524||808e4d3152594ff592cc6baaa5f5650c||0197cca6898a4d1ebd365a9b54975e70||85366595188||95b6aabef90548168f7876bb695ac1b9||d6a5e64220834ef49f8514bb3726a30c||1c589b0e64ad426c948151b9b49f717f||554cc5bb6c3441edbbc667b217fe58cc||d9961b52cf9446f7b449f69429fa0889||8748b6095d23483b8ec45acff3443dda||17cfb61638e143289fb4ced4ef1e6f2e||279c33469a024131821f3568651848ec||5386237c5fe84864bee5e0d87f46acde||f8a4256454924ef481a51f4440eabd54||014b4dbce85940c49a402faa4606a7ef||87c419a151a64cef8d13d9964985cdb9||2590cd60cc364daebfa8321d3f3a3d9e||de2c33f2e8924ff884e0073ca2f2f711||cb512fe8adeb429fb5a99b444622d9e9||b498c162fec1487ca8d90c8208fb24c0||86917b76f1e341ad8d5862c2f4178a69||edde56b16fc741ff8b5345dc89f6ebe2||133a8b8e00b141c999691556994845f8||97e31402568c4084b7b2d17a109805d1||ba60284fb2294c8d8a2dfdc13e631224||2f73268b8ae94a50adc9be13948813f7||71af618e8b4c4d47b3d934d592bc27ac||8abec5614cc94544bf84d24e20c0f1c3||949d2191c3b74e1089e41dc19eef7f66||b6d091fa70bb461c99e50ed8a2e5f846||4d4d8a06b41245b48e8633efa32b56ed||57af656016e542c19a0ea207b6810264||a95524a9c3c94d77b7ba522ac697c889||f2cd9549515242239b52f389111ba003||afd07576885044668f7c6e88be80a54e||6318f71b46894644ab40a3dd2ce388b2||f73a4a768d0b4f78969704078302b676||7d6c41b297fa4341abed436c5d64048f||8927dc75226e481e98dee5b148a61be0||7fc33d65fa2d4822923cb6fa8ee6d7d5||37bea30fa18a44d68d341c34ae681c0c||fffc57772b6446f7b6b563c0c5e518d4||5c2406d8d742479196f0392f786c69c1||0e51b089f4b34d3d9a29d56d3d016c62||befaa12c69944ea4bbc1cd34f19aef40||cd28fd64b08a4db095c528a942f4c7fc||6d97f56f1e75434db49ce1e162c13c28||66672dc67c7a4dbcae2ae29e9698c31a||fc1b59cdab764da483749628bc91ea72||ee362b734411416ba44cb249714b6885||f5c98c7c087d4083bef0c748aad9ba90||8585cd13c42e4b33b021593f562d7619||31208ce7c16347a1afacfb50602c9ca1||7211ef07565d4d8ba8c45565c7d201dc||e6a1734037cc4b998aea57052eb31786||8db5edbdcf734b27a0bc2fa2fa420e5c||2294cc939f0b488690d7e95c7981e658||be2be0043b264b8c93808edf36e81d63||ca0f57a1f95146b4b9b0103800b03f10||80d248b51edc43d3959cc478e77b9de5||8e441d5ee59241b5b8a64ead1dd03daa||e1827273133247c4a17d65c9df4c2894||95fc56b9839a42878cbe7106e7bc9ff2||f8d893fd85844e199cc17fdce79f62b6||f23077c76a144507a5f5a91aa15e865e||f5c1321841da43c5b4ab8edf267c9e69||b2c5d9232e034eb69424fa238ea7f375||14a2c914e09045a59827a633f98fa5dc||64d58369915b4a69bb8306cddd41dd3a||39030ddf0a1e4db299085474b9809fa7||0817f586f81a4117b924b017f7a58718||32b4c694454f4ec0bb767f518b8be301||48c2b0ff0e234ef799cc067a05677cc7||b74bc661bf5547b5a962f8e0b2c7563d||4a8c6d8bb109414aab17983ae18459b2||a7778844a42b4df0834763481a401073||7df43c26decd4b9cae3ee957bd05ac52||6dacc32a48a940899dfc1be5378373b6||7edd8a500fde4b8db4393e514d0dc215||0140063f60ad458a9b35c32e80401834||af5151a9eb3f4563b9d20be1e682593e||fabc111e771340d5b7224973e2a3fa5d||f935cded097641519b1ef47fa8ec3687||3f410f5e6cf7498e969232f774691a59||ea236caa8ca0480cae6575512433286c||10a3ebd8d21942d8a55aac22da0d984b||19b0ec31274040d8b06845a6d7505028||7fa79a52aad6492db78f233d379fc526||07cac1d1f977484f919c1a1c84c0c4cb||03cb98bfabad4eb3886ea08003879412||015844c6a25e41ff9f2b1859dac6148e||aab1b82a96024584b706542be157c683||9510b742fb024efbb29002b1e6f78a3b||a618df6d09b74ada91ddcf362b0a2459||0a5c4b8aa6584ffbaf4fcab312b83e72||07e85dba485140d3899f481b7902ad03||999ebb3c09ea422086ae400bb0e4291e||fece2bfda3754029a97897fd7bcd15ba||5a8d2b7613394af588b7b98f4731b294||f9a8d038d6e349a5aff297208ac117f7||24a80b4c78924cb9b75a5649221a90fe||81057b5a7a5c4a3f83e31cc97a493c72||6b4461647e144969a68a39fdc54a728c||681170032ac84ca39dcc7ac5374a0bd4||1f6fea78cd244c239b8a6bbd76560f61||dd65cdd7594f4590b0addb80b08e23e7||44efc4fd2a7c4f0388ab038a7105a251||3f0bc6b120f54febb3fbfb242a6597b6||476f26533d5f4ffda54f9ac26073dd27||b151c6057d5545899b2a6261940327ef||d273990f0fd5436ea92b8aceae0e1915||7199240e63e047979523a7b7126b3763||699f8f67450e4d89b69eea35968f15cb||4c2924d70c7140488ba6d2e7146c48b7||cba0a50d125e4569af4982270fcd44d2||99ba985aa3e24188a2427a9674c2cee7||1ba154236289422eafc1494fb2cd5447||d850f273b8e94baea24e5a5c1e02c0ec||cd09819332b34b69af57d5bbbf242879||93d52e81a9d04166a441cc5bd8d528e9||80011bbeb65242b0b2947e3ce2d9a5e8||7cb4799a81bb42818868a9eca56ae364||9b1adf4c531547f5810837fe2ce871f3||fa7ba91175504d6486f3a14fbb54defb||b5b56dfc08d44d92a2968b7bfc9898cd||68c2a2b9c9af4d5ab5225f12eeca6afa||10421da78e3b47688103b59d9925fa05||d95fed7490a54c20af0710f1978bf614||b383dfb32c2f4871b38d47329ba436fe||fbb3c70fed1b4624aba506492c0261cd||22e74e0843004767bb26e9e0a575ea3a||6ca5062bf688459aacb2c3cc9a3c0c61||7b666e3eb28d4b809d76eb91cc8597f0||a49a7c9de5104fdf82df8a67dad41568||a0b37271746d4f61a7a25787ad221027||71cd6fbc9da54e9d8a1992172d92bee5||7ad527490c6a4ebe9093f45525340fd9||928640e07d4748a996d43024e3373aef||cacb6b3bf53e4766933665e8f5961f28||d23a0456250b4f86bfae673300cb38e2||b6e9e751a0b54a5cbef9e3a737f265a7||75d12123136a4da6b6134cdb5ca0e8f5||5a2851a0484e47d2a249785ba40f346d||3cb82820fdc9473fb104d725bf4924b4||dbe3002e90d44a52af0407584fdda2ea||0b3fd2002a424c5293ca8ec4c60bc977||0c1f60a0713d4791abdb94b425acc831||0758f5c6f4d34d3abc84962c81925ff8||caead448c45348c3b2d06df665ed0b43||babd7c07416247a08215df6e17e50733||18df396b8c0c417fbd79959faa528709||0d349f252c5d4527aee68a077baf11d1||70dbb5c3959e42e3bd4cf49f8d2b21a1||a27eed8d234240fb9c121211a2ffbfbf||8e0b5404bd3d4b95ad0a9fda7eafe5fd||9dffdaf42d6c4eb6a6e11255c5fadec2||00305613607f4cbb866cbc37b0bfede9||549b335ae8444bd6a3f12d7b2ecf82b1||d563bb9c21b148e9bcf3cb543662a6f6||2215b3679edd41b18212c28e7b392f80||a636c81d9442466c9a3c8c49e56db824||6a3ab6e564d344c0851139770ecd6762||9882c0d508d24a6faf6fddc2beb02c3c||2c55ce0fee3147119eec42bd8782af11||7aca61c45ffb4141b192c7c22aef7d2b||e218d4fc639f459193d8ef15476126a7||acf423a33d3d45c8b9a0ef893448795c||cbd99ad437ee4044845a0f6895b9453a||3975792146174b81bdce4bc7c4dbe517||04ab7c92e3a34a6caf33f80b3b938fe3||15eef83ce12142bcb8082005634292a2||41cae2681efa4437b27db6ee5aad939e||93b603f08902496e96ef3170c445bc54||9a42f047ebd34c3bb16eceb04f46ad94||058efe8f0e2041cd844a427714ac69b1||fa50138b9b8d49d8bf260885407cc9ef||bee4d5a331e541489c57e0403aff3c14||34efab9a18e64629be64bdda9fcb774a||a022810578794fd1be090e1ddb7850ea||5d23bea235d04487b3eefe64034d7fda||b8c5e55dcf0044d0b91f51a498c7c3b7||0bfb4a4625f0425c8242096acf9bc8a3||d71d62e137824bf8825f980e5574d2b5||db5af88546df4dae8fc3ea0f08cb6bc3||ca7cc04116614dcfae20c5dca061eb77||2d57998e8713452e93d2123da51b3c91||ac5a25b5179d4a8e84c8419026838a3f||36d15a3860cd493e9ba0c63d312a7ca8||cb0e00bed21c48c6894aa36b4cda6b2d||e9c096b95d7d47e0bb5103e66f1da2f3||d9b310ffca4e4561bfade2ead90e0a2d||2d761edec80b4119bb083686b348b21c||578ae551e59f42bda4ca48a130d76f5d||f25f6085ef6e4c0cb8014dbc4d0ddcd0||7e8751338e2248f589fe2163b2ae5a7b||5c1333648d2d42f2b2aa2011b9ffade9||76731c48496c4bffb3896b1918bfa3d0||f3642a263d674655ae1f9a7603e4ccb1||39133cd83c3a40b2adfd298404f5fab4||66efa290b15f4c08b28e7541cf933e2f||d672d66b04144b3cb6cbfca091c020e6||cb8169ebaae8481a8c5d4f6c1b22b142||586edbe496a747b18adc89ffc878cbab||f89d6b872fd040a9b6b3720076be24ff||8358c9d0c77f4ac091afd16cc1745ac5||d09c0eee96ac4461b1c1ff063cbca2af||82ad349d742f413f9c8c9ac5aa2d16ae||798db872fefe4addb1aa4efab993619f||775d0fa3641f4af2aa81f6889baa66ae||1eda003b63df48e6b8e8983aef1ace3f||336c8fad4859446abeaffc666ea0034d||c9aad1386f79409e9957a8ecc3426808||9ed8a8a0ad7e47edb387824822125b6b||d50969c86ae648f8af35ec29d9236379||afdf59e627e04e669207c1ba5a158426||e543b1c837314ff7919b911360726f33||41255ecec07747c4aaa12d0f4f763899||ad36dac9c0a7446bb63f92017099e5f7||e85ab29db71f4c3b8042b2f4059a4ac4||b897e51938f74d0e8357f5d3a73b6bb5||8ea2de06b14d4b358f11954ad36c15ed||219ac16136cf4b96b9756f69b9ae2b47||a74a1fe3b0804d6d83d2b1ed9a738996||9554e4f2d4154c06b35e9773806c1ab8||e73042840f994782b3c6470dd18a00a6||97c0a9a22a57465893534cb2a81766fb||cbeae827ba474a049d87f2d58096886f||76044e1707e942188f8af63b97a6f94e||97696bdba4484dfbb57def84f6195e50||b5c26472151d4c30a64f9955c3423dbc||ee6b2783d4954a1ca8bc247eb94b230e||ba7ecfc2837b438b872424cd5e0bfb72||899c6b944b2b444888ec08358bbeca7b||59d1eba6196d49278e4c380637434a53||97dec846fdd84280955d40f2e600d9ac||ae6de9e7c8774d499e5a7b670bdbedab||589a90409e584af5a7075904ad82a1ed||0d37ff8411d345bb9865ffd5b83df6b1||de27337c7183428bb365434dde67540e||ddb9462dfe384b1cac8dbc479c763509||586bf05203264df08a3ddb421b92fa13||8995fc636a26431f97fd95c1ffdb4914||3075e0c16569406184882a838101d895||ce6a630816fa4ff984db113288bdf1e8||4212642359404be885019d440889715a||3e8fa0da58184f94b7aba8e0772bc827||ecbcccd916bc44efb13a9c3f8f9d8161||0da8510241f640efbe443d964bee44ca||c886c0dbc7ff4b298a129a92616dfe79||9af0f5d24bd049339adb4c0e59f5a060||a7c47d1d913e449f954db18a6283fd5a||8e37f686502447599d3854a15fbb8ae5||ac64e5483d0f4344aadc39275824d687||88521354a4da4d1aa2f77186fdb54a89||9484a47b88084155973168cec9411d83||0c5a8a111c114b4391ba8a09f0f6ecc9||65b915cede2849c195ffa529f2ffdea1||05ebbc6fd10c4a2c8d6c39d1551ab7b8||f788aa33aecb43f18c08733bfc011a35||dfcca957bc814522b835b7cf55fff881||d84c1d854e0d473ea5c4f1d227db4cfe||5fa2a064c37d4e81b3ad69376ee2b2f1||74afac17a97548b8a7626427872a9ae0||8588f4747e1e4aa78b601e1fe3ba6ea4||06608784722d4ac4a44cd9d4147a89c7||c8bb92abf38949ff83cd5aaa4ae8407f||ea76f01ddec54c229e7f5d0af867e858||be28e4d2bcfb48cb81310d5e656af70e||de474557d8174c94905c81996890307e||799276a5c4e7451a86e77e09a85f1ca7||7648dcd80d724d7f9b2a633f95d4755c||c850338443094f5caaecc018ebf8d12a||edf10fda182d42649ae26f4c06375b3e||bec9e09c35c14a029f57693bd7b9f123||93eeff4394c24537975714c722a21538||5a3e092713a74425aa535d418776be7c||2cd9ad01cc6f427f84e5bcad2a6d8a20||bf168d8698ce4c90b9e92d64a49769bb||28cff42995fa4715992dbc7d4d51e54e||9ffab45c54bf4a1e8d0c15324af65def||DaoMi||niweizhong||81637ab67fd34698b26a0c84e57fb586||Jing||NiZhuanNvWang||e75fdc4bd465447f93500c94974d890a||842272ad140b4bebb09e74dfe35a1c3c||da41bf5e46544387a759744cea5e246a||ba86d976c2bc4bc6830d8a2fbedc4c4d||b384daa0ea33478b9420a9024ac2a73d||4fcced4527d24399815cc9fae33cf520||niweizhong1||8d09b2b788d44024ba00b75555829aab||311d11e804834115b32effca449bf344||239440e576ae498eaa355db03b40a359||826511a8c600414e82e6fc40ecb73091||7e0d277f5b3949bd850ffa41043fe94d||dbff4317ecff4d4daefe5328b0b1cc4b||300ea525053e4b53bf41ede2818a2843||4cb68f1c6637483dac5fb1b66fba1fb9||4422836b40cb48958165d66c3674772a||aea36f9a07f7441a8a65aa83a4c4f3ba||530fea4b44784875bdc1b22f95fd3e34||c95842ec1daa44dd93452efc98b0bd30||534cef2dd45c4f3987eec2ebb64b7b59||bc243d8115084d06a8638781ce1c464a||7c22c617875546e7997dd6f7e48ca122||702fd097e6c042eba95c29687046ab99||af4945ebc21d4d439526940221a65d6d||fae4414b9cb149f581a55d6f9bce6e7e||c0336c92864d4d26b9a5730d7090e945||aea46b0ad5a042908813338e676ad877||0a948550dbfd4caa91ca67e8f0290c64||8f8d07caa1964477a40057191c102170||b8fbefaaa83b4609a30b0d6c70b83cf6||83027b9db3dd466781f2ebd2918d07ba||71e411071ba44bb9a31ae59c690b45dd||b6abe9e5b60040fb87737af823d1e83a||605111ff896d491bb1e02fbf48bca00b||ecfd3f7a78ca4ddf833e3367e1d975dd||ff58b504b63a49dfa419978699556f12||a5b6ba045b884fef826e71aa5ac4eb83||5454884535fd402d8cd9476a5d8d3518||257e541a782848a6ab785968a4f09167||e1fd8563e9bc4f4abddc873691ce5667||75d368cf564d45c7a1c68673529c9517||c833339a311e4800b76357a5d798e99b||98daffb2f1864025bbde03d12421b3cc||f9cddf17dee34143a6d4cd982748922d||12ff0514985d433ba4a37cdd52d9a671||6aa0554079044d289976a58acdf3a90b||fdbf05bcffbb493ab3a240f09f2b6e4c||31d9126ca13340a6b3883a7717e6babd||a5cc23be2b834459b3887c5f51d6b4c0||56de1864ec3a4681853c4db5e83c0af0||ea96e22fa5be470db076f8bb42c047d3||b999e85e12c0403d8bc49c81ac9556eb||e30ea5d6efe249fbb59bf8db89994dac||f3617631f8574c1d82762b3c1609a393||45a8d654cd7648d69f54a844b0d7adb5||b81fed2d9f3c4093b70440dea7cd5ee9||1cdbcab1d6274f8f834319a30bd8c61c||18af85032c7747b0929cb51d4fd71f5e||ea36dacba6454a3789fc2ff195bd0e91||a1a03dd8448a4b5fb3206e4806523127||34c0e62a714e4be99ecd21449d0bb91f||ba996646249d4c1890270f17a80289ef||6f47bd244e0842f39e4d2e26fccd4882||9c10c1b3a1f64ac3ae69645c72ead06b||a06ff1bd53304dc4972365db3489bf19||84f0eb84578a4239ad83a20665b41fb2||792b180fa959405aaf9b0a40756cc074||a54a8cf734714ba5b92c827b23553a1b||2c6aa2625fd245cbb8abe629e5bf7831||5d319cc9d2be403cb1a762f002e599ae||8b7c0b4a75c9406b99b24820ff82191c||1f616f086823498bbb301ef59e0040e9||ec0b2f879755443aa15a71378110bc1d||27c6770b84b945d3971689a8c8810b00||f62182a37a054d69b170edd70e0518b5||20be22b288e8462b8c73b335924ecf73||ff7f0226278d47dcbb50c6344e8d6934||4e5ad54450644d44ad5c3dfc576b10bd||8084a2bc89eb4c84b41e30f59256a87c||a9cb6a0072b44a27b525079bcced1e8c||fde8ae4a13004c5b9ee1640e23bc1897||a7a23b58021f487597d1c80f694e2e2e||fed96eeecf874f7e8838254188944408||2299adbb0974456696c48fd6b81c378d||69ab423e932a44468223b05280e4fafe||7642dc4946a243f498a90e1b3857f5a4||982d4406d79a4bb4a61c97bc0365214c||6222d8255ee24bb889b865ad436ef8c2||45be0631645b4a1882f026fa3d2d2dfe||475b41e508ce4d638ea084f81c325fb5||9ecbb79b36a24252a0586228f3d3083c||f22faaef58be42858cbacb9ff9da800a||0aa5f83a291d4aa7ba8d4086915880ce||dabc53b452be4489b3e18a05b308f804||03e38aab6a804e78b95d309fa86b16f7||367cafd3a2374b778fd422970139e524||d01ac22eb1654a9da7753b257d7fb4a4||d3c89f38a5b3430c8232de55ebda30bc||48502e88c7634fd08db8d6805ccc7363||47576041020e47f497f946286ca77f47||c49cf412ea324f96b45ea7a115784fd6||e0fd386f532d490fa7fd2c096c7b39a1||507149fe42a74c7e8bbffad8979ae9d1||f636656b9f5243abb8f6ced135cd621f||3858da6bd5af4a9893bff132fbe46ac7||aee3752323054508a1c90bbf6cb80f9e||3a4090a41eab46c492e96f6b2e648eb7||7eb942cb4e58410982da35d47256422b||294bc70386904ce1a7fda5be14a20fb1||a4af8c884a4d405a8238b736cbe0fc21||dda20f0da0fb4812b56114a728b64190||ca75d30846424ebca5a51f79cb4bb2e7||862f3a38dd5840cba8500d2a59978722||88b5b9869f194f74907ee569792d3d54||543b08411e4b49adbec8624f9a6f5312||679d94e8e9314d7fa91365a11c7ed2c8||ea054a9055dc41668f61d53f71e68b7c||5b2e3efa32f8436bbaf0a9f695c02816||635a1682c6ba46fb95307413848ee6ba||29a76c6a4a6f43c5b71748c2738b3c3b||f6d46444bc9a4a2bb851497aaee27a78||65864af4280b4005b927476aa292d0d1||0fde3e5f79eb40d3b049f2481d4842bf||94244996bfa34c5b92a0d54295c9006e||dc8796ff0d4c4d2f91f744dc6892cb2f||05d7435e380f49698527d14d2fd1f844||362ba60dadf94a05b75dd52534188bb8||220f77530c944b5896c168dad23d903b||bb9d19c00d9c474ea53e30cbf7d1588e||144546c5a0d247a9900dd6a66ad8a1a0||39355b7e5bb94fae98c7ce54e1070c1a||9412384e179b496a9fc13818f67d60bd||5e8fe52031604159ab19f1985c2426ab||88c19a5e794548cebfb86ad8107e2377||10e7cb2e11bf43cba2460115232bb786||65621a4de96944a4b9e26263b9b1a114||8053185f6e1e4621842a325a491ac319||87cc068d582a49bcb583407f6607b946||993021ff177b4b66ae5e872ba2911184||9a13d2c9c74c4deab8f1fb52ff9339cc||c93291fad04541dba9ecb530af94d2cd||f330128f93b64cc09fb5ca8bafb1c36d||34295e97630c4205867e1753dc70f424||163abb196d1c44e99cee5fff0afff95a||45a3a51edacc414e9745766e66111cfd||c93ef08bfec04716b8c466c7469ac5f4||92e0e642e0a94f89afc49e89ba9f0b85||b58e1da4a15144e7b19b21fa2d3c238a||9030bac59e494da1afa7ee60b0526049||034e4bc479884e4bbc7e3c9e7ca164cd||12b39532617e47439748f2a8c98849b9||77b0431a372740f89ab2e334000f4c56||0819ebfe2dd0437dbdb50d86b82038a1||apple||1300000003||13000000004||13000000005||13000000006||13000000007||13000000008||a0ebf8b880284f48843a53028e591bee||d594fab192ad4e05b1be0d0dc545a286||b99e008fe0604434be878bf538939bc1||75af46085fff42a586fa4bb9cdc62d81||a8e66762075b41f99c718d98fd9907d6||d29b03052cb149de8a7648d0dbe1aeeb||5df4290abf614d57b914c42aace94f23||ce60b6218c13449284204ae1b9d566b7||81d2d6a3790d44669f5735abc20e7a6c||c92ed7f9933e4afe8fea199ca5084dad||c7ea4ca3be794553a076a7ec7c419f4a||5c9df482e773463e98dff755c2224c73||3273c6c8dde94874a06e64e25d6f7a95||511bdf383ca14816a29ce239a62679d1||0f76c21b93b641c0bb6599a23895ad84||4e5fd450d46a4d2cbf81e5c866e36417||a96b2115bda3413cb3de8be94679f952||a508e4b09b2141a69272a9d3e87b3fd3||CongYangXianMinLiangMaoGongSiLiJinLin||234243wsssw||be191efb9084458d906d7ec629f33e17||2224324sdftgret90||YiCengJing||5c8ebf4464b64ae8bd6c925cc19885e5||afc05c871ae04dd2bf357aecec57117c||b4aec1bb874a44af86b7a9c9aa25cb09||ff188b68bf264e5e9bdc1c7a7698de00||d3bd9f282439452e91a583adb930d2cc||a7273d6dde0640d393aa507ed891a81e||a67595000089494e820b01b4c5808962||589f6255c6584be7985cfb5289f6118c||3152ef42d7e34ee199ea596e1f4d15d9||bd8fbad3e2fb411581b0104d10fdf2e4||d2772d6125e84c1d9c2098fa67ae9ed1||3db29a5211394ca39f8755907784ef66||46439d60e9b241abaa3a9ba4689feff7||BaiSeSuDa||9b0810a99f442188af5e7a08bbae6664||ebffcb3ad86444e89512a47e809b72c4||zhl||6bd8db0277814280acf06fdb2767979d||8780badc46c54179852a373a6eddd5e6||ef8ccda25fc947db80a6e9cad0b6d5a6||b5b7070e5016407ab7d7d4e241c92dcb||aad9df53ec9e441dbe609aa2a2e1ec2b||6fbe1abeb44e477690ab89e5fda42fdb||c642ddae62b445efad4d8bbcf09b0875||369dabc48c8f411285353f70d74a964f||f31e5f0b47514a689ba7c6fe65e71f26||83cc05c827b946419c081c6a56855d98||fec9b7bcebc4493d92602d14a629281e||e9697f868bb541f2868e5d4a000d0fc4||d56859b154e54054921fda5ac6f849a4||572ab76c2c7149ca85c7263695bbf1d4||823add1ccde6453d8c1cdb7294e44d86||34c2878f3b6c469db1419f70498eda60||08795cfe5e044ecb995021d6f0ffaef7||4130490f6d424dc7901173cd61163832||5a55093cd3ae4397861cd39107fb5e5e||f10e8de1ccf04e5faa83cb228afdc4a9||c3909442c5a049cab5590f0446346643||zh15158019721||zh15658037030||2341578784||833f6e6445584b00bfd8a0112f8e3b48||536c4cdd71f04e499643d71c119db847||277e2d02a73a40cc92609c9ea67c7682||34038950338c46ea981e6edda3668b8c||d79e62c7969e43a5bb6b158b7222ca6f||4ab9625e71b844248a6fe255475b75a5||ChenXiaoRou||AXiao||Song||cammmmm1||wendy||XianChen||e1f42777a76ed6d94e80b87fc1e09ff5||lanting||ZaDiLe||NiZi13587548366||111111111111111111122||18758285875||zh18030146944||LuEr||HuanXi||d41d8cd98f00b204e9800998ecf8427e||emoji||min||sasa||LiangRenMeng||a.XiaoPangZhi||zh15158716336||LW01||ximei||12||1d9c0170f5ab2c799f2b4c1ac7859cc9||alina||YiZhiMao||15757150876||13989473881||YuanNiZuiHouYeNengTaShangXueShan||234324baishan||cengjin||kongwen116||1111111||HuangJinRong111||zh15869193754||alex||dingdang||ZengYing||HeYuQing||faywang||BoJunBaoZheng||XiaoChengZi||cocokou.||MiaoJie||YanWei||tmac||andy||littlechen||d41d8cd98f00b204e9800998ecf8427e01||ACaileonard||AiMi||ADeng||XiaoBoGe||JiaoJiao||alex01||feynman||c.||Shen||ZaiBuYunDongChengZhuLe||XiaoHei||AiHua||ZhuYanPinglita||e6797283781a4af4d285826372a5f650||JiuEr||jolie||LanLan||l_ch||nina||s.||YeKongZhongZuiLiangDeXing||Nie||MeiLing||FanXiQie||d41d8cd98f00b204e9800998ecf8427e03||ChenSiWeikenneth||hu-Lei||littleLan||javan||YangJun||jeffrey-ACheng||jarron||d41d8cd98f00b204e9800998ecf8427e04||3590cb8af0bbb9e78c343b52b93773c9||hiJing||GeShouDeXiaoSongShu||d41d8cd98f00b204e9800998ecf8427e06||audrey||YaoYaoYao||Jiao||a-jdvHangZhouChengXiYinTaiCheng||aTianTian||5058f1af8388633f609cadb75a75dc9d\",\"shawn||4f4431cd1ceca4aa1e1897c24b3f6c3c||53cdc0a710a3d1772cdcd1f6fc89b949||yesterdayisawalionkissadeer||gracehuang||d41d8cd98f00b204e9800998ecf8427e05||jdvHangZhouLeDiGangDian||LianShangFengDeQiu||l||yamii||YiZhiDaNiao||ZhongLiangJinLanYunDiRenXiang||ALiang||rayhu||ZhangYiDa||gugu||jdv-ChenTingHao||jeremyguan.||b6548d0b4d924b14919ad5f8370061e3||WuChengCheng@||GaoKui||YeSi.||WuShengZhiXi||DaDaDaDaDa||YeManRen||fcc||zh13758106974||234324||23456678723423||WuTianLongbesos||mr.Jiong||YaTou||zh18502066231||zh18628218679||XuWeiWuRao||alun||234234asdd||fuguang||9ae4c4f1277340a186b16a17d937c72c";
String[] split = StringUtils.split(str, "||"); String[] split = StringUtils.split(str, "||");
ConcurrencyTester tester = ThreadUtil.concurrencyTest(20, () -> { ConcurrencyTester tester = ThreadUtil.concurrencyTest(20, () -> {
int v = (int) (Math.random() * 100); int v = (int) (Math.random() * 100);
String wuserId = split[v]; String wuserId = split[v];
List<String> res = memberUnionidRelatedApiService.listExterialList("ca66a01b79474c40b3e7c7f93daf1a3b", wuserId); List<String> res = memberUnionidRelatedApiService.listExterialList("ca66a01b79474c40b3e7c7f93daf1a3b", wuserId);
System.out.println(wuserId + "-----" + JSON.toJSONString(res)); System.out.println(wuserId + "-----" + JSON.toJSONString(res));
}); });
long interval = tester.getInterval(); long interval = tester.getInterval();
System.out.println(interval); System.out.println(interval);
// //
// ExecutorService pool = Executors. newCachedThreadPool(); // ExecutorService pool = Executors. newCachedThreadPool();
// List<String> res = memberUnionidRelatedApiService.listSelfExterialList("ca66a01b79474c40b3e7c7f93daf1a3b", "QiuWenMin"); // List<String> res = memberUnionidRelatedApiService.listSelfExterialList("ca66a01b79474c40b3e7c7f93daf1a3b", "QiuWenMin");
// System.out.println(JSON.toJSONString(res)); // System.out.println(JSON.toJSONString(res));
// 初始化计数器为1 // 初始化计数器为1
// CountDownLatch countDownLatch = new CountDownLatch(1); // CountDownLatch countDownLatch = new CountDownLatch(1);
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"12", countDownLatch)).start(); // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"12", countDownLatch)).start();
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"13989473881", countDownLatch)).start(); // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"13989473881", countDownLatch)).start();
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"1545shiyao", countDownLatch)).start(); // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"1545shiyao", countDownLatch)).start();
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"15757150876", countDownLatch)).start();; // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"15757150876", countDownLatch)).start();;
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"18758285875", countDownLatch)).start(); // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"18758285875", countDownLatch)).start();
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"2224324sdftgret90", countDownLatch)).start(); // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"2224324sdftgret90", countDownLatch)).start();
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"2341578784", countDownLatch)).start(); // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"2341578784", countDownLatch)).start();
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"234324", countDownLatch)).start(); // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"234324", countDownLatch)).start();
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"niweizhong", countDownLatch)).start(); // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"niweizhong", countDownLatch)).start();
// new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"QiuWenMin", countDownLatch)).start(); // new Thread(new CountDownLatchTest(memberUnionidRelatedApiService,"QiuWenMin", countDownLatch)).start();
// 启动多个线程 // 启动多个线程
// countDownLatch.countDown(); // countDownLatch.countDown();
} }
@Test @Test
public void test3() { public void test3() {
List<DepartmentDTO> department = qywxDepartmentApiService.listSelfDepartment("wweac4ef962720aa12", "GFu4FwkfcGFPue-qinB7ThEU4wR2SadbBH1yT5sLDzs", null); List<DepartmentDTO> department = qywxDepartmentApiService.listSelfDepartment("wweac4ef962720aa12", "GFu4FwkfcGFPue-qinB7ThEU4wR2SadbBH1yT5sLDzs", null);
System.out.println(JSONObject.toJSONString(department)); System.out.println(JSONObject.toJSONString(department));
} }
@Test @Test
public void test4() { public void test4() {
String s = ""; String s = "";
memberUnionidRelatedApiService.dealQywxExternalUser(s); memberUnionidRelatedApiService.dealQywxExternalUser(s);
} }
} }
...@@ -20,6 +20,7 @@ import com.gic.redis.data.util.RedisUtil; ...@@ -20,6 +20,7 @@ import com.gic.redis.data.util.RedisUtil;
import com.gic.reponse.SendSmsResponse; import com.gic.reponse.SendSmsResponse;
@RestController @RestController
@Deprecated
public class SendCodeController extends WebBaseController{ public class SendCodeController extends WebBaseController{
private static Logger logger = LoggerFactory.getLogger(SendCodeController.class); private static Logger logger = LoggerFactory.getLogger(SendCodeController.class);
......
...@@ -213,8 +213,9 @@ public class WxEnterpriseController extends WebBaseController { ...@@ -213,8 +213,9 @@ public class WxEnterpriseController extends WebBaseController {
return resultResponse(HaoBanErrCode.ERR_1, vo); return resultResponse(HaoBanErrCode.ERR_1, vo);
} }
//微信企业绑定接口 //微信企业绑定接口 - 迁移到运维
@RequestMapping("wx-enterprise-bind") @RequestMapping("wx-enterprise-bind")
@Deprecated
public HaobanResponse wxEnterpriseBind(WxEnterpriseBindQo bindQo) { public HaobanResponse wxEnterpriseBind(WxEnterpriseBindQo bindQo) {
if (StringUtils.isAnyBlank(bindQo.getEnterpriseId(), bindQo.getVersion())) { if (StringUtils.isAnyBlank(bindQo.getEnterpriseId(), bindQo.getVersion())) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment