feat:查看微信大修改
This commit is contained in:
1 parent
bd1b400f50
commit
bb942b08bc
14 files changed
+174
-47
No files matched your search
+3
-2
@@ -48,7 +48,7 @@ public class OpenTypeController {
|
||||
private OpenTypeService openTypeService;
|
||||
|
||||
@PostMapping("/update-paid")
|
||||
@Operation(summary = "更新钱包充值为已充值")
|
||||
@Operation(summary = "更新钱包充值为已充值(支付的回调)")
|
||||
@PermitAll
|
||||
public CommonResult<Boolean> updateWalletRechargerPaid(@Valid @RequestBody PayOrderNotifyReqDTO notifyReqDTO) {
|
||||
openTypeService.updateWalletRechargerPaid(Long.valueOf(notifyReqDTO.getMerchantOrderId()), notifyReqDTO.getPayOrderId());
|
||||
@@ -56,7 +56,8 @@ public class OpenTypeController {
|
||||
}
|
||||
|
||||
@PostMapping("/update-refunded")
|
||||
@Operation(summary = "更新钱包充值为已退款")
|
||||
@Operation(summary = "更新钱包充值为已退款(退款的回调)")
|
||||
@PermitAll
|
||||
public CommonResult<Boolean> updateWalletRechargeRefunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) {
|
||||
openTypeService.updateWalletRechargeRefunded(Long.valueOf(notifyReqDTO.getMerchantOrderId()), notifyReqDTO.getPayRefundId());
|
||||
return success(true);
|
||||
|
||||
-2
@@ -31,8 +31,6 @@ public class AppOpenTypeController {
|
||||
@Resource
|
||||
private OpenTypeService openTypeService;
|
||||
|
||||
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "查看全部开通会员列表")
|
||||
public CommonResult<List<OpenTypeRespVO>> getOpenTypeList(@Valid OpenTypePageReqVO pageReqVO) {
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.opentype;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.opentype.vo.openType.OpenTypeRespVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.opentype.vo.openTypeUser.OpenTypeUserReqVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.opentype.vo.openTypeUser.OpenTypeUserRespVO;
|
||||
import cn.iocoder.yudao.module.member.dal.mysql.opentype.OpenTypeUserMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "用户 App - 会员开通记录")
|
||||
@RestController
|
||||
@RequestMapping("/member/open-type-user")
|
||||
@Validated
|
||||
public class AppOpenTypeUserController {
|
||||
|
||||
@Resource
|
||||
private OpenTypeUserMapper openTypeUserMapper;
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "查看全部开通会员列表")
|
||||
public CommonResult<PageResult<OpenTypeRespVO>> getOpenTypeList(@Valid OpenTypeUserReqVO pageReqVO) {
|
||||
IPage<OpenTypeUserRespVO> pageResult = openTypeUserMapper.page(new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()), pageReqVO);
|
||||
|
||||
PageResult result = new PageResult<OpenTypeUserRespVO>();
|
||||
result.setTotal(pageResult.getTotal());
|
||||
result.setList(pageResult.getRecords());
|
||||
|
||||
return success(result);
|
||||
}
|
||||
|
||||
}
|
||||
+6
@@ -75,6 +75,12 @@ public class AppRecentController {
|
||||
return success(recentService.lookWechat(getLoginUserId(), memberId));
|
||||
}
|
||||
|
||||
@GetMapping("/look-wechat-count")
|
||||
@Operation(summary = "今日查看微信次数")
|
||||
public CommonResult<AppLookWechatCountResVo> lookWechatCount() {
|
||||
return success(recentService.lookWechatCount(getLoginUserId()));
|
||||
}
|
||||
|
||||
@PostMapping("/create/view-record")
|
||||
@Operation(summary = "添加用户预览记录")
|
||||
public CommonResult<Long> createViewRecord(@Valid @RequestBody AppRecentViewRecordReqVo dto) {
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.recent.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 微信查看次数响应
|
||||
*/
|
||||
@Data
|
||||
public class AppLookWechatCountResVo {
|
||||
|
||||
/**
|
||||
* 今日已查看的次数
|
||||
*/
|
||||
private Integer todayCount = 0;
|
||||
|
||||
/**
|
||||
* 今日可查看的总次数
|
||||
*/
|
||||
private Integer todayCountTotal = 0;
|
||||
|
||||
}
|
||||
+1
-1
@@ -33,7 +33,7 @@ public interface OpenTypeUserMapper extends BaseMapperX<OpenTypeUserDO> {
|
||||
.eq(OpenTypeUserDO::getMemberId, memberId)
|
||||
.eq(OpenTypeUserDO::getStatus, OpenTypeUserStatusEnum.EFFICIENT.getType())
|
||||
.eq(OpenTypeUserDO::getPayStatus, true)
|
||||
.isNotNull(OpenTypeUserDO::getRefundStatus)
|
||||
.isNull(OpenTypeUserDO::getRefundStatus)
|
||||
.gt(OpenTypeUserDO::getEndTime, LocalDateTime.now())
|
||||
.orderByDesc(OpenTypeUserDO::getEndTime)
|
||||
.last("LIMIT 1")
|
||||
|
||||
+5
@@ -21,6 +21,7 @@ import cn.iocoder.yudao.module.member.enums.MemberErrorCode;
|
||||
import cn.iocoder.yudao.module.member.enums.opentype.OpenTypeUserStatusEnum;
|
||||
import cn.iocoder.yudao.module.member.service.config.MemberConfigService;
|
||||
import cn.iocoder.yudao.module.member.service.opentype.BO.OpenTypeExtBO;
|
||||
import cn.iocoder.yudao.module.member.service.user.MemberRecentTagService;
|
||||
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
|
||||
import cn.iocoder.yudao.module.pay.api.order.PayOrderApi;
|
||||
import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO;
|
||||
@@ -78,6 +79,8 @@ public class OpenTypeServiceImpl implements OpenTypeService {
|
||||
private MemberUserService memberUserService;
|
||||
@Resource
|
||||
private MemberConfigService memberConfigService;
|
||||
@Resource
|
||||
private MemberRecentTagService memberRecentTagService;
|
||||
|
||||
@Resource
|
||||
private ChatApi chatApi;
|
||||
@@ -373,6 +376,8 @@ public class OpenTypeServiceImpl implements OpenTypeService {
|
||||
if (updateCount == 0) {
|
||||
throw exception(MemberErrorCode.EMPTY, "钱包充值更新支付状态失败,钱包充值记录不是【未支付】状态");
|
||||
}
|
||||
// 添加会员tag
|
||||
memberRecentTagService.createOrUpdateVipTag(openTypeUserDO.getMemberId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -141,10 +141,10 @@ public class OperationServiceImpl implements OperationService {
|
||||
public Integer lookWechatCount(Long operateMemberId, Long memberId) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
Long count = operationMapper.selectCount(new LambdaQueryWrapperX<OperationDO>()
|
||||
.eq(OperationDO::getOperatorMemberId, operateMemberId)
|
||||
.eqIfPresent(OperationDO::getMemberId, memberId)
|
||||
.eq(OperationDO::getBizType, MemberRecentOperateEnum.MEMBER_LOOK_WECHAT.getType())
|
||||
// .between(OperationDO::getCreateTime, now.with(LocalTime.MIN), now.with(LocalTime.MAX))
|
||||
.eq(OperationDO::getOperatorMemberId, operateMemberId)
|
||||
.eqIfPresent(OperationDO::getMemberId, memberId)
|
||||
.eq(OperationDO::getBizType, MemberRecentOperateEnum.MEMBER_LOOK_WECHAT.getType())
|
||||
.between(OperationDO::getCreateTime, now.with(LocalTime.MIN), now.with(LocalTime.MAX))
|
||||
);
|
||||
return Math.toIntExact(count);
|
||||
}
|
||||
|
||||
+5
-1
@@ -43,6 +43,11 @@ public interface RecentService {
|
||||
*/
|
||||
MemberWechatBO lookWechat(Long operateMemberId, Long memberId);
|
||||
|
||||
/**
|
||||
* 今日查看微信的次数
|
||||
*/
|
||||
AppLookWechatCountResVo lookWechatCount(Long loginUserId);
|
||||
|
||||
/**
|
||||
* 获得朋友圈
|
||||
*/
|
||||
@@ -112,5 +117,4 @@ public interface RecentService {
|
||||
* 朋友圈我喜欢的、喜欢我的等总数统计
|
||||
*/
|
||||
OperationTotalGroupRecentRespVO total(Long userId);
|
||||
|
||||
}
|
||||
+42
-19
@@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.member.api.thirdauth.ThirdAuthVo;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.recent.vo.*;
|
||||
import cn.iocoder.yudao.module.member.controller.app.recent.vo.AppEvaluateDetailResVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.recent.vo.AppRecentLikeReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.recent.vo.AppRecentOperateReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.recent.vo.AppRecentQuickPageVO;
|
||||
import cn.iocoder.yudao.module.member.controller.app.recent.vo.*;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.config.MemberConfigDO;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.location.LocationDO;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.photo.PhotoDO;
|
||||
@@ -76,8 +73,6 @@ public class RecentServiceImpl implements RecentService {
|
||||
private RecentMapper recentMapper;
|
||||
@Resource
|
||||
private OperationMapper operationMapper;
|
||||
@Resource
|
||||
private MemberRecentTagMapper memberRecentTagMapper;
|
||||
|
||||
@Resource
|
||||
private MemberUserService memberUserService;
|
||||
@@ -156,7 +151,7 @@ public class RecentServiceImpl implements RecentService {
|
||||
LocationDO currentUserLastLocation = locationService.getCurrentUserLastLocation();
|
||||
|
||||
// 查询发送朋友圈用户
|
||||
convertRecentPageResVoSetupMember(result);
|
||||
convertRecentPageResVoSetupMember(result, false);
|
||||
// 查询用户最新的位置
|
||||
convertRecentPageResVoSetupLocation(result, currentUserLastLocation);
|
||||
// 用户tag
|
||||
@@ -313,6 +308,21 @@ public class RecentServiceImpl implements RecentService {
|
||||
return memberWechat;
|
||||
}
|
||||
|
||||
/**
|
||||
* 今日查看微信的次数
|
||||
*/
|
||||
@Override
|
||||
public AppLookWechatCountResVo lookWechatCount(Long loginUserId) {
|
||||
AppLookWechatCountResVo result = new AppLookWechatCountResVo();
|
||||
// 查询配置
|
||||
MemberConfigDO config = memberConfigService.getConfig();
|
||||
result.setTodayCountTotal(config.getVipLookWechtCout());
|
||||
// 今日已查看的次数
|
||||
Integer todayCount = operationService.lookWechatCount(loginUserId, null);
|
||||
result.setTodayCount(todayCount);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecentDO getRecent(Long id) {
|
||||
return recentMapper.selectById(id);
|
||||
@@ -326,7 +336,7 @@ public class RecentServiceImpl implements RecentService {
|
||||
IPage<RecentPageResVo> recentPageList = recentMapper.pageJoin(new Page(pageReqVO.getPageNo(), pageReqVO.getPageSize()), pageReqVO);
|
||||
List<RecentPageResVo> resultList = recentPageList.getRecords();
|
||||
// 为RecentPageResVo设置Member信息
|
||||
convertRecentPageResVoSetupMember(resultList);
|
||||
convertRecentPageResVoSetupMember(resultList, false);
|
||||
// 为RecentPageResVo设置OperationTotal信息
|
||||
convertRecentPageResVoSetupOperationTotal(resultList);
|
||||
// 为RecentPageResVo设置Tag信息
|
||||
@@ -341,6 +351,8 @@ public class RecentServiceImpl implements RecentService {
|
||||
public PageResult<RecentPageResVo> quickPage(AppRecentQuickPageVO bean) {
|
||||
// 查询当前用户信息
|
||||
MemberUserDO operationUser = memberUserService.getUser(bean.getOperationMemberId());
|
||||
// 判断当前操作用户是不是VIP
|
||||
boolean isVip = openTypeService.isUserOpenType(bean.getOperationMemberId());
|
||||
// 查询当前用户设置
|
||||
MemberRecentCfgDO operationCfg = memberRecentCfgService.getOrCreate(operationUser.getId());
|
||||
RecentPageReqVO resultQuery = BeanUtil.toBean(bean, RecentPageReqVO.class);
|
||||
@@ -350,7 +362,7 @@ public class RecentServiceImpl implements RecentService {
|
||||
IPage<RecentPageResVo> recentPageList = recentMapper.pageJoin(new Page(bean.getPageNo(), bean.getPageSize()), resultQuery);
|
||||
List<RecentPageResVo> resultList = BeanUtils.toBean(recentPageList.getRecords(), RecentPageResVo.class);
|
||||
// 为RecentPageResVo设置Member信息
|
||||
convertRecentPageResVoSetupMember(resultList);
|
||||
convertRecentPageResVoSetupMember(resultList, isVip);
|
||||
// 查询用户tag
|
||||
convertRecentPageResVoSetupTag(resultList);
|
||||
// 为RecentPageResVo设置OperationTotal信息
|
||||
@@ -367,6 +379,8 @@ public class RecentServiceImpl implements RecentService {
|
||||
public PageResult<RecentPageResVo> quickUserPage(AppRecentQuickPageVO bean) {
|
||||
// 查询当前用户信息
|
||||
MemberUserDO operationUser = memberUserService.getUser(bean.getOperationMemberId());
|
||||
// 查询当前用户是不是会员
|
||||
boolean isVip = openTypeService.isUserOpenType(operationUser.getId());
|
||||
// 查询当前用户设置
|
||||
MemberRecentCfgDO operationCfg = memberRecentCfgService.getOrCreate(operationUser.getId());
|
||||
RecentPageReqVO resultQuery = BeanUtil.toBean(bean, RecentPageReqVO.class);
|
||||
@@ -389,10 +403,14 @@ public class RecentServiceImpl implements RecentService {
|
||||
IPage<RecentPageResVo> recentPageList = recentMapper.pageUserJoin(new Page(bean.getPageNo(), bean.getPageSize()), resultQuery);
|
||||
List<RecentPageResVo> resultList = BeanUtils.toBean(recentPageList.getRecords(), RecentPageResVo.class);
|
||||
// 为RecentPageResVo设置Member信息
|
||||
convertRecentPageResVoSetupMember(resultList);
|
||||
convertRecentPageResVoSetupMember(resultList, isVip);
|
||||
// 如果是`新人``女生`模糊`头像`和`用户名`
|
||||
List<MemberRecentSceneEnum> dimList = Arrays.asList(MemberRecentSceneEnum.SQUARE_NEW_PERSON, MemberRecentSceneEnum.SQUARE_FEMALE);
|
||||
if (dimList.contains(bean.getScene())) {
|
||||
// 查询用户tag
|
||||
convertRecentPageResVoSetupTag(resultList);
|
||||
// 设置用户图片/视频数量
|
||||
convertRecentPageResVoSetupPhotoExt(resultList);
|
||||
if (dimList.contains(bean.getScene()) && !isVip) {
|
||||
for (RecentPageResVo v : resultList) {
|
||||
if (ObjectUtil.isNotEmpty(v.getMember()) && ObjectUtil.isNotEmpty(v.getMember().getMemberNickname())) {
|
||||
// 如果是自己不处理
|
||||
@@ -404,10 +422,6 @@ public class RecentServiceImpl implements RecentService {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 查询用户tag
|
||||
convertRecentPageResVoSetupTag(resultList);
|
||||
// 设置用户图片/视频数量
|
||||
convertRecentPageResVoSetupPhotoExt(resultList);
|
||||
return new PageResult<>(resultList, recentPageList.getTotal());
|
||||
}
|
||||
|
||||
@@ -510,7 +524,7 @@ public class RecentServiceImpl implements RecentService {
|
||||
if (ObjectUtil.isEmpty(pageList)) return new PageResult<>();
|
||||
resultList = BeanUtil.copyToList(pageList.getRecords(), RecentPageResVo.class);
|
||||
// 添加用户信息
|
||||
convertRecentPageResVoSetupMember(resultList);
|
||||
convertRecentPageResVoSetupMember(resultList, false);
|
||||
return new PageResult<RecentPageResVo>(resultList, pageList.getTotal());
|
||||
}
|
||||
|
||||
@@ -556,10 +570,13 @@ public class RecentServiceImpl implements RecentService {
|
||||
*/
|
||||
@Override
|
||||
public RecentPageResVo getRecentUserByUserId(Long operateUserId, Long userId) {
|
||||
// 判断当前操作用户是不是VIP
|
||||
boolean isVip = openTypeService.isUserOpenType(operateUserId);
|
||||
|
||||
RecentPageResVo result = new RecentPageResVo();
|
||||
result.setMemberId(userId);
|
||||
// 添加用户信息
|
||||
convertRecentPageResVoSetupMember(result);
|
||||
convertRecentPageResVoSetupMember(result, isVip);
|
||||
// 查询用户最新的位置
|
||||
LocationDO currentUserLastLocation = locationService.getCurrentUserLastLocation();
|
||||
convertRecentPageResVoSetupLocation(result, currentUserLastLocation);
|
||||
@@ -623,13 +640,16 @@ public class RecentServiceImpl implements RecentService {
|
||||
/**
|
||||
* 为RecentPageResVo设置Member信息
|
||||
*/
|
||||
private void convertRecentPageResVoSetupMember(List<RecentPageResVo> list) {
|
||||
private void convertRecentPageResVoSetupMember(List<RecentPageResVo> list, boolean isVip) {
|
||||
if (ObjectUtil.isEmpty(list)) return;
|
||||
List<Long> memberIds = list.stream().map(RecentPageResVo::getMemberId).collect(Collectors.toList());
|
||||
List<MemberExtBO> memberList = memberUserService.getUserExtList(memberIds);
|
||||
Map<Long, MemberExtBO> memberMap = IterUtil.toMap(memberList, MemberExtBO::getMemberId);
|
||||
for (RecentPageResVo entity : list) {
|
||||
MemberExtBO member = memberMap.get(entity.getMemberId());
|
||||
if (!isVip && ObjectUtil.isNotEmpty(member) && ObjectUtil.isNotEmpty(member.getWechatNum())) {
|
||||
member.setWechatNum(member.getwechatMaskString());
|
||||
}
|
||||
entity.setMember(member);
|
||||
}
|
||||
}
|
||||
@@ -654,9 +674,12 @@ public class RecentServiceImpl implements RecentService {
|
||||
}
|
||||
}
|
||||
|
||||
private void convertRecentPageResVoSetupMember(RecentPageResVo detail) {
|
||||
private void convertRecentPageResVoSetupMember(RecentPageResVo detail, boolean isVip) {
|
||||
if (ObjectUtil.isEmpty(detail)) return;
|
||||
MemberExtBO member = memberUserService.getUserExt(detail.getMemberId());
|
||||
if (!isVip && ObjectUtil.isNotEmpty(member) && ObjectUtil.isNotEmpty(member.getWechatNum())) {
|
||||
member.setWechatNum(member.getwechatMaskString());
|
||||
}
|
||||
detail.setMember(member);
|
||||
}
|
||||
|
||||
|
||||
+21
@@ -1,7 +1,10 @@
|
||||
package cn.iocoder.yudao.module.member.service.user.BO;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -47,4 +50,22 @@ public class MemberExtBO {
|
||||
@Schema(description = "最近登录时间")
|
||||
private LocalDateTime appRefreshDate;
|
||||
|
||||
|
||||
public String getwechatMaskString() {
|
||||
String str = this.wechatNum;
|
||||
if (str == null || str.length() <= 2) {
|
||||
return "**";
|
||||
}
|
||||
char first = str.charAt(0);
|
||||
char last = str.charAt(str.length() - 1);
|
||||
int middleLength = str.length() - 2;
|
||||
StringBuilder masked = new StringBuilder();
|
||||
masked.append(first);
|
||||
for (int i = 0; i < middleLength; i++) {
|
||||
masked.append('*');
|
||||
}
|
||||
masked.append(last);
|
||||
return masked.toString();
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -154,7 +154,7 @@ public class MemberRecentTagServiceImp implements MemberRecentTagService {
|
||||
boolean isVip = openTypeService.isUserOpenType(memberId);
|
||||
MemberRecentTagDO tag = memberRecentTagMapper.selectOne(new LambdaQueryWrapperX<MemberRecentTagDO>()
|
||||
.eq(MemberRecentTagDO::getMemberId, memberId)
|
||||
.eq(MemberRecentTagDO::getTagBizType, MemberRecentTagEnum.NEW_PERSON.getType())
|
||||
.eq(MemberRecentTagDO::getTagBizType, MemberRecentTagEnum.VIP.getType())
|
||||
);
|
||||
// 是vip
|
||||
if (isVip) {
|
||||
|
||||
+1
-3
@@ -186,9 +186,7 @@ public class MemberUserServiceImpl implements MemberUserService {
|
||||
entity.setAppRefreshDate(member.getAppRefreshDate());
|
||||
entity.setMemberLat(member.getLat());
|
||||
entity.setMemberLng(member.getLng());
|
||||
if (ObjectUtil.isNotEmpty(member.getWechatNum())) {
|
||||
entity.setWechatNum(member.getwechatMaskString());
|
||||
}
|
||||
entity.setWechatNum(member.getWechatNum());
|
||||
return entity;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
+20
-14
@@ -27,12 +27,14 @@
|
||||
resultType="cn.iocoder.yudao.module.member.controller.admin.recent.vo.OperationTotalGroupRecentRespVO">
|
||||
select
|
||||
sum(if(a.biz_type = '1' and a.cancel_time is null, 1, 0)) as likeTotal,
|
||||
sum(if(a.biz_type = '1' and a.cancel_time is null and a.operator_member_id = #{dto.memberId}, 1, 0)) as likeItTotal,
|
||||
sum(if(a.biz_type = '1' and a.cancel_time is null and a.operator_member_id = #{dto.memberId}, 1, 0)) as
|
||||
likeItTotal,
|
||||
sum(if(a.biz_type = '1' and a.cancel_time is null and a.member_id = #{dto.memberId}, 1, 0)) as likeMeTotal,
|
||||
sum(if(a.biz_type = '2', 1, 0)) as reportTotal,
|
||||
sum(if(a.biz_type = '3', 1, 0)) as shieldTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null, 1, 0)) as userLikeTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null and a.operator_member_id = #{dto.memberId}, 1, 0)) as userLikeItTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null and a.operator_member_id = #{dto.memberId}, 1, 0)) as
|
||||
userLikeItTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null and a.member_id = #{dto.memberId}, 1, 0)) as userLikeMeTotal,
|
||||
a.biz_type as bizType,
|
||||
a.member_recent_id as memberRecentId
|
||||
@@ -46,15 +48,19 @@
|
||||
<select id="totalGroupRecentByUser"
|
||||
resultType="cn.iocoder.yudao.module.member.controller.admin.recent.vo.OperationTotalGroupRecentRespVO">
|
||||
select sum(if(a.biz_type = '1' and a.cancel_time is null, 1, 0)) as likeTotal,
|
||||
sum(if(a.biz_type = '1' and a.cancel_time is null and a.operator_member_id = #{userId}, 1, 0)) as likeItTotal,
|
||||
sum(if(a.biz_type = '1' and a.cancel_time is null and a.member_id = #{userId}, 1, 0)) as likeMeTotal,
|
||||
sum(if(a.biz_type = '2', 1, 0)) as reportTotal,
|
||||
sum(if(a.biz_type = '3', 1, 0)) as shieldTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null, 1, 0)) as userLikeTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null and a.operator_member_id = #{userId}, 1, 0)) as userLikeItTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null and a.member_id = #{userId}, 1, 0)) as userLikeMeTotal,
|
||||
a.biz_type as bizType,
|
||||
a.member_recent_id as memberRecentId
|
||||
sum(if(a.biz_type = '1' and a.cancel_time is null and a.operator_member_id = #{userId}, 1,
|
||||
0)) as likeItTotal,
|
||||
sum(if(a.biz_type = '1' and a.cancel_time is null and a.member_id = #{userId}, 1,
|
||||
0)) as likeMeTotal,
|
||||
sum(if(a.biz_type = '2', 1, 0)) as reportTotal,
|
||||
sum(if(a.biz_type = '3', 1, 0)) as shieldTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null, 1, 0)) as userLikeTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null and a.operator_member_id = #{userId}, 1,
|
||||
0)) as userLikeItTotal,
|
||||
sum(if(a.biz_type = '4' and a.cancel_time is null and a.member_id = #{userId}, 1,
|
||||
0)) as userLikeMeTotal,
|
||||
a.biz_type as bizType,
|
||||
a.member_recent_id as memberRecentId
|
||||
from member_operation a
|
||||
where a.deleted = 0
|
||||
and (a.operator_member_id = #{userId} or a.member_id = #{userId})
|
||||
@@ -76,12 +82,11 @@
|
||||
resultType="cn.iocoder.yudao.module.member.controller.admin.recent.vo.OperationStatusVo">
|
||||
select
|
||||
a.member_id,
|
||||
if(a.biz_type = '4' and a.cancel_time is null, true, false) as isLike,
|
||||
if(a.biz_type = '100' and a.cancel_time is null, true, false) as isLookWechat
|
||||
max(if(a.biz_type = '4' AND a.cancel_time IS NULL, true, false)) AS isLike,
|
||||
max(if(a.biz_type = '100' AND a.cancel_time IS NULL, true, false)) AS isLookWechat
|
||||
from member_operation a
|
||||
<where>
|
||||
a.deleted = '0'
|
||||
and a.biz_type = '4'
|
||||
<if test="operationUserId != null">
|
||||
and a.operator_member_id = #{operationUserId}
|
||||
</if>
|
||||
@@ -92,6 +97,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
group by a.member_id
|
||||
</select>
|
||||
|
||||
<select id="getRecentOperationStatus"
|
||||
|
||||
Reference in new issue
Block a user