Commit 99434657 by 王祖波

Merge branch 'master' into feature-recommend3

# Conflicts:
#	haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/contact/impl/ContactLogServiceImpl.java
#	haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/contact/ContactOrderApiServiceImpl.java
parents ab9f41af c42aa1bb
......@@ -54,5 +54,7 @@ public interface TabHaobanQywxFeeOrderAccountMapper {
List<TabHaobanQywxFeeOrderAccount> selectByWxEnterpriseId( @Param("wxEnterpriseId")String wxEnterpriseId);
void updateByActiveCode(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("activeCode")String activeCode);
void refund(@Param("wxEnterpriseId") String wxEnterpriseId , @Param("orderId") String orderId);
}
......@@ -43,5 +43,8 @@ public interface TabHaobanQywxFeeOrderMapper {
List<TabHaobanQywxFeeOrder> listOrder(@Param("wxEnterpriseId") String wxEnterpriseId);
void refund(@Param("feeOrderId") Long feeOrderId);
}
......@@ -44,4 +44,7 @@ public interface HaobanQywxFeeOrderService {
TabHaobanQywxFeeOrder selectByOrderId(String wxEnterpriseId,String orderId);
void refund(Long feeOrderId ,String wxEnterpriseId , String orderId) ;
}
......@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.fee.impl;
import java.util.List;
import com.gic.haoban.manage.service.dao.mapper.fee.TabHaobanQywxFeeOrderAccountMapper;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -26,6 +27,8 @@ public class HaobanQywxFeeOrderServiceImpl implements HaobanQywxFeeOrderService
@Autowired
private TabHaobanQywxFeeOrderMapper tabHaobanQywxFeeOrderMapper;
@Autowired
private TabHaobanQywxFeeOrderAccountMapper tabHaobanQywxFeeOrderAccountMapper ;
/**
* 新增数据
......@@ -60,4 +63,10 @@ public class HaobanQywxFeeOrderServiceImpl implements HaobanQywxFeeOrderService
public TabHaobanQywxFeeOrder selectByOrderId(String wxEnterpriseId, String orderId) {
return this.tabHaobanQywxFeeOrderMapper.selectByOrderId(wxEnterpriseId, orderId);
}
@Override
public void refund(Long feeOrderId , String wxEnterpriseId , String orderId) {
this.tabHaobanQywxFeeOrderMapper.refund(feeOrderId);
this.tabHaobanQywxFeeOrderAccountMapper.refund(wxEnterpriseId,orderId);
}
}
......@@ -607,6 +607,9 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
@Override
public void getQwPublishData(Long planId, String cursor) {
if(null == cursor) {
logger.info("获取企微朋友执行情况={}", planId);
}
TabQwMomentPlan plan = this.qwMomentPlanMapper.getById(planId) ;
String momentId = plan.getMomentId() ;
if(StringUtils.isBlank(momentId)) {
......@@ -658,10 +661,16 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
// 是否完成
if(params.equals("1")) {
List<Long> planIdList = this.qwMomentPlanMapper.listForData(1) ;
logger.info("朋友圈-定时1-{}",planIdList);
if(CollectionUtils.isNotEmpty(planIdList)) {
for(Long planId : planIdList) {
try{
this.getQwPublishData(planId,null) ;
CommonMQDTO mq = new CommonMQDTO() ;
mq.setType(9) ;
Map<String,String> map = new HashMap<>() ;
map.put("planId",planId+"") ;
mq.setParams(map);
this.haobanCommonMQApiService.putCommonDelayMessage(mq, 10);
}catch (Exception e) {
logger.info("异常",e);
}
......@@ -672,10 +681,20 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
// 评论数据
if(params.equals("2")) {
List<Long> planIdList = this.qwMomentPlanMapper.listForData(2) ;
logger.info("朋友圈-定时2-{}",planIdList);
if(CollectionUtils.isNotEmpty(planIdList)) {
for(Long planId : planIdList) {
try {
this.getQwData(planId);
try{
CommonMQDTO mq = new CommonMQDTO() ;
mq.setType(10) ;
Map<String,String> map = new HashMap<>() ;
map.put("planId",planId+"") ;
mq.setParams(map);
this.haobanCommonMQApiService.putCommonDelayMessage(mq, 10);
}catch (Exception e) {
logger.info("异常",e);
}
}catch (Exception e) {
logger.info("异常",e);
}
......
......@@ -170,6 +170,14 @@ public class HaobanCommonMQApiServiceImpl implements HaobanCommonMQApiService {
Long qwPlanId = Long.valueOf(map.get("planId")) ;
this.qwMomentPlanService.sendRetry(qwPlanId);
break;
case 9 :
Long planId9 = Long.valueOf(map.get("planId")) ;
this.qwMomentPlanService.getQwPublishData(planId9,null);
break;
case 10 :
Long planId10 = Long.valueOf(map.get("planId")) ;
this.qwMomentPlanService.getQwData(planId10);
break;
default:
break;
}
......
......@@ -1430,15 +1430,20 @@ public class StaffApiServiceImpl implements StaffApiService {
if(CollUtil.isNotEmpty(wxEnterpriseList)){
for (String wxEnterpriseId : wxEnterpriseList){
logger.info("开始刷新:{}",wxEnterpriseId);
String taskId = dealSyncOperationApiService.createQywxTask(wxEnterpriseId, "后门同步企业微信架构", "定时同步处理", "后门同步企业微信架构");
if (StringUtils.isBlank(taskId)) {
logger.info("企业微信id:{},创建异步任务异常!",wxEnterpriseId);
return com.gic.api.base.commons.ServiceResponse.failure("-9999","创建异步任务失败!");
}
String ret = dealSyncOperationApiService.dealQywxDepartment(taskId, wxEnterpriseId);
if (null != ret) {
logger.info("企业微信id:{},异常信息返回:{}",wxEnterpriseId,ret);
try {
String taskId = dealSyncOperationApiService.createQywxTask(wxEnterpriseId, "后门同步企业微信架构", "定时同步处理", "后门同步企业微信架构");
if (StringUtils.isBlank(taskId)) {
logger.info("企业微信id:{},创建异步任务异常!",wxEnterpriseId);
return com.gic.api.base.commons.ServiceResponse.failure("-9999","创建异步任务失败!");
}
String ret = dealSyncOperationApiService.dealQywxDepartment(taskId, wxEnterpriseId);
if (null != ret) {
logger.info("企业微信id:{},异常信息返回:{}",wxEnterpriseId,ret);
}
}catch (Exception e) {
logger.info("异常={}",wxEnterpriseId);
}
}
}
return null;
......
......@@ -354,7 +354,8 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
StaffClerkRelationDTO staffClerkRelationDTO = staffClerkRelationService.getByClerkId(clerkId, wxEnterpriseId);
if (staffClerkRelationDTO != null) {
return ServiceResponse.failure("3", "该导购已经被绑定,不允许绑定");
// return ServiceResponse.failure("3", "该导购已经被绑定,不允许绑定");
this.unbindByStaffAndClerkId("-1", clerkId, ChannelCodeEnum.AUDIT_UNBIND.getCode(),staffClerkRelationDTO.getWxEnterpriseId());
}
return ServiceResponse.success();
}
......
package com.gic.haoban.manage.service.service.out.impl.contact;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
......@@ -11,12 +13,17 @@ import com.gic.haoban.manage.service.service.contact.ContactLogService;
import com.gic.haoban.manage.service.service.contact.ContactOrderService;
import com.gic.order.api.dto.resp.OrderInfoResp;
import com.gic.order.api.service.member.MemberOrderReadApiService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
* Created by wangzubo on 2022/11/1.
*/
@Slf4j
@Service("contactOrderApiService")
public class ContactOrderApiServiceImpl implements ContactOrderApiService {
......@@ -39,9 +46,13 @@ public class ContactOrderApiServiceImpl implements ContactOrderApiService {
return ServiceResponse.success();
}
OrderInfoResp result = serviceResponse.getResult();
boolean clearFlag = CollectionUtils.isNotEmpty(result.getOrderItems()) && result.getPaidAmount() > 0
&& (result.getReceiptsDate() != null && DateUtil.compare(DateUtil.offsetDay(new Date(), -14), result.getReceiptsDate()) <= 0);
log.info("获取订单时间,orderId:{},单据时间:{},应收:{}", result.getOrderId(),result.getReceiptsDate(),result.getPaidAmount());
boolean contactOrder = contactOrderService.saveContactOrder(result);
if (contactOrder) {
contactLogService.clearContactLog(enterpriseId,memberId, 1,"");
log.info("clearFlag:{},contactOrder:{}", clearFlag, contactOrder);
if (clearFlag || contactOrder) {
contactLogService.clearContactLog(memberId, 1,"");
}
return ServiceResponse.success();
}
......
......@@ -77,16 +77,28 @@ public class InteractRecordApiServiceImpl implements InteractRecordApiService {
}
Integer eventType = interactRecordQDTO.getEventTypeAggs();
if (eventType != null) {
List<Integer> bizTypeList = searchQo.getBizTypeList();
if (Objects.equals(eventType, InteractRecordEventType.MATERIAL.getCode())) {
searchQo.setEventTypeList(Lists.newArrayList(MaterialInteractRecordEventType.VISIT_MATERIAL.getCode(),MaterialInteractRecordEventType.VISIT_PRODUCT.getCode()));
List<Integer> bizTypeList = Optional.ofNullable(searchQo.getBizTypeList()).orElse(new ArrayList<>());
bizTypeList.add(ShareBizType.MATERIAL.getCode());
if (CollectionUtils.isEmpty(searchQo.getBizTypeList())) {
bizTypeList = Lists.newArrayList(ShareBizType.MATERIAL.getCode());
}else {
bizTypeList.retainAll(Lists.newArrayList(ShareBizType.MATERIAL.getCode()));
if (CollectionUtils.isEmpty(bizTypeList)) {
bizTypeList = Lists.newArrayList(-1);
}
}
searchQo.setBizTypeList(bizTypeList);
} else if (Objects.equals(bizType, ShareBizType.GOODS.getCode())) {
} else if (Objects.equals(eventType, ShareBizType.GOODS.getCode())) {
searchQo.setEventTypeList(Lists.newArrayList(MaterialInteractRecordEventType.VISIT_MATERIAL.getCode(),MaterialInteractRecordEventType.VISIT_PRODUCT.getCode()));
List<Integer> bizTypeList = Optional.ofNullable(searchQo.getBizTypeList()).orElse(new ArrayList<>());
bizTypeList.add(ShareBizType.GOODS.getCode());
bizTypeList.add(ShareBizType.MULTIPLE_GOODS.getCode());
if (CollectionUtils.isEmpty(searchQo.getBizTypeList())) {
bizTypeList = Lists.newArrayList(ShareBizType.GOODS.getCode(),ShareBizType.MULTIPLE_GOODS.getCode());
}else {
bizTypeList.retainAll(Lists.newArrayList(ShareBizType.GOODS.getCode(),ShareBizType.MULTIPLE_GOODS.getCode()));
if (CollectionUtils.isEmpty(bizTypeList)) {
bizTypeList = Lists.newArrayList(-1);
}
}
searchQo.setBizTypeList(bizTypeList);
}else {
searchQo.setEventTypeList(Lists.newArrayList(eventType));
......
......@@ -224,6 +224,11 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
}
// 查询订单下的激活码code列表,记录到activeCodeList
for (TabHaobanQywxFeeOrder order : orderList) {
FeeOrderDeatilResponseDTO wxOrder = qywxUserApiService.getOrder(corpid, serviceCorpid, order.getOrderId());
if (null != wxOrder && wxOrder.getOrder().getOrderStatus()!=1) {
this.haobanQywxFeeOrderService.refund(order.getFeeOrderId(), wxEnterpriseId, order.getOrderId());
continue;
}
List<Map<String, String>> activeCodeList = new ArrayList<>();
// 查询订单下的激活码code列表
this.getOrderAccount(order.getOrderId(), corpid, null, activeCodeList);
......
......@@ -118,6 +118,24 @@ public class QwSendMsgServiceImpl implements QwSendMsgService {
if (CollectionUtils.isEmpty(sendResultList)) {
return;
}
//判断是否已经发送
List<GroupSendResultBO> noSendList = sendResultList.stream().filter(dto -> Objects.equals(dto.getStatus(), 0))
.collect(Collectors.toList());
if (!CollectionUtils.isEmpty(noSendList)) {
Integer tryCount = dealQwSendDTO.getTryCount();
if (tryCount != null && tryCount >= 10) {
log.info("查询超过次数限制:{}",qwSendMsg.getMsgId());
return;
}
if (tryCount == null) {
tryCount = 0;
}
// 重新刷新
dealQwSendDTO.setRefreshType(2);
dealQwSendDTO.setTryCount(++tryCount);
MqUtils.sendMessageToMQ("qwSendRefreshByMQ", JSON.toJSONString(dealQwSendDTO), 60);
return;
}
log.info("刷新企微群发结果:{}", qwSendMsg.getMsgId());
List<TabQwSendLog> entities;
List<List<GroupSendResultBO>> partition = Lists.partition(sendResultList, 1000);
......@@ -174,10 +192,7 @@ public class QwSendMsgServiceImpl implements QwSendMsgService {
log.error("未查询到userid");
return Collections.emptyList();
}
List<GroupSendResultBO> sendResultList = getSendResult(qwSendMsg.getWxEnterpriseId(), qwSendMsg.getMsgId(), newWxUserId);
//判断是否已经发送
return sendResultList.stream().filter(dto -> !Objects.equals(dto.getStatus(), 0))
.collect(Collectors.toList());
return getSendResult(qwSendMsg.getWxEnterpriseId(), qwSendMsg.getMsgId(), newWxUserId);
}
public List<GroupSendResultBO> getSendResult(String wxEnterpriseId, String msgId, String userId) {
......
......@@ -101,5 +101,11 @@
where wx_enterprise_id = #{wxEnterpriseId} and active_code = #{activeCode}
</update>
<update id="refund">
update tab_haoban_qywx_fee_order_account
set status = 0, update_time = NOW()
where wx_enterprise_id = #{wxEnterpriseId} and order_id = #{orderId}
</update>
</mapper>
......@@ -40,7 +40,7 @@
</insert>
<select id="countExternalContactCount" resultType="java.lang.Integer">
select sum(external_contact_count)
select ifnull(sum(external_contact_count),0)
from tab_haoban_qywx_fee_order
where wx_enterprise_id = #{wxEnterpriseId}
</select>
......@@ -53,5 +53,12 @@
from tab_haoban_qywx_fee_order
where wx_enterprise_id = #{wxEnterpriseId}
</select>
<update id="refund">
update tab_haoban_qywx_fee_order
set wx_enterprise_id = corp_id
where fee_order_id = #{feeOrderId}
</update>
</mapper>
......@@ -22,8 +22,11 @@ import com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImp
import com.gic.haoban.manage.service.service.moment.QwMomentPlanService;
import com.gic.wechat.api.dto.qdto.group.QywxMomentInfoQDTO;
import com.gic.wechat.api.dto.qywx.group.QywxMomentRespDTO;
import com.gic.wechat.api.dto.qywx.moment.MomentResultDTO;
import com.gic.wechat.api.dto.qywx.response.QywxTransferCustomerDTO;
import com.gic.wechat.api.service.qywx.QywxExternalUserService;
import com.gic.wechat.api.service.qywx.QywxSuiteApiService;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
import org.apache.commons.collections.CollectionUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
......@@ -53,14 +56,38 @@ public class MomentTest {
private QwMomentPlanMapper qwMomentPlanMapper ;
@Autowired
private QwMomentPlanAttendMapper qwMomentPlanAttendMapper ;
@Autowired
private QywxUserApiService qywxUserApiService ;
@Test
public void jc() {
String wxEnterpriseId = "d0a9e3cd351e4c26a526082a8c210f03";
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
String wxUserId = "JF10105";
String takeoverUserId = "JF10884";
List<String> list = new ArrayList<>();
list.add("wmEalNBwAANkqRWoKYqbMhlIxwpvTV0g");
QywxTransferCustomerDTO transferCustomerResp = qywxUserApiService.transferCustomer(qwDTO.getThirdCorpid(), qwDTO.getSelf3thSecret(), wxUserId, takeoverUserId, list,qwDTO.isSelf(),qwDTO.getUrlHost());
System.out.println(JSONObject.toJSONString(transferCustomerResp));
}
@Test
public void ok() {
SendResultQDTO plan = new SendResultQDTO() ;
plan.setWxEnterpriseId("6d52f722471343eeb7fbed87994cbdf8");
plan.setClerkId("1664331543ab49769ad5ccfb6dc7986c");
plan.setSendTime(DateUtil.strToDate("2025-05-13 18:31:00","yyyy-MM-dd HH:mm:ss"));
plan.setStaffId("e35fe570efe44201beb3381f1e50f07e");
plan.setPlanId(795415784309457024L);
this.qwMomentApiService.finishTask(plan) ;
}
@Test
public void sendToQw() {
Long id = 792759787778540646L ;
TabQwMomentPlan plan = this.qwMomentPlanMapper.getById(id) ;
this.qwMomentPlanService.sendToQiwei(plan);
// this.qwMomentPlanService.sendToQiwei(plan);
}
......@@ -108,8 +135,8 @@ public class MomentTest {
@Test
public void getmomentid() {
String wxEnterpriseId = "ca66a01b79474c40b3e7c7f93daf1a3b";
String jobId = "kyy1q5PYkElEGL6BISXVKkKZPD-Lpq76iGKEn8Z1nU4OBh9487Ni70dA638plHpD";
String wxEnterpriseId = "d4210ec4393d4be9b75b79f7e4db4287";
String jobId = "PpJSQQbEj2idWBfdPk0s8qL4RZiXOcFryhsozrorxtf_S0iGF2a2bCN0LzSBj8er";
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId);
ServiceResponse<Object> resp2 = this.qywxExternalUserService.getMomentTaskResult(qwDTO.getThirdCorpid(),
qwDTO.getSelf3thSecret(), jobId, qwDTO.isSelf(),qwDTO.getUrlHost()) ;
......@@ -119,10 +146,9 @@ public class MomentTest {
@Test
public void data() {
Long planId = 773211358316478465L ;
// this.qwMomentPlanService.getQwData(planId);
this.qwMomentPlanService.getQwPublishData(planId,null);
Long planId = 801500314782997092L ;
//this.qwMomentPlanService.getQwPublishData(planId,null);
this.qwMomentPlanService.getQwData(planId) ;
}
......
......@@ -101,6 +101,10 @@ public class GroupChatPlanExcelVO extends Object implements Serializable{
}
public String getCompletionRate() {
if (null == this.staffCount || this.staffCount==0 || null == this.sendCount || 0==this.sendCount){
completionRate = "0%";
return completionRate;
}
Double i = 100.0 * this.sendCount / this.staffCount;
BigDecimal bd = new BigDecimal(i);
bd = bd.setScale(2, RoundingMode.HALF_UP);
......
......@@ -19,7 +19,8 @@ import com.gic.enterprise.api.dto.custompage.CustomPageRenderDTO;
import com.gic.enterprise.api.enums.CustomPageTypeEnum;
import com.gic.enterprise.api.service.*;
import com.gic.haoban.manage.web.qo.StaffAddVO;
import com.gic.haoban.manage.web.utils.CustomSwitcher;
import com.gic.haoban.manage.web.utils.switcher.CustomSwitcher;
import com.gic.haoban.manage.web.utils.switcher.MarketingSwitcher;
import com.gic.haoban.manage.web.utils.storestatusfilter.StoreStatusFilterUtils;
import com.gic.haoban.manage.web.vo.*;
import com.gic.marketing.pro.api.service.clerktask.ClerkTaskApiService;
......@@ -75,7 +76,6 @@ import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseRelationDetailDTO;
import com.gic.haoban.manage.api.dto.role.HaobanRoleDTO;
import com.gic.haoban.manage.api.dto.role.StoreRoleDTO;
import com.gic.haoban.manage.api.enums.AuditStatus;
import com.gic.haoban.manage.api.enums.AuditType;
import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
......@@ -288,14 +288,13 @@ public class WxStaffController extends WebBaseController {
*/
@IgnoreLogin
@RequestMapping("/get-audit-setting")
public HaobanResponse getAuditSetting(String wxEnterpriseId) {
public HaobanResponse getAuditSetting(String wxEnterpriseId,String enterpriseId) {
if (StringUtils.isAnyBlank(wxEnterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_2);
}
AuditSettingDTO auditSetting = auditSettingApiService.findSettingByWxEnterpriseId(wxEnterpriseId);
AuditSettingVO auditSettingVO = EntityUtil.changeEntityNew(AuditSettingVO.class, auditSetting);
return resultResponse(HaoBanErrCode.ERR_1, auditSettingVO);
}
......@@ -1559,30 +1558,40 @@ public class WxStaffController extends WebBaseController {
* @return
*/
@RequestMapping(value = "/queryMenuCodesByClerkType", method = RequestMethod.GET)
public RestResponse<HaobanRoleDTO> queryMenuByClerkType(Integer clerkType, String staffId, String wxEnterpriseId , String enterpriseId) {
if(StringUtils.isBlank(wxEnterpriseId) || wxEnterpriseId.equals("-1")) {
return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_2.getCode()), HaoBanErrCode.ERR_2.getMsg());
}
public RestResponse<HaobanRoleVO> queryMenuByClerkType(Integer clerkType, String staffId, String wxEnterpriseId , String enterpriseId) {
if (clerkType == null) {
return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_2.getCode()), HaoBanErrCode.ERR_2.getMsg());
clerkType = -1 ;
}
if (clerkType == -1) {
logger.info("导购类型为-1,游客获取系统级别的导购权限");
// 游客获取系统级别的导购权限
ServiceResponse<HaobanRoleDTO> serviceResponse = haobanRoleApiService
.getMenuByWxEnterpriseIdAndClerkType("-1", RoleClerkTypeEnum.CLERK.getCode(), 0);
return RestResponse.successResult(serviceResponse.getResult());
return RestResponse.successResult(convertHaobanRoleVO(serviceResponse.getResult(),enterpriseId));
}
if (StringUtils.isBlank(staffId) || "-1".equals(staffId)) {
logger.info("未登录游客获取系统级别的导购权限");
// 游客获取系统级别的导购权限
ServiceResponse<HaobanRoleDTO> serviceResponse = haobanRoleApiService
.getMenuByWxEnterpriseIdAndClerkType("-1", RoleClerkTypeEnum.CLERK.getCode(), 0);
return RestResponse.successResult(serviceResponse.getResult());
return RestResponse.successResult(convertHaobanRoleVO(serviceResponse.getResult(),enterpriseId));
}
ServiceResponse<HaobanRoleDTO> serviceResponse = haobanRoleApiService
.getMenuByWxEnterpriseIdAndClerkType(wxEnterpriseId, clerkType, 1 , enterpriseId);
return RestResponse.successResult(serviceResponse.getResult());
return RestResponse.successResult(convertHaobanRoleVO(serviceResponse.getResult(),enterpriseId));
}
private HaobanRoleVO convertHaobanRoleVO(HaobanRoleDTO haobanRoleDTO,String enterpriseId) {
if (haobanRoleDTO == null) {
return null;
}
HaobanRoleVO haobanRoleVO = EntityUtil.changeEntityNew(HaobanRoleVO.class, haobanRoleDTO);
int potentialHide = StringUtils.isNotBlank(MarketingSwitcher.POTENTIAL_HIDE_STORE_ENTERPRISE_ID)
&& StringUtils.isNotBlank(enterpriseId)
&& MarketingSwitcher.POTENTIAL_HIDE_STORE_ENTERPRISE_ID.contains(enterpriseId)
? 1 : 0;
haobanRoleVO.setPotentialHide(potentialHide);
return haobanRoleVO;
}
/**
......
......@@ -136,6 +136,7 @@ public class GroupChatPlanController {
@RequestMapping("staff-send-result")
public RestResponse<Void> staffSendResult(@RequestBody StaffSendResultQDTO qdto) {
logger.info("企微返回={}",JSONObject.toJSONString(qdto));
qdto.setSendTime(new Date());
this.groupChatPlanApiService.staffSendResult(qdto) ;
return RestResponse.successResult();
}
......
......@@ -177,6 +177,7 @@ public class QwMomentController {
@ResponseBody
public RestResponse<Void> finishTask(@RequestBody SendResultQDTO qdto) {
logger.info("完成任务={}",JSONObject.toJSONString(qdto)) ;
qdto.setSendTime(new Date());
this.qwMomentApiService.finishTask(qdto) ;
return RestResponse.successResult();
}
......
......@@ -260,6 +260,9 @@ public class PotentialDataAdaptor {
if (reportType == null) {
return new Pair<>("", "");
}
if (StringUtils.isBlank(bizDate)) {
return new Pair<>("", "");
}
String endDate = bizDate;
String beginDate = bizDate;
if (MaterialReportType.MONTH.getCode().equals(reportType)) {
......
package com.gic.haoban.manage.web.utils;
import com.gic.commons.switcher.SwitcherApplication;
import com.gic.haoban.manage.web.utils.switcher.CustomSwitcher;
import com.gic.haoban.manage.web.utils.switcher.MarketingSwitcher;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;
......@@ -12,5 +14,6 @@ public class SwitcherInitialization implements InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
SwitcherApplication.init(CustomSwitcher.class);
SwitcherApplication.init(MarketingSwitcher.class);
}
}
\ No newline at end of file
package com.gic.haoban.manage.web.utils;
package com.gic.haoban.manage.web.utils.switcher;
import com.alibaba.fastjson.JSONObject;
import com.gic.commons.switcher.Switcher;
......
package com.gic.haoban.manage.web.utils.switcher;
import com.gic.commons.switcher.Switcher;
import com.gic.commons.switcher.SwitcherNamespace;
@SwitcherNamespace("BUZ.market-properties")
public class MarketingSwitcher {
@Switcher
public static String POTENTIAL_HIDE_STORE_ENTERPRISE_ID;
}
\ No newline at end of file
package com.gic.haoban.manage.web.vo;
import com.gic.haoban.manage.api.dto.role.HaobanRoleDTO;
public class HaobanRoleVO extends HaobanRoleDTO {
// 潜客雷达隐藏折扣店
private int potentialHide;
public int getPotentialHide() {
return potentialHide;
}
public void setPotentialHide(int potentialHide) {
this.potentialHide = potentialHide;
}
}
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