Commit d3aedd1d by daixing

Merge branch 'master' of ssh://begitlab.chubanyun.me:12122/rays/pcloud-book into dx-C1000884

parents 71c1c16c e2e0c6ee
......@@ -17,6 +17,11 @@ import java.util.Map;
public class BookConstant {
/**
* 微信小号每天拉人次数缓存前缀
*/
public static final String WXGROUP_ADD_USER_NUM = CacheConstant.BOOK + "WXGROUP_ADD_USER_NUM:";
/**
* 图书基础缓存前缀名称
*/
public static final String BOOK_CACHE = CacheConstant.BOOK + "BOOK:";
......
package com.pcloud.book.group.dto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @Description
* @Author ruansiyuan
* @Date 2019/8/12 14:57
**/
public class GroupCipherDTO implements Serializable {
private static final long serialVersionUID = 4254978072223600943L;
@ApiModelProperty("密码")
private String cipher;
@ApiModelProperty("分类id")
private Long classifyId;
@ApiModelProperty("创建人")
private Long wechatUserId;
@ApiModelProperty("使用人微信id")
private String wxId;
@ApiModelProperty("是否使用")
private Boolean hasUsed;
@ApiModelProperty("机器人id")
private String altId;
public String getCipher() {
return cipher;
}
public void setCipher(String cipher) {
this.cipher = cipher;
}
public Long getClassifyId() {
return classifyId;
}
public void setClassifyId(Long classifyId) {
this.classifyId = classifyId;
}
public Long getWechatUserId() {
return wechatUserId;
}
public void setWechatUserId(Long wechatUserId) {
this.wechatUserId = wechatUserId;
}
public String getWxId() {
return wxId;
}
public void setWxId(String wxId) {
this.wxId = wxId;
}
public Boolean getHasUsed() {
return hasUsed;
}
public void setHasUsed(Boolean hasUsed) {
this.hasUsed = hasUsed;
}
public String getAltId() {
return altId;
}
public void setAltId(String altId) {
this.altId = altId;
}
@Override
public String toString() {
return "GroupCipherDTO{" +
"cipher='" + cipher + '\'' +
", classifyId=" + classifyId +
", wechatUserId=" + wechatUserId +
", wxId='" + wxId + '\'' +
", hasUsed=" + hasUsed +
", altId='" + altId + '\'' +
'}';
}
}
......@@ -54,6 +54,10 @@ public class GroupClassifyQrcodeDTO implements Serializable {
* 是否开启群学习报告
*/
private Boolean hasOpenLearningReport;
/**
* 进群方式:1群二维码,2客服机器人
*/
private Integer joinGroupType;
public Long getBookId() {
return bookId;
......@@ -135,6 +139,14 @@ public class GroupClassifyQrcodeDTO implements Serializable {
this.hasOpenLearningReport = hasOpenLearningReport;
}
public Integer getJoinGroupType() {
return joinGroupType;
}
public void setJoinGroupType(Integer joinGroupType) {
this.joinGroupType = joinGroupType;
}
@Override
public String toString() {
return "GroupClassifyQrcodeDTO{" +
......@@ -148,6 +160,7 @@ public class GroupClassifyQrcodeDTO implements Serializable {
", price=" + price +
", qrCodeUrl='" + qrCodeUrl + '\'' +
", hasOpenLearningReport=" + hasOpenLearningReport +
", joinGroupType=" + joinGroupType +
'}';
}
}
package com.pcloud.book.group.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @Description
* @Author ruansiyuan
* @Date 2019/8/7 9:26
**/
@ApiModel("群使用情况模型")
public class GroupUseDTO implements Serializable {
@ApiModelProperty("已使用")
private Integer hasUsed;
@ApiModelProperty("未使用")
private Integer notUsed;
public Integer getHasUsed() {
return hasUsed;
}
public void setHasUsed(Integer hasUsed) {
this.hasUsed = hasUsed;
}
public Integer getNotUsed() {
return notUsed;
}
public void setNotUsed(Integer notUsed) {
this.notUsed = notUsed;
}
@Override
public String toString() {
return "GroupUseDTO{" +
"hasUsed=" + hasUsed +
", notUsed=" + notUsed +
'}';
}
}
package com.pcloud.book.group.dto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @Description
* @Author ruansiyuan
* @Date 2019/8/7 11:23
**/
public class LargeTempletDTO implements Serializable {
private static final long serialVersionUID = -5982946901202138966L;
@ApiModelProperty("大类")
private Integer largeTemplet;
@ApiModelProperty("名称")
private String name;
public Integer getLargeTemplet() {
return largeTemplet;
}
public void setLargeTemplet(Integer largeTemplet) {
this.largeTemplet = largeTemplet;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "LargeTempletDTO{" +
"largeTemplet=" + largeTemplet +
", name='" + name + '\'' +
'}';
}
}
package com.pcloud.book.group.dto;
import java.io.Serializable;
/**
* @author 戴兴
* @description TODO
* @date 2019/8/7 17:13
*/
public class PersonalQrcodeDTO implements Serializable {
private String newQrcodeUrl;
private String oldQrcodeUrl;
public String getNewQrcodeUrl() {
return newQrcodeUrl;
}
public void setNewQrcodeUrl(String newQrcodeUrl) {
this.newQrcodeUrl = newQrcodeUrl;
}
public String getOldQrcodeUrl() {
return oldQrcodeUrl;
}
public void setOldQrcodeUrl(String oldQrcodeUrl) {
this.oldQrcodeUrl = oldQrcodeUrl;
}
@Override
public String toString() {
return "PersonalQrcodeDTO{" +
"newQrcodeUrl='" + newQrcodeUrl + '\'' +
", oldQrcodeUrl='" + oldQrcodeUrl + '\'' +
'}';
}
}
\ No newline at end of file
......@@ -58,7 +58,13 @@ public interface BookGroupClassifyService {
@PostMapping("filterDeleteId")
ResponseEntity<ResponseDto<List<Long>>> filterDeleteId(@RequestBody List<String >wxGroupIdList);
@ApiOperation("获取用户支付金额")
@GetMapping("getPayPrice")
ResponseEntity<ResponseDto<BigDecimal>> getPayPrice(@RequestParam("qrcodeId") Long qrcodeId, @RequestParam("wxUserId") String wxUserId);
@ApiOperation("获取群分类个数")
@PostMapping("getGroupClassifyCount")
ResponseEntity<ResponseDto<Map<Long, BookClassifyDTO>>> getGroupClassifyCount(@RequestBody List<Long> bookIds);
}
......@@ -3,13 +3,21 @@ package com.pcloud.book.group.service;
import java.util.List;
import java.util.Map;
import com.pcloud.book.group.dto.PersonalQrcodeDTO;
import com.pcloud.book.group.dto.GroupCipherDTO;
import com.pcloud.book.group.dto.GroupUseDTO;
import com.pcloud.book.group.dto.ResourceBrowseParamDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import com.pcloud.book.group.dto.BookGroupDTO;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.dto.StoreFlowInfoDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.page.PageBeanNew;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -29,12 +37,48 @@ public interface BookGroupService {
@RequestMapping(value = "getBookGroupInfoByIds", method = RequestMethod.POST)
ResponseEntity<ResponseDto<Map<Long, BookGroupDTO>>> getBookGroupInfoByIds(@RequestBody List<Long> bookGroupIds) throws BizException;
@ApiOperation("为信息流批量获取社群书基本信息")
@RequestMapping(value = "getFlowInfoByBookGroupIds", method = RequestMethod.POST)
ResponseEntity<ResponseDto<Map<Long, StoreFlowInfoDto>>> getFlowInfoByBookGroupIds(@RequestBody List<Long> bookGroupIds) throws BizException;
@ApiOperation("获取指定条数社群书基本信息")
@RequestMapping(value = "getBookGroupInfoByChannelId",method = RequestMethod.GET)
ResponseEntity<ResponseDto<Map<Long, StoreFlowInfoDto>>> getBookGroupInfoByChannelId(@RequestParam("channelId")Long channelId, @RequestParam("itemNum")Integer itemNum) throws BizException;
@ApiOperation(value = "知识商城获取社群书信息")
@RequestMapping(value = "listBookGroup4KnowledgeMall",method = RequestMethod.GET)
ResponseEntity<ResponseDto<PageBeanNew<StoreFlowInfoDto>>> listBookGroup4KnowledgeMall(@RequestParam(value="channelId",required = false)Long channelId,
@RequestParam("currentPage")int currentPage,
@RequestParam("numPerPage") int numPerPage) throws BizException;
@ApiOperation("获取社群书基本信息")
@RequestMapping(value = "getBaseInfoBySceneId",method = RequestMethod.GET)
ResponseEntity<ResponseDto<BookGroupDTO>> getBaseInfoBySceneId(@RequestParam("sceneId")Long sceneId) throws BizException;
@ApiOperation("更新个人二维码")
@RequestMapping(value = "updatePersonQrcode",method = RequestMethod.POST)
void updatePersonQrcode(@RequestBody PersonalQrcodeDTO personalQrcodeDTO) throws BizException;
@ApiOperation("获取暗号状态")
@GetMapping("/getCipherState")
ResponseEntity<ResponseDto<Integer>> getCipherState(@RequestParam("cipher")String cipher) throws BizException;
@ApiOperation("更新暗号状态为已使用")
@GetMapping("/updateCipherStateToUsed")
void updateCipherStateToUsed(@RequestParam("cipher")String cipher, @RequestParam("wxId")String wxId) throws BizException;
@ApiOperation("获取个人二维码方式群已使用和未使用数量")
@PostMapping("/getGroupUse")
ResponseEntity<ResponseDto<GroupUseDTO>> getGroupUse(@RequestBody List<String> altIds) throws BizException;
@ApiOperation("获取暗号基本信息")
@GetMapping("/getJoinGroupCipher")
ResponseEntity<ResponseDto<GroupCipherDTO>> getJoinGroupCipher(@RequestParam("cipher")String cipher) throws BizException;
@ApiOperation("获取资源浏览数据")
@PostMapping("getResourcesBrowseCount")
ResponseEntity<ResponseDto<Map<Long, Long>>> getResourcesBrowseCount(@RequestBody ResourceBrowseParamDto resourceBrowseParamDto);
}
......@@ -83,6 +83,10 @@ public interface WeixinQrcodeService {
@RequestMapping(value = "getGroupVersionIp", method = RequestMethod.POST)
ResponseEntity<ResponseDto<Map<String, BookWxQrcodeDTO>>> getGroupVersionIp(@RequestBody List<String> wxGroupIds);
@ApiOperation(value = "通过群分类id获取微信群id", httpMethod = "GET")
@RequestMapping(value = "getWxGroupId", method = RequestMethod.GET)
ResponseEntity<ResponseDto<String>> getWxGroupId(@RequestParam("classifyId") Long classifyId);
}
package com.pcloud.book.riddle;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.Map;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* @描述:猜谜语接口
* @作者:zhuyajie
* @创建时间:16:24 2019/8/5
* @版本:1.0
*/
@FeignClient(value = "pcloud-service-book", qualifier = "riddleServiceCloud", path = "book/v1.0/riddleService")
@Api(description = "猜谜语接口")
public interface RiddleService {
@ApiOperation(value = "定时器调用游戏结束接口", httpMethod = "POST")
@RequestMapping(value = "/riddleEndQuartz", method = RequestMethod.POST)
public void riddleEndQuartz(@RequestBody Map<String, Object> map);
}
package com.pcloud.book.riddle.constants;
/**
* @描述:猜谜语常量
* @作者:zhuyajie
* @创建时间:17:36 2019/7/29
* @版本:1.0
*/
public class RiddleConstant {
/**
* 10s
*/
public static Integer expire_seconds = 12;
/**
* 定时器类型名称
*/
public static final String JOB_GROUP_RIDDLE = "riddle";
/**
* 到期定时器方法名
*/
public static final String JOB_NAME_RIDDLE_EXPIRE = "judgeRiddleTime";
}
package com.pcloud.book.riddle.enums;
/**
* @描述:猜谜进度状态
* @作者:zhuyajie
* @创建时间:10:14 2019/7/25
* @版本:1.0
*/
public enum RiddleRecordStatusEnum {
/**
* 开始
*/
begin(0),
/**
*结束
*/
end(1),
/**
*进行中
*/
underway(2);
private Integer code;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
RiddleRecordStatusEnum(Integer code) {
this.code = code;
}
}
package com.pcloud.book.riddle.enums;
/**
* @描述:回复文案类型
* @作者:zhuyajie
* @创建时间:16:56 2019/7/24
* @版本:1.0
*/
public enum RiddleReplyTypeEnum {
/**
* 游戏规则
*/
rule("rule"),
/**
* 无人回复的结束语
*/
no_reply_end("no_reply_end"),
/**
* 答完全部题结束语
*/
finish_end("finish_end"),
/**
* 中途回复关键词
*/
midway_in("midway_in"),
/**
* 答对
*/
correct("correct"),
/**
* 答错
*/
incorrect("incorrect"),
/**
* 部分正确
*/
partly_correct("partly_correct");
private String code;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
RiddleReplyTypeEnum(String code) {
this.code = code;
}
}
......@@ -198,4 +198,27 @@ public class BookApplication {
public Binding wxGroupLearningReportBind() {
return RabbitMQFactory.bindingExchange(wxGroupLearningReportQueue(), MQTopicProducer.WXGROUP_LEARNING_REPORT);
}
/**
* 微信个人机器人同意加好友
*/
@Bean
public Queue wxGroupAgreeAddUserQueue() {
return RabbitMQFactory.queueBuilder(MQTopicConumer.WX_AGREE_ADD_USER);
}
@Bean
public Binding wxGroupAgreeAddUserBind() {
return RabbitMQFactory.bindingExchange(wxGroupAgreeAddUserQueue(), MQTopicProducer.WX_AGREE_ADD_USER);
}
@Bean
public Queue wxGroupUserBindQueue(){
return RabbitMQFactory.queueBuilder(MQTopicConumer.CONSUMER_WXGROUP_USER_BIND);
}
@Bean
public Binding wxGroupUserBindBind(){
return RabbitMQFactory.bindingExchange(wxGroupUserBindQueue(), MQTopicProducer.WXGROUP_USER_BIND);
}
}
package com.pcloud.book.adnews.biz;
import com.pcloud.book.adnews.entity.AdNews;
import com.pcloud.book.adnews.entity.AdNewsSet;
import com.pcloud.book.adnews.entity.*;
import com.pcloud.book.adnews.dto.AdNewsListParam;
import com.pcloud.book.adnews.vo.AdNewsGroupRecordVO;
import com.pcloud.book.adnews.vo.AdNewsMessageStatisticVO;
import com.pcloud.common.page.PageBeanNew;
import java.util.List;
......@@ -40,10 +42,86 @@ public interface AdNewsBiz {
/**
* 获取素材库列表
*/
PageBeanNew<AdNews> getAdNewsList(String title, Long partyId, Integer currentPage, Integer numPerPage);
PageBeanNew<AdNews> getAdNewsList(AdNewsListParam adNewsListParam);
/**
* 获取编辑已选取的素材库列表
*/
PageBeanNew<AdNews> getAdNewsChooseList(Long partyId, String title, Boolean hasUsed, Integer currentPage, Integer numPerPage);
/**
* 禁用/允许推送
* @param partyId
* @param adNewsId
* @param hasBan
*/
void saveAdNewsBan( Long partyId, Long adNewsId, Integer hasBan);
/**
* 增加公众号反馈
* @param adNewsWechat
* @return
*/
Long addAdNewsWechat(AdNewsWechat adNewsWechat);
/**
* 获取所有的公众号列表
* @param currentPage
* @param numPerPage
* @return
*/
PageBeanNew<AdNewsWechat> getAdNewsWechatList(Integer currentPage, Integer numPerPage);
/**
* 获取编辑已选择的公众号列表
* @param partyId
* @param currentPage
* @param numPerPage
*/
PageBeanNew<AdNewsWechat> getAdNewsWechatChooseList(Long partyId, Integer currentPage, Integer numPerPage);
/**
* 编辑添加选择的公众号
* @param adNewsWechatIds
* @param partyId
*/
void createAdNewsWechatChooseBatch(List<Long> adNewsWechatIds, Long partyId);
/**
* 编辑移除选择的公众号
* @param adNewsWechatId
* @param partyId
*/
void deleteAdNewsWechatChoose(Long adNewsWechatId, Long partyId);
/**
* 获取早晚报发送记录
* @param partyId
* @param title
* @param beginTime
* @param endTime
* @param proLabelId 专业
* @param depLabelId 深度
* @param purLabelId 目的
* @param currentPage
* @param numPerPage
* @return
*/
PageBeanNew<AdNewsMessageStatisticVO> getAdNewsMessageStatistic(Long partyId, String title, String beginTime, String endTime, Long proLabelId, Long depLabelId, Long purLabelId, Integer currentPage, Integer numPerPage);
/**
* 查询早晚报发送详情
* @param partyId
* @param messageStatisticId
* @return
*/
List<AdNewsGroupRecordVO> getAdNewsGroupRecord(Long partyId, Long messageStatisticId);
/**
* 记录用户点击量
* @param adNewsClickRecord
* @return
*/
Long addAdNewsClickRecord(AdNewsClickRecord adNewsClickRecord);
}
package com.pcloud.book.adnews.check;
import com.google.common.base.Enums;
import com.pcloud.book.adnews.entity.AdNewsGroup;
import com.pcloud.book.adnews.entity.AdNewsSet;
import com.pcloud.book.adnews.enums.AdContentFromEnum;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.NumberUtil;
import com.pcloud.common.utils.string.StringUtil;
import org.springframework.stereotype.Component;
......@@ -16,49 +19,52 @@ import org.springframework.stereotype.Component;
public class AdNewsCheck {
public void createAdNewsSetCheck(AdNewsSet adNewsSet){
if (adNewsSet==null){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"参数错误");
public void createAdNewsSetCheck(AdNewsSet adNewsSet) {
if (adNewsSet == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数错误");
}
if (ListUtils.isEmpty(adNewsSet.getAdNewsGroups())){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"发送群分类不能为空!");
if (ListUtils.isEmpty(adNewsSet.getAdNewsGroups())) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "发送群分类不能为空!");
}
if (adNewsSet.getSendCount()==null||adNewsSet.getSendCount()<=0){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"推送条数不能为空且必须大于0!");
if (adNewsSet.getSendCount() == null || adNewsSet.getSendCount() <= 0) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "推送条数不能为空且必须大于0!");
}
if (adNewsSet.getHasMorningOpen()==null){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"是否开启早报不能为空!");
if (adNewsSet.getHasMorningOpen() == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "是否开启早报不能为空!");
}
if (adNewsSet.getHasEveningOpen()==null){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"是否开启晚报不能为空!");
if (adNewsSet.getHasEveningOpen() == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "是否开启晚报不能为空!");
}
if (adNewsSet.getHasStartContent()==null){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"是否开启开场语不能为空!");
if (adNewsSet.getHasStartContent() == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "是否开启开场语不能为空!");
}
if (adNewsSet.getHasEndContent()==null){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"是否开启结束语不能为空!");
if (adNewsSet.getHasEndContent() == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "是否开启结束语不能为空!");
}
if (adNewsSet.getHasMorningOpen()&&StringUtil.isEmpty(adNewsSet.getMorningTime())){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"早报时间不能为空!");
if (adNewsSet.getHasMorningOpen() && StringUtil.isEmpty(adNewsSet.getMorningTime())) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "早报时间不能为空!");
}
if (adNewsSet.getHasEveningOpen()&&StringUtil.isEmpty(adNewsSet.getEveningTime())){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"晚报时间不能为空!");
if (adNewsSet.getHasEveningOpen() && StringUtil.isEmpty(adNewsSet.getEveningTime())) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "晚报时间不能为空!");
}
if (adNewsSet.getHasStartContent()&&StringUtil.isEmpty(adNewsSet.getStartContent())){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"开场语不能为空!");
if (adNewsSet.getHasStartContent() && StringUtil.isEmpty(adNewsSet.getStartContent())) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "开场语不能为空!");
}
if (adNewsSet.getHasEndContent()&&StringUtil.isEmpty(adNewsSet.getEndContent())){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"结束语不能为空!");
if (adNewsSet.getHasEndContent() && StringUtil.isEmpty(adNewsSet.getEndContent())) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "结束语不能为空!");
}
for(AdNewsGroup adNewsGroup:adNewsSet.getAdNewsGroups()){
if (adNewsGroup==null){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"早晚报关联不能为空!");
if (adNewsSet.getContentFrom() != AdContentFromEnum.WECHAT.key && adNewsSet.getContentFrom() != AdContentFromEnum.CUSTOM.key) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "请选择早晚报内容来源!");
}
for (AdNewsGroup adNewsGroup : adNewsSet.getAdNewsGroups()) {
if (adNewsGroup == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "早晚报关联不能为空!");
}
if (adNewsGroup.getClassifyId()==null){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"群分类id不能为空!");
if (adNewsGroup.getClassifyId() == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "群分类id不能为空!");
}
if (adNewsGroup.getBookGroupId()==null){
throw new BookBizException(BookBizException.PARAM_IS_ERROR,"社群码id不能为空!");
if (adNewsGroup.getBookGroupId() == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "社群码id不能为空!");
}
}
......
package com.pcloud.book.adnews.dao;
import com.pcloud.book.adnews.entity.AdNewsBan;
import com.pcloud.common.core.dao.BaseDao;
/**
* @author zhengyongqiang
* @date 2019/8/12 15:12
*/
public interface AdNewsBanDao extends BaseDao<AdNewsBan> {
void deleteByAdNewsId(Long partyId,Long adNewsId);
}
package com.pcloud.book.adnews.dao;
import com.pcloud.book.adnews.entity.AdNewsClickRecord;
import com.pcloud.common.core.dao.BaseDao;
/**
* @author zhengyongqiang
* @date 2019/8/15 11:10
*/
public interface AdNewsClickRecordDao extends BaseDao<AdNewsClickRecord> {
}
......@@ -6,9 +6,15 @@ import com.pcloud.common.core.dao.BaseDao;
import java.util.List;
public interface AdNewsGroupDao extends BaseDao<AdNewsGroup> {
Integer batchInsert(List<AdNewsGroup> adNewsGroups);
void deleteByAdNewsSetId(Long adNewsSetId);
/**
* 获取勾选关联的社群
* @param adNewsSetId
* @return
*/
List<AdNewsGroup> getListByAdNewsSetId(Long adNewsSetId);
}
package com.pcloud.book.adnews.dao;
import com.pcloud.book.adnews.entity.AdNewsGroupRecord;
import com.pcloud.book.adnews.vo.AdNewsGroupRecordVO;
import com.pcloud.common.core.dao.BaseDao;
import java.util.List;
......@@ -12,4 +13,6 @@ import java.util.List;
**/
public interface AdNewsGroupRecordDao extends BaseDao<AdNewsGroupRecord> {
Integer batchInsert(List<AdNewsGroupRecord> adNewsGroupRecords);
List<AdNewsGroupRecordVO> getAdNewsGroupRecord(Long partyId, Long messageStatisticId);
}
package com.pcloud.book.adnews.dao;
import com.pcloud.book.adnews.entity.AdNewsMessageStatistic;
import com.pcloud.common.core.dao.BaseDao;
import com.pcloud.common.page.PageBeanNew;
import java.util.List;
/**
* @author zhengyongqiang
* @date 2019/8/13 19:05
*/
public interface AdNewsMessageStatisticDao extends BaseDao<AdNewsMessageStatistic> {
Integer batchInsert(List<AdNewsMessageStatistic> list);
}
package com.pcloud.book.adnews.dao;
import com.pcloud.book.adnews.entity.AdNewsChoose;
import com.pcloud.book.adnews.entity.AdNewsWechatChoose;
import com.pcloud.common.core.dao.BaseDao;
import java.util.List;
/**
* @author zhengyongqiang
* @date 2019/8/7 11:47
*/
public interface AdNewsWechatChooseDao extends BaseDao<AdNewsWechatChoose> {
Integer batchInsert(List<AdNewsWechatChoose> adNewsWechatChooses);
void deleteAdNewsWechatChooseById(Long adNewsWechatId, Long partyId);
void deleteAdNewsWechatChooseByPartyId(Long partyId);
Integer getCountByAdNewsWechatIdsAndPartyId(List<Long> adNewsIds, Long partyId);
}
package com.pcloud.book.adnews.dao;
import com.pcloud.book.adnews.entity.AdNewsWechat;
import com.pcloud.common.core.dao.BaseDao;
/**
* @author zhengyongqiang
* @date 2019/8/7 11:46
*/
public interface AdNewsWechatDao extends BaseDao<AdNewsWechat> {
}
package com.pcloud.book.adnews.dao.impl;
import com.pcloud.book.adnews.dao.AdNewsBanDao;
import com.pcloud.book.adnews.entity.AdNewsBan;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.Map;
/**
* @author zhengyongqiang
* @date 2019/8/12 15:11
*/
@Repository("adnewsBanDao")
public class AdNewsBanDaoImpl extends BaseDaoImpl<AdNewsBan> implements AdNewsBanDao {
@Override
public void deleteByAdNewsId(Long partyId, Long adNewsId) {
Map<String,Object> map = new HashMap<>();
map.put("partyId",partyId);
map.put("adNewsId",adNewsId);
super.getSqlSession().delete(getStatement("deleteByAdNewsId"),map);
}
}
package com.pcloud.book.adnews.dao.impl;
import com.pcloud.book.adnews.dao.AdNewsClickRecordDao;
import com.pcloud.book.adnews.entity.AdNewsClickRecord;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;
/**
* @author zhengyongqiang
* @date 2019/8/15 11:10
*/
@Repository("adNewsClickRecordDao")
public class AdNewsClickRecordDaoImpl extends BaseDaoImpl<AdNewsClickRecord> implements AdNewsClickRecordDao {
}
......@@ -2,10 +2,13 @@ package com.pcloud.book.adnews.dao.impl;
import com.pcloud.book.adnews.dao.AdNewsGroupRecordDao;
import com.pcloud.book.adnews.entity.AdNewsGroupRecord;
import com.pcloud.book.adnews.vo.AdNewsGroupRecordVO;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description
......@@ -18,4 +21,12 @@ public class AdNewsGroupRecordDaoImpl extends BaseDaoImpl<AdNewsGroupRecord> imp
public Integer batchInsert(List<AdNewsGroupRecord> list) {
return super.getSqlSession().insert(getStatement("batchInsert"), list);
}
@Override
public List<AdNewsGroupRecordVO> getAdNewsGroupRecord(Long partyId, Long messageStatisticId) {
Map<String,Object> map = new HashMap<>();
map.put("partyId",partyId );
map.put("messageStatisticId",messageStatisticId );
return super.getSqlSession().selectList(getStatement("getAdNewsGroupRecord"),map);
}
}
package com.pcloud.book.adnews.dao.impl;
import com.pcloud.book.adnews.dao.AdNewsMessageStatisticDao;
import com.pcloud.book.adnews.entity.AdNewsGroupRecord;
import com.pcloud.book.adnews.entity.AdNewsMessageStatistic;
import com.pcloud.common.core.dao.BaseDaoImpl;
import com.pcloud.common.page.PageBeanNew;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author zhengyongqiang
* @date 2019/8/13 19:05
*/
@Repository("adNewsMessageStatisticDao")
public class AdNewsMessageStatisticDaoImpl extends BaseDaoImpl<AdNewsMessageStatistic> implements AdNewsMessageStatisticDao {
@Override
public Integer batchInsert(List<AdNewsMessageStatistic> list) {
return super.getSqlSession().insert(getStatement("batchInsert"), list);
}
}
package com.pcloud.book.adnews.dao.impl;
import com.pcloud.book.adnews.dao.AdNewsWechatChooseDao;
import com.pcloud.book.adnews.entity.AdNewsWechatChoose;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author zhengyongqiang
* @date 2019/8/7 11:52
*/
@Repository("adNewsWechatChooseDao")
public class AdNewsWechatChooseDaoImpl extends BaseDaoImpl<AdNewsWechatChoose> implements AdNewsWechatChooseDao {
@Override
public Integer batchInsert(List<AdNewsWechatChoose> adNewsWechatChooses) {
return super.getSqlSession().insert(getStatement("batchInsert"),adNewsWechatChooses);
}
@Override
public void deleteAdNewsWechatChooseById(Long adNewsWechatId, Long partyId) {
Map<String, Object> map = new HashMap<>();
map.put("adNewsWechatId", adNewsWechatId);
map.put("partyId", partyId);
super.getSqlSession().delete(getStatement("deleteAdNewsWechatChooseById"), map);
}
@Override
public void deleteAdNewsWechatChooseByPartyId(Long partyId) {
Map<String, Object> map = new HashMap<>();
map.put("partyId", partyId);
super.getSqlSession().delete(getStatement("deleteAdNewsWechatChooseByPartyId"), map);
}
@Override
public Integer getCountByAdNewsWechatIdsAndPartyId(List<Long> adNewsWechatIds, Long partyId) {
Map<String, Object> map = new HashMap<>();
map.put("adNewsWechatIds", adNewsWechatIds);
map.put("partyId", partyId);
return super.getSqlSession().selectOne(getStatement("getCountByAdNewsWechatIdsAndPartyId"), map);
}
}
package com.pcloud.book.adnews.dao.impl;
import com.pcloud.book.adnews.dao.AdNewsWechatDao;
import com.pcloud.book.adnews.entity.AdNewsWechat;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;
/**
* @author zhengyongqiang
* @date 2019/8/7 11:52
*/
@Repository("adNewsWechatDao")
public class AdNewsWechatDaoImpl extends BaseDaoImpl<AdNewsWechat> implements AdNewsWechatDao {
}
package com.pcloud.book.adnews.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
/**
* @author zhengyongqiang
* @date 2019/8/12 11:33
*/
@Data
@ApiModel("查询素材列表")
public class AdNewsListParam {
@ApiModelProperty("当前人")
private Long partyId;
@ApiModelProperty ("标题")
private String title;
@ApiModelProperty("开始时间")
private String beginTime;
@ApiModelProperty("结束时间")
private String endTime;
@ApiModelProperty ("公众号id")
private List<Long> adNewsWechatIds;
@ApiModelProperty("已被禁用;0:没禁用; 1:已禁用;")
private Integer hasBan;
@ApiModelProperty("使用状态;0:未使用; 1:已使用;")
private Integer hasUsed;
@ApiModelProperty("当前页")
private Integer currentPage;
@ApiModelProperty("每页展示条数")
private Integer numPerPage;
}
......@@ -38,6 +38,12 @@ public class AdNews extends BaseEntity {
@ApiModelProperty("是否使用")
private Boolean hasUsed;
@ApiModelProperty("是否禁用")
private Boolean hasBan ;
@ApiModelProperty("公众号")
private String wechatName;
public String getType() {
return type;
}
......@@ -102,6 +108,22 @@ public class AdNews extends BaseEntity {
this.hasUsed = hasUsed;
}
public Boolean getHasBan() {
return hasBan;
}
public void setHasBan(Boolean hasBan) {
this.hasBan = hasBan;
}
public String getWechatName() {
return wechatName;
}
public void setWechatName(String wechatName) {
this.wechatName = wechatName;
}
@Override
public String toString() {
return "AdNews{" +
......@@ -113,6 +135,8 @@ public class AdNews extends BaseEntity {
", shortUrl='" + shortUrl + '\'' +
", newsDate='" + newsDate + '\'' +
", hasUsed=" + hasUsed +
"} " + super.toString();
", hasBan=" + hasBan +
", wechatName='" + wechatName + '\'' +
'}';
}
}
package com.pcloud.book.adnews.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhengyongqiang
* @date 2019/8/12 15:13
*/
@ApiModel("禁止推送")
@Data
public class AdNewsBan extends BaseEntity {
private static final long serialVersionUID = -5102664638916548405L;
@ApiModelProperty("编辑id")
private Long adviserId;
@ApiModelProperty("新闻id")
private Long adNewsId;
}
package com.pcloud.book.adnews.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhengyongqiang
* @date 2019/8/15 11:02
*/
@Data
@ApiModel("记录点击量")
public class AdNewsClickRecord extends BaseEntity {
private static final long serialVersionUID = -3879628889314992714L;
@ApiModelProperty("微信统计记录id")
private Long messageStatisticId;
@ApiModelProperty("微信记录详情id")
private Long groupRecordId;
@ApiModelProperty("微信用户id")
private Long wechatUserId;
}
......@@ -3,12 +3,14 @@ package com.pcloud.book.adnews.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Description
* @Author ruansiyuan
* @Date 2019/7/17 15:20
**/
@Data
@ApiModel("编辑新闻群关联")
public class AdNewsGroup extends BaseEntity {
......@@ -32,63 +34,7 @@ public class AdNewsGroup extends BaseEntity {
@ApiModelProperty("修改人")
private Long updateUser;
public Long getClassifyId() {
return classifyId;
}
@ApiModelProperty("分类")
private String classify;
public void setClassifyId(Long classifyId) {
this.classifyId = classifyId;
}
public Long getBookGroupId() {
return bookGroupId;
}
public void setBookGroupId(Long bookGroupId) {
this.bookGroupId = bookGroupId;
}
public Long getAdNewsSetId() {
return adNewsSetId;
}
public void setAdNewsSetId(Long adNewsSetId) {
this.adNewsSetId = adNewsSetId;
}
public Boolean getIsDelete() {
return isDelete;
}
public void setIsDelete(Boolean isDelete) {
this.isDelete = isDelete;
}
public Long getCreateUser() {
return createUser;
}
public void setCreateUser(Long createUser) {
this.createUser = createUser;
}
public Long getUpdateUser() {
return updateUser;
}
public void setUpdateUser(Long updateUser) {
this.updateUser = updateUser;
}
@Override
public String toString() {
return "AdNewsGroup{" +
"classifyId=" + classifyId +
", bookGroupId=" + bookGroupId +
", adNewsSetId=" + adNewsSetId +
", isDelete=" + isDelete +
", createUser=" + createUser +
", updateUser=" + updateUser +
"} " + super.toString();
}
}
......@@ -3,6 +3,7 @@ package com.pcloud.book.adnews.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Description
......@@ -10,10 +11,14 @@ import io.swagger.annotations.ApiModelProperty;
* @Date 2019/7/17 15:55
**/
@ApiModel("编辑新闻发送记录")
@Data
public class AdNewsGroupRecord extends BaseEntity{
private static final long serialVersionUID = -3271071194854381077L;
@ApiModelProperty("消息统计表id")
private Long messageStatisticId;
@ApiModelProperty("群id")
private Long qrcodeId;
......@@ -35,72 +40,12 @@ public class AdNewsGroupRecord extends BaseEntity{
@ApiModelProperty("修改人")
private Long updateUser;
public Long getQrcodeId() {
return qrcodeId;
}
public void setQrcodeId(Long qrcodeId) {
this.qrcodeId = qrcodeId;
}
public Long getClassifyId() {
return classifyId;
}
public void setClassifyId(Long classifyId) {
this.classifyId = classifyId;
}
public Long getBookGroupId() {
return bookGroupId;
}
public void setBookGroupId(Long bookGroupId) {
this.bookGroupId = bookGroupId;
}
public Long getAdNewsId() {
return adNewsId;
}
public void setAdNewsId(Long adNewsId) {
this.adNewsId = adNewsId;
}
public Long getAdNewsSetId() {
return adNewsSetId;
}
public void setAdNewsSetId(Long adNewsSetId) {
this.adNewsSetId = adNewsSetId;
}
public Long getCreateUser() {
return createUser;
}
public void setCreateUser(Long createUser) {
this.createUser = createUser;
}
public Long getUpdateUser() {
return updateUser;
}
@ApiModelProperty("自定义内容")
private String customContent;
public void setUpdateUser(Long updateUser) {
this.updateUser = updateUser;
}
@ApiModelProperty("内容类型,0:早报;1:晚报")
private Integer contentType;
@Override
public String toString() {
return "AdNewsGroupRecord{" +
"qrcodeId=" + qrcodeId +
", classifyId=" + classifyId +
", bookGroupId=" + bookGroupId +
", adNewsId=" + adNewsId +
", adNewsSetId=" + adNewsSetId +
", createUser=" + createUser +
", updateUser=" + updateUser +
"} " + super.toString();
}
@ApiModelProperty("insert时父子表标识")
Integer insertMark;
}
package com.pcloud.book.adnews.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhengyongqiang
* @date 2019/8/13 18:51
*/
@ApiModel("消息记录统计表")
@Data
public class AdNewsMessageStatistic extends BaseEntity {
private static final long serialVersionUID = 5892129036072748567L;
@ApiModelProperty("群id")
private Long qrcodeId;
@ApiModelProperty("分类id")
private Long classifyId;
@ApiModelProperty("社群码id")
private Long bookGroupId;
@ApiModelProperty("编辑新闻设置id")
private Long adNewsSetId;
@ApiModelProperty("内容来源")
private Integer contentFrom;
@ApiModelProperty("发送消息数")
private Integer messageCount;
@ApiModelProperty("创建人")
private Long createUser;
@ApiModelProperty("insert时父子表标识")
private Integer insertMark;
}
......@@ -3,6 +3,7 @@ package com.pcloud.book.adnews.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
......@@ -11,6 +12,7 @@ import java.util.List;
* @Author ruansiyuan
* @Date 2019/7/17 16:13
**/
@Data
@ApiModel("编辑新闻发送记录")
public class AdNewsSet extends BaseEntity {
......@@ -49,132 +51,21 @@ public class AdNewsSet extends BaseEntity {
@ApiModelProperty("修改人")
private Long updateUser;
@ApiModelProperty("内容来源")
private Integer contentFrom;
@ApiModelProperty("早报内容")
private String morningContent;
@ApiModelProperty("晚报内容")
private String eveningContent;
@ApiModelProperty("内容类型")
private Integer contentType;
@ApiModelProperty("分类关联集合")
private List<AdNewsGroup> adNewsGroups;
@ApiModelProperty("分类id集合")
private List<Long> classifyIds;
public String getMorningTime() {
return morningTime;
}
public void setMorningTime(String morningTime) {
this.morningTime = morningTime;
}
public String getEveningTime() {
return eveningTime;
}
public void setEveningTime(String eveningTime) {
this.eveningTime = eveningTime;
}
public Boolean getHasMorningOpen() {
return hasMorningOpen;
}
public void setHasMorningOpen(Boolean hasMorningOpen) {
this.hasMorningOpen = hasMorningOpen;
}
public Boolean getHasEveningOpen() {
return hasEveningOpen;
}
public void setHasEveningOpen(Boolean hasEveningOpen) {
this.hasEveningOpen = hasEveningOpen;
}
public Integer getSendCount() {
return sendCount;
}
public void setSendCount(Integer sendCount) {
this.sendCount = sendCount;
}
public String getStartContent() {
return startContent;
}
public void setStartContent(String startContent) {
this.startContent = startContent;
}
public String getEndContent() {
return endContent;
}
public void setEndContent(String endContent) {
this.endContent = endContent;
}
public Boolean getHasStartContent() {
return hasStartContent;
}
public void setHasStartContent(Boolean hasStartContent) {
this.hasStartContent = hasStartContent;
}
public Boolean getHasEndContent() {
return hasEndContent;
}
public void setHasEndContent(Boolean hasEndContent) {
this.hasEndContent = hasEndContent;
}
public Long getCreateUser() {
return createUser;
}
public void setCreateUser(Long createUser) {
this.createUser = createUser;
}
public Long getUpdateUser() {
return updateUser;
}
public void setUpdateUser(Long updateUser) {
this.updateUser = updateUser;
}
public List<AdNewsGroup> getAdNewsGroups() {
return adNewsGroups;
}
public void setAdNewsGroups(List<AdNewsGroup> adNewsGroups) {
this.adNewsGroups = adNewsGroups;
}
public List<Long> getClassifyIds() {
return classifyIds;
}
public void setClassifyIds(List<Long> classifyIds) {
this.classifyIds = classifyIds;
}
@Override
public String toString() {
return "AdNewsSet{" +
"morningTime='" + morningTime + '\'' +
", eveningTime='" + eveningTime + '\'' +
", hasMorningOpen=" + hasMorningOpen +
", hasEveningOpen=" + hasEveningOpen +
", sendCount=" + sendCount +
", startContent='" + startContent + '\'' +
", endContent='" + endContent + '\'' +
", hasStartContent=" + hasStartContent +
", hasEndContent=" + hasEndContent +
", createUser=" + createUser +
", updateUser=" + updateUser +
", adNewsGroups=" + adNewsGroups +
", classifyIds=" + classifyIds +
"} " + super.toString();
}
}
package com.pcloud.book.adnews.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @author zhengyongqiang
* @date 2019/8/7 11:23
*/
@ApiModel("新闻微信公众号")
public class AdNewsWechat extends BaseEntity {
private static final long serialVersionUID = 454065623001378319L;
public AdNewsWechat() {
}
public AdNewsWechat(String newsFrom, String wechatName, Long adviserId, Boolean isDelete) {
this.newsFrom = newsFrom;
this.wechatName = wechatName;
this.adviserId = adviserId;
this.isDelete = isDelete;
}
@ApiModelProperty("微信公众号唯一标识")
private String newsFrom;
@ApiModelProperty("微信公众号名称")
private String wechatName;
@ApiModelProperty("编辑id")
private Long adviserId;
@ApiModelProperty("是否删除")
private Boolean isDelete;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getNewsFrom() {
return newsFrom;
}
public void setNewsFrom(String newsFrom) {
this.newsFrom = newsFrom;
}
public String getWechatName() {
return wechatName;
}
public void setWechatName(String wechatName) {
this.wechatName = wechatName;
}
public Long getAdviserId() {
return adviserId;
}
public void setAdviserId(Long adviserId) {
this.adviserId = adviserId;
}
public Boolean getDelete() {
return isDelete;
}
public void setDelete(Boolean delete) {
isDelete = delete;
}
@Override
public String toString() {
return "AdNewsWechat{" +
"newsFrom='" + newsFrom + '\'' +
", wechatName='" + wechatName + '\'' +
", adviserId=" + adviserId +
", isDelete=" + isDelete +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}
package com.pcloud.book.adnews.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @author zhengyongqiang
* @date 2019/8/7 11:32
*/
@ApiModel("新闻公众号选择关联")
public class AdNewsWechatChoose extends BaseEntity {
private static final long serialVersionUID = 209558478794921448L;
@ApiModelProperty("编辑id")
private Long adviserId;
@ApiModelProperty("公众号id")
private Long adNewsWechatId;
@ApiModelProperty("是否删除")
private Boolean isDelete;
@ApiModelProperty("创建人")
private Long createUser;
@ApiModelProperty("修改人")
private Long updateUser;
public Long getAdviserId() {
return adviserId;
}
public void setAdviserId(Long adviserId) {
this.adviserId = adviserId;
}
public Long getAdNewsWechatId() {
return adNewsWechatId;
}
public void setAdNewsWechatId(Long adNewsWechatId) {
this.adNewsWechatId = adNewsWechatId;
}
public Boolean getDelete() {
return isDelete;
}
public void setDelete(Boolean delete) {
isDelete = delete;
}
public Long getCreateUser() {
return createUser;
}
public void setCreateUser(Long createUser) {
this.createUser = createUser;
}
public Long getUpdateUser() {
return updateUser;
}
public void setUpdateUser(Long updateUser) {
this.updateUser = updateUser;
}
@Override
public String toString() {
return "AdNewsWechatChoose{" +
"adviserId=" + adviserId +
", adNewsWechatId=" + adNewsWechatId +
", isDelete=" + isDelete +
", createUser=" + createUser +
", updateUser=" + updateUser +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}
package com.pcloud.book.adnews.enums;
import com.pcloud.book.advertising.enums.AdDetailModeEnum;
import org.springframework.amqp.rabbit.support.PublisherCallbackChannelImpl;
/**
* 早晚报内容来源
*
* @author zhengyongqiang
* @date 2019/8/6 17:50
*/
public enum AdContentFromEnum {
WECHAT(0, "微信公众号"),
CUSTOM(1, "自定义内容 ");
public final Integer key;
public final String name;
AdContentFromEnum(Integer key, String name) {
this.key = key;
this.name = name;
}
public static String getNameByKey(String key) {
AdContentFromEnum[] var1 = values();
int var2 = var1.length;
for (int var3 = 0; var3 < var2; ++var3) {
AdContentFromEnum methodEnum = var1[var3];
if (methodEnum.key.equals(key)) {
return methodEnum.name;
}
}
return null;
}
}
package com.pcloud.book.adnews.enums;
/**
* 禁止推送/允许推送
* @author zhengyongqiang
* @date 2019/8/12 14:42
*/
public enum AdNewsBanEnum {
NONBAN(0), // 不禁止推送
BAN(1); // 禁止推送
public final Integer key;
AdNewsBanEnum(Integer key){
this.key=key;
}
}
package com.pcloud.book.adnews.enums;
import java.security.Key;
/**
* 内容类型
*
* @author zhengyongqiang
* @date 2019/8/16 17:25
*/
public enum AdNewsContentTypeEnum {
MORNING(0, "早报"),
EVENING(1, "晚报");
public final Integer key;
public final String description;
AdNewsContentTypeEnum(Integer key, String description) {
this.key = key;
this.description = description;
}
public static String getDescriptionByKey(Integer key) {
AdNewsContentTypeEnum[] var1 = values();
int var2 = var1.length;
for (int var3 = 0; var3 < var2; ++var3) {
AdNewsContentTypeEnum methodEnum = var1[var3];
if (methodEnum.key.equals(key)) {
return methodEnum.description;
}
}
return null;
}
}
package com.pcloud.book.adnews.enums;
/**
* 公众号状态
* @author zhengyongqiang
* @date 2019/8/7 11:37
*/
public enum AdNewsWechatEnum {
EXAMINING(0), // 审核中
ENABLE(1); // 已启用
public final Integer key;
AdNewsWechatEnum(Integer key){
this.key=key;
}
}
package com.pcloud.book.adnews.facade;
import com.pcloud.book.adnews.entity.AdNewsClickRecord;
import com.pcloud.book.adnews.entity.AdNewsSet;
import com.pcloud.book.adnews.dto.AdNewsListParam;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.permission.PermissionException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.*;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@FeignClient(value = "pcloud-service-book",qualifier = "adNewsFacadeCloud",path = "adNews")
@FeignClient(value = "pcloud-service-book", qualifier = "adNewsFacadeCloud", path = "adNews")
@Api(description = "推送群消息外部接口")
public interface AdNewsFacade {
@ApiOperation("新增编辑端早晚报设置")
@PostMapping("/createAdNewsSet")
ResponseDto<?> createAdNewsSet(
......@@ -37,6 +36,7 @@ public interface AdNewsFacade {
@RequestHeader("token") @ApiParam("token信息") String token
) throws BizException, PermissionException;
@Deprecated
@ApiOperation("编辑添加选择的早晚报素材")
@PostMapping("/createAdNewsChooseBatch")
ResponseDto<?> createAdNewsChooseBatch(
......@@ -44,6 +44,7 @@ public interface AdNewsFacade {
@RequestBody @ApiParam("新闻id集合") List<Long> adNewsIds
) throws BizException, PermissionException;
@Deprecated
@ApiOperation("编辑移除选择的早晚报素材")
@GetMapping("/deleteAdNewsChoose")
ResponseDto<?> deleteAdNewsChoose(
......@@ -51,23 +52,91 @@ public interface AdNewsFacade {
@RequestParam @ApiParam("adNewsChooseId") Long adNewsChooseId
) throws BizException, PermissionException;
@ApiOperation("获取早晚报素材库")
@GetMapping("/getAdNewsList")
@Deprecated
@ApiOperation("获取编辑选择的早晚报素材库")
@GetMapping("/getAdNewsChooseList")
ResponseDto<?> getAdNewsChooseList(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam(value = "title", required = false) @ApiParam("标题") String title,
@RequestParam(value = "hasUsed", required = false) @ApiParam("标题") Boolean hasUsed,
@RequestParam("currentPage") @ApiParam("当前页") Integer currentPage,
@RequestParam("numPerPage") @ApiParam("每页条数") Integer numPerPage
) throws BizException, PermissionException;
@ApiOperation("早晚报素材库")
@PostMapping("/getAdNewsList")
ResponseDto<?> getAdNewsList(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam(value = "title",required = false) @ApiParam("标题") String title,
@RequestBody @ApiParam("查询参数") AdNewsListParam adNewsListParam
) throws BizException, PermissionException;
@ApiOperation("禁用/解除禁用")
@GetMapping("/saveAdNewsBan")
ResponseDto<?> saveAdNewsBan(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam("adNewsId") @ApiParam("新闻id") Long adNewsId,
@RequestParam("hasBan") @ApiParam("禁止推送") Integer hasBan
) throws BizException, PermissionException;
@ApiOperation("添加编辑选择的公众号")
@PostMapping("/createAdNewsWechatChooseBatch")
ResponseDto<?> createAdNewsWechatChooseBatch(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestBody @ApiParam("选择的公众号主键") List<Long> adNewsWechatIds
) throws BizException, PermissionException;
@ApiOperation("移除编辑已选择的公众号")
@GetMapping("/deleteAdNewsWechatChoose")
ResponseDto<?> deleteAdNewsWechatChoose(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam(value = "adNewsWechatId") @ApiParam("公众号主键") Long adNewsWechatId
) throws BizException, PermissionException;
@ApiOperation("获取编辑已选择的公众号")
@GetMapping("/getAdNewsWechatChooseList")
ResponseDto<?> getAdNewsWechatChooseList(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam("currentPage") @ApiParam("当前页") Integer currentPage,
@RequestParam("numPerPage") @ApiParam("每页条数") Integer numPerPage
) throws BizException, PermissionException;
@ApiOperation("获取编辑选择的早晚报素材库")
@GetMapping("/getAdNewsChooseList")
ResponseDto<?> getAdNewsChooseList(
@ApiOperation("获取所有的公众号列表")
@GetMapping("/getAdNewsWechatList")
ResponseDto<?> getAdNewsWechatList(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam(value = "title",required = false) @ApiParam("标题") String title,
@RequestParam(value = "hasUsed",required = false) @ApiParam("标题") Boolean hasUsed,
@RequestParam("currentPage") @ApiParam("当前页") Integer currentPage,
@RequestParam("numPerPage") @ApiParam("每页条数") Integer numPerPage
) throws BizException, PermissionException;
@ApiOperation("获取早晚报发送记录")
@GetMapping("/getAdNewsMessageStatistic")
ResponseDto<?> getAdNewsMessageStatistic(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam(value = "title", required = false) @ApiParam("群名称、群分类、社群码、社群书") String title,
@RequestParam(value = "beginTime", required = false) @ApiParam("开始日期") String beginTime,
@RequestParam(value = "endTime", required = false) @ApiParam("结束日期") String endTime,
@RequestParam(value = "proLabelId", required = false) @ApiParam("专业") Long proLabelId,
@RequestParam(value = "depLabelId", required = false) @ApiParam("深度") Long depLabelId,
@RequestParam(value = "purLabelId", required = false) @ApiParam("目的") Long purLabelId,
@RequestParam(value = "currentPage", required = false, defaultValue = "0") @ApiParam("当前页") Integer currentPage,
@RequestParam(value = "numPerPage", required = false, defaultValue = "10") @ApiParam("每页条数") Integer numPerPage
) throws BizException, PermissionException;
@ApiOperation("查询早晚报发送详情")
@GetMapping("/getAdNewsGroupRecord")
ResponseDto<?> getAdNewsGroupRecord(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam("messageStatisticId") @ApiParam("统计表id") Long messageStatisticId
) throws BizException, PermissionException;
@ApiOperation("记录用户点击量")
@PostMapping("/addAdNewsClickRecord")
@ApiImplicitParams({
@ApiImplicitParam(name = "userInfo", value = "Cookie", dataType = "String", paramType = "header"),
@ApiImplicitParam(name = "adNewsClickRecord", value = "用户点击量对象", dataType = "AdNewsClickRecord", paramType = "body")})
ResponseDto<?> addAdNewsClickRecord(
@CookieValue("userInfo") @ApiParam("用户信息") String userInfo,
@RequestBody @ApiParam("用户点击量对象") AdNewsClickRecord adNewsClickRecord
) throws BizException, PermissionException;
}
package com.pcloud.book.adnews.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhengyongqiang
* @date 2019/8/14 14:41
*/
@ApiModel
@Data
public class AdNewsGroupRecordVO {
@ApiModelProperty("主键id")
private Long id;
@ApiModelProperty("新闻id")
private Long adNewsId;
@ApiModelProperty("公众号名称")
private String wechatName;
@ApiModelProperty("新闻标题")
private String title;
@ApiModelProperty("新闻短链接")
private String shortUrl;
@ApiModelProperty("自定义早晚报内容")
private String customContent;
@ApiModelProperty("内容类型,0:早报;1:晚报")
private Integer contentType;
}
package com.pcloud.book.adnews.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author zhengyongqiang
* @date 2019/8/14 10:43
*/
@Data
public class AdNewsMessageStatisticVO {
@ApiModelProperty("主键id")
private Long id;
@ApiModelProperty("微信群名称")
private String groupName;
@ApiModelProperty("分类")
private String classify;
@ApiModelProperty("社群码名称")
private String groupQrcodeName;
@ApiModelProperty("社群书名称")
private String bookName;
@ApiModelProperty("专业")
private String depLabelName;
@ApiModelProperty("深度")
private String proLabelName;
@ApiModelProperty("目的")
private String purLabelName;
@ApiModelProperty("专业Id")
private Long depLabelId;
@ApiModelProperty("深度Id")
private Long proLabelId;
@ApiModelProperty("目的Id")
private Long purLabelId;
@ApiModelProperty("内容来源")
private Integer contentFrom;
@ApiModelProperty("发送消息数")
private Integer messageCount;
@ApiModelProperty("发送时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("点击次数")
private Long clickCount;
@ApiModelProperty("点击人数")
private Long userCount;
}
package com.pcloud.book.advertising.dao;
import com.pcloud.book.advertising.entity.AdvertisingDetailFile;
import com.pcloud.common.core.dao.BaseDao;
import java.util.List;
/**
* @描述:广告详情上传文件
* @作者:zhuyajie
* @创建时间:21:16 2019/8/2
* @版本:1.0
*/
public interface AdvertisingDetailFileDao extends BaseDao<AdvertisingDetailFile> {
/**
* 根据广告id查询
* @param adId
* @return
*/
public List<AdvertisingDetailFile> getByAdId(Long adId);
/**
* 删除文件
* @param adId
*/
void deleteByAdId(Long adId);
}
package com.pcloud.book.advertising.dao.impl;
import com.pcloud.book.advertising.dao.AdvertisingDetailFileDao;
import com.pcloud.book.advertising.entity.AdvertisingDetailFile;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @描述:广告详情上传文件
* @作者:zhuyajie
* @创建时间:21:17 2019/8/2
* @版本:1.0
*/
@Component("advertisingDetailFileDao")
public class AdvertisingDetailFileDaoImpl extends BaseDaoImpl<AdvertisingDetailFile> implements AdvertisingDetailFileDao {
@Override
public List<AdvertisingDetailFile> getByAdId(Long adId) {
return getSessionTemplate().selectList(getStatement("getByAdId"), adId);
}
@Override
public void deleteByAdId(Long adId) {
getSessionTemplate().delete(getStatement("deleteByAdId"), adId);
}
}
......@@ -6,6 +6,7 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pcloud.book.advertising.entity.AdvertisingBmOption;
import com.pcloud.book.advertising.entity.AdvertisingDetailFile;
import com.pcloud.common.dto.BaseDto;
/**
......@@ -311,6 +312,10 @@ public class AdvertisingSpaceDTO extends BaseDto {
* 投放次数
*/
private Integer distributionNum;
/**
* 多个上传文件
*/
private List<AdvertisingDetailFile> advertisingDetailFileList;
public Long getId() {
return id;
......@@ -819,6 +824,14 @@ public class AdvertisingSpaceDTO extends BaseDto {
this.distributionNum = distributionNum;
}
public List<AdvertisingDetailFile> getAdvertisingDetailFileList() {
return advertisingDetailFileList;
}
public void setAdvertisingDetailFileList(List<AdvertisingDetailFile> advertisingDetailFileList) {
this.advertisingDetailFileList = advertisingDetailFileList;
}
@Override
public String toString() {
return "AdvertisingSpaceDTO{" +
......@@ -885,6 +898,7 @@ public class AdvertisingSpaceDTO extends BaseDto {
", outNum=" + outNum +
", outRate=" + outRate +
", distributionNum=" + distributionNum +
", advertisingDetailFileList=" + advertisingDetailFileList +
'}';
}
}
\ No newline at end of file
package com.pcloud.book.advertising.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pcloud.common.entity.BaseEntity;
import java.util.Date;
/**
* 广告详情文件
*/
public class AdvertisingDetailFile extends BaseEntity{
/**
* 广告id
*/
private Long adId;
/**
* 文件ID
*/
private String fileId;
/**
* 文件转码状态
*/
private Integer fileConvertState;
/**
*文件大小
*/
private Long fileSize;
/**
*文件名称
*/
private String fileName;
/**
*文件时长
*/
private Long fileDuration;
/**
*文件路径
*/
private String fileUrl;
/**
*文件试播秒数
*/
private Long filePilotSecond;
/**
*文件试播路径
*/
private String filePilotUrl;
/**
*文件试播结束提示
*/
private String filePilotFinishTip;
/**
*文件标题
*/
private String title;
/**
*封面
*/
private String coverPic;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
/**
* 修改时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
public Long getAdId() {
return adId;
}
public void setAdId(Long adId) {
this.adId = adId;
}
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId == null ? null : fileId.trim();
}
public Integer getFileConvertState() {
return fileConvertState;
}
public void setFileConvertState(Integer fileConvertState) {
this.fileConvertState = fileConvertState;
}
public Long getFileSize() {
return fileSize;
}
public void setFileSize(Long fileSize) {
this.fileSize = fileSize;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName == null ? null : fileName.trim();
}
public Long getFileDuration() {
return fileDuration;
}
public void setFileDuration(Long fileDuration) {
this.fileDuration = fileDuration;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl == null ? null : fileUrl.trim();
}
public Long getFilePilotSecond() {
return filePilotSecond;
}
public void setFilePilotSecond(Long filePilotSecond) {
this.filePilotSecond = filePilotSecond;
}
public String getFilePilotUrl() {
return filePilotUrl;
}
public void setFilePilotUrl(String filePilotUrl) {
this.filePilotUrl = filePilotUrl == null ? null : filePilotUrl.trim();
}
public String getFilePilotFinishTip() {
return filePilotFinishTip;
}
public void setFilePilotFinishTip(String filePilotFinishTip) {
this.filePilotFinishTip = filePilotFinishTip == null ? null : filePilotFinishTip.trim();
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
public String getCoverPic() {
return coverPic;
}
public void setCoverPic(String coverPic) {
this.coverPic = coverPic == null ? null : coverPic.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public Date getUpdateTime() {
return updateTime;
}
@Override
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "AdvertisingDetailFile{" +
"adId=" + adId +
", fileId='" + fileId + '\'' +
", fileConvertState=" + fileConvertState +
", fileSize=" + fileSize +
", fileName='" + fileName + '\'' +
", fileDuration=" + fileDuration +
", fileUrl='" + fileUrl + '\'' +
", filePilotSecond=" + filePilotSecond +
", filePilotUrl='" + filePilotUrl + '\'' +
", filePilotFinishTip='" + filePilotFinishTip + '\'' +
", title='" + title + '\'' +
", coverPic='" + coverPic + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}
\ No newline at end of file
......@@ -176,6 +176,10 @@ public class AdvertisingSpace extends BaseEntity {
* 广告详情文件时长
*/
private Long adDetailFileDuration;
/**
* 多个上传文件
*/
private List<AdvertisingDetailFile> advertisingDetailFileList;
@Override
public Long getId() {
......@@ -471,6 +475,14 @@ public class AdvertisingSpace extends BaseEntity {
this.adDetailFileDuration = adDetailFileDuration;
}
public List<AdvertisingDetailFile> getAdvertisingDetailFileList() {
return advertisingDetailFileList;
}
public void setAdvertisingDetailFileList(List<AdvertisingDetailFile> advertisingDetailFileList) {
this.advertisingDetailFileList = advertisingDetailFileList;
}
@Override
public String toString() {
return "AdvertisingSpace{" +
......@@ -510,6 +522,7 @@ public class AdvertisingSpace extends BaseEntity {
", adDetailFileSize=" + adDetailFileSize +
", adDetailFileName='" + adDetailFileName + '\'' +
", adDetailFileDuration=" + adDetailFileDuration +
", advertisingDetailFileList=" + advertisingDetailFileList +
'}';
}
}
\ No newline at end of file
......@@ -1317,7 +1317,9 @@ public class BookSet {
Map<Long, Long> bookIdsMap = new HashMap<>();
for (Object object : bookList) {
BookDto bookDto = (BookDto) object;
bookIdsMap.put(bookDto.getBookId(), bookDto.getBookId());
if (bookDto != null && bookDto.getBookId() != null) {
bookIdsMap.put(bookDto.getBookId(), bookDto.getBookId());
}
}
List<Long> bookIds = Lists.newArrayList(bookIdsMap.values());
if (CollectionUtils.isEmpty(bookIds)) {
......
......@@ -377,7 +377,7 @@ public class BookClockBizImpl implements BookClockBiz {
//获取机器人微信号
String altId = wechatGroupConsr.getRobotIdByGroupId(weixinGroupId);
SendTextMessageVO sendTextMessageVO = new SendTextMessageVO();
sendTextMessageVO.setGroupId(weixinGroupId);
sendTextMessageVO.setWxGroupId(weixinGroupId);
sendTextMessageVO.setAltId(altId);
sendTextMessageVO.setContent(bookClockInfoDTO.getNoticeContent());
if(!MapUtils.isEmpty(wxQrcodeDTOMap) && wxQrcodeDTOMap.containsKey(weixinGroupId)){
......
......@@ -60,7 +60,8 @@ public class BookClockInfoServiceImpl implements BookClockInfoService {
@RequestMapping(value = "sendBookClockGroupMessage", method = RequestMethod.POST)
public void sendBookClockGroupMessage(@RequestBody Map<String, Object> map) throws BizException {
LOGGER.info("内部接口群发消息被调用"+map.toString());
bookClockBiz.sendBookClockGroupMessage(map);
return;
// bookClockBiz.sendBookClockGroupMessage(map);
}
}
......@@ -8,6 +8,8 @@ import java.util.Map;
import com.pcloud.common.core.aspect.ParamLog;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.settlementcenter.record.dto.GetGroupClassifyIncomeDTO;
import com.pcloud.settlementcenter.record.dto.GetGroupQrcodeIncomeDTO;
import com.pcloud.settlementcenter.record.dto.GroupRescourceIncomeParamDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -129,14 +131,14 @@ public class BookConsr {
} catch (Exception e) {
LOGGER.error("批量获取社群码下资源的总收益.[getRescourceTotalIncome]:" + e.getMessage(), e);
}
return rescourceTotalIncome;
return rescourceTotalIncome == null?BigDecimal.ZERO:rescourceTotalIncome;
}
@ParamLog(value = "批量获取社群码分类的收益", isBefore = false, isAfterReturn = false)
public Map<Long,BigDecimal> getClassifyIncome(List<Long> classifyIds) throws BizException {
public Map<Long,BigDecimal> getClassifyIncome(GetGroupClassifyIncomeDTO getGroupClassifyIncomeDTO) throws BizException {
Map<Long,BigDecimal> classifyIncome = new HashMap<>();
try {
ResponseEntity<ResponseDto<Map<Long,BigDecimal>>> responseEntityP = bookService.getGroupClassifyIncome(classifyIds);
ResponseEntity<ResponseDto<Map<Long,BigDecimal>>> responseEntityP = bookService.getGroupClassifyIncome(getGroupClassifyIncomeDTO);
classifyIncome = ResponseHandleUtil.parseMap(responseEntityP, Long.class, BigDecimal.class);
} catch (Exception e) {
LOGGER.error("批量获取社群码分类的收益.[getClassifyIncome]:" + e.getMessage(), e);
......@@ -145,10 +147,10 @@ public class BookConsr {
}
@ParamLog(value = "批量获取社群码分类下的微信群收益", isBefore = false, isAfterReturn = false)
public Map<Long,BigDecimal> getQrcodeIncome(List<Long> qrcodeIds) throws BizException {
public Map<Long,BigDecimal> getQrcodeIncome(GetGroupQrcodeIncomeDTO getGroupQrcodeIncomeDTO) throws BizException {
Map<Long,BigDecimal> qrcodeIncome = new HashMap<>();
try {
ResponseEntity<ResponseDto<Map<Long,BigDecimal>>> responseEntityP = bookService.getGroupQrcodeIncome(qrcodeIds);
ResponseEntity<ResponseDto<Map<Long,BigDecimal>>> responseEntityP = bookService.getGroupQrcodeIncome(getGroupQrcodeIncomeDTO);
qrcodeIncome = ResponseHandleUtil.parseMap(responseEntityP, Long.class, BigDecimal.class);
} catch (Exception e) {
LOGGER.error("批量获取社群码分类下的微信群收益.[getQrcodeIncome]:" + e.getMessage(), e);
......
......@@ -5,6 +5,9 @@ import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.settlementcenter.record.dto.ProductStaticUnderAppMapDTO;
import com.pcloud.settlementcenter.record.dto.ResourcesStatisticVO;
import com.pcloud.settlementcenter.record.service.BookService;
import com.pcloud.settlementcenter.record.service.SettlementService;
import org.slf4j.Logger;
......@@ -26,6 +29,8 @@ public class SettlementConsr {
@Autowired
private SettlementService settlementService;
@Autowired
private BookService bookService;
@ParamLog(value = "获取收益", isBefore = false, isAfterReturn = false)
public Map<Long, BigDecimal> getWXGroupQrcodeIncomeByAdviser(List<Long> groupQrcodeIds, Long adviserId) throws BizException {
......@@ -66,4 +71,16 @@ public class SettlementConsr {
}
return dateList;
}
@ParamLog(value = "社群码应用下商品的收益", isBefore = false, isAfterReturn = false)
public Map<Long,List<ResourcesStatisticVO>> getProductStaticUnderApp(ProductStaticUnderAppMapDTO productStaticUnderAppMapDTO) throws BizException {
Map<Long,List<ResourcesStatisticVO>> resourcesStatisticVOS = new HashMap<>();
try {
ResponseEntity<ResponseDto<Map<Long,List<ResourcesStatisticVO>>>> responseEntityP = bookService.getProductStaticUnderAppMap(productStaticUnderAppMapDTO);
resourcesStatisticVOS = ResponseHandleUtil.parseMapList(responseEntityP, Long.class, ResourcesStatisticVO.class);
} catch (Exception e) {
LOGGER.error("社群码应用下商品的收益.[getProductStaticUnderApp]:" + e.getMessage(), e);
}
return resourcesStatisticVOS;
}
}
......@@ -124,6 +124,19 @@ public class TradeConsr {
return amount;
}
@ParamLog("获取用户购买或者参与过的社群码ID")
public List<Long> getBuyBookGroupIdList(Long channelId, Long wechatUserId) throws BizException {
List<Long> results = new ArrayList<>();
try {
ResponseEntity<ResponseDto<List<Long>>> responseEntity = orderFormService.getBuyBookGroupIdList(wechatUserId, channelId);
results = ResponseHandleUtil.parseListResponse(responseEntity, Long.class);
} catch (Exception e) {
LOGGER.error("获取用户购买或者参与过的社群码ID详情:" + e.getMessage(), e);
}
return results;
}
@ParamLog("获取社群码下的应用作品购买量")
public List<ClassifyPayDetailDto> getGroupBuyCount(Long bookGroupId, Long classifyId, Long qrcodeId, Date startDate, Date endDate) throws BizException{
List<ClassifyPayDetailDto> classifyPayDetailDtos = new ArrayList<>();
......
......@@ -2,19 +2,25 @@ package com.pcloud.book.consumer.wechatgroup;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.common.core.aspect.ParamLog;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.wechatgroup.group.dto.GroupMemberStatisDTO;
import com.pcloud.wechatgroup.group.dto.GroupRobotDTO;
import com.pcloud.wechatgroup.group.dto.GroupUserDTO;
import com.pcloud.wechatgroup.group.dto.RobotReplyDTO;
import com.pcloud.wechatgroup.group.service.GroupMemberService;
import com.pcloud.wechatgroup.message.dto.GroupChatCountDTO;
import com.pcloud.wechatgroup.message.service.MessageService;
import com.pcloud.wechatgroup.monitor.service.MonitorService;
import com.pcloud.wechatgroup.selfrobot.service.SelfRobotService;
import com.pcloud.wechatgroup.selfrobot.dto.SelfRobotDTO;
import com.pcloud.wechatgroup.selfrobot.service.SelfRobotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
......@@ -35,6 +41,44 @@ public class WechatGroupConsr {
private MessageService messageService;
@Autowired
private MonitorService monitorService;
@Autowired
private SelfRobotService selfRobotService;
@ParamLog("根据机器人id和用户微信id获取最新暗号")
public String getCipherByRobotAndUserWxId(String robotWxId, String userWxId) {
if (StringUtil.isBlank(robotWxId) || StringUtil.isBlank(userWxId)) {
return null;
}
try {
return ResponseHandleUtil.parseResponse(selfRobotService.getCipherByRobotAndUserWxId(robotWxId, userWxId), String.class);
} catch (BizException e) {
log.warn("根据机器人id和用户微信id获取最新暗号失败:" + e.getMessage(), e);
throw new BizException(e.getCode(), e.getMessage());
} catch (Exception e) {
log.error("根据机器人id和用户微信id获取最新暗号.[getCipherByRobotAndUserWxId]:" + e.getMessage(), e);
throw new BookBizException(BookBizException.INVOKE_RES_ERROR, "服务内部错误,请稍后重试");
} finally {
log.info("【根据机器人id和用户微信id获取最新暗号,<END>");
}
}
@ParamLog("是否群机器人")
public Boolean isGroupRobot(String robotWxId) {
if (StringUtil.isBlank(robotWxId)) {
return null;
}
try {
return ResponseHandleUtil.parseResponse(selfRobotService.isGroupRobot(robotWxId), Boolean.class);
} catch (BizException e) {
log.warn("是否群机器人失败:" + e.getMessage(), e);
throw new BizException(e.getCode(), e.getMessage());
} catch (Exception e) {
log.error("是否群机器人.[isGroupRobot]:" + e.getMessage(), e);
throw new BookBizException(BookBizException.INVOKE_RES_ERROR, "服务内部错误,请稍后重试");
} finally {
log.info("【是否群机器人,<END>");
}
}
/**
* 是否黑名单
......@@ -280,4 +324,26 @@ public class WechatGroupConsr {
}
return map;
}
@ParamLog(value = "获取可用机器人")
public SelfRobotDTO getAvailableRobot(Long wechatUserId, Integer largeTemplet, Long classifyId) {
SelfRobotDTO selfRobotDTO = null;
try {
selfRobotDTO = ResponseHandleUtil.parseResponse(selfRobotService.getAvailableRobot(wechatUserId, largeTemplet, classifyId), SelfRobotDTO.class);
} catch (Exception e) {
log.error("获取可用机器人.[getAvailableRobot]:" + e.getMessage(), e);
}
return selfRobotDTO;
}
@ParamLog("根据用户微信ID获取用户信息")
public GroupUserDTO getWxUserInfoByWxUserId(String wxUserId) {
GroupUserDTO dto = new GroupUserDTO();
try {
dto = ResponseHandleUtil.parseResponse(groupMemberService.getWxUserInfoByWxId(wxUserId), GroupUserDTO.class);
} catch (Exception e) {
log.error("根据用户微信ID获取用户信息.[getWxUserInfoByWxId]:" + e.getMessage(), e);
}
return dto;
}
}
......@@ -2,12 +2,21 @@ package com.pcloud.book.group.biz;
import com.pcloud.book.book.dto.BookDto;
import com.pcloud.book.group.dto.*;
import com.pcloud.book.group.entity.BookGroup;
import com.pcloud.book.group.dto.AppStatisticsDTO;
import com.pcloud.book.group.dto.BookGroupDTO;
import com.pcloud.book.group.dto.ClassifyKeywordDTO;
import com.pcloud.book.group.dto.GroupStoreMyPayDto;
import com.pcloud.book.group.dto.QrcodeNameAndProIdDTO;
import com.pcloud.book.group.entity.BookGroup;
import com.pcloud.book.group.vo.*;
import com.pcloud.book.group.entity.BookGroup;
import com.pcloud.book.group.vo.*;
import com.pcloud.book.group.vo.StatisticVO;
import com.pcloud.common.dto.StoreFlowInfoDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.page.PageBean;
import com.pcloud.common.page.PageBeanNew;
......@@ -127,6 +136,13 @@ public interface BookGroupBiz {
PageBean listBookGroup4Adviser(Map<String, Object> paramMap, PageParam pageParam, Long adviserId) throws BizException;
/**
* @description 获取社群书列表(运营)
* @author 戴兴
* @date 2019/7/23 15:39
*/
PageBean listBookGroup4Channel(Long channelId, ListBookGroup4ChannelParamVO listBookGroup4ChannelParamVO);
/**
* 获取社群书列表(编辑)
* @param paramMap 参数Map
* @return
......@@ -197,6 +213,13 @@ public interface BookGroupBiz {
BookGroupDTO getBaseInfoBySceneId(Long sceneId);
/**
* @description 更新个人二维码
* @author 戴兴
* @date 2019/8/7 16:30
*/
void updatePersonQrcode(PersonalQrcodeDTO personalQrcodeDTO);
/**
* @Author:lili
* @Desr:是否是特殊的出版社
* @Date:2019/5/28 11:14
......@@ -248,6 +271,65 @@ public interface BookGroupBiz {
Boolean getIsShowBookName(Long partyId);
/**
* 删除社群码
*/
void deleteBookGroup(Long bookGroupId);
/**
* 根据分类id获取个人二维码信息
*/
OwnAltQrcodeInfoDTO getOwnAltQrcodeInfoDTOByClassifyId(Long wechatUserId, Long classifyId);
/**
* 获取暗号状态
*/
Integer getCipherState(String cipher);
/**
* 更新状态为已使用
*/
void updateCipherStateToUsed(String cipher, String wxId);
/**
* 获取个人二维码方式群已使用和未使用数量
*/
GroupUseDTO getGroupUse(List<String> altIds);
/**
* 获取所有的大类分类
*/
List<LargeTempletDTO> getAllLargTemplet();
/**
* 根据微信id和机器人id获取分类集合
*/
List<JoinGroupCipherDTO> getClassifyIdsByWxIdAndAltId(String wxId,String altId);
/**
* 获取暗号基本信息
*/
GroupCipherDTO getJoinGroupCipher(String cipher);
/**
* 为信息流批量获取社群书基本信息
*/
Map<Long, StoreFlowInfoDto> getFlowInfoByBookGroupIds(List<Long> bookGroupIds);
/**
* 获取指定条数社群书基本信息
*/
Map<Long, StoreFlowInfoDto> getBookGroupInfoByChannelId(Long channelId, Integer itemNum);
/**
* 知识商城获取社群书信息
*/
PageBeanNew<StoreFlowInfoDto> listBookGroup4KnowledgeMall(Long channelId, int currentPage, int numPerPage);
/**
* 获取用户购买或者参与过的社群书信息
*/
PageBeanNew<GroupStoreMyPayDto> getUserBrowseGroup4KnowLedgeMall(Long channelId, Long wechatUserId, Integer currentPage, Integer numPerPage);
/**
* 获取社群码相关数据
*/
BookGroupStatisticsDTO getBookGroupStatisByBookGroupId(Long bookGroupId);
......@@ -265,7 +347,7 @@ public interface BookGroupBiz {
/**
* 社群码分类统计
*/
List<GroupStatisticVO> getClassifyStatistic(Long bookGroupId, Long adviserId);
PageBeanNew<GroupStatisticVO> getClassifyStatistic(Long bookGroupId, Long adviserId, Integer currentPage, Integer numPerPage);
/**
* 社群码分类的微信群统计
......@@ -280,7 +362,7 @@ public interface BookGroupBiz {
/**
* 资源数据导出
*/
void exportRescourceIncomeData(Long bookGroupId,Long adviserId, Long classifyId, Long qrcodeId, String type);
Map<String, String> exportRescourceIncomeData(Long bookGroupId,Long adviserId);
/**
* 获取资源浏览数据
......@@ -289,6 +371,4 @@ public interface BookGroupBiz {
}
......@@ -2,7 +2,23 @@ package com.pcloud.book.group.biz;
import com.pcloud.book.group.dto.*;
import com.pcloud.book.group.entity.BookGroupClassify;
import com.pcloud.book.group.vo.*;
import com.pcloud.book.group.vo.AddClassifyVO;
import com.pcloud.book.group.vo.AdviserClassifyParam;
import com.pcloud.book.group.vo.AdviserClassifyVO;
import com.pcloud.book.group.vo.BookGroupClassifyVO;
import com.pcloud.book.group.vo.BookGroupQrcodeStatisticVO;
import com.pcloud.book.group.vo.ClassifyAndGroupCountVO;
import com.pcloud.book.group.vo.ClassifyAndUserCountVO;
import com.pcloud.book.group.vo.ClassifyNameVO;
import com.pcloud.book.group.vo.ClassifyVO;
import com.pcloud.book.group.vo.GroupQrcode4ClassifyVO;
import com.pcloud.book.group.vo.ListBookGroupQrcodeParamVO;
import com.pcloud.book.group.vo.ListClassify4WechatVO;
import com.pcloud.book.group.vo.ListClassifyVO;
import com.pcloud.book.group.vo.ListGroupClassifyParam;
import com.pcloud.book.group.vo.StatisticVO;
import com.pcloud.book.group.vo.UpdateClassifyVO;
import com.pcloud.book.group.vo.UpdateRankVO;
import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.page.PageParam;
......@@ -114,6 +130,11 @@ public interface BookGroupClassifyBiz {
List<ListClassify4WechatVO> listClassify4Wechat(Long bookGroupId, Long wechatUserId);
/**
* 批量获取分类信息
*/
List<GroupClassifyQrcodeDTO> listClassifyQrcodeInfo(List<Long> classifyIds);
/**
* @Author:lili
* @Desr:客户端根据群分类获取二维码
* @Date:2019/4/29 17:21
......@@ -121,6 +142,11 @@ public interface BookGroupClassifyBiz {
GroupQrcode4ClassifyVO getGroupQrcode4ClassifyWechat(Long classifyId, Long wechatUserId);
/**
* 用户获取具体进群id
*/
String getWxGroupIdByClassifyIdAndWechatId(Long classifyId, Long wechatUserId);
/**
* @Author:lili
* @Desr:获取编辑所有的分类
* @Date:2019/4/30 15:33
......@@ -178,7 +204,7 @@ public interface BookGroupClassifyBiz {
PageBeanNew<AdviserClassifyVO> listAdviserClassify(Long adviserId, AdviserClassifyParam adviserClassifyParam);
Map<Long,BookClassifyDTO> getGroupClassifyCount(List<Long> bookIds);
Map<Long, BookClassifyDTO> getGroupClassifyCount(List<Long> bookIds);
/**
* 更新是否开启微学习报告
......@@ -189,4 +215,25 @@ public interface BookGroupClassifyBiz {
* 获取群分类学习报告相关列表
*/
PageBeanNew<ClassifyLearningReportDto> listClassifyForLearningReport(Integer currentPage, Integer numPerPage, String keyword, Long partyId);
/**
* 用户支付金额
* @param qrcodeId
* @param wxId
* @return
*/
public BigDecimal getPayPrice(Long qrcodeId, String wxId);
/**
* 拖动排序
*/
void dragSortClassify(List<Long> classifyIds);
/**
* 埋点记录点击群分类次数
*/
void clickClassify(Long wechatUserId, Long bookGroupId, Long classifyId);
List<ListClassifyVO> getClassifyIngoreDelete(Long bookGroupId);
}
......@@ -10,6 +10,7 @@ import com.pcloud.book.group.vo.GroupQrcodeBookVO;
import com.pcloud.book.group.vo.ListGroupQrcodeResponseVO;
import com.pcloud.book.group.vo.ListQrcodeByClassifyParamVO;
import com.pcloud.book.group.vo.UpdateGroupQrcodeRequestVO;
import com.pcloud.book.riddle.dto.GroupRiddleDTO;
import com.pcloud.common.page.PageBeanNew;
import java.util.List;
......@@ -137,4 +138,14 @@ public interface GroupQrcodeBiz {
* @return
*/
PageBeanNew<GroupQrcodeBookVO> listQrcodeByAdviser(Integer currentPage, Integer numPerPage, String name, Long adviserId);
/**
* 猜谜语列表
* @param partyId
* @param currentPage
* @param numPerPage
* @param name
* @return
*/
PageBeanNew<GroupRiddleDTO> listPageRiddle(Long partyId, Integer currentPage, Integer numPerPage, String name);
}
......@@ -22,7 +22,7 @@ public interface WeixinQrcodeBiz {
* @Desr:从二维码获取一个二维码
* @Date:2019/4/17 16:17
*/
WeixinQrcodeDTO getOneQrcode();
WeixinQrcodeDTO getOneQrcode(Integer generation);
/**
* @Author:lili
......@@ -107,6 +107,11 @@ public interface WeixinQrcodeBiz {
QrStatisticsVO getQrStatistics();
/**
* 根据版本分类统计平台端二维码数据
*/
List<QrStatisticsVO> getQrStatisticsByVersion();
/**
* 分页获取可用微信群
* @param currentPage
* @param numPerPage
......
......@@ -30,7 +30,6 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.wechatgroup.group.dto.GroupRobotDTO;
import com.sdk.wxgroup.AddToGroupVO;
import com.sdk.wxgroup.GroupInfoVO;
import com.sdk.wxgroup.QrcodeVO;
import com.sdk.wxgroup.WxGroupSDK;
......@@ -49,8 +48,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;
/**
......@@ -84,8 +81,8 @@ public class WeixinQrcodeBizImpl implements WeixinQrcodeBiz {
@Override
@ParamLog("从二维码库获取一个二维码")
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public WeixinQrcodeDTO getOneQrcode() {
WeixinQrcodeDTO qrcodeVO = weixinQrcodeDao.getOneWechatGroup();
public WeixinQrcodeDTO getOneQrcode(Integer generation) {
WeixinQrcodeDTO qrcodeVO = weixinQrcodeDao.getOneWechatGroup(generation);
if (qrcodeVO == null) {
return null;
}
......@@ -220,7 +217,10 @@ public class WeixinQrcodeBizImpl implements WeixinQrcodeBiz {
}
for (ChangeGroupNameDTO changeGroupNameDTO : changeGroupNameDTOS) {
String robotId = wechatGroupConsr.getRobotIdByGroupId(changeGroupNameDTO.getWxGroupId());
SendWeixinRequestTools.changeGroupName(robotId, changeGroupNameDTO.getWxGroupId(), changeGroupNameDTO.getWxGroupName());
final String wechatGroupId = changeGroupNameDTO.getWxGroupId();
Map<String, BookWxQrcodeDTO> groupVersion = weixinQrcodeBiz.getGroupVersion(Collections.singletonList(wechatGroupId));
String ip = Optional.ofNullable(groupVersion.get(wechatGroupId)).orElse(new BookWxQrcodeDTO()).getWechatGroupIp();
SendWeixinRequestTools.changeGroupName(robotId, changeGroupNameDTO.getWxGroupId(), changeGroupNameDTO.getWxGroupName(), ip);
}
}
......@@ -324,6 +324,35 @@ public class WeixinQrcodeBizImpl implements WeixinQrcodeBiz {
}
@Override
@ParamLog("按照版本分类获取平台端统计数据")
public List<QrStatisticsVO> getQrStatisticsByVersion() {
List<QrStatisticsVO> qrStatistics = weixinQrcodeDao.getQrStatisticsByVersion();
List<QrStatisticsVO> counts = weixinQrcodeDao.getQrcodeCountByVersion();
if (ListUtils.isEmpty(qrStatistics)) {
qrStatistics = new ArrayList<>();
QrStatisticsVO qr = new QrStatisticsVO();
qr.setAllCount(0);
qr.setInUseCount(0);
qr.setNotUseCount(0);
qr.setVersion(0);
qrStatistics.add(qr);
return qrStatistics;
}
// 组合两部分数据
for(QrStatisticsVO qr:qrStatistics){
for(QrStatisticsVO c: counts){
if(qr.getVersion().equals(c.getVersion())){
qr.setAllCount(c.getAllCount());
break;
}
}
}
return qrStatistics;
}
@Override
@ParamLog("分页获取可用微信群")
public List<BookWxQrcodeDTO> listAvailableGroupByPage(Integer currentPage, Integer numPerPage) {
Map<String, Object> paramMap = new HashMap<>();
......
package com.pcloud.book.group.constants;
import com.pcloud.book.group.dto.AutoUpdateGroupNumDTO;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* book业务常量类
*/
public class BookBusinessConstants {
/**
* 需更新微信群信息
*/
public static final Map<String, AutoUpdateGroupNumDTO> GROUP_NUM_DTO_MAP = new ConcurrentHashMap<>(128);
}
......@@ -140,6 +140,11 @@ public interface BookGroupClassifyDao extends BaseDao<BookGroupClassify> {
GroupClassifyQrcodeDTO getClassifyQrcodeInfo(String weixinGroupId);
/**
* 批量获取分类信息
*/
List<GroupClassifyQrcodeDTO> listClassifyQrcodeInfo(List<Long> classifyIds);
/**
* @Author:lili
* @Desr:获取所有的分类
* @Date:2019/4/29 11:23
......@@ -246,4 +251,16 @@ public interface BookGroupClassifyDao extends BaseDao<BookGroupClassify> {
*/
void updateHasOpenLearningReport(Long classifyId, Boolean hasOpenLearningReport, Long partyId);
/**
* 拖动排序
*/
void dragSortClassify(List<Long> classifyIds);
void addClickClassify(Long wechatUserId, Long bookGroupId, Long classifyId);
Map<Long, ClickClassifyDTO> mapClickClassify(List<Long> classifyIds);
List<ListClassifyVO> getClassifyIngoreDelete(Long bookGroupId);
}
......@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import com.pcloud.book.group.dto.BookGroupDTO;
import com.pcloud.book.group.dto.PersonalQrcodeDTO;
import com.pcloud.book.group.dto.QrcodeNameAndProIdDTO;
import com.pcloud.book.group.entity.BookGroup;
import com.pcloud.common.core.dao.BaseDao;
......@@ -120,6 +121,13 @@ public interface BookGroupDao extends BaseDao<BookGroup> {
Boolean isSpecialAgent(Long agentId);
/**
* @description 更新个人二维码
* @author 戴兴
* @date 2019/8/7 16:49
*/
void updatePersonQrcode(PersonalQrcodeDTO personalQrcodeDTO);
/**
* 获取社群书基本信息(包括书籍封面isbn号)
* @param paramMap
* @return
......@@ -135,4 +143,9 @@ public interface BookGroupDao extends BaseDao<BookGroup> {
* 获取是否显示书名
*/
Boolean getIsShowBookName(Long partyId);
/**
* 删除社群书
*/
void deleteByBookGroupId(Long bookGroupId);
}
......@@ -199,7 +199,15 @@ public interface GroupQrcodeDao extends BaseDao<GroupQrcode> {
List<GroupQrcodeFoAdDTO> GroupQrcodeFoAdDTOSByClassifyIds(List<Long> classifyIds);
/**
* 修改猜谜语开启状态
* @param qrcodeId
* @param status
*/
void updateRiddleOpenStatus(Long qrcodeId, Boolean status);
/**
* 根据分类id获取分类下的群---不分页
*/
List<ClassifyQrcodeVO> getQrcodeByClassify(Long bookGroupId, Long classifyId);
List<ClassifyQrcodeVO> getQrcodeByClassify(Long classifyId);
}
package com.pcloud.book.group.dao;
import com.pcloud.book.group.dto.JoinGroupCipherDTO;
import com.pcloud.book.group.entity.JoinGroupCipher;
import com.pcloud.common.core.dao.BaseDao;
import java.math.BigDecimal;
import java.util.List;
public interface JoinGroupCipherDao extends BaseDao<JoinGroupCipher> {
JoinGroupCipher getByWechatUserId(Long wechatUserId,Long classifyId);
JoinGroupCipher getByCipher(String cipher);
JoinGroupCipherDTO getDTOByCipher(String cipher);
void updateCipherStateToUsed(String cipher, String wxId);
List<JoinGroupCipherDTO> getClassifyIdsByWxIdAndAltId(String wxId, String altId);
void updateQrcodeId(String cipher, String wxId, Long qrcodeId);
/**
* 用户支付金额
* @param wxId
* @param qrcodeId
* @return
*/
BigDecimal getPayPrice(String wxId, Long qrcodeId);
}
package com.pcloud.book.group.dao;
import com.pcloud.book.group.entity.TempletRelevance;
import com.pcloud.common.core.dao.BaseDao;
public interface TempletRelevanceDao extends BaseDao<TempletRelevance> {
TempletRelevance getByTempletId(Long templetId);
}
......@@ -24,7 +24,7 @@ public interface WeixinQrcodeDao extends BaseDao<WeixinQrcode> {
* @Desr:获取一个微信群
* @Date:2019/3/12 18:04
*/
WeixinQrcodeDTO getOneWechatGroup();
WeixinQrcodeDTO getOneWechatGroup(Integer generation);
/**
* @Author:lili
......@@ -41,6 +41,12 @@ public interface WeixinQrcodeDao extends BaseDao<WeixinQrcode> {
QrStatisticsVO getQrStatistics();
/**
* 获取依据版本分类的二维码统计数据
* @return 依据版本分类的二维码统计数据
*/
List<QrStatisticsVO> getQrStatisticsByVersion();
/**
* @Author:lili
* @Desr:将处理中的二维码修改为处理失败
* @Date:2019/3/7 15:21
......@@ -117,6 +123,8 @@ public interface WeixinQrcodeDao extends BaseDao<WeixinQrcode> {
*/
Integer getQrcodeCount();
List<QrStatisticsVO> getQrcodeCountByVersion();
/**
* @Author:lili
* @Desr:校验存在性
......@@ -155,4 +163,9 @@ public interface WeixinQrcodeDao extends BaseDao<WeixinQrcode> {
Map<String, BookWxQrcodeDTO> listByWxGroupIds(List<String> wxGroupIds);
String getVirtualIp(Integer generation);
/**
* 根据状态获取群数量
*/
Integer countByState(Integer state, List<String> altIds);
}
......@@ -47,7 +47,7 @@ public class AppClickRecordDaoImpl extends BaseDaoImpl<AppClickRecord> implement
@Override
public Map<Long, ResourceClickVO> getResourceClick(Map<String, Object> map) {
return this.getSqlSession().selectMap(this.getStatement("getResourceClick"), map,"resourceId");
return this.getSqlSession().selectMap(this.getStatement("getResourceClick"), map,"rescourceId");
}
@Override
......
......@@ -114,6 +114,11 @@ public class BookGroupClassifyDaoImpl extends BaseDaoImpl<BookGroupClassify> imp
}
@Override
public List<GroupClassifyQrcodeDTO> listClassifyQrcodeInfo(List<Long> classifyIds) {
return this.getSqlSession().selectList(this.getStatement("listClassifyQrcodeInfo"), classifyIds);
}
@Override
public List<ListClassify4WechatVO> listClassify4Wechat(Long bookGroupId, Integer rankType) {
Map<String, Object> paramMap = new HashMap();
paramMap.put("bookGroupId", bookGroupId);
......@@ -215,4 +220,32 @@ public class BookGroupClassifyDaoImpl extends BaseDaoImpl<BookGroupClassify> imp
this.getSqlSession().update(this.getStatement("updateHasOpenLearningReport"), paramMap);
}
@Override
public void dragSortClassify(List<Long> classifyIds) {
Map<String, Object> paramMap = new HashMap();
paramMap.put("classifyIds", classifyIds);
this.getSqlSession().update(this.getStatement("dragSortClassify"), paramMap);
}
@Override
public void addClickClassify(Long wechatUserId, Long bookGroupId, Long classifyId) {
Map<String, Object> paramMap = new HashMap();
paramMap.put("classifyId", classifyId);
paramMap.put("wechatUserId", wechatUserId);
paramMap.put("bookGroupId", bookGroupId);
this.getSqlSession().insert(this.getStatement("addClickClassify"), paramMap);
}
@Override
public Map<Long, ClickClassifyDTO> mapClickClassify(List<Long> classifyIds) {
Map<String, Object> paramMap = new HashMap();
paramMap.put("classifyIds", classifyIds);
return this.getSqlSession().selectMap(this.getStatement("mapClickClassify"), paramMap,"classifyId");
}
@Override
public List<ListClassifyVO> getClassifyIngoreDelete(Long bookGroupId) {
return this.getSqlSession().selectList(this.getStatement("getClassifyIngoreDelete"), bookGroupId);
}
}
......@@ -3,6 +3,8 @@ package com.pcloud.book.group.dao.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.pcloud.book.group.dto.PersonalQrcodeDTO;
import org.springframework.stereotype.Repository;
import com.pcloud.book.group.dao.BookGroupDao;
import com.pcloud.book.group.dto.BookGroupDTO;
......@@ -124,6 +126,14 @@ public class BookGroupDaoImpl extends BaseDaoImpl<BookGroup> implements BookGrou
}
@Override
public void updatePersonQrcode(PersonalQrcodeDTO personalQrcodeDTO) {
Map<String,Object> map = new HashMap<>();
map.put("newQrcodeUrl",personalQrcodeDTO.getNewQrcodeUrl());
map.put("oldQrcodeUrl",personalQrcodeDTO.getOldQrcodeUrl());
this.getSqlSession().update(this.getStatement("updatePersonQrcode"), map);
}
@Override
public List<BookGroupDTO> getBookInfoByIdsWithBookClockInfoId(Map<String,Object> paramMap) {
return this.getSqlSession().selectList(this.getStatement("getBookInfoByIdsWithBookClockInfoId"), paramMap);
}
......@@ -140,4 +150,11 @@ public class BookGroupDaoImpl extends BaseDaoImpl<BookGroup> implements BookGrou
public Boolean getIsShowBookName(Long partyId) {
return this.getSqlSession().selectOne(this.getStatement("getIsShowBookName"), partyId);
}
@Override
public void deleteByBookGroupId(Long bookGroupId) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("bookGroupId", bookGroupId);
super.getSqlSession().update(getStatement("deleteByBookGroupId"), paramMap);
}
}
......@@ -191,11 +191,16 @@ public class GroupQrcodeDaoImpl extends BaseDaoImpl<GroupQrcode> implements Grou
}
@Override
public List<ClassifyQrcodeVO> getQrcodeByClassify(Long bookGroupId, Long classifyId) {
public void updateRiddleOpenStatus(Long qrcodeId, Boolean status) {
Map<String, Object> map = new HashMap<>();
map.put("bookGroupId", bookGroupId);
map.put("classifyId", classifyId);
map.put("changeNumber", 0);
return this.getSqlSession().selectList(this.getStatement("listQrcodeByClassify"), map);
map.put("qrcodeId", qrcodeId);
map.put("status", status);
getSessionTemplate().update(getStatement("updateRiddleOpenStatus"), map);
}
public List<ClassifyQrcodeVO> getQrcodeByClassify(Long classifyId) {
return this.getSqlSession().selectList(this.getStatement("getQrcodeByClassify"), classifyId);
}
}
package com.pcloud.book.group.dao.impl;
import com.pcloud.book.group.dao.JoinGroupCipherDao;
import com.pcloud.book.group.dto.JoinGroupCipherDTO;
import com.pcloud.book.group.entity.JoinGroupCipher;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description
* @Author ruansiyuan
* @Date 2019/8/5 16:18
**/
@Component("joinGroupCipherDao")
public class JoinGroupCipherDaoImpl extends BaseDaoImpl<JoinGroupCipher> implements JoinGroupCipherDao {
@Override
public JoinGroupCipher getByWechatUserId(Long wechatUserId,Long classifyId) {
Map<String,Object> map=new HashMap<>();
map.put("wechatUserId",wechatUserId);
map.put("classifyId",classifyId);
return this.getSqlSession().selectOne(this.getStatement("getByWechatUserId"), map);
}
@Override
public JoinGroupCipher getByCipher(String cipher) {
return this.getSqlSession().selectOne(this.getStatement("getByCipher"), cipher);
}
@Override
public JoinGroupCipherDTO getDTOByCipher(String cipher) {
return this.getSqlSession().selectOne(this.getStatement("getDTOByCipher"), cipher);
}
@Override
public void updateCipherStateToUsed(String cipher, String wxId) {
Map<String,Object> map=new HashMap<>();
map.put("cipher",cipher);
map.put("wxId",wxId);
this.getSqlSession().update(this.getStatement("updateCipherStateToUsed"), map);
}
@Override
public List<JoinGroupCipherDTO> getClassifyIdsByWxIdAndAltId(String wxId, String altId) {
Map<String,Object> map=new HashMap<>();
map.put("wxId",wxId);
map.put("altId",altId);
return this.getSqlSession().selectList(this.getStatement("getClassifyIdsByWxIdAndAltId"), map);
}
@Override
public void updateQrcodeId(String cipher, String wxId, Long qrcodeId) {
Map<String,Object> map=new HashMap<>();
map.put("cipher",cipher);
map.put("wxId",wxId);
map.put("qrcodeId",qrcodeId);
this.getSqlSession().update(this.getStatement("updateQrcodeId"), map);
}
@Override
public BigDecimal getPayPrice(String wxId, Long qrcodeId) {
Map<String, Object> map = new HashMap<>();
map.put("wxId", wxId);
map.put("qrcodeId", qrcodeId);
return getSessionTemplate().selectOne(getStatement("getPayPrice"), map);
}
}
package com.pcloud.book.group.dao.impl;
import com.pcloud.book.group.dao.TempletRelevanceDao;
import com.pcloud.book.group.entity.TempletRelevance;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Component;
/**
* @Description
* @Author ruansiyuan
* @Date 2019/8/5 16:19
**/
@Component("templetRelevanceDao")
public class TempletRelevanceDaoImpl extends BaseDaoImpl<TempletRelevance> implements TempletRelevanceDao {
@Override
public TempletRelevance getByTempletId(Long templetId) {
return this.getSqlSession().selectOne(this.getStatement("getByTempletId"), templetId);
}
}
......@@ -25,8 +25,10 @@ import java.util.Map;
@Component("WeixinQrcodeDao")
public class WeixinQrcodeDaoImpl extends BaseDaoImpl<WeixinQrcode> implements WeixinQrcodeDao {
@Override
public WeixinQrcodeDTO getOneWechatGroup() {
return this.getSqlSession().selectOne(this.getStatement("getOneWechatGroup"));
public WeixinQrcodeDTO getOneWechatGroup(Integer generation) {
Map<String, Object> paramMap = new HashMap();
paramMap.put("generation", generation);
return this.getSqlSession().selectOne(this.getStatement("getOneWechatGroup"),paramMap);
}
@Override
......@@ -45,6 +47,11 @@ public class WeixinQrcodeDaoImpl extends BaseDaoImpl<WeixinQrcode> implements We
}
@Override
public List<QrStatisticsVO> getQrStatisticsByVersion() {
return this.getSessionTemplate().selectList(this.getStatement("getQrStatisticsByVersion"));
}
@Override
public void updateStatusToError() {
this.getSqlSession().update(this.getStatement("updateStatusToError"));
}
......@@ -116,6 +123,11 @@ public class WeixinQrcodeDaoImpl extends BaseDaoImpl<WeixinQrcode> implements We
}
@Override
public List<QrStatisticsVO> getQrcodeCountByVersion() {
return this.getSqlSession().selectList(this.getStatement("getQrcodeCountByVersion"));
}
@Override
public Boolean checkExist(String weixinGroupId) {
return this.getSqlSession().selectOne(this.getStatement("checkExist"), weixinGroupId);
}
......@@ -154,4 +166,12 @@ public class WeixinQrcodeDaoImpl extends BaseDaoImpl<WeixinQrcode> implements We
public String getVirtualIp(Integer generation) {
return this.getSessionTemplate().selectOne("getVirtualIp", generation);
}
@Override
public Integer countByState(Integer state, List<String> altIds) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("state", state);
paramMap.put("altIds", altIds);
return this.getSessionTemplate().selectOne("countByState", paramMap);
}
}
package com.pcloud.book.group.dto;
import java.util.Date;
import java.util.concurrent.atomic.AtomicInteger;
import lombok.Data;
/**
* 自动更新群人数DTO
*/
@Data
public class AutoUpdateGroupNumDTO {
/**
* 群id
*/
private String wxGroupId;
/**
* 机器人id
*/
private String robotId;
/**
* wxGroupIp
*/
private String ip;
/**
* 当前触发次数
*/
private AtomicInteger num = new AtomicInteger(1);
/**
* 开始更新时间(犹豫微信有延迟,所以新用户进群之后30s再次更新群人数)
*/
private Date startTime;
public AutoUpdateGroupNumDTO() {
}
public AutoUpdateGroupNumDTO(String wxGroupId, String robotId, String ip, Date startTime) {
this.wxGroupId = wxGroupId;
this.robotId = robotId;
this.ip = ip;
this.num = new AtomicInteger(1);
this.startTime = startTime;
}
}
......@@ -133,6 +133,11 @@ public class BookGroupDTO extends BaseDto {
private String bookName;
/**
* 编号
*/
private String bookNumber;
private String url;
private Long bookClockInfoId;
......@@ -142,6 +147,11 @@ public class BookGroupDTO extends BaseDto {
*/
private Boolean isShowBookName;
/**
* 进群方式:1群二维码,2客服机器人
*/
private Integer joinGroupType;
public String getUrl() {
return url;
}
......@@ -359,6 +369,23 @@ public class BookGroupDTO extends BaseDto {
this.isShowBookName = isShowBookName;
}
public Integer getJoinGroupType() {
return joinGroupType;
}
public void setJoinGroupType(Integer joinGroupType) {
this.joinGroupType = joinGroupType;
}
public String getBookNumber() {
return bookNumber;
}
public void setBookNumber(String bookNumber) {
this.bookNumber = bookNumber;
}
@Override
public String toString() {
return "BookGroupDTO{" +
......@@ -386,9 +413,13 @@ public class BookGroupDTO extends BaseDto {
", bookImg='" + bookImg + '\'' +
", isbn='" + isbn + '\'' +
", bookName='" + bookName + '\'' +
", bookNumber='" + bookNumber + '\'' +
", url='" + url + '\'' +
", bookClockInfoId=" + bookClockInfoId +
", isShowBookName='" + isShowBookName + '\'' +
", isShowBookName=" + isShowBookName +
", joinGroupType=" + joinGroupType +
"} " + super.toString();
}
}
\ No newline at end of file
......@@ -82,6 +82,8 @@ public class ClassifyDTO implements Serializable {
private Long bookClockInfoId;
private Long createUser;
public Integer getRank() {
return rank;
}
......@@ -194,6 +196,14 @@ public class ClassifyDTO implements Serializable {
this.bookClockInfoId = bookClockInfoId;
}
public Long getCreateUser() {
return createUser;
}
public void setCreateUser(Long createUser) {
this.createUser = createUser;
}
@Override
public String toString() {
return "ClassifyDTO{" +
......@@ -211,6 +221,7 @@ public class ClassifyDTO implements Serializable {
", changeNumber=" + changeNumber +
", rank=" + rank +
", bookClockInfoId=" + bookClockInfoId +
", createUser=" + createUser +
'}';
}
}
package com.pcloud.book.group.dto;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @author 戴兴
* @description TODO
* @date 2019/8/22 21:49
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ClickClassifyDTO implements Serializable {
@ApiModelProperty("社群码标识")
private Long bookGroupId;
@ApiModelProperty("分类标识")
private Long classifyId;
@ApiModelProperty("点击次数")
private Long count;
public Long getBookGroupId() {
return bookGroupId;
}
public void setBookGroupId(Long bookGroupId) {
this.bookGroupId = bookGroupId;
}
public Long getClassifyId() {
return classifyId;
}
public void setClassifyId(Long classifyId) {
this.classifyId = classifyId;
}
public Long getCount() {
return count;
}
public void setCount(Long count) {
this.count = count;
}
@Override
public String toString() {
return "ClickClassifyDTO{" +
"bookGroupId=" + bookGroupId +
", classifyId=" + classifyId +
", count=" + count +
'}';
}
}
\ No newline at end of file
package com.pcloud.book.group.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @author 杨涛
* @description 商城用户已购买的社群码dto
* @date 2019/8/9 10:30
*/
@ApiModel("商城用户已购买的社群码dto")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GroupStoreMyPayDto {
@ApiModelProperty("标识(appId/productId/bookGroupId)")
private Long originId;
@ApiModelProperty("类型(APP/PRODUCT/BOOK_GROUP)")
private String originType;
@ApiModelProperty("标题")
private String originName;
@ApiModelProperty("封面图片")
private String coverImg;
@ApiModelProperty("已经购买的资源数量")
private Integer resourceNum;
@ApiModelProperty("已经购买的资源数量")
private Integer resourceItemNum;
public Long getOriginId() {
return originId;
}
public void setOriginId(Long originId) {
this.originId = originId;
}
public String getOriginType() {
return originType;
}
public void setOriginType(String originType) {
this.originType = originType;
}
public String getOriginName() {
return originName;
}
public void setOriginName(String originName) {
this.originName = originName;
}
public String getCoverImg() {
return coverImg;
}
public void setCoverImg(String coverImg) {
this.coverImg = coverImg;
}
public Integer getResourceNum() {
return resourceNum;
}
public void setResourceNum(Integer resourceNum) {
this.resourceNum = resourceNum;
}
public Integer getResourceItemNum() {
return resourceItemNum;
}
public void setResourceItemNum(Integer resourceItemNum) {
this.resourceItemNum = resourceItemNum;
}
@Override
public String toString() {
return "GroupStoreMyPayDto{" +
"originId=" + originId +
", originType='" + originType + '\'' +
", originName='" + originName + '\'' +
", coverImg='" + coverImg + '\'' +
", resourceNum=" + resourceNum +
", resourceItemNum=" + resourceItemNum +
'}';
}
}
package com.pcloud.book.group.dto;
import lombok.Data;
@Data
public class JoinGroupCipherDTO {
private String cipher;
private Long classifyId;
private Long qrcodeId;
private Long wechatUserId;
private String wxId;
private Boolean hasUsed;
private Long bookGroupId;
}
package com.pcloud.book.group.dto;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @Description
* @Author ruansiyuan
* @Date 2019/8/5 17:14
**/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OwnAltQrcodeInfoDTO implements Serializable {
@ApiModelProperty("小号id")
private String altId;
@ApiModelProperty("小号昵称")
private String altNickName;
@ApiModelProperty("小号头像")
private String altHeadUrl;
@ApiModelProperty("小号二维码地址")
private String altQrcodeUrl;
@ApiModelProperty("暗号")
private String cipher;
public String getAltId() {
return altId;
}
public void setAltId(String altId) {
this.altId = altId;
}
public String getAltNickName() {
return altNickName;
}
public void setAltNickName(String altNickName) {
this.altNickName = altNickName;
}
public String getAltHeadUrl() {
return altHeadUrl;
}
public void setAltHeadUrl(String altHeadUrl) {
this.altHeadUrl = altHeadUrl;
}
public String getAltQrcodeUrl() {
return altQrcodeUrl;
}
public void setAltQrcodeUrl(String altQrcodeUrl) {
this.altQrcodeUrl = altQrcodeUrl;
}
public String getCipher() {
return cipher;
}
public void setCipher(String cipher) {
this.cipher = cipher;
}
@Override
public String toString() {
return "OwnAltQrcodeInfoDTO{" +
"altId='" + altId + '\'' +
", altNickName='" + altNickName + '\'' +
", altHeadUrl='" + altHeadUrl + '\'' +
", altQrcodeUrl='" + altQrcodeUrl + '\'' +
", cipher='" + cipher + '\'' +
'}';
}
}
......@@ -18,6 +18,11 @@ public class QrcodeNameAndProIdDTO {
*/
private Long productId;
/**
* 进群方式:1群二维码,2客服机器人
*/
private Integer joinGroupType;
public Long getBookGroupId() {
return bookGroupId;
}
......@@ -42,12 +47,21 @@ public class QrcodeNameAndProIdDTO {
this.productId = productId;
}
public Integer getJoinGroupType() {
return joinGroupType;
}
public void setJoinGroupType(Integer joinGroupType) {
this.joinGroupType = joinGroupType;
}
@Override
public String toString() {
return "QrcodeNameAndProIdDTO{" +
"bookGroupId=" + bookGroupId +
", groupQrcodeName='" + groupQrcodeName + '\'' +
", productId=" + productId +
", joinGroupType=" + joinGroupType +
'}';
}
}
package com.pcloud.book.group.dto;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* @author 戴兴
* @description TODO
* @date 2019/8/8 21:39
*/
public class StatisticsIncomeDto implements Serializable {
/**
*
*/
private static final long serialVersionUID = 4695716936925368521L;
/**
* 应用标识
*/
private Long appId;
/**
* 书刊标识
*/
private Long bookGroupId;
/**
* 应用名称
*/
private String appName;
/**
* 浏览量
*/
private Integer scanCounts;
/**
* 销售量
*/
private Integer saleCounts;
/**
* 销售额
*/
private BigDecimal saleMoney;
/**
* 收益额
*/
private BigDecimal income;
/**
* 商品标识
*/
private Long productId;
/**
* 商品名称
*/
private String productName;
/**
* 收益时间
*/
private String dateTime;
/**
* 子项
*/
private List<StatisticsIncomeDto> itemList;
public Long getAppId() {
return appId;
}
public void setAppId(Long appId) {
this.appId = appId;
}
public Long getBookGroupId() {
return bookGroupId;
}
public void setBookGroupId(Long bookGroupId) {
this.bookGroupId = bookGroupId;
}
public String getAppName() {
return appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public Integer getScanCounts() {
return scanCounts;
}
public void setScanCounts(Integer scanCounts) {
this.scanCounts = scanCounts;
}
public Integer getSaleCounts() {
return saleCounts;
}
public void setSaleCounts(Integer saleCounts) {
this.saleCounts = saleCounts;
}
public BigDecimal getSaleMoney() {
return saleMoney;
}
public void setSaleMoney(BigDecimal saleMoney) {
this.saleMoney = saleMoney;
}
public BigDecimal getIncome() {
return income;
}
public void setIncome(BigDecimal income) {
this.income = income;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getDateTime() {
return dateTime;
}
public void setDateTime(String dateTime) {
this.dateTime = dateTime;
}
public List<StatisticsIncomeDto> getItemList() {
return itemList;
}
public void setItemList(List<StatisticsIncomeDto> itemList) {
this.itemList = itemList;
}
@Override
public String toString() {
return "StatisticsIncomeDto{" +
"appId=" + appId +
", bookGroupId=" + bookGroupId +
", appName='" + appName + '\'' +
", scanCounts=" + scanCounts +
", saleCounts=" + saleCounts +
", saleMoney=" + saleMoney +
", income=" + income +
", productId=" + productId +
", productName='" + productName + '\'' +
", dateTime='" + dateTime + '\'' +
", itemList=" + itemList +
'}';
}
}
\ No newline at end of file
......@@ -102,6 +102,11 @@ public class BookGroup extends BaseEntity {
*/
private Boolean isShowBookName;
/**
* 进群方式:1群二维码,2客服机器人
*/
private Integer joinGroupType;
public Long getId() {
return id;
}
......@@ -246,6 +251,14 @@ public class BookGroup extends BaseEntity {
this.isShowBookName = isShowBookName;
}
public Integer getJoinGroupType() {
return joinGroupType;
}
public void setJoinGroupType(Integer joinGroupType) {
this.joinGroupType = joinGroupType;
}
@Override
public String toString() {
return "BookGroup{" +
......@@ -267,6 +280,7 @@ public class BookGroup extends BaseEntity {
", updateTime=" + updateTime +
", isDelete=" + isDelete +
", isShowBookName=" + isShowBookName +
", joinGroupType=" + joinGroupType +
"} " + super.toString();
}
}
\ No newline at end of file
......@@ -80,6 +80,10 @@ public class GroupQrcode extends BaseEntity {
* 修改用户
*/
private Long updateUser;
/**
* 猜谜语是否开启
*/
private Boolean riddleOpen;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
......@@ -231,6 +235,14 @@ public class GroupQrcode extends BaseEntity {
this.qrcodeState = qrcodeState;
}
public Boolean getRiddleOpen() {
return riddleOpen;
}
public void setRiddleOpen(Boolean riddleOpen) {
this.riddleOpen = riddleOpen;
}
@Override
public String toString() {
return "GroupQrcode{" +
......@@ -243,12 +255,15 @@ public class GroupQrcode extends BaseEntity {
", weixinGroupId='" + weixinGroupId + '\'' +
", qrcodeUrl='" + qrcodeUrl + '\'' +
", useState=" + useState +
", qrcodeState=" + qrcodeState +
", changeNameState=" + changeNameState +
", isDelete=" + isDelete +
", createUser=" + createUser +
", updateUser=" + updateUser +
", riddleOpen=" + riddleOpen +
", createTime=" + createTime +
", updateTime=" + updateTime +
", qrcodeHeadUrl='" + qrcodeHeadUrl + '\'' +
'}';
}
}
package com.pcloud.book.group.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
/**
* @Description
* @Author ruansiyuan
* @Date 2019/8/5 15:59
**/
public class JoinGroupCipher extends BaseEntity {
private static final long serialVersionUID = -8724831387632496417L;
@ApiModelProperty("密码")
private String cipher;
@ApiModelProperty("分类id")
private Long classifyId;
@ApiModelProperty("群id")
private Long qrcodeId;
@ApiModelProperty("创建人")
private Long wechatUserId;
@ApiModelProperty("使用人微信id")
private String wxId;
@ApiModelProperty("是否使用")
private Boolean hasUsed;
@ApiModelProperty("机器人id")
private String altId;
public String getCipher() {
return cipher;
}
public void setCipher(String cipher) {
this.cipher = cipher;
}
public Long getClassifyId() {
return classifyId;
}
public void setClassifyId(Long classifyId) {
this.classifyId = classifyId;
}
public Long getQrcodeId() {
return qrcodeId;
}
public void setQrcodeId(Long qrcodeId) {
this.qrcodeId = qrcodeId;
}
public Long getWechatUserId() {
return wechatUserId;
}
public void setWechatUserId(Long wechatUserId) {
this.wechatUserId = wechatUserId;
}
public String getWxId() {
return wxId;
}
public void setWxId(String wxId) {
this.wxId = wxId;
}
public Boolean getHasUsed() {
return hasUsed;
}
public void setHasUsed(Boolean hasUsed) {
this.hasUsed = hasUsed;
}
public String getAltId() {
return altId;
}
public void setAltId(String altId) {
this.altId = altId;
}
@Override
public String toString() {
return "JoinGroupCipher{" +
"cipher='" + cipher + '\'' +
", classifyId=" + classifyId +
", qrcodeId=" + qrcodeId +
", wechatUserId=" + wechatUserId +
", wxId='" + wxId + '\'' +
", hasUsed=" + hasUsed +
", altId='" + altId + '\'' +
"} " + super.toString();
}
}
package com.pcloud.book.group.entity;
import com.pcloud.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
/**
* @Description 分类关联表
* @Author ruansiyuan
* @Date 2019/8/5 15:47
**/
public class TempletRelevance extends BaseEntity {
private static final long serialVersionUID = 5014986282950538055L;
@ApiModelProperty("分类id")
private Long templetId;
@ApiModelProperty("大类id")
private Integer largeTemplet;
public Long getTempletId() {
return templetId;
}
public void setTempletId(Long templetId) {
this.templetId = templetId;
}
public Integer getLargeTemplet() {
return largeTemplet;
}
public void setLargeTemplet(Integer largeTemplet) {
this.largeTemplet = largeTemplet;
}
@Override
public String toString() {
return "TempletRelevance{" +
"templetId=" + templetId +
", largeTemplet=" + largeTemplet +
"} " + super.toString();
}
}
package com.pcloud.book.group.enums;
public enum LargTempletEnum {
/**
* K12类
*/
K12(1, "K12类"),
/**
* 少儿类
*/
CHILD(2, "少儿类"),
/**
* 高等/职教
*/
HIGH(3, "高等/职教"),
/**
* 大众类
*/
GENERAL(4, "大众类");
public final Integer code;
public final String name;
LargTempletEnum(Integer code, String name) {
this.code = code;
this.name = name;
}
}
......@@ -173,5 +173,27 @@ public interface BookGroupClassifyFacade {
) throws BizException, PermissionException;
@ApiOperation("拖动排序")
@PostMapping("dragSortClassify")
ResponseDto<?> dragSortClassify(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestBody List<Long> classifyIds
) throws BizException, PermissionException;
@ApiOperation("埋点记录点击分类次数")
@GetMapping("clickClassify")
ResponseDto<?> clickClassify(
@CookieValue("userinfo") @ApiParam("cookie信息") String userInfo,
@RequestParam("bookGroupId") @ApiParam("社群码id") Long bookGroupId,
@RequestParam("classifyId") @ApiParam("群分类id") Long classifyId) throws BizException, PermissionException;
@ApiOperation("获取所有群分类包括已删除的")
@GetMapping("getClassifyIngoreDelete")
ResponseDto<?> getClassifyIngoreDelete(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam("bookGroupId") @ApiParam("社群码id") Long bookGroupId) throws BizException, PermissionException;
}
......@@ -5,6 +5,8 @@ import com.pcloud.book.group.vo.*;
import com.pcloud.common.page.PageBeanNew;
import org.codehaus.jackson.JsonParseException;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -13,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import com.pcloud.book.group.entity.BookGroup;
import com.pcloud.book.group.vo.ListBookGroup4ChannelParamVO;
import com.pcloud.book.group.vo.UpdateRankTypeVO;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.exceptions.BizException;
......@@ -122,6 +125,28 @@ public interface BookGroupFacade {
@RequestParam(value = "endDate", required = false) String endDate)
throws BizException, PermissionException;
@ApiOperation(value = "获取社群书列表(运营)", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", dataType = "string", paramType = "header"),
@ApiImplicitParam(name = "listBookGroup4ChannelParamVO", value = "ListBookGroup4ChannelParamVO", dataType = "ListBookGroup4ChannelParamVO", paramType = "body")
})
@RequestMapping(value = "listBookGroup4Channel", method = RequestMethod.POST)
ResponseDto<PageBean> listBookGroup4Channel(@RequestHeader("token") String token,
@RequestBody ListBookGroup4ChannelParamVO listBookGroup4ChannelParamVO)
throws BizException, PermissionException;
@ApiOperation(value = "获取用户购买或者参与过的社群书信息", httpMethod = "GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "userInfo", value = "Cookie", dataType = "string", paramType = "header"),
@ApiImplicitParam(name = "currentPage", value = "当前页", dataType = "Integer", paramType = "query"),
@ApiImplicitParam(name = "numPerPage", value = "每页条数", dataType = "Integer", paramType = "query")
})
@RequestMapping(value = "getUserBrowseGroup4KnowLedgeMall", method = RequestMethod.GET)
ResponseDto<?> getUserBrowseGroup4KnowLedgeMall(@CookieValue("userInfo")String userInfo,
@RequestParam(value = "currentPage", required = false) Integer currentPage,
@RequestParam(value = "numPerPage", required = false) Integer numPerPage)
throws BizException, PermissionException;
@ApiOperation(value = "获取社群书列表(编辑)", httpMethod = "GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", dataType = "string", paramType = "header"),
......@@ -255,6 +280,27 @@ public interface BookGroupFacade {
@RequestHeader("token") String token
) throws BizException, PermissionException, JsonParseException;
@ApiOperation("删除社群码")
@GetMapping("deleteBookGroup")
ResponseDto<?> deleteBookGroup(
@RequestHeader("token") String token,
@RequestParam("bookGroupId") Long bookGroupId
) throws BizException, PermissionException, JsonParseException;
@ApiOperation("根据分类id获取个人二维码")
@GetMapping("getOwnAltQrcodeInfoDTOByClassifyId")
ResponseDto<?> getOwnAltQrcodeInfoDTOByClassifyId(
@CookieValue("userInfo") String userInfo,
@RequestParam("classifyId") Long classifyId
) throws BizException, PermissionException, JsonParseException;
@ApiOperation("获取所有的大类")
@GetMapping("getAllLargeTemplet")
ResponseDto<?> getAllLargeTemplet(
@RequestHeader("token") String token
) throws BizException, PermissionException, JsonParseException;
@ApiOperation("获取社群书数据")
@RequestMapping(value = "getBookGroupStatisByBookGroupId",method = RequestMethod.GET)
ResponseDto<?> getBookGroupStatisByBookGroupId(@RequestParam("bookGroupId")Long bookGroupId) throws BizException;
......@@ -277,11 +323,15 @@ public interface BookGroupFacade {
@ApiOperation(value = "社群码分类统计--pc", httpMethod = "GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "bookGroupId", value = "bookGroupId", required = true, dataType = "Long", paramType = "query")
@ApiImplicitParam(name = "bookGroupId", value = "bookGroupId", required = true, dataType = "Long", paramType = "query"),
@ApiImplicitParam(name = "currentPage", value = "currentPage", required = true, dataType = "Integer", paramType = "query"),
@ApiImplicitParam(name = "numPerPage", value = "numPerPage", required = true, dataType = "Integer", paramType = "query")
})
@RequestMapping(value ="getClassifyStatistic",method = RequestMethod.GET)
public ResponseDto<List<GroupStatisticVO>> getClassifyStatistic(@RequestHeader("token") String token,
@RequestParam(value = "bookGroupId",required = true) Long bookGroupId) throws BizException, PermissionException;
public ResponseDto<?> getClassifyStatistic(@RequestHeader("token") String token,
@RequestParam(value = "bookGroupId",required = true) Long bookGroupId,
@RequestParam(value = "currentPage",required = true) Integer currentPage,
@RequestParam(value = "numPerPage",required = true) Integer numPerPage) throws BizException, PermissionException;
@ApiOperation(value = "社群码分类下的微信群统计--pc", httpMethod = "GET")
@ApiImplicitParams({
......@@ -289,7 +339,7 @@ public interface BookGroupFacade {
@ApiImplicitParam(name = "classifyId", value = "classifyId", required = true, dataType = "Long", paramType = "query")
})
@RequestMapping(value ="getQrcodeStatistic",method = RequestMethod.GET)
public ResponseDto<List<WxGroupStatisticVO>> getQrcodeStatistic(@RequestHeader("token") String token,
public ResponseDto<?> getQrcodeStatistic(@RequestHeader("token") String token,
@RequestParam(value = "bookGroupId",required = true) Long bookGroupId,
@RequestParam("classifyId") Long classifyId) throws BizException, PermissionException;
......@@ -308,15 +358,11 @@ public interface BookGroupFacade {
@ApiOperation(value = "社群码资源收益数据导出--pc", httpMethod = "GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "bookGroupId", value = "bookGroupId", required = true, dataType = "Long", paramType = "query"),
@ApiImplicitParam(name = "classifyId",value = "classifyId",required = false,dataType = "Long",paramType = "query"),
@ApiImplicitParam(name = "qrcodeId",value = "qrcodeId",required = false,dataType = "Long",paramType = "query"),
@ApiImplicitParam(name = "type",value = "type",required = true,dataType = "String",paramType = "query")
@ApiImplicitParam(name = "bookGroupId", value = "bookGroupId", required = true, dataType = "Long", paramType = "query")
})
@RequestMapping(value ="exportRescourceIncomeData",method = RequestMethod.GET)
public ResponseDto<?> exportRescourceIncomeData(@RequestHeader("token") String token, @RequestParam(value = "bookGroupId",required = true) Long bookGroupId,
@RequestParam(value = "classifyId",required = false) Long classifyId, @RequestParam(value = "qrcodeId",required = false) Long qrcodeId,
@RequestParam("type") String type) throws BizException, PermissionException;
public ResponseDto<?> exportRescourceIncomeData(@RequestHeader("token") String token,
@RequestParam(value = "bookGroupId",required = true) Long bookGroupId) throws BizException, PermissionException;
......
......@@ -16,6 +16,8 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import java.util.List;
/**
* @author lily
* @date 2019/4/26 15:10
......@@ -38,4 +40,10 @@ public interface WeixinQrcodeFacade {
@GetMapping("getQrStatistics")
ResponseDto<QrStatisticsVO> getQrStatistics(@RequestHeader("token") String token)
throws BizException, PermissionException;
@GetMapping("getQrStatisticsByVersion")
ResponseDto<List<QrStatisticsVO>> getQrStatisticsByVersion(@RequestHeader("token") String token)
throws BizException, PermissionException;
}
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