mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 会员区分运营商
This commit is contained in:
@@ -2,6 +2,8 @@ package com.jsowell.pile.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
@@ -19,4 +21,8 @@ public class QueryMemberInfoDTO {
|
||||
private String mobileNumber;
|
||||
|
||||
private String memberId;
|
||||
|
||||
private String merchantId;
|
||||
|
||||
private List<String> merchantDeptIds;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jsowell.pile.mapper;
|
||||
import com.jsowell.pile.domain.MemberBasicInfo;
|
||||
import com.jsowell.pile.domain.PileBasicInfo;
|
||||
import com.jsowell.pile.dto.QueryMemberInfoDTO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -113,4 +114,9 @@ public interface MemberBasicInfoMapper {
|
||||
*/
|
||||
List<MemberVO> selectMemberList(@Param("dto") QueryMemberInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 获取当前会员中的运营商列表(带权限校验)
|
||||
*/
|
||||
List<MerchantInfoVO> getMerchantListByAuth(@Param("deptIds") List<String> deptIds);
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.jsowell.pile.domain.MemberBasicInfo;
|
||||
import com.jsowell.pile.dto.PlatformTesterDTO;
|
||||
import com.jsowell.pile.dto.QueryMemberInfoDTO;
|
||||
import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberBalanceVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
||||
@@ -146,4 +147,10 @@ public interface IMemberBasicInfoService {
|
||||
* @return
|
||||
*/
|
||||
List<MemberBalanceVO> getMemberRefundAmount(List<String> memberIds);
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前会员中的运营商列表(带权限校验)
|
||||
*/
|
||||
List<MerchantInfoVO> getMerchantListByAuth(List<String> deptIds);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@ package com.jsowell.pile.service.impl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.SecurityUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.MemberBasicInfo;
|
||||
import com.jsowell.pile.domain.MemberPlateNumberRelation;
|
||||
@@ -19,6 +21,7 @@ import com.jsowell.pile.mapper.MemberWalletInfoMapper;
|
||||
import com.jsowell.pile.mapper.MemberWalletLogMapper;
|
||||
import com.jsowell.pile.service.IMemberBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileBasicInfoService;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberBalanceVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
||||
@@ -31,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -291,6 +295,15 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
||||
*/
|
||||
@Override
|
||||
public List<MemberVO> selectMemberList(QueryMemberInfoDTO dto) {
|
||||
// 获取登录账号信息
|
||||
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
|
||||
if (authorizedMap == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<String> merchantDeptIds = authorizedMap.getMerchantDeptIds();
|
||||
if (CollectionUtils.isNotEmpty(merchantDeptIds)) {
|
||||
dto.setMerchantDeptIds(merchantDeptIds);
|
||||
}
|
||||
return memberBasicInfoMapper.selectMemberList(dto);
|
||||
}
|
||||
|
||||
@@ -364,5 +377,13 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
||||
return memberWalletLogMapper.getMemberRefundAmount(memberIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前会员中的运营商列表(带权限校验)
|
||||
*/
|
||||
@Override
|
||||
public List<MerchantInfoVO> getMerchantListByAuth(List<String> deptIds) {
|
||||
return memberBasicInfoMapper.getMerchantListByAuth(deptIds);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,13 @@ public class MemberVO {
|
||||
*/
|
||||
private String memberId;
|
||||
|
||||
private String merchantId;
|
||||
|
||||
/**
|
||||
* 运营商名称
|
||||
*/
|
||||
private String merchantName;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user