修改相关bug
This commit is contained in:
parent
4dbf70143f
commit
3572600845
@ -41,7 +41,6 @@ public class CacheKey {
|
||||
public static final String COLLECT_LIVING_VIDEO_LOCK = "collect_living_video_lock";
|
||||
public static final String COLLECT_RECENT_END_VIDEO_LOCK = "collect_recent_end_video_lock";
|
||||
|
||||
public static final String SYNC_APP_ORDER = "sync_app_order";
|
||||
public static final String LOAD_USER_BLACK_LIST = "load_user_black_list";
|
||||
public static final String SAVE_MESSAGE_READ = "save_message_read";
|
||||
public static final String SAVE_GROUP_USER = "save_group_user";
|
||||
|
||||
@ -17,6 +17,8 @@ public class GroupMessageStateMachine {
|
||||
groupMessageSM.add(GroupMessageStatus.INITIAL, GroupMessageStatus.DELETED);
|
||||
// 已审核 -> 删除 -> 已删除
|
||||
groupMessageSM.add(GroupMessageStatus.AUDITED, GroupMessageStatus.DELETED);
|
||||
// 已审核 -> 撤回 -> 初始
|
||||
groupMessageSM.add(GroupMessageStatus.AUDITED, GroupMessageStatus.INITIAL);
|
||||
|
||||
return groupMessageSM;
|
||||
}
|
||||
|
||||
@ -63,6 +63,7 @@ public class CommentBlackVO extends CommonPhoneVO {
|
||||
|
||||
public CommentBlackVO(CommentBlack commentBlack) {
|
||||
this.id = commentBlack.getId();
|
||||
super.setPhone(commentBlack.getPhone());
|
||||
this.userName = commentBlack.getUserName();
|
||||
this.productId = commentBlack.getProductId();
|
||||
this.productType = commentBlack.getProductType();
|
||||
|
||||
@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.syzb.course.entity.Course;
|
||||
import com.syzb.course.entity.CoursePackage;
|
||||
import com.syzb.course.entity.ShortVideo;
|
||||
import com.syzb.group.entity.GroupInfo;
|
||||
import com.syzb.video.entity.VideoLive;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@ -84,6 +85,21 @@ public class SetMainPageQuery {
|
||||
return coursePackage;
|
||||
}
|
||||
|
||||
public GroupInfo toGroupPO() {
|
||||
GroupInfo groupInfo = new GroupInfo();
|
||||
groupInfo.setId(id);
|
||||
if (isRecommend != null) {
|
||||
groupInfo.setIsRecommend(isRecommend);
|
||||
}
|
||||
if (isDisplay != null) {
|
||||
groupInfo.setIsDisplay(isDisplay);
|
||||
}
|
||||
if (StrUtil.isNotBlank(mainPageText)) {
|
||||
groupInfo.setMainPageText(mainPageText);
|
||||
}
|
||||
return groupInfo;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import com.syzb.common.result.CommonResult;
|
||||
import com.syzb.common.result.Pager;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.InsertIdVO;
|
||||
import com.syzb.course.query.SetMainPageQuery;
|
||||
import com.syzb.group.query.info.*;
|
||||
import com.syzb.group.service.admin.AdminGroupInfoService;
|
||||
import com.syzb.group.vo.GroupVO;
|
||||
@ -79,4 +80,12 @@ public class AdminGroupInfoController {
|
||||
return CommonResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("后台设置首页参数")
|
||||
@PostMapping("/admin/group/info/setMainPageParam")
|
||||
public CommonResult<Void> setMainPageParam(@Validated @RequestBody @ApiParam(required = true) SetMainPageQuery query,
|
||||
@RequestAttribute(value = "backendUser", required = false) BackendUserVO backendUserVO) {
|
||||
adminGroupInfoService.setMainPageParam(query, backendUserVO);
|
||||
return CommonResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
@ -35,8 +35,11 @@ public class AppGroupMessageController {
|
||||
@PostMapping("/app/group/message/getMessageList")
|
||||
public CommonResult<AppPager<GroupMessageVO>> getMessageList(
|
||||
@Validated @RequestBody @ApiParam(required = true) ListGroupMessageAppQuery query,
|
||||
@RequestAttribute(value = "frontUser", required = false) FrontUserVO frontUserVO) {
|
||||
AppPager<GroupMessageVO> list = appGroupMessageService.getMessageList(query, frontUserVO);
|
||||
@RequestAttribute(value = "frontUser", required = false) FrontUserVO frontUser) {
|
||||
if (frontUser == null) {
|
||||
throw new BizException(ResponseStatus.SESSION_EXPIRY);
|
||||
}
|
||||
AppPager<GroupMessageVO> list = appGroupMessageService.getMessageList(query, frontUser);
|
||||
return CommonResult.success(list);
|
||||
}
|
||||
|
||||
@ -57,6 +60,9 @@ public class AppGroupMessageController {
|
||||
public CommonResult<Void> readMessage(
|
||||
@Validated @RequestBody @ApiParam(required = true) ReadGroupMessageAppQuery query,
|
||||
@RequestAttribute(value = "frontUser", required = false) FrontUserVO frontUser) {
|
||||
if (frontUser == null) {
|
||||
throw new BizException(ResponseStatus.SESSION_EXPIRY);
|
||||
}
|
||||
appGroupMessageService.readMessage(query, frontUser);
|
||||
return CommonResult.success();
|
||||
}
|
||||
@ -66,6 +72,9 @@ public class AppGroupMessageController {
|
||||
public CommonResult<Integer> unreadCount(
|
||||
@Validated @RequestBody @ApiParam(required = true) QueryUnreadCountAppQuery query,
|
||||
@RequestAttribute(value = "frontUser", required = false) FrontUserVO frontUser) {
|
||||
if (frontUser == null) {
|
||||
throw new BizException(ResponseStatus.SESSION_EXPIRY);
|
||||
}
|
||||
Integer count = appGroupMessageService.queryUnreadCount(query, frontUser);
|
||||
return CommonResult.success(count);
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@ package com.syzb.group.query.info;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.syzb.common.constant.IsDisplay;
|
||||
import com.syzb.common.constant.IsOrNot;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.group.constant.GroupInfoStatus;
|
||||
import com.syzb.group.entity.GroupInfo;
|
||||
@ -108,6 +110,7 @@ public class SaveGroupQuery {
|
||||
groupInfo.setUpdateTime(LocalDateTime.now());
|
||||
groupInfo.setCreateUserId(backendUserVO.getUserId());
|
||||
groupInfo.setWechatWorkId(wechatWorkId);
|
||||
groupInfo.setIsDisplay(IsDisplay.YES.value);
|
||||
return groupInfo;
|
||||
}
|
||||
|
||||
|
||||
@ -21,6 +21,8 @@ import com.syzb.common.vo.AuthResultVO;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.FrontUserVO;
|
||||
import com.syzb.common.vo.InsertIdVO;
|
||||
import com.syzb.course.entity.ShortVideo;
|
||||
import com.syzb.course.query.SetMainPageQuery;
|
||||
import com.syzb.course.service.PageService;
|
||||
import com.syzb.group.constant.GroupInfoStatus;
|
||||
import com.syzb.group.entity.GroupInfo;
|
||||
@ -96,7 +98,7 @@ public class AdminGroupInfoService {
|
||||
|
||||
GroupInfo groupInfo = query.toPO(backendUserVO, groupInfoInDB.getAdvisorId());
|
||||
groupInfoMapper.updateById(groupInfo);
|
||||
clearCache(query.getId());
|
||||
clearCache(query.getId(), null);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@ -112,7 +114,7 @@ public class AdminGroupInfoService {
|
||||
|
||||
GroupInfo groupInfo = query.toPO(targetStatus, backendUserVO);
|
||||
groupInfoMapper.updateById(groupInfo);
|
||||
clearCache(query.getId());
|
||||
clearCache(query.getId(), groupInfoInDB.getAdvisorId());
|
||||
}
|
||||
|
||||
public Pager<GroupVO> list(ListGroupQuery query, BackendUserVO backendUserVO) {
|
||||
@ -177,7 +179,18 @@ public class AdminGroupInfoService {
|
||||
}
|
||||
GroupInfo groupInfo = query.toPO();
|
||||
groupInfoMapper.updateById(groupInfo);
|
||||
clearCache(query.getId());
|
||||
clearCache(query.getId(), null);
|
||||
}
|
||||
|
||||
public void setMainPageParam(SetMainPageQuery query, BackendUserVO backendUserVO) {
|
||||
// 不使用返回值,仅校验课程是否存在以及数据权限
|
||||
GroupInfo groupInDB = getEntity(query.getId(), backendUserVO);
|
||||
if (groupInDB == null) {
|
||||
throw new BizException(ResponseStatus.ID_NOT_EXIST_ERROR);
|
||||
}
|
||||
GroupInfo video = query.toGroupPO();
|
||||
groupInfoMapper.updateById(video);
|
||||
this.clearCache(query.getId(), groupInDB.getAdvisorId());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -292,8 +305,13 @@ public class AdminGroupInfoService {
|
||||
return advisorId;
|
||||
}
|
||||
|
||||
public void clearCache(Integer id) {
|
||||
groupCache.delete(CacheKey.GroupKey.GROUP_INFO + id);
|
||||
public void clearCache(Integer id, Integer advisorId) {
|
||||
if (id != null) {
|
||||
groupCache.delete(CacheKey.GroupKey.GROUP_INFO + id);
|
||||
}
|
||||
if (advisorId != null) {
|
||||
groupCache.delete(CacheKey.GroupKey.MAIN_GROUP_LIST + advisorId);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -118,6 +118,9 @@ public class AdminGroupMessageService {
|
||||
groupMessageInDB.setStatus(GroupMessageStatus.AUDITED.value);
|
||||
groupMessageService.publishMessage(groupMessageInDB);
|
||||
}
|
||||
} else if (GroupMessageStatus.INITIAL.equals(targetStatus)) {
|
||||
groupMessageInDB.setStatus(GroupMessageStatus.INITIAL.value);
|
||||
groupMessageService.publishMessage(groupMessageInDB);
|
||||
}
|
||||
clearCache(query.getId());
|
||||
}
|
||||
@ -229,7 +232,7 @@ public class AdminGroupMessageService {
|
||||
|
||||
groupMessageService.publishGroupMessage(GroupMessageChannel.ALL, GroupMessageType.OPEN_INTERACTIVE, groupId, query.getStatus());
|
||||
|
||||
adminGroupInfoService.clearCache(groupId);
|
||||
adminGroupInfoService.clearCache(groupId, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -247,7 +250,7 @@ public class AdminGroupMessageService {
|
||||
|
||||
groupMessageService.publishGroupMessage(GroupMessageChannel.ALL, GroupMessageType.OPEN_PRIVATE_CHAT, groupId, query.getStatus());
|
||||
|
||||
adminGroupInfoService.clearCache(groupId);
|
||||
adminGroupInfoService.clearCache(groupId, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -265,7 +268,7 @@ public class AdminGroupMessageService {
|
||||
|
||||
groupMessageService.publishGroupMessage(GroupMessageChannel.ALL, GroupMessageType.SHOW_GROUP_MEMBER_COUNT, groupId, query.getStatus());
|
||||
|
||||
adminGroupInfoService.clearCache(groupId);
|
||||
adminGroupInfoService.clearCache(groupId, null);
|
||||
}
|
||||
|
||||
public void setShowNickName(GroupMessageStatusQuery query, BackendUserVO backendUser) {
|
||||
@ -280,7 +283,7 @@ public class AdminGroupMessageService {
|
||||
|
||||
groupMessageService.publishGroupMessage(GroupMessageChannel.ALL, GroupMessageType.SHOW_FULL_NICKNAME, groupId, query.getStatus());
|
||||
|
||||
adminGroupInfoService.clearCache(groupId);
|
||||
adminGroupInfoService.clearCache(groupId, null);
|
||||
}
|
||||
|
||||
public void setFirstAudit(GroupMessageStatusQuery query, BackendUserVO backendUser) {
|
||||
@ -295,7 +298,7 @@ public class AdminGroupMessageService {
|
||||
|
||||
groupMessageService.publishGroupMessage(GroupMessageChannel.ALL, GroupMessageType.PRE_CHECK_SEND, groupId, query.getStatus());
|
||||
|
||||
adminGroupInfoService.clearCache(groupId);
|
||||
adminGroupInfoService.clearCache(groupId, null);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.common.config.cache.CacheKey;
|
||||
import com.syzb.common.constant.IsDisplay;
|
||||
import com.syzb.common.query.OnlyIdQuery;
|
||||
import com.syzb.common.result.AppPager;
|
||||
import com.syzb.common.service.AppUserService;
|
||||
@ -34,9 +35,6 @@ public class AppGroupInfoService {
|
||||
@Resource
|
||||
private GroupInfoMapper groupInfoMapper;
|
||||
|
||||
@Resource
|
||||
private AuthService authService;
|
||||
|
||||
@Resource
|
||||
private PageService pageService;
|
||||
|
||||
@ -81,7 +79,7 @@ public class AppGroupInfoService {
|
||||
LambdaQueryWrapper<GroupInfo> wrapper = Wrappers.<GroupInfo>lambdaQuery()
|
||||
.eq(GroupInfo::getAdvisorId, id)
|
||||
.eq(GroupInfo::getStatus, GroupInfoStatus.AUDITED.value)
|
||||
// .eq(GroupInfo::getIsDisplay, IsDisplay.YES.value)
|
||||
.eq(GroupInfo::getIsDisplay, IsDisplay.YES.value)
|
||||
.orderByDesc(GroupInfo::getIsRecommend, GroupInfo::getAuditTime);
|
||||
List<GroupInfo> list = groupInfoMapper.selectList(wrapper);
|
||||
NavigableSet<GroupSortEntity> set = new TreeSet<>();
|
||||
|
||||
@ -20,7 +20,6 @@ import com.syzb.group.entity.GroupMessage;
|
||||
import com.syzb.group.entity.GroupMessageRead;
|
||||
import com.syzb.group.mapper.GroupMessageMapper;
|
||||
import com.syzb.group.mapper.GroupMessageReadMapper;
|
||||
import com.syzb.group.mapper.GroupUserFlowMapper;
|
||||
import com.syzb.group.vo.message.GroupMessageReadVO;
|
||||
import com.syzb.group.vo.message.GroupMessageVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -48,14 +47,11 @@ public class GroupCacheService {
|
||||
@Resource
|
||||
private GroupMessageMapper groupMessageMapper;
|
||||
|
||||
@Resource
|
||||
private GroupUserFlowMapper groupUserFlowMapper;
|
||||
|
||||
@Resource
|
||||
private IMap<String, Object> groupCache;
|
||||
|
||||
public NavigableSet<Integer> getMessageIdSet(Integer groupId, String userId, QueryGroupMessageType type) {
|
||||
String cacheKey = buildMessageIdSetKey(CacheKey.GroupKey.GROUP_MESSAGE_LIST, userId, type);
|
||||
String cacheKey = buildMessageIdSetKey(CacheKey.GroupKey.GROUP_MESSAGE_LIST, groupId, userId, type);
|
||||
return cacheService.get(groupCache, cacheKey, () -> {
|
||||
LambdaQueryWrapper<GroupMessage> wrapper = buildWrapper(groupId, userId, type);
|
||||
List<Object> objList = groupMessageMapper.selectObjs(wrapper);
|
||||
@ -66,7 +62,7 @@ public class GroupCacheService {
|
||||
}
|
||||
|
||||
public TreeMap<LocalDate, Integer> getDateIdMap(Integer groupId, String userId, QueryGroupMessageType type) {
|
||||
String cacheKey = buildMessageIdSetKey(CacheKey.GroupKey.GROUP_MESSAGE_DATE_ID_MAP, userId, type);
|
||||
String cacheKey = buildMessageIdSetKey(CacheKey.GroupKey.GROUP_MESSAGE_DATE_ID_MAP, groupId, userId, type);
|
||||
return cacheService.get(groupCache, cacheKey, () -> {
|
||||
LambdaQueryWrapper<GroupMessage> wrapper = buildWrapper(groupId, userId, type);
|
||||
List<DateIdVO> dateIdList = groupMessageMapper.selectDateIdList(wrapper);
|
||||
@ -112,7 +108,7 @@ public class GroupCacheService {
|
||||
private void removeMessage(Integer groupId, String userId, QueryGroupMessageType type, Integer messageId) {
|
||||
NavigableSet<Integer> set = getMessageIdSet(groupId, userId, type);
|
||||
set.remove(messageId);
|
||||
String cacheKey = buildMessageIdSetKey(CacheKey.GroupKey.GROUP_MESSAGE_LIST, userId, type);
|
||||
String cacheKey = buildMessageIdSetKey(CacheKey.GroupKey.GROUP_MESSAGE_LIST, groupId, userId, type);
|
||||
groupCache.put(cacheKey, set);
|
||||
}
|
||||
|
||||
@ -141,7 +137,7 @@ public class GroupCacheService {
|
||||
private void addMessage(Integer groupId, String userId, QueryGroupMessageType type, Integer messageId) {
|
||||
NavigableSet<Integer> set = getMessageIdSet(groupId, userId, type);
|
||||
set.add(messageId);
|
||||
String cacheKey = buildMessageIdSetKey(CacheKey.GroupKey.GROUP_MESSAGE_LIST, userId, type);
|
||||
String cacheKey = buildMessageIdSetKey(CacheKey.GroupKey.GROUP_MESSAGE_LIST, groupId, userId, type);
|
||||
groupCache.put(cacheKey, set);
|
||||
}
|
||||
|
||||
@ -239,8 +235,8 @@ public class GroupCacheService {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static String buildMessageIdSetKey(String prefix, String userId, QueryGroupMessageType type) {
|
||||
String cacheKey = prefix + type.value;
|
||||
private static String buildMessageIdSetKey(String prefix, Integer groupId, String userId, QueryGroupMessageType type) {
|
||||
String cacheKey = prefix + groupId + "|" + type.value;
|
||||
if (QueryGroupMessageType.PRIVATE.equals(type)) {
|
||||
cacheKey += "|" + userId;
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public interface VideoLiveMapper extends BaseMapper<VideoLive> {
|
||||
|
||||
@Select("SELECT v.advisor_id, COUNT(1) FROM video_live v\n" +
|
||||
"LEFT JOIN app_order o\n" +
|
||||
"ON v.id = o.video_id AND o.product_type = 3 AND o.pay_status = #{payStatus}\n" +
|
||||
"ON v.id = o.product_id AND o.product_type = 3 AND o.pay_status = #{payStatus}\n" +
|
||||
"WHERE v.id IN (${videoIds})\n" +
|
||||
"GROUP BY v.advisor_id\n" +
|
||||
"ORDER BY COUNT(1) DESC")
|
||||
@ -105,10 +105,10 @@ public interface VideoLiveMapper extends BaseMapper<VideoLive> {
|
||||
|
||||
@Select("SELECT v.advisor_id, COUNT(1) FROM video_live v\n" +
|
||||
"LEFT JOIN app_order o\n" +
|
||||
"ON v.id = o.video_id AND o.product_type = 3 AND o.pay_status = #{payStatus}\n" +
|
||||
"ON v.id = o.product_id AND o.product_type = 3 AND o.pay_status = #{payStatus}\n" +
|
||||
"WHERE v.id IN (${videoIds})\n" +
|
||||
"GROUP BY v.advisor_id\n" +
|
||||
"ORDER BY SUM(o.pay_total) DESC")
|
||||
"ORDER BY SUM(o.received_amount) DESC")
|
||||
Page<VideoCustomerReadRankListVO> selectAdvisorRankListOrderByOrderAmount(Page<?> toPage, @Param("videoIds") String videoIds, @Param("payStatus") Integer payStatus);
|
||||
|
||||
@Select("SELECT v.id FROM video_live v\n" +
|
||||
@ -129,7 +129,7 @@ public interface VideoLiveMapper extends BaseMapper<VideoLive> {
|
||||
|
||||
@Select("SELECT v.id, COUNT(1) FROM video_live v\n" +
|
||||
"LEFT JOIN app_order o\n" +
|
||||
"ON v.id = o.video_id AND o.product_type = 3 AND o.status = #{payStatus}\n" +
|
||||
"ON v.id = o.product_id AND o.product_type = 3 AND o.status = #{payStatus}\n" +
|
||||
"WHERE v.id IN (${videoIds})\n" +
|
||||
"GROUP BY v.id\n" +
|
||||
"ORDER BY COUNT(1) DESC")
|
||||
@ -137,10 +137,10 @@ public interface VideoLiveMapper extends BaseMapper<VideoLive> {
|
||||
|
||||
@Select("SELECT v.id, COUNT(1) FROM video_live v\n" +
|
||||
"LEFT JOIN app_order o\n" +
|
||||
"ON v.id = o.video_id AND o.product_type = 3 AND o.status = #{payStatus}\n" +
|
||||
"ON v.id = o.product_id AND o.product_type = 3 AND o.status = #{payStatus}\n" +
|
||||
"WHERE v.id IN (${videoIds})\n" +
|
||||
"GROUP BY v.id\n" +
|
||||
"ORDER BY SUM(o.pay_total) DESC")
|
||||
"ORDER BY SUM(o.received_amount) DESC")
|
||||
Page<VideoCustomerReadRankListVO> selectVideoRankListOrderByOrderAmount(Page<?> toPage, @Param("videoIds") String videoIds, @Param("payStatus") Integer payStatus);
|
||||
|
||||
}
|
||||
|
||||
@ -84,16 +84,16 @@ public interface VideoLiveUserMapper extends EasyBaseMapper<VideoLiveUser> {
|
||||
"GROUP BY s.sale_user_id) sc \n" +
|
||||
"ON sr.sale_user_id = sc.sale_user_id \n" +
|
||||
"LEFT JOIN \n" +
|
||||
"(SELECT s.sale_user_id, COUNT(*) AS count, IFNULL(SUM(o.pay_total), 0) AS amount FROM video_live_customer_sale s \n" +
|
||||
"(SELECT s.sale_user_id, COUNT(*) AS count, IFNULL(SUM(o.received_amount), 0) AS amount FROM video_live_customer_sale s \n" +
|
||||
"LEFT JOIN app_order o \n" +
|
||||
"ON s.user_id = o.user_name AND s.video_id = o.video_id \n" +
|
||||
"ON s.user_id = o.user_id AND s.video_id = o.product_id AND o.product_type = 3 \n" +
|
||||
"WHERE s.video_id = #{videoId} AND s.sale_user_id IS NOT NULL AND o.product_type = 3 AND o.pay_status = 1 \n" +
|
||||
"GROUP BY s.sale_user_id) op \n" +
|
||||
"ON sr.sale_user_id = op.sale_user_id \n" +
|
||||
"LEFT JOIN \n" +
|
||||
"(SELECT s.sale_user_id, COUNT(*) AS count FROM video_live_customer_sale s \n" +
|
||||
"LEFT JOIN app_order o \n" +
|
||||
"ON s.user_id = o.user_name AND s.video_id = o.video_id \n" +
|
||||
"ON s.user_id = o.user_id AND s.video_id = o.product_id AND o.product_type = 3 \n" +
|
||||
"WHERE s.video_id = #{videoId} AND s.sale_user_id IS NOT NULL AND o.product_type = 3 AND o.pay_status = 2 \n" +
|
||||
"GROUP BY s.sale_user_id) oup \n" +
|
||||
"ON sr.sale_user_id = oup.sale_user_id \n" +
|
||||
|
||||
@ -607,7 +607,7 @@ public class AdminVideoStatisticService {
|
||||
wrapper.exists("SELECT 1 FROM video_live_user c WHERE c.video_id = u.video_id AND c.user_id = u.user_id AND c.type = {0}", VideoUserRecordType.CART.value);
|
||||
}
|
||||
if (VideoCustomerType.ORDER_NOT_PAID.value.equals(type)) {
|
||||
wrapper.exists("SELECT 1 FROM app_order o WHERE o.video_id = u.video_id AND o.user_name = u.user_id AND o.pay_status = {0}", IsOrNot.NOT.value);
|
||||
wrapper.exists("SELECT 1 FROM app_order o WHERE o.product_id = u.video_id AND o.user_id = u.user_id AND o.pay_status = {0}", IsOrNot.NOT.value);
|
||||
}
|
||||
// if (VideoCustomerType.COUPON_NOT_USED.value.equals(type) || IsOrNot.IS.value.equals(hasGotCoupon)) {
|
||||
// if (userCouponMap.isEmpty()) {
|
||||
@ -624,7 +624,7 @@ public class AdminVideoStatisticService {
|
||||
// wrapper.in("u.user_id", userCouponMap.keySet());
|
||||
// }
|
||||
if (VideoCustomerType.SUBSCRIBE_PRODUCT.value.equals(type) || IsOrNot.IS.value.equals(hasBoughtPro)) {
|
||||
wrapper.exists("SELECT 1 FROM app_order o WHERE o.video_id = u.video_id AND o.user_name = u.user_id AND o.pay_status = {0}", IsOrNot.IS.value);
|
||||
wrapper.exists("SELECT 1 FROM app_order o WHERE o.product_id = u.video_id AND o.user_id = u.user_id AND o.pay_status = {0}", IsOrNot.IS.value);
|
||||
}
|
||||
if (VideoCustomerType.COMPLETE_SURVEY.value.equals(type) || IsOrNot.IS.value.equals(isAnswer)) {
|
||||
wrapper.exists("SELECT 1 FROM video_question_answer a JOIN video_question_main q WHERE a.question_id = q.id AND a.user_id = u.user_id AND q.video_id = u.video_id");
|
||||
@ -633,7 +633,7 @@ public class AdminVideoStatisticService {
|
||||
wrapper.exists("SELECT 1 FROM video_live_message m WHERE m.video_id = u.video_id AND m.user_id = u.user_id AND m.type = {1}", VideoMessageContentType.TEXT.value);
|
||||
}
|
||||
if (IsOrNot.IS.value.equals(isOrder)) {
|
||||
wrapper.exists("SELECT 1 FROM app_order o WHERE o.video_id = u.video_id AND o.user_name = u.user_id");
|
||||
wrapper.exists("SELECT 1 FROM app_order o WHERE o.product_id = u.video_id AND o.user_id = u.user_id");
|
||||
}
|
||||
Page<VideoStatisticUserDetailVO> page = adminVideoInteractionService.selectVideoUserDetail(query.toPage(), wrapper);
|
||||
List<VideoStatisticUserDetailVO> records = page.getRecords();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user