提交 aeca1804 作者: 沈振路

Merge branch 'customer_service_SZlu'

# Conflicts:
#	src/main/java/com/yaoyaozw/customer/service/CustomerGraphicsService.java
#	src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsServiceImpl.java
#	src/main/resources/mapper/RegisterUserEntityMapper.xml
......@@ -3,6 +3,7 @@ package com.yaoyaozw.customer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
......@@ -13,6 +14,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableScheduling
@MapperScan("com.yaoyaozw.customer.mapper")
@EnableFeignClients
@EnableAsync
public class CustomerServiceApplication {
public static void main(String[] args) {
......
......@@ -25,6 +25,12 @@ public class CrowdPackageCommonConstant {
public static final String GROUP_OR = "group_or";
public static final String CONDITION_STORE_ID = "store_id";
public static final String MULTIPLE_SELECT = "multiple_select";
public static final String COMMA_SEPARATOR = ",";
public static final Integer STATIC_CONDITION = 1;
public static final Integer NON_STATIC_CONDITION = 0;
......
package com.yaoyaozw.customer.constants;
import cn.hutool.core.util.ObjectUtil;
/**
* @author darker
* @date 2022/9/28 20:09
......@@ -8,4 +10,31 @@ public class CustomerCommonConstant {
public final static String CROWD_HUMAN_NUN_REDIS_KEY = "crowdHumanNum";
public final static Integer ACTIVITY_NEWS_TYPE = 8;
public final static Integer BOOK_NEWS_TYPE = 7;
public final static Integer USUAL_LINK_NEWS_TYPE = 9;
public final static String CUSTOMER_TYPE_VALUE_GRAPHICS = "news";
public final static String CUSTOMER_TYPE_VALUE_TEXT = "text";
public final static String CUSTOMER_TYPE_NAME_GRAPHICS = "图文";
public final static String CUSTOMER_TYPE_NAME_TEXT = "文本";
public static String getCustomerType(String type) {
if (ObjectUtil.isNull(type)) {
return null;
}
if (type.equals(CUSTOMER_TYPE_VALUE_GRAPHICS)) {
return CUSTOMER_TYPE_NAME_GRAPHICS;
}
if (type.equals(CUSTOMER_TYPE_VALUE_TEXT)) {
return CUSTOMER_TYPE_NAME_TEXT;
}
return type;
}
}
package com.yaoyaozw.customer.controller;
import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.service.CustomerServiceCommonService;
import com.yaoyaozw.customer.vo.CommonOptionResponseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author darker
* @date 2022/10/9 10:15
*/
@RestController
@RequestMapping("/customer-service/common")
@Api(tags = "客服通用接口")
public class CustomerCommonController {
@Autowired
private CustomerServiceCommonService commonService;
@GetMapping("/getStoreList")
@ApiOperation("获取书城列表")
public GenericsResult<List<CommonOptionResponseVO>> getStoreList() {
return commonService.getStoreList();
}
}
package com.yaoyaozw.customer.controller;
import com.github.pagehelper.PageInfo;
import com.yaoyaozw.customer.common.BaseResult;
import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO;
import com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO;
import com.yaoyaozw.customer.service.CustomerGraphicsService;
import com.yaoyaozw.customer.vo.customer.CustomerDelayListVO;
import com.yaoyaozw.customer.vo.customer.CustomerMessageDetailVO;
import com.yaoyaozw.customer.vo.customer.CustomerMessageListVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -33,15 +35,15 @@ public class CustomerMessageController {
return customerGraphicsService.insertCustomerMessage(saveDto);
}
@ApiOperation("编辑")
@PostMapping("/edit")
public BaseResult updateCustomerMessage(@RequestBody CustomerMessageSaveDTO saveDto) {
return customerGraphicsService.updateCustomerMessage(saveDto);
@ApiOperation("获取详情")
@GetMapping("/detail/{id}")
public GenericsResult<CustomerMessageDetailVO> getCustomerMessageDetail(@PathVariable("id") Long id) {
return customerGraphicsService.getCustomerMessageDetail(id);
}
@ApiOperation("查询")
@PostMapping("/pageList")
public GenericsResult<List<CustomerMessageListVO>> pageList(@RequestBody CustomerMessageQueryDTO queryDto) {
public GenericsResult<PageInfo<CustomerMessageListVO>> pageList(@RequestBody CustomerMessageQueryDTO queryDto) {
return customerGraphicsService.pageList(queryDto);
}
......@@ -51,5 +53,10 @@ public class CustomerMessageController {
return customerGraphicsService.removeCustomerMessage(id);
}
@ApiOperation("设置人群包")
@GetMapping("/setPack")
public BaseResult setPack(@RequestParam Long id, @RequestParam Long packId) {
return customerGraphicsService.setPack(id, packId);
}
}
package com.yaoyaozw.customer.dto.customer;
import com.yaoyaozw.customer.common.PageParams;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
......@@ -10,17 +12,12 @@ import java.io.Serializable;
* @author darker
* @date 2022/9/15 11:20
*/
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel("延时客服列表查询实体")
public class CustomerMessageQueryDTO implements Serializable {
public class CustomerMessageQueryDTO extends PageParams implements Serializable {
private static final long serialVersionUID = 2406901469313438527L;
@ApiModelProperty("消息名称关键词")
private String messageKeyword;
@ApiModelProperty("客服消息类型")
private Integer messageType;
}
......@@ -18,22 +18,16 @@ public class CustomerMessageSaveDTO implements Serializable {
@ApiModelProperty("客服消息id")
private Long id;
@ApiModelProperty("人群包ID")
private Long packId;
@ApiModelProperty("标题")
private String title;
private String name;
@ApiModelProperty("消息发送时间")
private String postTime;
@ApiModelProperty("是否支付 0-否 1-是")
private Integer isPay;
@ApiModelProperty("客服消息类型(图文、文本)")
private Integer type;
private String type;
@ApiModelProperty("素材文本内容")
@ApiModelProperty("推广标题")
private String extendTitle;
@ApiModelProperty("素材图片路径")
......
package com.yaoyaozw.customer.dto.customer;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* @author darker
......@@ -14,11 +22,18 @@ import java.util.Date;
@Data
public class CustomerReferralDTO implements Serializable {
@ApiModelProperty("主键id")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
@ApiModelProperty("链接类型")
private Integer newsType;
@ApiModelProperty("书城")
private String storeType;
@ApiModelProperty("书")
private Long bookId;
private String bookId;
@ApiModelProperty("章节")
private Integer chapterIdx;
......@@ -41,6 +56,42 @@ public class CustomerReferralDTO implements Serializable {
@ApiModelProperty(value = "结束时间")
private Date endTime;
@ApiModelProperty(value = "开始、结束时间")
private List<Date> dateList;
@ApiModelProperty(value = "充值金额")
private BigDecimal rechargeAmount;
@ApiModelProperty(value = "赠送数量")
private Integer giftAmount;
private Integer isDeleted;
public Date getStartTime() {
if (ObjectUtil.isNull(this.startTime) && CollectionUtil.isNotEmpty(this.dateList)) {
return dateList.get(0);
}
return startTime;
}
public Date getEndTime() {
if (ObjectUtil.isNull(this.endTime) && CollectionUtil.isNotEmpty(this.dateList)) {
return dateList.get(0);
}
return endTime;
}
public List<Date> getDateList() {
if (CollectionUtil.isEmpty(this.dateList) && ObjectUtil.isNotNull(this.startTime) && ObjectUtil.isNotNull(this.endTime)) {
return Arrays.asList(this.startTime, this.endTime);
}
return dateList;
}
public Integer getIsDeleted() {
if (ObjectUtil.isNull(this.isDeleted)) {
return 0;
}
return isDeleted;
}
}
......@@ -16,7 +16,7 @@ import org.springframework.data.annotation.Id;
@Data
@TableName(value = "customer_graphics")
public class CustomerGraphics implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
@TableId(value = "id", type = IdType.ID_WORKER)
@Id
private Long id;
......
......@@ -196,6 +196,10 @@ public class ReferralEntity implements Serializable {
@TableField(value = "config_name")
private String configName;
@TableField(exist = false)
@ApiModelProperty(value = "infoId")
private Long infoId;
public static final String COL_ID = "id";
public static final String COL_ACCOUNT_ID = "account_id";
......
......@@ -87,6 +87,12 @@ public class RegisterUserEntity implements Serializable {
@TableField(value = "customer_publish")
private Date customerPublish;
/**
* 延时客服发送时间
*/
@TableField(value = "in_package")
private String inPackage;
private static final long serialVersionUID = 1L;
......
package com.yaoyaozw.customer.feigns;
import com.yaoyaozw.customer.common.R;
import com.yaoyaozw.customer.entity.ReferralEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 推荐装客户端
*
* @author Admin
* @date 2022/10/09
*/
@FeignClient("referral-service-wgh")
public interface ReferralFeignClient {
/**
* 产品推荐
*
* @param referralEntity 推荐实体
* @return {@link R}
*/
@PostMapping("/getReferral")
R productReferral(@RequestBody ReferralEntity referralEntity);
}
package com.yaoyaozw.customer.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO;
import com.yaoyaozw.customer.entity.CustomerGraphics;
import com.yaoyaozw.customer.vo.customer.CustomerMessageListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author Admin
* @date 2022/10/08
*/
@Mapper
@DS("material")
public interface CustomerGraphicsMapper extends BaseMapper<CustomerGraphics> {
/**
* 页面列表
*
* @param queryDto 查询dto
* @return {@link List}<{@link CustomerMessageListVO}>
*/
List<CustomerMessageListVO> pageList(@Param("queryDto") CustomerMessageQueryDTO queryDto);
}
\ No newline at end of file
......@@ -33,5 +33,13 @@ public interface KanbanCommonMapper {
*/
List<Long> getSetupIdListFromStaticCondition(@Param("expressList") List<String> expressList);
/**
* 被表达存储类型
*
* @param expression 表达式
* @return {@link String}
*/
String getStoreTypeByExpression(@Param("expression") String expression);
}
package com.yaoyaozw.customer.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.vo.AuthInfoVO;
import com.yaoyaozw.customer.vo.CommonOptionResponseVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Set;
/**
* @author darker
* @date 2022/10/9 10:31
*/
@Repository
@DS("material")
public interface MaterialCommonMapper {
/**
* 获取存储列表
*
* @return {@link List}<{@link CommonOptionResponseVO}>
*/
List<CommonOptionResponseVO> getStoreList();
/**
* 获得身份验证信息列表
*
* @param accountSet 帐户设置
* @return {@link List}<{@link AuthInfoVO}>
*/
List<AuthInfoVO> getAuthInfoList(@Param("accountSet") Set<String> accountSet);
}
package com.yaoyaozw.customer.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yaoyaozw.customer.entity.ReferralEntity;
import com.yaoyaozw.customer.vo.referral.ReferralEntityVo;
......@@ -14,6 +15,7 @@ import java.util.List;
* @date 2022/10/08
*/
@Mapper
@DS("material")
public interface ReferralEntityMapper extends BaseMapper<ReferralEntity> {
/**
......
......@@ -29,11 +29,19 @@ public interface RegisterUserEntityMapper extends BaseMapper<RegisterUserEntity>
void updateUserPackageBelong(@Param("openId") String openId, @Param("packageBelong") String packageBelong);
/**
* 从包中获取用户列表(现在已经在人群包内的)
* 从包中获取公众号列表
*
* @param packageId 包id
* @return {@link List}<{@link RegisterUserEntity}>
*/
List<Long> getAuthListFromPackage(@Param("packageId") Long packageId);
/**
* 得到当前包用户列表中
*
* @param packageId 包id
* @return {@link List}<{@link CrowdPackageUserVO}>
*/
List<CrowdPackageUserVO> getCurrentInPackUserList(@Param("packageId") Long packageId);
}
\ No newline at end of file
package com.yaoyaozw.customer.service;
import com.github.pagehelper.PageInfo;
import com.yaoyaozw.customer.common.BaseResult;
import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO;
......@@ -8,6 +9,7 @@ import com.yaoyaozw.customer.dto.integration.IntegrationRequestDTO;
import com.yaoyaozw.customer.entity.CustomerGraphics;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yaoyaozw.customer.vo.customer.CustomerDelayListVO;
import com.yaoyaozw.customer.vo.customer.CustomerMessageDetailVO;
import com.yaoyaozw.customer.vo.customer.CustomerMessageListVO;
import java.util.List;
......@@ -33,10 +35,10 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> {
/**
* 更新客户信息
*
* @param saveDto 保存dto
* @param id 客服消息主键
* @return {@link BaseResult}
*/
BaseResult updateCustomerMessage(CustomerMessageSaveDTO saveDto);
GenericsResult<CustomerMessageDetailVO> getCustomerMessageDetail( Long id);
/**
......@@ -45,7 +47,7 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> {
* @param queryDto 查询dto
* @return {@link GenericsResult}<{@link List}<{@link CustomerDelayListVO}>>
*/
GenericsResult<List<CustomerMessageListVO>> pageList(CustomerMessageQueryDTO queryDto);
GenericsResult<PageInfo<CustomerMessageListVO>> pageList(CustomerMessageQueryDTO queryDto);
/**
* 删除客户信息
......@@ -55,6 +57,14 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> {
*/
BaseResult removeCustomerMessage(Long id);
/**
* 设置包
*
* @param id id
* @param packId 包id
* @return {@link BaseResult}
*/
BaseResult setPack(Long id, Long packId);
void sendCustomerMessage(IntegrationRequestDTO integrationRequestDTO);
......
package com.yaoyaozw.customer.service;
import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.vo.CommonOptionResponseVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -18,4 +20,10 @@ public interface CustomerServiceCommonService {
*/
List<Long> getSetupIdListFromStaticCondition(List<String> expressList);
/**
* 获取存储列表
*
* @return {@link GenericsResult}<{@link CommonOptionResponseVO}>
*/
GenericsResult<List<CommonOptionResponseVO>> getStoreList();
}
......@@ -20,13 +20,21 @@ public interface RegisterUserEntityService extends IService<RegisterUserEntity>{
List<CrowdPackageUserVO> getUserMatchDynamicExpress(List<String> dynamicExpressList, String openId);
/**
* 从包中获取用户列表(现在已经在人群包内的)
* 从包中获取公众号列表
*
* @param packageId 包id
* @return {@link List}<{@link RegisterUserEntity}>
*/
List<Long> getAccountIdListFromPackage(Long packageId);
/**
* 得到当前包用户列表中
*
* @param packageId 包id
* @return {@link List}<{@link CrowdPackageUserVO}>
*/
List<CrowdPackageUserVO> getCurrentInPackUserList(Long packageId);
}
......@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yaoyaozw.customer.common.BaseResult;
import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.components.CustomerServiceCommonAsyncComponent;
import com.yaoyaozw.customer.components.SnowflakeComponent;
import com.yaoyaozw.customer.components.TokenManager;
import com.yaoyaozw.customer.constants.CrowdPackageCommonConstant;
......@@ -63,6 +64,8 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
private RegisterUserEntityMapper userEntityMapper;
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private CustomerServiceCommonAsyncComponent asyncComponent;
@Override
......@@ -86,6 +89,9 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
boolean result = super.saveOrUpdate(crowdPackage);
// TODO: 2022/9/26 添加人群包人群的更新
if (result && ObjectUtil.isNotNull(name)) {
asyncComponent.addMatchUserIntoPackage(id, true);
}
return result ? new GenericsResult<>(new CrowdPackageCommonIdVO(crowdPackage.getId(), null)) : new GenericsResult<>(false, "新增人群包失败!");
}
......@@ -232,10 +238,10 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
@Override
public BaseResult updateUserPackageBatch(List<String> openIdList) {
List<CrowdPackage> packageList = super.list();
return null;
for (String openId : openIdList) {
this.updateUserPackageBelong(openId);
}
return new BaseResult().success();
}
/**
......
package com.yaoyaozw.customer.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.mapper.KanbanCommonMapper;
import com.yaoyaozw.customer.mapper.MaterialCommonMapper;
import com.yaoyaozw.customer.service.CustomerServiceCommonService;
import com.yaoyaozw.customer.vo.CommonOptionResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -18,6 +21,8 @@ public class CustomerServiceCommonServiceImpl implements CustomerServiceCommonSe
@Autowired
private KanbanCommonMapper kanbanCommonMapper;
@Autowired
private MaterialCommonMapper materialCommonMapper;
@Override
public List<Long> getSetupIdListFromStaticCondition(List<String> expressList) {
......@@ -26,4 +31,10 @@ public class CustomerServiceCommonServiceImpl implements CustomerServiceCommonSe
}
return kanbanCommonMapper.getSetupIdListFromStaticCondition(expressList);
}
@Override
public GenericsResult<List<CommonOptionResponseVO>> getStoreList() {
List<CommonOptionResponseVO> storeList = materialCommonMapper.getStoreList();
return new GenericsResult<>(storeList);
}
}
......@@ -41,4 +41,9 @@ public class RegisterUserEntityServiceImpl extends ServiceImpl<RegisterUserEntit
public List<Long> getAccountIdListFromPackage(Long packageId) {
return baseMapper.getAuthListFromPackage(packageId);
}
@Override
public List<CrowdPackageUserVO> getCurrentInPackUserList(Long packageId) {
return baseMapper.getCurrentInPackUserList(packageId);
}
}
package com.yaoyaozw.customer.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @author darker
* @date 2022/10/9 19:42
*/
@Data
public class AuthInfoVO implements Serializable {
private Long id;
private String accountId;
private String accountName;
private String storeType;
private String storeTypeName;
}
......@@ -23,7 +23,7 @@ public class CrowdPackageConditionVO implements Serializable {
private Long id;
@ApiModelProperty("条件key")
private String ConditionKey;
private String conditionKey;
@ApiModelProperty("条件名称")
private String conditionName;
......@@ -37,4 +37,7 @@ public class CrowdPackageConditionVO implements Serializable {
@ApiModelProperty("是否静态属性 0 - 否;1 - 是")
private Integer isStatic;
@ApiModelProperty("条件服务 为空不调接口")
private String sourceBaseService;
}
......@@ -25,4 +25,6 @@ public class CrowdPackageUserVO implements Serializable {
private String inPackage;
private String storeType;
}
package com.yaoyaozw.customer.vo.customer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yaoyaozw.customer.dto.customer.CustomerReferralDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author darker
* @date 2022/10/8 17:13
*/
@Data
public class CustomerMessageDetailVO implements Serializable {
@ApiModelProperty("客服消息id")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
@ApiModelProperty("标题")
private String name;
@ApiModelProperty("消息发送时间")
private String postTime;
@ApiModelProperty("是否支付 0-否 1-是")
private Integer isPay;
@ApiModelProperty("客服消息类型(图文、文本)")
private String type;
@ApiModelProperty("素材文本内容")
private String extendTitle;
@ApiModelProperty("素材图片路径")
private String coverUrl;
@ApiModelProperty("素材文本内容")
private String content;
@ApiModelProperty("链接相关内容")
private CustomerReferralDTO customerReferralDto;
}
package com.yaoyaozw.customer.vo.customer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yaoyaozw.customer.constants.CustomerCommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -14,10 +17,11 @@ public class CustomerMessageListVO implements Serializable {
private static final long serialVersionUID = -8057791504394044052L;
@ApiModelProperty("客服消息id")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
@ApiModelProperty("标题")
private String title;
private String name;
@ApiModelProperty("消息发送时间")
private String postTime;
......@@ -28,9 +32,6 @@ public class CustomerMessageListVO implements Serializable {
@ApiModelProperty("推广标题")
private String extendTitle;
@ApiModelProperty("推广类型")
private String extendType;
@ApiModelProperty("人群包id")
private Long packId;
......@@ -46,4 +47,7 @@ public class CustomerMessageListVO implements Serializable {
@ApiModelProperty("发送状态描述")
private String sendStatusStr;
public String getType() {
return CustomerCommonConstant.getCustomerType(this.type);
}
}
......@@ -17,4 +17,32 @@
<!--@mbg.generated-->
id, pack_id, post_time, create_user, gmt_create, modified_user, gmt_modified, is_deleted
</sql>
<select id="pageList" resultType="com.yaoyaozw.customer.vo.customer.CustomerMessageListVO">
select
cg.id,
cg.name,
cg.type,
cg.post_time as postTime,
cg.extend_title as extendTitle,
cg.send_status as sendStatus,
dic.dic_value as sendStatusStr,
cpm.id as packId,
cpm.package_name as packName,
cpm.crowd_num as peopleNum
from customer_graphics cg
left join crowd_package_main cpm
on cpm.id = cg.pack_id
left join sys_dictionary dic
on dic.dic_key = cg.send_status
and dic.group_id = 'CUSTOMER_SEND_STATUS'
and dic.level = 3
where cg.is_deleted = 0
</select>
</mapper>
\ No newline at end of file
......@@ -24,4 +24,13 @@
</foreach>
</where>
</select>
<select id="getStoreTypeByExpression" resultType="java.lang.String">
select
store_type
from store_entity
${expression}
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yaoyaozw.customer.mapper.MaterialCommonMapper">
<select id="getStoreList" resultType="com.yaoyaozw.customer.vo.CommonOptionResponseVO">
select
`value` as `key`,
explanation as `name`
from account_dictionary
where type = 'StoreType'
</select>
<select id="getAuthInfoList" resultType="com.yaoyaozw.customer.vo.AuthInfoVO">
select
ai.id, ai.account_id as accountId,
ai.nick_name as accountName,
ai.store_type as storeType,
se.store_name as storeTypeName
from authorizer_info ai
left join store_entity se
on ai.store_type = se.store_type
where ai.account_id in
<foreach collection="accountSet" item="accountId" separator="," open="(" close=")">
#{accountId}
</foreach>
</select>
</mapper>
\ No newline at end of file
......@@ -27,7 +27,8 @@
ai.account_id as accountId,
rue.setup_id as setupId,
rue.open_id as openId,
rue.in_package as inPackage
rue.in_package as inPackage,
ai.store_type as storeType
from register_user_entity rue
......@@ -65,8 +66,23 @@
where find_in_set(#{packageId}, in_package)
</select>
<select id="getCurrentInPackUserList" resultType="com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO">
select
rue.id,
ai.account_id as accountId,
rue.setup_id as setupId,
rue.open_id as openId,
rue.in_package as inPackage,
ai.store_type as storeType,
rue.app_id as appId
from register_user_entity rue
left join authorizer_info ai
on rue.app_id = ai.appid
where find_in_set(#{packageId}, rue.in_package)
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论