提交 cc2b5253 作者: gh

客服发送

上级 39d1c46f
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
</remote-repository> </remote-repository>
<remote-repository> <remote-repository>
<option name="id" value="central" /> <option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" /> <option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" /> <option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository> </remote-repository>
......
...@@ -29,20 +29,14 @@ public class CustomerGraphics implements Serializable { ...@@ -29,20 +29,14 @@ public class CustomerGraphics implements Serializable {
/** /**
* 标题 * 标题
*/ */
@TableField(value = "title") @TableField(value = "name")
private String title; private String name;
/** /**
* 类型 0-文本 1-图文 * 类型 text-文本 news-图文
*/ */
@TableField(value = "type") @TableField(value = "type")
private Integer type; private String type;
/**
* 是否支付 0-否 1-是
*/
@TableField(value = "is_pay")
private Integer isPay;
/** /**
* 推广标题 * 推广标题
......
...@@ -2,9 +2,12 @@ package com.yaoyaozw.customer.mapper; ...@@ -2,9 +2,12 @@ package com.yaoyaozw.customer.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yaoyaozw.customer.entity.ReferralEntity; import com.yaoyaozw.customer.entity.ReferralEntity;
import com.yaoyaozw.customer.vo.referral.ReferralEntityVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* @author Admin * @author Admin
...@@ -19,4 +22,7 @@ public interface ReferralEntityMapper extends BaseMapper<ReferralEntity> { ...@@ -19,4 +22,7 @@ public interface ReferralEntityMapper extends BaseMapper<ReferralEntity> {
* @param sourceId 素材主体ID * @param sourceId 素材主体ID
*/ */
void ultimateDeleteReferrals(@Param("sourceId") Long sourceId); void ultimateDeleteReferrals(@Param("sourceId") Long sourceId);
List<ReferralEntityVo> findByMaterialGraphicsId(@Param("graphicsId")Long graphicsId);
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.yaoyaozw.customer.common.BaseResult; ...@@ -4,6 +4,7 @@ import com.yaoyaozw.customer.common.BaseResult;
import com.yaoyaozw.customer.common.GenericsResult; import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO; import com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO;
import com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO; import com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO;
import com.yaoyaozw.customer.dto.integration.IntegrationRequestDTO;
import com.yaoyaozw.customer.entity.CustomerGraphics; import com.yaoyaozw.customer.entity.CustomerGraphics;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yaoyaozw.customer.vo.customer.CustomerDelayListVO; import com.yaoyaozw.customer.vo.customer.CustomerDelayListVO;
...@@ -54,5 +55,9 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> { ...@@ -54,5 +55,9 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> {
*/ */
BaseResult removeCustomerMessage(Long id); BaseResult removeCustomerMessage(Long id);
void sendCustomerMessage(IntegrationRequestDTO integrationRequestDTO);
} }
...@@ -2,6 +2,9 @@ package com.yaoyaozw.customer.service; ...@@ -2,6 +2,9 @@ package com.yaoyaozw.customer.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yaoyaozw.customer.entity.ReferralEntity; import com.yaoyaozw.customer.entity.ReferralEntity;
import com.yaoyaozw.customer.vo.referral.ReferralEntityVo;
import java.util.List;
/** /**
...@@ -18,4 +21,5 @@ public interface ReferralEntityService extends IService<ReferralEntity> { ...@@ -18,4 +21,5 @@ public interface ReferralEntityService extends IService<ReferralEntity> {
void ultimateDeleteReferrals(Long sourceId); void ultimateDeleteReferrals(Long sourceId);
List<ReferralEntityVo> findReferralByCustomerGraphicsId(Long graphicsId);
} }
...@@ -10,10 +10,6 @@ import java.util.List; ...@@ -10,10 +10,6 @@ import java.util.List;
public interface RegisterUserEntityService extends IService<RegisterUserEntity>{ public interface RegisterUserEntityService extends IService<RegisterUserEntity>{
void sendCustomerMessage(IntegrationRequestDTO integrationRequestDTO);
/** /**
* 获取符合动态条件的用户 * 获取符合动态条件的用户
* *
......
package com.yaoyaozw.customer.service.impl; package com.yaoyaozw.customer.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yaoyaozw.customer.common.BaseResult; import com.yaoyaozw.customer.common.BaseResult;
import com.yaoyaozw.customer.common.GenericsResult; import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.components.CustomerServiceCommonAsyncComponent; import com.yaoyaozw.customer.components.CustomerServiceCommonAsyncComponent;
...@@ -8,24 +9,26 @@ import com.yaoyaozw.customer.components.TokenManager; ...@@ -8,24 +9,26 @@ import com.yaoyaozw.customer.components.TokenManager;
import com.yaoyaozw.customer.constants.CustomerCommonConstant; import com.yaoyaozw.customer.constants.CustomerCommonConstant;
import com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO; import com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO;
import com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO; import com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO;
import com.yaoyaozw.customer.dto.integration.IntegrationRequestDTO;
import com.yaoyaozw.customer.entity.AuthorizerToken;
import com.yaoyaozw.customer.entity.ReferralEntity; import com.yaoyaozw.customer.entity.ReferralEntity;
import com.yaoyaozw.customer.service.CrowdPackageConditionMatchService; import com.yaoyaozw.customer.service.*;
import com.yaoyaozw.customer.service.ReferralEntityService; import com.yaoyaozw.customer.service.wechat.service.WeChatService;
import com.yaoyaozw.customer.service.RegisterUserEntityService;
import com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO; import com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO;
import com.yaoyaozw.customer.vo.customer.CustomerMessageListVO; import com.yaoyaozw.customer.vo.customer.CustomerMessageListVO;
import com.yaoyaozw.customer.vo.referral.ReferralEntityVo;
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.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date; import java.util.*;
import java.util.List; import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yaoyaozw.customer.entity.CustomerGraphics; import com.yaoyaozw.customer.entity.CustomerGraphics;
import com.yaoyaozw.customer.mapper.CustomerGraphicsMapper; import com.yaoyaozw.customer.mapper.CustomerGraphicsMapper;
import com.yaoyaozw.customer.service.CustomerGraphicsService;
/** /**
* 客户图形服务impl * 客户图形服务impl
...@@ -46,6 +49,13 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap ...@@ -46,6 +49,13 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
private CustomerServiceCommonAsyncComponent commonAsyncComponent; private CustomerServiceCommonAsyncComponent commonAsyncComponent;
@Autowired @Autowired
private ReferralEntityService referralEntityService; private ReferralEntityService referralEntityService;
@Autowired
private WeChatService weChatService;
@Autowired
private RegisterUserEntityService registerUserEntityService;
@Autowired
private AuthorizerTokenService authorizerTokenService;
@Override @Override
public BaseResult insertCustomerMessage(CustomerMessageSaveDTO saveDto) { public BaseResult insertCustomerMessage(CustomerMessageSaveDTO saveDto) {
...@@ -64,8 +74,6 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap ...@@ -64,8 +74,6 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
referralEntityService.save(referralEntity); referralEntityService.save(referralEntity);
return new BaseResult().success(); return new BaseResult().success();
} }
...@@ -83,5 +91,51 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap ...@@ -83,5 +91,51 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
public BaseResult removeCustomerMessage(Long id) { public BaseResult removeCustomerMessage(Long id) {
return null; return null;
} }
@Override
public void sendCustomerMessage(IntegrationRequestDTO integrationRequestDTO) {
Date requestDate = integrationRequestDTO.getRequestDate();
//当前时刻发送的客服(需要加启用禁用)
List<CustomerGraphics> customerGraphicsList = list(new QueryWrapper<CustomerGraphics>().eq(CustomerGraphics.COL_POST_TIME, requestDate));
for (CustomerGraphics customerGraphics : customerGraphicsList) {
Long packId = customerGraphics.getPackId();
/*
根据人群包找人
*/
List<CrowdPackageUserVO> userList=new ArrayList<>();
Map<String, List<CrowdPackageUserVO>> appidUserMap = userList.stream().collect(Collectors.groupingBy(CrowdPackageUserVO::getAppId));
//根据公众号找具体素材和链接
List<ReferralEntityVo> referralList = referralEntityService.findReferralByCustomerGraphicsId(customerGraphics.getId());
Map<String, List<ReferralEntityVo>> referralMap = referralList.stream().collect(Collectors.groupingBy(ReferralEntityVo::getAppid));
//循环该客服下的所有素材
for (Map.Entry<String, List<ReferralEntityVo>> referralEntry : referralMap.entrySet()) {
String appid = referralEntry.getKey();
//获取token
AuthorizerToken authorizerToken = authorizerTokenService.findTokenByAppid(appid);
if (authorizerToken!=null&&authorizerToken.getAuthorizerAccessToken()!=null){
//获取该号的链接实体
List<ReferralEntityVo> referralEntityVo = referralMap.get(appid);
//获取该号的openid
List<CrowdPackageUserVO> packageUserVo = appidUserMap.get(appid);
if (referralEntityVo!=null&&!referralEntityVo.isEmpty()){
weChatService.sendCustomerMessage(appid,authorizerToken.getAuthorizerAccessToken(),customerGraphics,packageUserVo,referralEntityVo);
}
}
}
}
}
} }
...@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yaoyaozw.customer.entity.ReferralEntity; import com.yaoyaozw.customer.entity.ReferralEntity;
import com.yaoyaozw.customer.mapper.ReferralEntityMapper; import com.yaoyaozw.customer.mapper.ReferralEntityMapper;
import com.yaoyaozw.customer.service.ReferralEntityService; import com.yaoyaozw.customer.service.ReferralEntityService;
import com.yaoyaozw.customer.vo.referral.ReferralEntityVo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* @Author didi * @Author didi
* @Create 2022/3/23 16:14 * @Create 2022/3/23 16:14
...@@ -18,4 +21,9 @@ public class ReferralEntityServiceImpl extends ServiceImpl<ReferralEntityMapper, ...@@ -18,4 +21,9 @@ public class ReferralEntityServiceImpl extends ServiceImpl<ReferralEntityMapper,
super.baseMapper.ultimateDeleteReferrals(materialId); super.baseMapper.ultimateDeleteReferrals(materialId);
} }
@Override
public List<ReferralEntityVo> findReferralByCustomerGraphicsId(Long graphicsId) {
return baseMapper.findByMaterialGraphicsId(graphicsId);
}
} }
...@@ -29,23 +29,6 @@ import java.util.stream.Collectors; ...@@ -29,23 +29,6 @@ import java.util.stream.Collectors;
@Service @Service
public class RegisterUserEntityServiceImpl extends ServiceImpl<RegisterUserEntityMapper, RegisterUserEntity> implements RegisterUserEntityService{ public class RegisterUserEntityServiceImpl extends ServiceImpl<RegisterUserEntityMapper, RegisterUserEntity> implements RegisterUserEntityService{
@Autowired
private AuthorizerTokenService authorizerTokenService;
@Autowired
private WeChatService weChatService;
@Override
public void sendCustomerMessage(IntegrationRequestDTO integrationRequestDTO) {
//1.读取人群包
List<RegisterUserEntity> list = list();
//2.发送客服消息
}
@Override @Override
public List<CrowdPackageUserVO> getUserMatchDynamicExpress(List<String> dynamicExpressList, String openId) { public List<CrowdPackageUserVO> getUserMatchDynamicExpress(List<String> dynamicExpressList, String openId) {
......
...@@ -5,7 +5,7 @@ import lombok.Data; ...@@ -5,7 +5,7 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
public class WechatResponseEntity implements Serializable { public class WeChatResponseEntity implements Serializable {
private static final long serialVersionUID = -7200832532059064880L; private static final long serialVersionUID = -7200832532059064880L;
private Integer errcode; private Integer errcode;
......
package com.yaoyaozw.customer.service.wechat.entity.customerRequest;
import lombok.Data;
import java.io.Serializable;
/**
* @author wgh
* @date 2022/10/8 19:22
*/
@Data
public class CustomerNewsArticleItem implements Serializable {
private String title;
private String description;
private String url;
private String picurl;
public CustomerNewsArticleItem(String title, String description, String url, String picurl) {
this.title = title;
this.description = description;
this.url = url;
this.picurl = picurl;
}
public CustomerNewsArticleItem() {
}
}
package com.yaoyaozw.customer.service.wechat.entity.customerRequest;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @author wgh
* @date 2022/10/8 19:15
*/
@Data
public class CustomerNewsItem implements Serializable {
List<CustomerNewsArticleItem> articles;
public CustomerNewsItem() {
}
public CustomerNewsItem(CustomerNewsArticleItem articles) {
List<CustomerNewsArticleItem> articleItemList = new ArrayList<>();
articleItemList.add(articles);
this.articles = articleItemList;
}
}
package com.yaoyaozw.customer.service.wechat.entity.customerRequest;
import lombok.Data;
import java.io.Serializable;
/**
* @author wgh
* @date 2022/10/8 19:32
*/
@Data
public class CustomerTextItem implements Serializable {
private String content;
public CustomerTextItem() {
}
public CustomerTextItem(String content) {
this.content = content;
}
}
package com.yaoyaozw.customer.service.wechat.entity.customerRequest;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @author wgh
* @date 2022/10/8 19:04
*/
@Data
public class WeChatCustomerRequestEntity implements Serializable {
private String touser;
private String msgtype;
private CustomerNewsItem news;
private CustomerTextItem text;
public WeChatCustomerRequestEntity( String msgtype, String title, String description, String url, String picurl) {
this.msgtype = msgtype;
this.news = new CustomerNewsItem(new CustomerNewsArticleItem(title,description,url,picurl));
}
public WeChatCustomerRequestEntity(String msgtype, String content) {
this.msgtype = msgtype;
this.text = new CustomerTextItem(content);
}
public WeChatCustomerRequestEntity() {
}
}
...@@ -8,6 +8,8 @@ import org.springframework.web.client.RestTemplate; ...@@ -8,6 +8,8 @@ import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponents; import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder; import org.springframework.web.util.UriComponentsBuilder;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map; import java.util.Map;
@Service @Service
...@@ -42,4 +44,15 @@ public class WeChatRestService { ...@@ -42,4 +44,15 @@ public class WeChatRestService {
return result; return result;
} }
public <T> ResponseEntity<T> sendPostRequest(String fullPath, Class<T> responseEntity, Object requestEntity)
throws URISyntaxException, RestClientException {
RestTemplate restTemplate = new RestTemplate();
URI uri = new URI(fullPath);
ResponseEntity<T> result = restTemplate.postForEntity(uri, requestEntity, responseEntity);
return result;
}
} }
package com.yaoyaozw.customer.service.wechat.service; package com.yaoyaozw.customer.service.wechat.service;
import com.yaoyaozw.customer.entity.CustomerDelayPublish; import com.yaoyaozw.customer.entity.CustomerDelayPublish;
import com.yaoyaozw.customer.entity.CustomerGraphics;
import com.yaoyaozw.customer.entity.RegisterUserEntity; import com.yaoyaozw.customer.entity.RegisterUserEntity;
import com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO;
import com.yaoyaozw.customer.vo.customer.CustomerDelayItemVO; import com.yaoyaozw.customer.vo.customer.CustomerDelayItemVO;
import com.yaoyaozw.customer.vo.referral.ReferralEntityVo;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.Future; import java.util.concurrent.Future;
...@@ -14,5 +18,6 @@ public interface WeChatService { ...@@ -14,5 +18,6 @@ public interface WeChatService {
*/ */
Future<CustomerDelayPublish> sendCustomerDelayMessage(String token, CustomerDelayPublish user, Map<Integer,CustomerDelayItemVO>delaySortMap); Future<CustomerDelayPublish> sendCustomerDelayMessage(String token, CustomerDelayPublish user, Map<Integer,CustomerDelayItemVO>delaySortMap);
void sendCustomerMessage(String appid,String token, CustomerGraphics customerGraphics, List<CrowdPackageUserVO>openidList,List<ReferralEntityVo> referralEntityVo);
} }
...@@ -2,30 +2,44 @@ package com.yaoyaozw.customer.service.wechat.service; ...@@ -2,30 +2,44 @@ package com.yaoyaozw.customer.service.wechat.service;
import com.yaoyaozw.customer.entity.CustomerDelayPublish; import com.yaoyaozw.customer.entity.CustomerDelayPublish;
import com.yaoyaozw.customer.entity.RegisterUserEntity; import com.yaoyaozw.customer.entity.CustomerGraphics;
import com.yaoyaozw.customer.service.ReferralEntityService;
import com.yaoyaozw.customer.service.wechat.entity.WeChatResponseEntity;
import com.yaoyaozw.customer.service.wechat.entity.customerRequest.CustomerNewsArticleItem;
import com.yaoyaozw.customer.service.wechat.entity.customerRequest.CustomerNewsItem;
import com.yaoyaozw.customer.service.wechat.entity.customerRequest.WeChatCustomerRequestEntity;
import com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO;
import com.yaoyaozw.customer.vo.customer.CustomerDelayItemVO; import com.yaoyaozw.customer.vo.customer.CustomerDelayItemVO;
import com.yaoyaozw.customer.vo.referral.ReferralEntityVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.AsyncResult; import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.stream.Collectors;
@Service @Service
public class WeChatServiceImpl implements WeChatService{ public class WeChatServiceImpl implements WeChatService{
private String customerPath="";
private static final String CUSTOMER_TEXT="text";
private static final String CUSTOMER_NEWS="news";
@Autowired @Autowired
private WeChatRestService weChatRestService; private WeChatRestService weChatRestService;
@Async("myExecutor") @Async("myExecutor")
@Override @Override
public Future<CustomerDelayPublish> sendCustomerDelayMessage(String token, CustomerDelayPublish user, Map<Integer,CustomerDelayItemVO> delaySortMap) { public Future<CustomerDelayPublish> sendCustomerDelayMessage(String token, CustomerDelayPublish user, Map<Integer,CustomerDelayItemVO> delaySortMap) {
//根据公众号发送客服
//当前时间批次发文素材的用户关注时间一致 //当前时间批次发文素材的用户关注时间一致
Long subscribeTimestamp = user.getGmtCreate().getTime(); Long subscribeTimestamp = user.getGmtCreate().getTime();
...@@ -41,4 +55,41 @@ public class WeChatServiceImpl implements WeChatService{ ...@@ -41,4 +55,41 @@ public class WeChatServiceImpl implements WeChatService{
} }
return new AsyncResult<>(user); return new AsyncResult<>(user);
} }
@Override
public void sendCustomerMessage(String appid,String token, CustomerGraphics customerGraphics, List<CrowdPackageUserVO> openidList,List<ReferralEntityVo> referralEntityVo) {
//根据公众号发送客服
String fullPath=customerPath+"?"+token;
//构建请求参数(文本/图文)
WeChatCustomerRequestEntity customerRequest = buildCustomerRequest(customerGraphics,referralEntityVo);
try {
ResponseEntity<WeChatResponseEntity> response = weChatRestService.sendPostRequest(fullPath, WeChatResponseEntity.class, customerRequest);
WeChatResponseEntity body = response.getBody();
System.err.println(body);
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
private WeChatCustomerRequestEntity buildCustomerRequest(CustomerGraphics customerGraphics,List<ReferralEntityVo> urlList){
//类型判断
if (CUSTOMER_TEXT.equals(customerGraphics.getType())){
return new WeChatCustomerRequestEntity(CUSTOMER_TEXT,customerGraphics.getContent());
}else if (CUSTOMER_NEWS.equals(customerGraphics.getType())){
return new WeChatCustomerRequestEntity(CUSTOMER_NEWS,customerGraphics.getExtendTitle(),urlList.get(0).getReferral(),customerGraphics.getContent(),customerGraphics.getCoverUrl());
}
return null;
}
} }
...@@ -17,6 +17,8 @@ public class CrowdPackageUserVO implements Serializable { ...@@ -17,6 +17,8 @@ public class CrowdPackageUserVO implements Serializable {
private String accountId; private String accountId;
private String appId;
private String openId; private String openId;
private Long setupId; private Long setupId;
......
package com.yaoyaozw.customer.vo.referral;
import lombok.Data;
import java.io.Serializable;
/**
* @author wgh
* @date 2022/10/9 11:10
*/
@Data
public class ReferralEntityVo implements Serializable {
private Long materialGraphicsId;
private Long accountId;
private String appid;
private String referral;
}
...@@ -29,4 +29,20 @@ ...@@ -29,4 +29,20 @@
delete from referral_entity where material_graphics_id = #{sourceId} delete from referral_entity where material_graphics_id = #{sourceId}
</delete> </delete>
<select id="findByMaterialGraphicsId" resultType="com.yaoyaozw.customer.vo.referral.ReferralEntityVo">
select material_graphics_id ,referral.account_id,authInfo.appid,referral.referral
from referral_entity referral left join authorizer_info authInfo
on referral.account_id=authInfo.account_id
where referral.material_graphics_id=#{graphicsId} and referral.is_deleted=0
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -64,4 +64,9 @@ ...@@ -64,4 +64,9 @@
on rue.app_id = ai.appid on rue.app_id = ai.appid
where find_in_set(#{packageId}, in_package) where find_in_set(#{packageId}, in_package)
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论