Commit db8ab262 by 徐高华

Merge branch 'feature/xgh/20241月迭代' into 'master'

Feature/xgh/20241月迭代

See merge request !1680
parents ea75f974 2b73742f
......@@ -50,8 +50,28 @@ public class MemberUnionidRelatedDTO implements Serializable{
private Integer addWay ;
private String wxUserId ;
private int retryTimes ;
private boolean isFlush = false ;
public int getRetryTimes() {
return retryTimes;
}
public void setRetryTimes(int retryTimes) {
this.retryTimes = retryTimes;
}
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId;
}
public boolean isFlush() {
return isFlush;
}
......
......@@ -51,6 +51,16 @@ public class QwFrientNoticeDTO implements Serializable {
// 是否从自建应用下的回调
private int selfCallback = 0;
private int retryTimes ;
public int getRetryTimes() {
return retryTimes;
}
public void setRetryTimes(int retryTimes) {
this.retryTimes = retryTimes;
}
public int getSelfCallback() {
return selfCallback;
}
......
......@@ -112,4 +112,13 @@ public interface HaobanTimerApiService {
*/
public ServiceResponse<Void> groupChatQuitTimer(String params) ;
/**
* 加好友统计
* @param params
*/
public void addFrientMonitorTimer(String params) ;
public void doErrorFriendTimer(String params) ;
}
......@@ -161,9 +161,10 @@ public interface MemberUnionidRelatedApiService {
* @param wxEnterpriseId
* @param wxUserId
* @param externalUserId
* from 0 企微加好友通知 1刷新好友
* @return
*/
ExternalUserDTO getExternalUseridInfo(String wxEnterpriseId, String wxUserId, String externalUserId);
ExternalUserDTO getExternalUseridInfo(String wxEnterpriseId, String wxUserId, String externalUserId , int from);
/**
* 清理外部联系人
......
......@@ -2,8 +2,10 @@ package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO;
import com.gic.haoban.manage.service.entity.TabQywxErrorLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
/**
......@@ -25,4 +27,7 @@ public interface TabQywxErrorLogMapper {
*/
List<TabQywxErrorLog> queryListByPage(QywxErrorLogListQDTO qywxErrorLogListQDTO);
List<TabQywxErrorLog> listErrorFriend(@Param("wxEnterpriseId") String wxEnterpriseId , @Param("qywxErrorType") int type ,
@Param("startDate") Date startDate , @Param("endDate") Date endDate) ;
}
package com.gic.haoban.manage.service.pojo;
public class HBQwMonitorBO {
private String host ;
private int num ;
private int failNum ;
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
public int getFailNum() {
return failNum;
}
public void setFailNum(int failNum) {
this.failNum = failNum;
}
}
package com.gic.haoban.manage.service.service;
import com.gic.api.base.commons.Page;
import com.gic.haoban.manage.api.dto.QywxErrorLogDTO;
import com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO;
import com.gic.haoban.manage.service.entity.TabQywxErrorLog;
import com.gic.haoban.manage.service.pojo.bo.TabQywxErrorLogBO;
......@@ -33,4 +34,16 @@ public interface QywxErrorLogService {
*/
List<TabQywxErrorLog> queryListByPage(QywxErrorLogListQDTO qywxErrorLogListQDTO);
/**
*
* @param wxEnterpriseId
* @param msg
* @param type 4自建 5第三方
*/
void addFriendErrLog(String wxEnterpriseId , String msg , int type , String externalUserId) ;
public void putToMq(QywxErrorLogDTO dto) ;
public void doFriendTimer(String params) ;
}
......@@ -3,7 +3,21 @@ package com.gic.haoban.manage.service.service.impl;
import java.util.Date;
import java.util.List;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gic.commons.util.CollectionUtil;
import com.gic.commons.util.DateUtil;
import com.gic.commons.util.GICMQClientUtil;
import com.gic.dubbo.entity.ProviderLocalTag;
import com.gic.haoban.manage.api.constants.Manage3Constants;
import com.gic.haoban.manage.api.dto.QwFrientNoticeDTO;
import com.gic.haoban.manage.api.dto.QywxErrorLogDTO;
import com.gic.haoban.manage.service.pojo.DealQywxExternalUserPojo;
import com.gic.mq.sdk.GicMQClient;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -23,10 +37,13 @@ import com.gic.haoban.manage.service.service.QywxErrorLogService;
*/
@Service
public class TabQywxErrorLogServiceImpl implements QywxErrorLogService {
private static final Logger log = LogManager.getLogger(QywxErrorLogService.class);
@Autowired
private TabQywxErrorLogMapper tabQywxErrorLogMapper;
private static GicMQClient clientInstance = GICMQClientUtil.getClientInstance();
@Override
public TabQywxErrorLogBO insert(TabQywxErrorLogBO tabQywxErrorLogBO) {
String wxEnterpriseId = tabQywxErrorLogBO.getWxEnterpriseId();
......@@ -44,4 +61,48 @@ public class TabQywxErrorLogServiceImpl implements QywxErrorLogService {
return this.tabQywxErrorLogMapper.queryListByPage(qywxErrorLogListQDTO);
}
@Override
public void addFriendErrLog(String wxEnterpriseId, String msg, int type , String externalUserId) {
QywxErrorLogDTO errLog = new QywxErrorLogDTO() ;
errLog.setWxEnterpriseId(wxEnterpriseId);
errLog.setExternalUserId(externalUserId);
errLog.setTraceId(ProviderLocalTag.tag.get().traceId);
errLog.setQywxErrorType(type);
errLog.setScenario("加好友");
errLog.setErrorContent(msg);
this.putToMq(errLog);
}
@Override
public void putToMq(QywxErrorLogDTO errLog) {
try {
clientInstance.sendMessage(Manage3Constants.QYWX_ERROR_MSG, JSON.toJSONString(errLog));
} catch (Exception e) {
log.error("发送消息失败:{}", e.getMessage(), e);
}
}
@Override
public void doFriendTimer(String params) {
log.info("加好友异常重试");
Date yesterday = DateUtil.addDay(new Date() , -1) ;
Date start = DateUtil.getStartTimeOfDay(yesterday) ;
Date end = DateUtil.getEndTimeOfDay(yesterday) ;
List<TabQywxErrorLog> list = this.tabQywxErrorLogMapper.listErrorFriend(null,4, start, end) ;
if(CollectionUtils.isNotEmpty(list)) {
String mqName = "dealQywxExternalUserMq2";
for(TabQywxErrorLog tab : list) {
try {
DealQywxExternalUserPojo dealQywxExternalUserPojo = new DealQywxExternalUserPojo();
dealQywxExternalUserPojo.setType(DealQywxExternalUserPojo.DealType.add.getType());
if(StringUtils.isNotBlank(tab.getErrorContent())) {
dealQywxExternalUserPojo.setData(JSONObject.parseObject(tab.getErrorContent(), QwFrientNoticeDTO.class));
clientInstance.sendMessage(mqName, JSONObject.toJSONString(dealQywxExternalUserPojo));
}
} catch (Exception e) {
log.info("异步处理异常:{}", e);
}
}
}
}
}
package com.gic.haoban.manage.service.service.out.impl;
import com.gic.haoban.manage.service.service.QywxErrorLogService;
import com.gic.haoban.manage.service.service.chat.GroupChatDataService;
import com.gic.haoban.manage.service.util.HBQwMonitorUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -27,6 +29,8 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
private ExternalMemberService externalMemberService ;
@Autowired
private GroupChatDataService groupChatDataService ;
@Autowired
private QywxErrorLogService qywxErrorLogService ;
@Override
......@@ -88,4 +92,14 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
this.groupChatDataService.groupChatQuitTimer(params) ;
return ServiceResponse.success();
}
@Override
public void addFrientMonitorTimer(String params) {
HBQwMonitorUtils.addByTimer();
}
@Override
public void doErrorFriendTimer(String params) {
this.qywxErrorLogService.doFriendTimer(params);
}
}
......@@ -4,7 +4,9 @@ import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import com.gic.haoban.manage.service.service.*;
import com.gic.haoban.manage.service.util.EventUtils;
import com.gic.haoban.manage.service.util.HBQwMonitorUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
......@@ -73,18 +75,6 @@ import com.gic.haoban.manage.service.pojo.ExternalUserPojo;
import com.gic.haoban.manage.service.pojo.QywxTagSyncInfoPojo;
import com.gic.haoban.manage.service.pojo.bo.hm.HmLinkBO;
import com.gic.haoban.manage.service.pojo.bo.hm.KeyDataLinkBO;
import com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService;
import com.gic.haoban.manage.service.service.ExternalClerkRelatedService;
import com.gic.haoban.manage.service.service.ExternalMemberService;
import com.gic.haoban.manage.service.service.KeyDataService;
import com.gic.haoban.manage.service.service.MemberUnionRelatedService;
import com.gic.haoban.manage.service.service.QywxSendService;
import com.gic.haoban.manage.service.service.SecretSettingService;
import com.gic.haoban.manage.service.service.StaffClerkRelationService;
import com.gic.haoban.manage.service.service.StaffService;
import com.gic.haoban.manage.service.service.WelcomeSendService;
import com.gic.haoban.manage.service.service.WxEnterpriseRelatedService;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.service.chat.GroupChatService;
import com.gic.haoban.manage.service.service.hm.HmLinkService;
import com.gic.haoban.manage.service.service.hm.WxUserAddLogService;
......@@ -185,6 +175,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
private ExternalMemberService externalMemberService ;
@Autowired
private ClerkMainStoreRelatedApiService clerkMainStoreRelatedApiService ;
@Autowired
private QywxErrorLogService qywxErrorLogService ;
GicMQClient instance = GICMQClientUtil.getClientInstance();
......@@ -925,6 +917,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return null ;
}
if(qwDTO.isSelf()) {
HBQwMonitorUtils.addForFriend(0);
this.updateExternalStatus(dto.getExternalUserid(),dto.getStaffId());
String unionIdJson = qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), dto.getExternalUserid(),qwDTO.getUrlHost());
if (StringUtils.isBlank(unionIdJson)) {
......@@ -932,6 +925,12 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return null;
} else if ("1".equals(unionIdJson)) {
log.info("接口调用被限制");
dto.setWxUserId(wxUserId);
dto.setRetryTimes(dto.getRetryTimes()+1);
if(dto.getRetryTimes()<=3) {
this.qywxErrorLogService.addFriendErrLog(wxEnterpriseId, JSONObject.toJSONString(dto), 4, dto.getExternalUserid());
}
HBQwMonitorUtils.addForFriend(1);
throw new WxApiLimitException("getCorpSelfExternalUseridInfo接口调用被限制");
}
ExternalUserPojo pojo = getExternalUserPojo(unionIdJson, wxUserId, wxEnterpriseId);
......@@ -960,8 +959,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if (SELF_APP.equals(suiteid)) {
externalUserDTO = this.getCorpSelfExternalUseridInfo(wxEnterpriseId, wxUserId, externalUserid);
} else {
HBQwMonitorUtils.addForFriend(0);
this.updateExternalStatus(externalUserid,dto.getStaffId());
externalUserDTO = this.getExternalUseridInfo(wxEnterpriseId, wxUserId, externalUserid);
externalUserDTO = this.getExternalUseridInfo(wxEnterpriseId, wxUserId, externalUserid,0);
}
checkQywxSettingApiService.saveFriendCallback(wxEnterpriseId, externalUserDTO, dto);
if (externalUserDTO == null) {
......@@ -1375,7 +1375,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
@Override
public ExternalUserDTO getExternalUseridInfo(String wxEnterpriseId, String wxUserId, String externalUserId) {
public ExternalUserDTO getExternalUseridInfo(String wxEnterpriseId, String wxUserId, String externalUserId , int from) {
log.info("查询第三方:wxEnterpriseId:{},wxUserId:{},externalUserId:{}", wxEnterpriseId, wxUserId, externalUserId);
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId);
if (qwDTO == null) {
......@@ -1399,6 +1399,10 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return null;
} else if ("1".equals(uJ)) {
log.info("限制次数");
if(from==0) {
this.qywxErrorLogService.addFriendErrLog(wxEnterpriseId,tabHaobanStaff.getStaffId(),5,externalUserId);
HBQwMonitorUtils.addForFriend(1);
}
throw new WxApiLimitException("getExternalUseridInfo接口次数限制");
}
String name = "";
......
......@@ -154,6 +154,20 @@ public class MessageApiServiceImpl implements MessageApiService {
}
}
private String getWxEnterpriseId(String corpid) {
String wxEnterpriseId = null ;
TabHaobanWxApplication wxApplication = wxApplicationService.selectByCorpId(corpid);
if (null == wxApplication) {
TabHaobanWxEnterprise wxEnterprise = this.wxEnterpriseService.getEnterpriseBycorpId(corpid) ;
if(null != wxEnterprise) {
wxEnterpriseId = wxEnterprise.getWxEnterpriseId() ;
}
}else {
wxEnterpriseId = wxApplication.getWxEnterpriseId();
}
return wxEnterpriseId ;
}
@Override
public void dealWxMessage(String param) {
QywxCallBackDTO dto = JSON.parseObject(param, QywxCallBackDTO.class);
......@@ -163,12 +177,11 @@ public class MessageApiServiceImpl implements MessageApiService {
log.info("通讯录只处理自建应用回调 dto={}", JSON.toJSONString(param));
return;
}
TabHaobanWxApplication wxApplication = wxApplicationService.selectByCorpId(dto.getAuthCorpId());
if (Objects.isNull(wxApplication)) {
String wxEnterpriseId = this.getWxEnterpriseId(dto.getAuthCorpId()) ;
if(null == wxEnterpriseId) {
log.info("授权企业不存在,{}", dto.getAuthCorpId());
return;
}
String wxEnterpriseId = wxApplication.getWxEnterpriseId();
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
if(qwDTO.isSelf() && dto.getSelfCallback()==0) {
log.info("非自建应用回调");
......@@ -437,12 +450,11 @@ public class MessageApiServiceImpl implements MessageApiService {
String authCorpId = qywxCallBackDTO.getAuthCorpId();
DepartmentDTO departmentDTO = new DepartmentDTO();
departmentDTO.setIsStore(0);
TabHaobanWxApplication wxApplication = wxApplicationService.selectByCorpId(authCorpId);
if (Objects.isNull(wxApplication)) {
log.info("授权企业不存在,{}", qywxCallBackDTO.getAuthCorpId());
String wxEnterpriseId = this.getWxEnterpriseId(authCorpId) ;
if(null == wxEnterpriseId) {
log.info("授权企业不存在,{}", authCorpId);
return;
}
String wxEnterpriseId = wxApplication.getWxEnterpriseId();
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(wxEnterpriseId,
SecretTypeEnum.CUSTOMIZED_APP.getVal());
......
......@@ -63,7 +63,7 @@ public class FriendSyncNewOperation implements BaseSyncOperation {
String externalUserId = dataPre.getDataContent();
String staffId = dataPre.getpDataId() ;
ExternalUserDTO externalUserDTO = memberUnionidRelatedApiService.getExternalUseridInfo(wxEnterpriseId, wxUserId, externalUserId);
ExternalUserDTO externalUserDTO = memberUnionidRelatedApiService.getExternalUseridInfo(wxEnterpriseId, wxUserId, externalUserId , 1);
if (externalUserDTO == null) {
logger.info("第三方外部联系人详情查询失败,staffId={},{},{}", staffId,wxUserId,externalUserId);
dealFlag = false;
......
package com.gic.haoban.manage.service.util;
import com.gic.commons.util.IPUtil;
import com.gic.dubbo.util.DubboInvokeUtil;
import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService;
import com.gic.haoban.manage.service.pojo.HBQwMonitorBO;
import com.gic.redis.data.util.RedisUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.redisson.api.RAtomicLong;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
/**
* 好办统计
*/
@Component
public class HBQwMonitorUtils {
private static Logger logger = LogManager.getLogger(HBQwMonitorUtils.class);
private static final List<String> keyList = Arrays.asList("hbmonitor:friendNotice","hbmonitor:friendFail") ;
/**
* @param index 0加好友企微通知数量 1加好友查询企微接口限制数量
*/
public static void addForFriend(int index) {
String ip = IPUtil.getLocalIP();
logger.info("addForFriend={}",ip);
String key = keyList.get(index)+ip ;
RAtomicLong cache = RedisUtil.getRedisClient().getAtomicLong(key);
cache.addAndGet(1);
}
public static Object query(String sql) {
return InfluxDbMonitorUtils.getInstance().query(sql);
}
public static void addByTimer() {
List<String> ipList = DubboInvokeUtil.getServiceHostList(MemberUnionidRelatedApiService.class) ;
logger.info("add timer");
for(String ip : ipList) {
int totalNum = getNum(keyList.get(0),ip) ;
int failNum = getNum(keyList.get(1),ip);
HBQwMonitorBO bo = new HBQwMonitorBO() ;
bo.setHost(ip);
bo.setNum(totalNum);
bo.setFailNum(failNum);
InfluxDbMonitorUtils.getInstance().friendAdd(bo);
}
}
private static int getNum(String key , String ip) {
key = key+ip ;
int count = 0 ;
Object countObj = RedisUtil.getCache(key) ;
if(null != countObj) {
count = Integer.valueOf(countObj.toString()) ;
}
RAtomicLong cache = RedisUtil.getRedisClient().getAtomicLong(key);
cache.addAndGet(-count) ;
return count ;
}
}
package com.gic.haoban.manage.service.util;
import com.gic.haoban.manage.service.pojo.HBQwMonitorBO;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.influxdb.InfluxDB;
import org.influxdb.InfluxDBFactory;
import org.influxdb.dto.Point;
import org.influxdb.dto.Query;
import org.influxdb.dto.QueryResult;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
public class InfluxDbMonitorUtils {
private static Logger logger = LogManager.getLogger(InfluxDbMonitorUtils.class);
private static String url = "http://10.0.2.9:8086";
private static InfluxDB influxDB;
private static final String DB_NAME = "haoban_info";
private static final String RP_NAME = "default";
private static volatile InfluxDbMonitorUtils instance = null;
public static InfluxDbMonitorUtils getInstance() {
if (instance == null) {
synchronized (InfluxDbMonitorUtils.class) {
if (instance == null) {
instance = new InfluxDbMonitorUtils();
}
}
}
return instance;
}
private InfluxDbMonitorUtils() {
influxDB = InfluxDBFactory.connect(url, "inflxudb", "inflxudb");
if (!influxDB.describeDatabases().contains(DB_NAME)) {
influxDB.createDatabase(DB_NAME);
influxDB.createRetentionPolicy(RP_NAME, DB_NAME, "7d", 1, true);
}
influxDB.setDatabase(DB_NAME);
influxDB.setRetentionPolicy(RP_NAME);
}
public InfluxDB getInfluxDB() {
return influxDB;
}
public void friendAdd(HBQwMonitorBO bo) {
influxDB.write(Point.measurement("hb_qw_friend_monitor")
.time(System.currentTimeMillis(), TimeUnit.MILLISECONDS)
.addField("num", bo.getNum())
.addField("failNum",bo.getFailNum())
.tag("application","haoban-manage3")
.tag("host", bo.getHost())
.build());
}
/**
* 查询
*
* @param command 查询语句
*/
public List<Map<String, Object>> query(String command) {
QueryResult query = influxDB.query(new Query(command, DB_NAME));
return queryResultProcess(query);
}
/**
* @param queryResult
* @desc 查询结果处理
*/
public List<Map<String, Object>> queryResultProcess(QueryResult queryResult) {
List<Map<String, Object>> mapList = new ArrayList<>();
List<QueryResult.Result> resultList = queryResult.getResults();
//把查询出的结果集转换成对应的实体对象,聚合成list
for (QueryResult.Result query : resultList) {
List<QueryResult.Series> seriesList = query.getSeries();
if (seriesList != null && seriesList.size() != 0) {
for (QueryResult.Series series : seriesList) {
List<String> columns = series.getColumns();
String[] keys = columns.toArray(new String[columns.size()]);
List<List<Object>> values = series.getValues();
if (values != null && values.size() != 0) {
for (List<Object> value : values) {
Map<String, Object> map = new HashMap(keys.length);
for (int i = 0; i < keys.length; i++) {
map.put(keys[i], value.get(i));
}
mapList.add(map);
}
}
}
}
}
return mapList;
}
}
......@@ -263,7 +263,7 @@
</foreach>
and a.status_flag = 1
group by a.staff_id, a.clerk_id) as scr on scr.staff_id = ecr.staff_id
where ecr.status_flag = 1 AND ecr.`external_status` = 1
where ecr.status_flag = 1 AND ecr.`external_status` in (1 , 3)
and ecr.enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and ecr.wx_enterprise_id=#{wxEnterpriseId}
and ecr.member_id in
......
......@@ -82,8 +82,17 @@
</trim>
</insert>
<select id="listErrorFriend" resultMap="TabQywxErrorLogMap">
select
<include refid="Base_Column_List"/>
from tab_qywx_error_log where qywx_error_type = #{qywxErrorType}
and create_time <![CDATA[ >= ]]> #{startDate}
and create_time <![CDATA[ <= ]]> #{endDate}
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and wx_enterprise_id = #{wxEnterpriseId}
</if>
</select>
<!--通过实体作为筛选条件查询-->
<select id="queryListByPage" parameterType="com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO"
resultMap="TabQywxErrorLogMap">
select
......@@ -97,7 +106,7 @@
and ( member_id = #{scenario} or external_user_id = #{scenario} )
</if>
<if test="qywxErrorType != null">
and qywx_error_type = #{qywxErrorType}
and qywx_error_type = 1
</if>
<if test="startDate != null">
and create_time <![CDATA[ >= ]]> #{startDate}
......
......@@ -446,8 +446,8 @@ public class GroupChatPlanController {
//设置sheet的表头与表名
String[] groupChatListSheetHead = {"任务名称", "任务状态", "已完成群主数", "未完成群主数", "完成率", "已送达群数", "任务开始时间", "任务结束时间", "创建人", "创建时间"};
String[] sendSheetHead = {"任务名称", "发送人", "关联导购", "关联门店", "完成状态", "已送达客户群数", "发送时间", "任务开始时间", "任务结束时间"};
String[] receiveSheetHead = {"任务名称", "群名称", "群人数", "发送人", "关联导购", "关联门店", "发送状态", "发送时间", "任务开始时间", "任务结束时间"};
String[] sendSheetHead = {"任务名称", "发送人", "关联导购","关联导购code", "关联门店", "关联门店code","完成状态", "已送达客户群数", "发送时间", "任务开始时间", "任务结束时间"};
String[] receiveSheetHead = {"任务名称", "群名称", "群人数", "发送人", "关联导购", "关联导购code","关联门店", "关联门店code","发送状态", "发送时间", "任务开始时间", "任务结束时间"};
List<ExcelSheet> mysheet = new ArrayList<>();
ExcelSheet groupChatListExcel = new ExcelSheet("客户群发列表", groupChatListSheetHead, changeGroupChatPlanExcelVOList(groupChatPlanExcelVOList));
......@@ -482,7 +482,7 @@ public class GroupChatPlanController {
String sendTime = DateUtil.formatString(vo.getSendTime(), DateUtil.FORMAT_DATETIME_19);
String startTime = DateUtil.formatString(vo.getStartTime(), DateUtil.FORMAT_DATETIME_19);
String endTime = DateUtil.formatString(vo.getEndTime(), DateUtil.FORMAT_DATETIME_19);
String[] a = {vo.getName(), vo.getStaffName(), vo.getClerkName(), vo.getStoreName(),vo.getSendStatusExcel(), vo.getSendCount()==null?"":vo.getSendCount().toString(), sendTime,startTime, endTime};
String[] a = {vo.getName(), vo.getStaffName(), vo.getClerkName(),vo.getClerkCode(), vo.getStoreName(), vo.getStoreCode(), vo.getSendStatusExcel(), vo.getSendCount()==null?"":vo.getSendCount().toString(), sendTime,startTime, endTime};
result.add(a);
}
return result;
......@@ -496,7 +496,7 @@ public class GroupChatPlanController {
String sendTime = DateUtil.formatString(vo.getSendTime(), DateUtil.FORMAT_DATETIME_19);
String startTime = DateUtil.formatString(vo.getStartTime(), DateUtil.FORMAT_DATETIME_19);
String endTime = DateUtil.formatString(vo.getEndTime(), DateUtil.FORMAT_DATETIME_19);
String[] a = {vo.getName(), vo.getChatName(), vo.getChatTotalCount()==null?"":vo.getChatTotalCount().toString(), vo.getStaffName(),vo.getClerkName(),vo.getStoreName(),vo.getSendStatusExcel(),sendTime,startTime, endTime};
String[] a = {vo.getName(), vo.getChatName(), vo.getChatTotalCount()==null?"":vo.getChatTotalCount().toString(), vo.getStaffName(),vo.getClerkName(),vo.getClerkCode(),vo.getStoreName(),vo.getStoreCode(),vo.getSendStatusExcel(),sendTime,startTime, endTime};
result.add(a);
}
return result;
......
......@@ -36,10 +36,13 @@ public class ReceiveExcelVO implements Serializable {
* 关联导购
*/
private String clerkName;
private String clerkCode;
/**
* 关联门店
*/
private String storeName;
private String storeCode;
/**
* 发送状态
*/
......@@ -61,6 +64,22 @@ public class ReceiveExcelVO implements Serializable {
*/
private Date endTime;
public String getClerkCode() {
return clerkCode;
}
public void setClerkCode(String clerkCode) {
this.clerkCode = clerkCode;
}
public String getStoreCode() {
return storeCode;
}
public void setStoreCode(String storeCode) {
this.storeCode = storeCode;
}
public String getName() {
return name;
}
......
......@@ -27,10 +27,14 @@ public class SendExcelVO implements Serializable{
* 关联导购
*/
private String clerkName;
private String clerkCode ;
/**
* 关联门店
*/
private String storeName;
private String storeCode ;
/**
* 完成状态
*/
......@@ -56,6 +60,22 @@ public class SendExcelVO implements Serializable{
*/
private Date endTime;
public String getClerkCode() {
return clerkCode;
}
public void setClerkCode(String clerkCode) {
this.clerkCode = clerkCode;
}
public String getStoreCode() {
return storeCode;
}
public void setStoreCode(String storeCode) {
this.storeCode = storeCode;
}
public String getName() {
return name;
}
......
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