## 推荐正反查调整处理方式;
This commit is contained in:
parent
f79e4a7ab6
commit
3c679ce8a8
|
@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.CountryConstants;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.constant.TableNameConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
|
@ -20,7 +19,6 @@ import com.hzs.common.domain.member.achieve.ext.CuMemberAchieveExt;
|
|||
import com.hzs.common.domain.member.base.CuMember;
|
||||
import com.hzs.common.domain.member.ext.CuMemberExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.service.ITransactionCommonService;
|
||||
import com.hzs.member.base.IMemberServiceApi;
|
||||
import com.hzs.report.member.param.*;
|
||||
import com.hzs.report.member.service.IMemberService;
|
||||
|
@ -50,8 +48,6 @@ public class MemberReportController extends BaseController {
|
|||
@Autowired
|
||||
private MemberReportService memberReportService;
|
||||
@Autowired
|
||||
private ITransactionCommonService iTransactionCommonService;
|
||||
@Autowired
|
||||
private IMemberService iMemberService;
|
||||
@Autowired
|
||||
private ICuMemberSettlePeriodService iCuMemberSettlePeriodService;
|
||||
|
@ -1348,7 +1344,6 @@ public class MemberReportController extends BaseController {
|
|||
if (summaryVo.getRegisterAuthority() != null) {
|
||||
summaryVo.setRegisterName(ERegistrationAuthority.getEnumByValue(summaryVo.getRegisterAuthority()).getLabel());
|
||||
}
|
||||
// summaryVo.setConsumeAchieve(summaryVo.getConsumeAchieve().multiply(currency.getData().getInExchangeRate()));
|
||||
if (SecurityUtils.getPkCountry().equals(CountryConstants.CHINA_COUNTRY)) {
|
||||
summaryVo.setConsumeAchieve(summaryVo.getConsumeAchieve().multiply(currency.getData().getInExchangeRate()));
|
||||
} else {
|
||||
|
@ -1359,7 +1354,7 @@ public class MemberReportController extends BaseController {
|
|||
util.exportExcel(response, reportSummaryList, "报单汇总导出");
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* 推荐反查
|
||||
**/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PARENT_PEG, method = EOperationMethod.SELECT)
|
||||
|
@ -1391,15 +1386,9 @@ public class MemberReportController extends BaseController {
|
|||
if (StringUtils.isNotEmpty(cuMemberUmbrellaParam.getMemberCode())) {
|
||||
List<CuMemberAchieveExt> cuMemberAchieveExtList = iMemberService.queryParentCuMemberAchieveExt(cuMemberUmbrellaParam);
|
||||
if (CollectionUtil.isNotEmpty(cuMemberAchieveExtList)) {
|
||||
// 获取需要翻译的枚举翻译
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(ECategory.values());
|
||||
Map<Integer, String> transactionMap1 = iTransactionCommonService.exportEnumTransactionByDB(EnumsPrefixConstants.KEY_GRADE, EnumsPrefixConstants.KEY_AWARD);
|
||||
|
||||
for (CuMemberAchieveExt cuMemberAchieveExt : cuMemberAchieveExtList) {
|
||||
CuMemberPushAchieveVO vo = BeanUtil.copyProperties(cuMemberAchieveExt, CuMemberPushAchieveVO.class);
|
||||
vo.setPkGradeVal(transactionMap1.get(cuMemberAchieveExt.getPkGrade()));
|
||||
vo.setPkAwardsVal(transactionMap1.get(cuMemberAchieveExt.getPkAwards()));
|
||||
vo.setCategoryVal(transactionMap.get(EnumsPrefixConstants.ENU_CAT + cuMemberAchieveExt.getCategory()));
|
||||
vo.setCategoryVal(ECategory.getLableByValue(cuMemberAchieveExt.getCategory()));
|
||||
cuMemberPushAchieveVOList.add(vo);
|
||||
}
|
||||
}
|
||||
|
@ -1414,15 +1403,6 @@ public class MemberReportController extends BaseController {
|
|||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_DETAIL_QUERY_LIST, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/product-detail-query-list")
|
||||
public TableDataInfo productDetailQuery(ProductDetailQueryParam productDetailQueryParam) {
|
||||
// if (StringUtils.isNotBlank(productDetailQueryParam.getMemberCode())) {
|
||||
// R<CuMember> memberDto = iMemberServiceApi.getMember(productDetailQueryParam.getMemberCode());
|
||||
// CuMember member = memberDto.getData();
|
||||
// if (member != null) {
|
||||
// productDetailQueryParam.setMemberCode(null);
|
||||
// productDetailQueryParam.setPkMember(member.getPkId());
|
||||
// }
|
||||
// }
|
||||
|
||||
if (productDetailQueryParam.getStartPayTime() != null) {
|
||||
productDetailQueryParam.setStartPayTime(DateUtils.getStartTime(productDetailQueryParam.getStartPayTime()));
|
||||
}
|
||||
|
@ -1564,5 +1544,4 @@ public class MemberReportController extends BaseController {
|
|||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -11,57 +11,29 @@ import org.apache.ibatis.annotations.Param;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会员信息-奖衔升级记录 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-31
|
||||
* 会员信息 Mapper 接口
|
||||
*/
|
||||
public interface MemberMapper extends BaseMapper<CuMember> {
|
||||
|
||||
/**
|
||||
* @description: 查询伞下账户余额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/25 15:29
|
||||
* @param: [umbrellaBalanceVO]
|
||||
* @return: java.util.List<com.hzs.member.base.vo.CuMemberUmbrellaBalanceVO>
|
||||
* 查询伞下账户余额
|
||||
**/
|
||||
List<CuMemberUmbrellaBalanceVO> selectUmbrellaLowerBalance(CuMemberUmbrellaBalanceVO umbrellaBalanceVO);
|
||||
|
||||
/*
|
||||
* @description: 用于反查统计分析,反差伞下,
|
||||
* @author: sui q
|
||||
* @date: 2023/8/26 10:56
|
||||
* @param: null null
|
||||
* 用于反查统计分析,反差伞下,
|
||||
**/
|
||||
List<CuMemberAchieveExt> queryParentParentCuMemberAchieveExt(@Param("period") Integer period,
|
||||
@Param("param") CuMemberUmbrellaParam param);
|
||||
|
||||
/**
|
||||
* @description: 统计分析-伞下直推
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/13 13:43
|
||||
* @param: [memberId]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.UmbrellaBelowPushVO>
|
||||
* 统计分析-伞下直推
|
||||
**/
|
||||
List<UmbrellaBelowPushVO> queryUmbrellaBelowPush(UmbrellaBelowPushVO umbrellaBelowPushVO);
|
||||
|
||||
/**
|
||||
* @description: 查询会员订单消费业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/12 10:41
|
||||
* @param: [umbrellaBelowPushVO]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.UmbrellaBelowPushVO>
|
||||
* 查询会员订单消费业绩
|
||||
**/
|
||||
List<UmbrellaBelowPushVO> queryOrderExpend(UmbrellaBelowPushVO umbrellaBelowPushVO);
|
||||
|
||||
/**
|
||||
* @description: 统计分析-伞下直推会员信息
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/13 13:43
|
||||
* @param: [pkId]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.UmbrellaBelowPushVO>
|
||||
**/
|
||||
UmbrellaBelowPushVO queryUmbrellaBelowInfo(@Param("pkId") Long pkId);
|
||||
}
|
||||
|
|
|
@ -26,11 +26,6 @@ public class CuMemberUmbrellaParam implements Serializable {
|
|||
*/
|
||||
private Integer placeDept;
|
||||
|
||||
/**
|
||||
* 考核状态
|
||||
*/
|
||||
private Integer isAssess;
|
||||
|
||||
/**
|
||||
* 查询方向(1=反查,2=正查)
|
||||
*/
|
||||
|
|
|
@ -8,47 +8,28 @@ import com.hzs.report.member.vo.UmbrellaBelowPushVO;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 会员查询的服务
|
||||
* @author: sui q
|
||||
* @time: 2023/8/26 09:37
|
||||
* @classname: IMemberService
|
||||
* @package_name: com.hzs.report.member.service
|
||||
* version 1.0.0
|
||||
* 会员查询的服务
|
||||
*/
|
||||
public interface IMemberService {
|
||||
|
||||
/**
|
||||
* @description: 查询伞下账户余额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/25 15:29
|
||||
* @param: [umbrellaBalanceVO]
|
||||
* @return: java.util.List<com.hzs.member.base.vo.CuMemberUmbrellaBalanceVO>
|
||||
**/
|
||||
* 查询伞下账户余额
|
||||
*/
|
||||
List<CuMemberUmbrellaBalanceVO> selectUmbrellaLowerBalance(CuMemberUmbrellaBalanceVO umbrellaBalanceVO);
|
||||
|
||||
/*
|
||||
* @description: 会员推荐反查
|
||||
* @author: sui q
|
||||
* @date: 2023/8/28 15:03
|
||||
* @param: null null
|
||||
**/
|
||||
/**
|
||||
* 会员推荐反查
|
||||
*/
|
||||
List<CuMemberAchieveExt> queryParentCuMemberAchieveExt(CuMemberUmbrellaParam cuMemberUmbrellaParam);
|
||||
|
||||
/**
|
||||
* @description: 统计分析-伞下直推
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/13 9:59
|
||||
* @param: [memberId]
|
||||
* @return: java.util.List<com.hzs.common.domain.member.ext.CuMemberExt>
|
||||
**/
|
||||
* 统计分析-伞下直推
|
||||
*/
|
||||
List<UmbrellaBelowPushVO> queryUmbrellaBelowPush(UmbrellaBelowPushVO umbrellaBelowPushVO);
|
||||
|
||||
/**
|
||||
* @description: 查询会员订单消费业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/12 10:41
|
||||
* @param: [umbrellaBelowPushVO]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.UmbrellaBelowPushVO>
|
||||
**/
|
||||
* 查询会员订单消费业绩
|
||||
*/
|
||||
List<UmbrellaBelowPushVO> queryOrderExpend(UmbrellaBelowPushVO umbrellaBelowPushVO);
|
||||
|
||||
}
|
||||
|
|
|
@ -7,13 +7,6 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/8/26 9:49
|
||||
* @Classname: MemberReportService
|
||||
* @PackageName: com.hzs.report.member.service
|
||||
*/
|
||||
public interface MemberReportService {
|
||||
|
||||
/**
|
||||
|
@ -25,29 +18,17 @@ public interface MemberReportService {
|
|||
Date startPayTime, Date endPayTime);
|
||||
|
||||
/**
|
||||
* @description: 查询伞下直推新增业绩-业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2024/1/3 16:17
|
||||
* @param: [pkMember, startPayTime, endPayTime, orderType, pkCountry]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushNewVo>
|
||||
* 查询伞下直推新增业绩-业绩
|
||||
**/
|
||||
List<DirectPushNewVo> directPushNewAchieList(DirectPushNewVo dpo, List<Long> pkMemberList);
|
||||
|
||||
/**
|
||||
* @description: 查询会员总盒数
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/14 15:01
|
||||
* @param: [dpb, pkMemberList]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushBoxVo>
|
||||
* 查询会员总盒数
|
||||
**/
|
||||
List<DirectPushBoxVo> directPushNewBoxList(DirectPushBoxVo dpb, List<DirectPushBoxVo> dpbList);
|
||||
|
||||
/**
|
||||
* @description: 查询伞下直推新增业绩-业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2024/3/18 15:41
|
||||
* @param: [pkMember, startPayTime, endPayTime, pkCountry, monthList]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushNewVo>
|
||||
* 查询伞下直推新增业绩-业绩
|
||||
**/
|
||||
List<DirectPushNewVo> directPushNewAchieUpList(DirectPushNewVo dpo,
|
||||
List<Long> pkMemberList);
|
||||
|
@ -72,11 +53,7 @@ public interface MemberReportService {
|
|||
List<MemberResettleAchieveVo> memberResettleAchieve(Long pkMember, String memberName, Date startPayTime, Date endPayTime, Integer pkVertex, Integer pkTeamCode, Integer pkCountry, Integer pkAwards, List<Integer> orderTypeList);
|
||||
|
||||
/**
|
||||
* @description: 查询伞下新增安置业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2024/3/12 16:55
|
||||
* @param: [pkMember, memberName, startPayTime, endPayTime, pkVertex, pkTeamCode, pkCountry, pkAwards, orderTypeList]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.MemberResettleAchieveVo>
|
||||
* 查询伞下新增安置业绩
|
||||
**/
|
||||
List<MemberResettleAchieveVo> selectBrollyNewABAchieve(Long pkMember, String memberName, Date startPayTime, Date endPayTime, Integer pkVertex,
|
||||
Integer pkTeamCode, Integer pkCountry, Integer pkAwards, String achieveTableName, int period);
|
||||
|
@ -204,56 +181,32 @@ public interface MemberReportService {
|
|||
Integer sumQuantity(String productName, Integer pkClassify, Date startTime, Date endTime, Integer pkCountry, List<Integer> orderTypeList);
|
||||
|
||||
/**
|
||||
* @description: 查询表是否存在
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/7 15:38
|
||||
* @param: [tableName]
|
||||
* @return: java.lang.Integer
|
||||
* 查询表是否存在
|
||||
**/
|
||||
Integer selectExistTable(String tableName);
|
||||
|
||||
/**
|
||||
* @description:查询会员大小区业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/7 15:59
|
||||
* @param: [dpo, pkMember]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushNewVo>
|
||||
* 查询会员大小区业绩
|
||||
**/
|
||||
DirectPushNewVo sizeZoneAchie(DirectPushNewVo dpo, Long pkMember, BigDecimal rate);
|
||||
|
||||
/**
|
||||
* @description: 查询会员大小区金额业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/14 9:26
|
||||
* @param: [dpo, pkMember, rate]
|
||||
* @return: com.hzs.report.member.vo.DirectPushNewVo
|
||||
* 查询会员大小区金额业绩
|
||||
**/
|
||||
DirectPushNewVo sizeZoneAchieAmount(DirectPushNewVo dpo, Long pkMember, BigDecimal rate);
|
||||
|
||||
/**
|
||||
* @description: 定时任务批量处理统计会员以及伞下金额业绩盒数
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/12 12:03
|
||||
* @param: []
|
||||
* @return: void
|
||||
* 定时任务批量处理统计会员以及伞下金额业绩盒数
|
||||
**/
|
||||
void pushAmountBoxmethod();
|
||||
|
||||
/**
|
||||
* @description: 定时任务7天重算直推会员金额业绩盒数
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/12 16:11
|
||||
* @param: [startDateStr, endDateStr]
|
||||
* @return: void
|
||||
* 定时任务7天重算直推会员金额业绩盒数
|
||||
**/
|
||||
void repeatPushAmountBoxmethod(String startDateStr, String endDateStr);
|
||||
|
||||
/**
|
||||
* @description: 初始化会员直推金额业绩盒数统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/12 17:39
|
||||
* @param: [startDateStr, endDateStr]
|
||||
* @return: void
|
||||
* 初始化会员直推金额业绩盒数统计数据
|
||||
**/
|
||||
void washMemberAmountBox(String startDateStr, String endDateStr);
|
||||
|
||||
|
@ -266,29 +219,17 @@ public interface MemberReportService {
|
|||
DirectPushBoxVo sizeZoneBox(DirectPushBoxVo dpbVo, String memberCode, Long pkMember);
|
||||
|
||||
/**
|
||||
* @description: 查询会员是否激活
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/14 14:52
|
||||
* @param: [dpbVo]
|
||||
* @return: java.lang.Integer
|
||||
* 查询会员是否激活
|
||||
**/
|
||||
List<DirectPushBoxVo> selectMemberActiveState(DirectPushBoxVo dpbVo, List<Long> pkMemberList);
|
||||
|
||||
/**
|
||||
* @description: 查询直推会员信息
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/17 15:52
|
||||
* @param: [directPushNewVo]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushNewVo>
|
||||
* 查询直推会员信息
|
||||
**/
|
||||
List<DirectPushNewVo> querDirectPushDetails(DirectPushNewVo directPushNewVo);
|
||||
|
||||
/**
|
||||
* @description: 创建表
|
||||
* @author: zhang jing
|
||||
* @date: 2025/3/5 11:41
|
||||
* @param: [tabeName]
|
||||
* @return: void
|
||||
* 创建表
|
||||
**/
|
||||
void createCuMemberAmountBoxTable(String tabeName);
|
||||
}
|
||||
|
|
|
@ -5,12 +5,9 @@ import cn.hutool.core.collection.CollUtil;
|
|||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.constant.TableNameConstants;
|
||||
import com.hzs.common.core.enums.EGrade;
|
||||
import com.hzs.common.core.enums.ETradeType;
|
||||
import com.hzs.common.core.enums.EYesNo;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.domain.member.base.CuMember;
|
||||
import com.hzs.common.domain.system.config.BdAccount;
|
||||
import com.hzs.common.service.ITransactionCommonService;
|
||||
import com.hzs.report.member.mapper.MemberReportMapper;
|
||||
|
@ -21,14 +18,13 @@ import com.hzs.report.report.service.ICuMemberSettlePeriodService;
|
|||
import com.hzs.system.base.ICurrencyServiceApi;
|
||||
import com.hzs.system.base.dto.CurrencyDTO;
|
||||
import com.hzs.system.config.IAccountServiceApi;
|
||||
import com.hzs.system.config.dto.GradeDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
|
@ -38,35 +34,22 @@ import java.time.temporal.ChronoUnit;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @BelongsProject: hzs_cloud
|
||||
* @BelongsPackage: com.hzs.report.member.service.Impl
|
||||
* @Author: yh
|
||||
* @CreateTime: 2023-08-26 09:51
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MemberReportServiceImpl implements MemberReportService {
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private MemberReportMapper memberReportMapper;
|
||||
@Autowired
|
||||
private ICuMemberSettlePeriodService cuMemberSettlePeriodService;
|
||||
private ICuMemberSettlePeriodService iCuMemberSettlePeriodService;
|
||||
@Autowired
|
||||
private ITransactionCommonService iTransactionCommonService;
|
||||
|
||||
@DubboReference
|
||||
IAccountServiceApi accountServiceApi;
|
||||
IAccountServiceApi iAccountServiceApi;
|
||||
@DubboReference
|
||||
ICurrencyServiceApi currencyServiceApi;
|
||||
ICurrencyServiceApi iCurrencyServiceApi;
|
||||
|
||||
/**
|
||||
* 查询伞下直推新增业绩-查询会员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DirectPushNewVo> directPushNewList(List<String> memberCodeList,
|
||||
Integer pkCountry, Date startPayTime,
|
||||
|
@ -74,75 +57,31 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
return memberReportMapper.directPushNewList(memberCodeList, pkCountry, startPayTime, endPayTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询伞下直推新增业绩-业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/6 14:16
|
||||
* @param: [pkMember, startPayTime, endPayTime]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushNewVo>
|
||||
**/
|
||||
@Override
|
||||
public List<DirectPushNewVo> directPushNewAchieList(DirectPushNewVo dpo, List<Long> pkMemberList) {
|
||||
return memberReportMapper.directPushNewAchieList(dpo, pkMemberList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询会员总盒数
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/14 15:01
|
||||
* @param: [dpb, pkMemberList]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushBoxVo>
|
||||
**/
|
||||
@Override
|
||||
public List<DirectPushBoxVo> directPushNewBoxList(DirectPushBoxVo dpb, List<DirectPushBoxVo> dpbList) {
|
||||
return memberReportMapper.directPushNewBoxList(dpb, dpbList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询伞下直推新增业绩-业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2024/3/18 11:54
|
||||
* @param: [pkMember, startPayTime, endPayTime, orderType, pkCountry]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushNewVo>
|
||||
**/
|
||||
@Override
|
||||
public List<DirectPushNewVo> directPushNewAchieUpList(DirectPushNewVo dpo, List<Long> pkMemberList) {
|
||||
return memberReportMapper.directPushNewAchieUpList(dpo, pkMemberList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户消费统计
|
||||
*
|
||||
* @param memberCode 用户编号
|
||||
* @param memberName 用户姓名
|
||||
* @param startPayTime 开始支付时间
|
||||
* @param endPayTime 结束支付时间
|
||||
* @param pkWares 商品主键
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MemberConsumptionVo> memberConsumptionList(String memberCode, String memberName, Date startPayTime, Date endPayTime, Integer pkWares) {
|
||||
return memberReportMapper.memberConsumptionList(memberCode, memberName, startPayTime, endPayTime, pkWares);
|
||||
}
|
||||
|
||||
/**
|
||||
* 伞下新增安置业绩
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MemberResettleAchieveVo> memberResettleAchieve(Long pkMember, String memberName, Date startPayTime, Date endPayTime, Integer pkVertex, Integer pkTeamCode, Integer pkCountry, Integer pkAwards, List<Integer> orderTypeList) {
|
||||
return memberReportMapper.memberResettleAchieve(pkMember, memberName, startPayTime, endPayTime, pkVertex, pkTeamCode, pkCountry, pkAwards, orderTypeList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 伞下新增安置业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2024/3/14 15:14
|
||||
* @param: [pkMember, memberName, startPayTime, endPayTime, pkVertex, pkTeamCode, pkCountry, pkAwards, achieveTableName, treeTableName, period]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.MemberResettleAchieveVo>
|
||||
**/
|
||||
@Override
|
||||
public List<MemberResettleAchieveVo> selectBrollyNewABAchieve(Long pkMember, String memberName, Date startPayTime, Date endPayTime, Integer pkVertex,
|
||||
Integer pkTeamCode, Integer pkCountry, Integer pkAwards, String achieveTableName,
|
||||
|
@ -151,120 +90,51 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
pkVertex, pkTeamCode, pkCountry, pkAwards, achieveTableName, period);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单币种查询
|
||||
*
|
||||
* @param memberCode 会员编号
|
||||
* @param memberName 会员名称
|
||||
* @param orderCode 订单编号
|
||||
* @param orderType 订单类型
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OrderCurrencyVo> getOrderCurrencyList(String memberCode, String memberName, String orderCode, Integer orderType) {
|
||||
return memberReportMapper.getOrderCurrencyList(memberCode, memberName, orderCode, orderType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单币种
|
||||
*
|
||||
* @param orderCodeList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MemberTradeVo> getBySourceCodeMemberTradeList(List<String> orderCodeList) {
|
||||
return memberReportMapper.getBySourceCodeMemberTradeList(orderCodeList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询省订单
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param pkCountry 所属国家
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OrderDistribution> getByProvinceOrderDistribution(Date startTime, Date endTime, Integer pkCountry) {
|
||||
return memberReportMapper.getByProvinceOrderDistribution(startTime, endTime, pkCountry);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询市订单
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param pkCountry 所属国家
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OrderDistribution> getByCityOrderDistribution(Date startTime, Date endTime, Integer pkCountry) {
|
||||
return memberReportMapper.getByCityOrderDistribution(startTime, endTime, pkCountry);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询区县订单
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param pkCountry 所属国家
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OrderDistribution> getByDistrictOrderDistribution(Date startTime, Date endTime, Integer pkCountry) {
|
||||
return memberReportMapper.getByDistrictOrderDistribution(startTime, endTime, pkCountry);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出货明细汇总
|
||||
*
|
||||
* @param productName
|
||||
* @param pkClassify
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProductOrderInfoVo> getProductOrderInfo(String productName, Integer pkClassify, Date startTime, Date endTime, Integer pkCountry, List<Integer> orderTypeList) {
|
||||
return memberReportMapper.getProductOrderInfo(productName, pkClassify, startTime, endTime, pkCountry, orderTypeList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 报单汇总
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ReportSummaryVo> reportSummaryList(ReportSummaryVo reportSummaryVo) {
|
||||
return memberReportMapper.reportSummaryList(reportSummaryVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出货明细汇总统计详情
|
||||
*
|
||||
* @param pkProduct
|
||||
* @param productName
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProductShippingDetailsInfoVo> productShippingDetailsList(Integer pkProduct, String productName, Integer pkClassify, Integer pkAwards, List<Integer> orderTypeList, Date startTime, Date endTime, Integer pkCountry) {
|
||||
return memberReportMapper.productShippingDetailsList(pkProduct, productName, pkClassify, pkAwards, orderTypeList, startTime, endTime, pkCountry);
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品明细查询
|
||||
*
|
||||
* @param productDetailQueryParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProductDetailQueryVo> productDetailQueryList(ProductDetailQueryParam productDetailQueryParam) {
|
||||
return memberReportMapper.productDetailQueryList(productDetailQueryParam);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<SmallAreaNewAddAchieveVO> selectSmallAreaNewAdd(SmallAreaNewAddAchieveVO addAchieveVO) {
|
||||
List<SmallAreaNewAddAchieveVO> areaNewAddAchieveVOList = null;
|
||||
|
@ -277,10 +147,9 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
//获取期数
|
||||
String date = beforeLocalDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
//开始时间减一天的期数
|
||||
int period = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
int period = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
addAchieveVO.setBeforePeriod(period);
|
||||
//查询大小区业绩表
|
||||
//String settleTable = TableNameConstants.CU_MEMBER_SETTLE + period;
|
||||
addAchieveVO.setSettleTable(getMonthTableName(beforeLocalDate));
|
||||
addAchieveVO.setMonthAchieveVOList(getAchieveMonthTable(startDate, addAchieveVO.getEndDate()));
|
||||
if (addAchieveVO.getAchieve().compareTo(new BigDecimal("10000")) > -1) {
|
||||
|
@ -314,7 +183,6 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
* @param endDate 结束时间
|
||||
* @return List<MonthAchieveVO>
|
||||
*/
|
||||
|
||||
private List<MonthAchieveVO> getAchieveMonthTable(String startDate, String endDate) {
|
||||
MonthAchieveVO monthAchieveVO = null;
|
||||
List<MonthAchieveVO> monthAchieveVOList = new ArrayList<>();
|
||||
|
@ -326,7 +194,7 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
//相差两个月及以上
|
||||
if (months >= 2) {
|
||||
//初月信息
|
||||
int startPeriod = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(startDate).getPkId();
|
||||
int startPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(startDate).getPkId();
|
||||
MonthAchieveVO startMonthAchieveVO = MonthAchieveVO.builder().achieveTable(getMonthTableName(startLocalDate))
|
||||
.startPeriod(startPeriod)
|
||||
.build();
|
||||
|
@ -338,27 +206,27 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
monthAchieveVOList.add(monthAchieveVO);
|
||||
}
|
||||
//末月信息
|
||||
int endPeriod = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(endDate).getPkId();
|
||||
int endPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(endDate).getPkId();
|
||||
MonthAchieveVO endMonthAchieveVO = MonthAchieveVO.builder().achieveTable(getMonthTableName(endLocalDate))
|
||||
.endPeriod(endPeriod)
|
||||
.build();
|
||||
monthAchieveVOList.add(endMonthAchieveVO);
|
||||
//同一个月
|
||||
} else if (months == 0) {
|
||||
int startPeriod = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(startDate).getPkId();
|
||||
int endPeriod = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(endDate).getPkId();
|
||||
int startPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(startDate).getPkId();
|
||||
int endPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(endDate).getPkId();
|
||||
monthAchieveVO = MonthAchieveVO.builder().achieveTable(getMonthTableName(startLocalDate))
|
||||
.startPeriod(startPeriod).endPeriod(endPeriod).build();
|
||||
monthAchieveVOList.add(monthAchieveVO);
|
||||
} else {
|
||||
//初月信息
|
||||
int startPeriod = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(startDate).getPkId();
|
||||
int startPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(startDate).getPkId();
|
||||
MonthAchieveVO startMonthAchieveVO = MonthAchieveVO.builder().achieveTable(getMonthTableName(startLocalDate))
|
||||
.startPeriod(startPeriod)
|
||||
.build();
|
||||
monthAchieveVOList.add(startMonthAchieveVO);
|
||||
//末月信息
|
||||
int endPeriod = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(endDate).getPkId();
|
||||
int endPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(endDate).getPkId();
|
||||
MonthAchieveVO endMonthAchieveVO = MonthAchieveVO.builder().achieveTable(getMonthTableName(endLocalDate))
|
||||
.endPeriod(endPeriod)
|
||||
.build();
|
||||
|
@ -367,18 +235,17 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
return monthAchieveVOList;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuMemberWalletVO> selectMemberUnderWalletList(CuMemberWalletVO walletVO) {
|
||||
List<CuMemberWalletVO> cuMemberWalletVOList = memberReportMapper.selectMemberUnderWalletList(walletVO);
|
||||
if (CollUtil.isNotEmpty(cuMemberWalletVOList)) {
|
||||
Integer pkCountry = walletVO.getPkCountry();
|
||||
//查询币种值
|
||||
List<BdAccount> allAccounts = accountServiceApi.queryAccountByType(null, pkCountry).getData();
|
||||
List<BdAccount> allAccounts = iAccountServiceApi.queryAccountByType(null, pkCountry).getData();
|
||||
Map<Integer, BdAccount> map = allAccounts.stream().collect(Collectors.toMap(BdAccount::getPkId, o -> o));
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(ETradeType.values());
|
||||
//根据国家查询汇率
|
||||
CurrencyDTO currency = currencyServiceApi.getCurrency(pkCountry).getData();
|
||||
CurrencyDTO currency = iCurrencyServiceApi.getCurrency(pkCountry).getData();
|
||||
//汇率
|
||||
BigDecimal exchangeRate = currency.getInExchangeRate();
|
||||
for (CuMemberWalletVO cuMemberWalletVO : cuMemberWalletVOList) {
|
||||
|
@ -404,52 +271,21 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
return cuMemberWalletVOList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品统计信息
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProductSaleStatVo> productSaleStatList(String skuCode, String productName, Integer orderType, Date startTime, Date endTime, Integer pkCountry) {
|
||||
return memberReportMapper.productSaleStatList(skuCode, productName, orderType, startTime, endTime, pkCountry);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计产品所有汇总
|
||||
*
|
||||
* @param productName
|
||||
* @param pkClassify
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @param pkCountry
|
||||
* @param orderTypeList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Integer sumQuantity(String productName, Integer pkClassify, Date startTime, Date endTime, Integer pkCountry, List<Integer> orderTypeList) {
|
||||
return memberReportMapper.sumQuantity(productName, pkClassify, startTime, endTime, pkCountry, orderTypeList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询表是否存在
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/7 15:38
|
||||
* @param: [tableName]
|
||||
* @return: java.lang.Integer
|
||||
**/
|
||||
@Override
|
||||
public Integer selectExistTable(String tableName) {
|
||||
return memberReportMapper.selectExistTable(tableName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询会员大小区业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/7 16:22
|
||||
* @param: [dpo, pkMember, memberRetailTable, rate]
|
||||
* @return: com.hzs.report.member.vo.DirectPushNewVo
|
||||
**/
|
||||
@Override
|
||||
public DirectPushNewVo sizeZoneAchie(DirectPushNewVo dpo, Long pkMember, BigDecimal rate) {
|
||||
//查询直推会员
|
||||
|
@ -478,13 +314,6 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
return getMemberBigAndSmallAchieve(memberSelfAchieveList, rate);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询会员大小区金额业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/13 11:26
|
||||
* @param: [dpo, pkMember, rate]
|
||||
* @return: com.hzs.report.member.vo.DirectPushNewVo
|
||||
**/
|
||||
@Override
|
||||
public DirectPushNewVo sizeZoneAchieAmount(DirectPushNewVo dpo, Long pkMember, BigDecimal rate) {
|
||||
//会员业绩(需求修改,注册、升级上传业绩、复购、复消算自己的业绩)
|
||||
|
@ -503,13 +332,8 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
return getMemberBigAndSmallAchieve(memberPushAchieveList, rate);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询会员推荐伞下业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/7 16:21
|
||||
* @param: [pkMemberList, memberRangeTable]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushNewVo>
|
||||
* 查询会员推荐伞下业绩
|
||||
**/
|
||||
private List<DirectPushNewVo> getMemberPushAchieve(List<Long> pkMemberList, String memberRangeTable, Date endPayTime, Date zonpayTime) {
|
||||
DirectPushNewVo memberAchieveVO = DirectPushNewVo.builder()
|
||||
|
@ -522,7 +346,8 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
}
|
||||
|
||||
/**
|
||||
* @description: 查询伞下业绩金额
|
||||
* 查询伞下业绩金额
|
||||
*
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/25 15:40
|
||||
* @param: [dpo]
|
||||
|
@ -532,10 +357,9 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
return memberReportMapper.querMemberAchieveAmountTeam(dpo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description: 获取直推大区业绩、小区业绩
|
||||
* 获取直推大区业绩、小区业绩
|
||||
*
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/7 16:21
|
||||
* @param: [memberAchieveList, rate]
|
||||
|
@ -559,7 +383,8 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
}
|
||||
|
||||
/**
|
||||
* @description: 根据大业绩查询大小区盒数
|
||||
* 根据大业绩查询大小区盒数
|
||||
*
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/25 16:36
|
||||
* @param: [memberAchieveList, rate]
|
||||
|
@ -585,26 +410,19 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 定时任务批量处理统计当天会员以及伞下金额业绩盒数
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/12 12:03
|
||||
* @param: []
|
||||
* @return: void
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void pushAmountBoxmethod() {
|
||||
//查询当前日期
|
||||
String date = DateUtils.beforeDateStr(1, ChronoUnit.DAYS, DateUtils.YYYY_MM_DD, (DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, new Date())));
|
||||
int period = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
int period = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
String rangeTabeName = TableNameConstants.CU_MEMBER_RETAIL_RANGE + period;
|
||||
if (selectExistTable(rangeTabeName) == 0) {
|
||||
return;
|
||||
}
|
||||
//查询上一期的统计金额业绩盒数表
|
||||
String beforeDate = DateUtils.beforeDateStr(1, ChronoUnit.DAYS, DateUtils.YYYY_MM_DD, date);
|
||||
int beforePeriod = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(beforeDate).getPkId();
|
||||
int beforePeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(beforeDate).getPkId();
|
||||
String beforeTabeName = TableNameConstants.CU_MEMBER_AMOUNT_BOX + beforePeriod;
|
||||
String tabeName = TableNameConstants.CU_MEMBER_AMOUNT_BOX + period;
|
||||
|
||||
|
@ -638,13 +456,6 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 定时任务7天重算直推会员金额业绩盒数
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/12 16:10
|
||||
* @param: [startDateStr, endDateStr]
|
||||
* @return: void
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void repeatPushAmountBoxmethod(String startDateStr, String endDateStr) {
|
||||
|
@ -653,14 +464,14 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
if (CollectionUtil.isNotEmpty(dateList)) {
|
||||
dateList.forEach(date -> {
|
||||
//查询当前日期
|
||||
int period = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
int period = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
String rangeTabeName = TableNameConstants.CU_MEMBER_RETAIL_RANGE + period;
|
||||
if (selectExistTable(rangeTabeName) == 0) {
|
||||
return;
|
||||
}
|
||||
//查询上一期的统计金额业绩盒数表
|
||||
String beforeDate = DateUtils.beforeDateStr(1, ChronoUnit.DAYS, DateUtils.YYYY_MM_DD, date);
|
||||
int beforePeriod = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(beforeDate).getPkId();
|
||||
int beforePeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(beforeDate).getPkId();
|
||||
String beforeTabeName = TableNameConstants.CU_MEMBER_AMOUNT_BOX + beforePeriod;
|
||||
String tabeName = TableNameConstants.CU_MEMBER_AMOUNT_BOX + period;
|
||||
|
||||
|
@ -688,7 +499,6 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
//添加会员统计金额业绩盒数数据
|
||||
memberReportMapper.innertMemberAmountBoxTable(date, date, tabeName, beforeTabeName, rangeTabeName);
|
||||
List<DirectPushAmountPvBoxVo> orderList = memberReportMapper.querMemberOrder(date, date);
|
||||
log.info("订单数据:{}"+ "orderList= "+orderList.size());
|
||||
if (CollectionUtil.isNotEmpty(orderList)) {
|
||||
orderList.forEach(itm -> {
|
||||
//添加会员伞下业绩金额盒数数据
|
||||
|
@ -702,13 +512,6 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 初始化会员直推金额业绩盒数统计数据
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/12 17:38
|
||||
* @param: [startDateStr, endDateStr]
|
||||
* @return: void
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void washMemberAmountBox(String startDateStr, String endDateStr) {
|
||||
|
@ -716,7 +519,7 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
if (CollectionUtil.isNotEmpty(dateList)) {
|
||||
dateList.forEach(date -> {
|
||||
//查询当前日期
|
||||
int period = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
int period = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
String rangeTabeName = TableNameConstants.CU_MEMBER_RETAIL_RANGE + period;
|
||||
if (selectExistTable(rangeTabeName) == 0) {
|
||||
return;
|
||||
|
@ -741,7 +544,6 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public List<String> getDateRange(String startDateStr, String endDateStr) {
|
||||
// 定义日期格式
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
@ -759,13 +561,6 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
return dateList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询会员大小区盒数
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/14 13:35
|
||||
* @param: [dpbVo, pkMember]
|
||||
* @return: com.hzs.report.member.vo.DirectPushBoxVo
|
||||
**/
|
||||
@Override
|
||||
public DirectPushBoxVo sizeZoneBox(DirectPushBoxVo dpbVo, String memberCode, Long pkMember) {
|
||||
dpbVo.setPkMember(pkMember);
|
||||
|
@ -788,34 +583,20 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
*/
|
||||
private String getTableSName() {
|
||||
String localDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
int period = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(localDate).getPkId();
|
||||
int period = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(localDate).getPkId();
|
||||
return TableNameConstants.CU_MEMBER_RETAIL_S + period;
|
||||
}
|
||||
//查询会员是否激活
|
||||
|
||||
@Override
|
||||
public List<DirectPushBoxVo> selectMemberActiveState(DirectPushBoxVo dpbVo, List<Long> pkMemberList) {
|
||||
return memberReportMapper.selectMemberActiveState(dpbVo, pkMemberList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询直推会员信息
|
||||
* @author: zhang jing
|
||||
* @date: 2025/2/17 15:52
|
||||
* @param: [directPushNewVo]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.DirectPushNewVo>
|
||||
**/
|
||||
@Override
|
||||
public List<DirectPushNewVo> querDirectPushDetails(DirectPushNewVo directPushNewVo) {
|
||||
return memberReportMapper.querDirectPushDetails(directPushNewVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description:创建表
|
||||
* @author: zhang jing
|
||||
* @date: 2025/3/5 11:41
|
||||
* @param: [tabeName]
|
||||
* @return: void
|
||||
**/
|
||||
@Override
|
||||
public void createCuMemberAmountBoxTable(String tabeName) {
|
||||
memberReportMapper.createCuMemberAmountBoxTable(tabeName);
|
||||
|
|
|
@ -9,37 +9,25 @@ import com.hzs.report.member.service.IMemberService;
|
|||
import com.hzs.report.member.vo.CuMemberUmbrellaBalanceVO;
|
||||
import com.hzs.report.member.vo.UmbrellaBelowPushVO;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 会员
|
||||
* @author: sui q
|
||||
* @time: 2023/8/26 09:37
|
||||
* @classname: MemberServiceImpl
|
||||
* @package_name: com.hzs.report.member.service.impl
|
||||
* version 1.0.0
|
||||
* 会员
|
||||
*/
|
||||
@Service
|
||||
public class MemberServiceImpl implements IMemberService {
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private MemberMapper memberMapper;
|
||||
|
||||
@DubboReference
|
||||
ICuMemberSettlePeriodServiceApi cuMemberSettlePeriodServiceApi;
|
||||
|
||||
/**
|
||||
* @description: 查询伞下账户余额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/25 15:29
|
||||
* @param: [umbrellaBalanceVO]
|
||||
* @return: java.util.List<com.hzs.member.base.vo.CuMemberUmbrellaBalanceVO>
|
||||
**/
|
||||
@Override
|
||||
public List<CuMemberUmbrellaBalanceVO> selectUmbrellaLowerBalance(CuMemberUmbrellaBalanceVO umbrellaBalanceVO) {
|
||||
return memberMapper.selectUmbrellaLowerBalance(umbrellaBalanceVO);
|
||||
|
@ -47,40 +35,16 @@ public class MemberServiceImpl implements IMemberService {
|
|||
|
||||
@Override
|
||||
public List<CuMemberAchieveExt> queryParentCuMemberAchieveExt(CuMemberUmbrellaParam cuMemberUmbrellaParam) {
|
||||
// Date settleDate = cuMemberUmbrellaParam.getQueryDate() == null ? DateUtils.currentDate() : cuMemberUmbrellaParam.getQueryDate();
|
||||
// if (DateUtils.compareDateBefore(settleDate, DateUtils.currentDate())) {
|
||||
// String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, settleDate);
|
||||
// CuMemberSettlePeriod cuMemberSettlePeriod = cuMemberSettlePeriodServiceApi.getCuMemberSettlePeriodByDate(date).getData();
|
||||
// String tableName = TableNameConstants.CU_MEMBER_SETTLE + cuMemberSettlePeriod.getPkId();
|
||||
// String tableAssName = TableNameConstants.CU_MEMBER_ASSESS + DateUtils.getYear(date);
|
||||
// Integer period = cuMemberSettlePeriodServiceApi.getCuMemberSettlePeriodByDate(DateUtils.currentMonthFirstDateStr(settleDate)).getData().getPkId();
|
||||
// return memberMapper.queryParentParentHisCuMemberAchieveExt(tableName, tableAssName, period, cuMemberUmbrellaParam);
|
||||
// } else {
|
||||
Date settleDate = DateUtils.beforeDate(1, ChronoUnit.DAYS);
|
||||
Integer period = cuMemberSettlePeriodServiceApi.getCuMemberSettlePeriodByDate(DateUtils.currentMonthFirstDateStr(settleDate)).getData().getPkId();
|
||||
return memberMapper.queryParentParentCuMemberAchieveExt(period, cuMemberUmbrellaParam);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 统计分析-伞下直推
|
||||
* @author: zhang jing
|
||||
* @date: 2023/6/13 13:54
|
||||
* @param: [memberId]
|
||||
* @return: java.util.List<com.hzs.member.statis.vo.UmbrellaBelowPushVO>
|
||||
**/
|
||||
@Override
|
||||
public List<UmbrellaBelowPushVO> queryUmbrellaBelowPush(UmbrellaBelowPushVO umbrellaBelowPushVO) {
|
||||
return memberMapper.queryUmbrellaBelowPush(umbrellaBelowPushVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询会员订单消费业绩
|
||||
* @author: zhang jing
|
||||
* @date: 2023/9/12 10:41
|
||||
* @param: [umbrellaBelowPushVO]
|
||||
* @return: java.util.List<com.hzs.report.member.vo.UmbrellaBelowPushVO>
|
||||
**/
|
||||
@Override
|
||||
public List<UmbrellaBelowPushVO> queryOrderExpend(UmbrellaBelowPushVO umbrellaBelowPushVO) {
|
||||
return memberMapper.queryOrderExpend(umbrellaBelowPushVO);
|
||||
|
|
|
@ -53,7 +53,7 @@ public class CuMemberPushAchieveVO implements Serializable {
|
|||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
|
||||
private Integer pkAwards;
|
||||
@Excel(name = "级差奖衔")
|
||||
@Excel(name = "当月奖衔")
|
||||
private String pkAwardsVal;
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
LEFT JOIN cu_member_team ct ON ct.pk_id = cm.pk_team_code
|
||||
left join CU_MEMBER_ACCOUNT cmac on cmac.PK_MEMBER=cm.pk_id
|
||||
where cm.del_flag = 0 and cmac.del_flag = 0
|
||||
|
||||
<if test="pkCountry != null">
|
||||
AND cm.PK_SETTLE_COUNTRY=#{pkCountry}
|
||||
</if>
|
||||
|
@ -53,20 +52,21 @@
|
|||
with cm.pk_id = #{pkId}
|
||||
connect by cm.PK_PARENT = prior cm.pk_id
|
||||
order by level
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryParentParentCuMemberAchieveExt" resultType="com.hzs.common.domain.member.achieve.ext.CuMemberAchieveExt">
|
||||
select a.algebra, a.pk_member, a.pk_parent, a.pk_settle_country,
|
||||
a.member_code, a.member_name, a.phone, bdr.pk_transaction pk_register_grade, bd.pk_transaction pk_grade,
|
||||
ba.pk_transaction pk_awards, bv.vertex_name, ct.team_name,
|
||||
cmp.member_code parentCode, cmp.member_name parentName, cmpl.member_code placeCode, cmpl.member_name placeName, a.place_dept placeDept,
|
||||
a.member_code, a.member_name, a.phone,
|
||||
bd.grade_name pk_grade_val,
|
||||
ba.awards_name pk_awards_val,
|
||||
bv.vertex_name, ct.team_name,
|
||||
cmp.member_code parentCode, cmp.member_name parentName,
|
||||
a.category, a.pay_time
|
||||
from
|
||||
(
|
||||
select pk_id pk_member, pk_parent, pk_place_parent, place_dept, purchase_status,
|
||||
member_code, member_name, phone, pk_register_grade, pk_settle_grade pk_grade, pk_awards,
|
||||
pk_vertex, pk_team_code, pk_settle_country, category, pay_time, level algebra
|
||||
from (
|
||||
select pk_id pk_member, pk_parent, purchase_status,
|
||||
member_code, member_name, phone, pk_settle_country,
|
||||
pk_settle_grade pk_grade, pk_awards,
|
||||
pk_vertex, pk_team_code, category, creation_time pay_time, level algebra
|
||||
from cu_member
|
||||
where del_flag = 0
|
||||
start with member_code = #{param.memberCode}
|
||||
|
@ -77,8 +77,6 @@
|
|||
<otherwise>connect by prior pk_id = pk_parent</otherwise>
|
||||
</choose>
|
||||
) a
|
||||
left join bd_grade bdr
|
||||
on a.pk_register_grade = bdr.pk_id
|
||||
left join bd_grade bd
|
||||
on a.pk_grade = bd.pk_id
|
||||
left join bd_awards ba
|
||||
|
@ -89,12 +87,7 @@
|
|||
on a.pk_vertex = bv.pk_id
|
||||
left join cu_member cmp
|
||||
on a.pk_parent = cmp.pk_id
|
||||
left join cu_member cmpl
|
||||
on a.pk_place_parent = cmpl.pk_id
|
||||
where 1 = 1
|
||||
<if test="param.pkRegisterGrade != null">
|
||||
and a.pk_register_grade = #{param.pkRegisterGrade}
|
||||
</if>
|
||||
<if test="param.pkGrade != null">
|
||||
and a.pk_grade = #{param.pkGrade}
|
||||
</if>
|
||||
|
@ -107,20 +100,9 @@
|
|||
<if test="param.pkTeamCode != null">
|
||||
and a.pk_team_code = #{param.pkTeamCode}
|
||||
</if>
|
||||
<if test="param.isAssess != null">
|
||||
<choose>
|
||||
<when test="param.isAssess == 0 ">
|
||||
and a.purchase_status in (0,1)
|
||||
</when>
|
||||
<otherwise>
|
||||
and a.purchase_status = 2
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
order by a.algebra
|
||||
</select>
|
||||
|
||||
|
||||
<!--统计分析-伞下直推-->
|
||||
<select id="queryUmbrellaBelowPush" resultType="com.hzs.report.member.vo.UmbrellaBelowPushVO">
|
||||
select
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package com.hzs.system.config.controller.manage;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
|
@ -17,17 +15,14 @@ import com.hzs.common.core.web.controller.BaseController;
|
|||
import com.hzs.common.core.web.domain.AjaxResult;
|
||||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
import com.hzs.common.domain.system.base.BdCountry;
|
||||
import com.hzs.common.domain.system.config.BdAwards;
|
||||
import com.hzs.common.domain.system.config.BdShop;
|
||||
import com.hzs.common.domain.system.config.ext.BdShopExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.util.TransactionUtils;
|
||||
import com.hzs.system.base.ITransactionServiceApi;
|
||||
import com.hzs.system.base.service.IBdCountryService;
|
||||
import com.hzs.system.base.service.IBdCurrencyService;
|
||||
import com.hzs.system.config.service.IBdShopService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -37,87 +32,70 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 配送中心等级 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-15
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/manage/shop")
|
||||
public class BdShopController extends BaseController {
|
||||
@Autowired
|
||||
private IBdShopService shopService;
|
||||
@DubboReference
|
||||
private ITransactionServiceApi iTransactionServiceApi;
|
||||
@Autowired
|
||||
IBdCurrencyService currencyService;
|
||||
private RedisService redisService;
|
||||
@Autowired
|
||||
IBdCountryService countryService;
|
||||
|
||||
@Autowired
|
||||
public void setRedisService(RedisService redisService) {
|
||||
this.redisService = redisService;
|
||||
}
|
||||
private IBdShopService iBdShopService;
|
||||
@Autowired
|
||||
private IBdCurrencyService iBdCurrencyService;
|
||||
@Autowired
|
||||
private IBdCountryService iBdCountryService;
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
/**
|
||||
* @description: 查询店铺配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:20
|
||||
* @param: [shop]
|
||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
||||
* 查询店铺配置列表
|
||||
**/
|
||||
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.SHOP, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BdShop shop) {
|
||||
startPage();
|
||||
QueryWrapper<BdShop> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
LambdaQueryWrapper<BdShop> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdShop::getPkCountry, SecurityUtils.getPkCountry());
|
||||
if (StringUtils.isNotNull(shop.getShopName())) {
|
||||
queryWrapper.eq("SHOP_NAME", shop.getShopName());
|
||||
queryWrapper.eq(BdShop::getShopName, shop.getShopName());
|
||||
}
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
BdCountry country = countryService.getCountry(SecurityUtils.getPkCountry());
|
||||
queryWrapper.orderByDesc(BdShop::getCreationTime);
|
||||
BdCountry country = iBdCountryService.getCountry(SecurityUtils.getPkCountry());
|
||||
List<BdShopExt> listExt = new ArrayList<>();
|
||||
List<BdShop> list = shopService.list(queryWrapper);
|
||||
List<BdShop> list = iBdShopService.list(queryWrapper);
|
||||
list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdShopExt.class)));
|
||||
for (BdShopExt bs : listExt) {
|
||||
if (StringUtils.isNotNull(bs.getRegisterValue())) {
|
||||
bs.setNationalFlag2(country.getNationalFlag2());
|
||||
bs.setRegisterValueLocal(currencyService.getDollar(bs.getRegisterValue(), SecurityUtils.getPkCountry()));
|
||||
bs.setRegisterValueLocal(iBdCurrencyService.getDollar(bs.getRegisterValue(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
}
|
||||
return getDataTable(listExt);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出配送中心等级
|
||||
* @author: zhang jing
|
||||
* @date: 2023/3/9 16:08
|
||||
* @param: [response, shop]
|
||||
* @return: void
|
||||
* 导出配送中心等级
|
||||
**/
|
||||
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.SHOP, method = EOperationMethod.SELECT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BdShop shop) {
|
||||
startPage();
|
||||
QueryWrapper<BdShop> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
LambdaQueryWrapper<BdShop> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdShop::getPkCountry, SecurityUtils.getPkCountry());
|
||||
if (StringUtils.isNotNull(shop.getShopName())) {
|
||||
queryWrapper.eq("SHOP_NAME", shop.getShopName());
|
||||
queryWrapper.eq(BdShop::getShopName, shop.getShopName());
|
||||
}
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
BdCountry country = countryService.getCountry(SecurityUtils.getPkCountry());
|
||||
queryWrapper.orderByDesc(BdShop::getCreationTime);
|
||||
BdCountry country = iBdCountryService.getCountry(SecurityUtils.getPkCountry());
|
||||
List<BdShopExt> listExt = new ArrayList<>();
|
||||
List<BdShop> list = shopService.list(queryWrapper);
|
||||
List<BdShop> list = iBdShopService.list(queryWrapper);
|
||||
list.forEach(item -> listExt.add(BeanUtil.copyProperties(item, BdShopExt.class)));
|
||||
for (BdShopExt bs : listExt) {
|
||||
if (StringUtils.isNotNull(bs.getRegisterValue())) {
|
||||
bs.setNationalFlag2(country.getNationalFlag2());
|
||||
bs.setRegisterValueLocal(currencyService.getDollar(bs.getRegisterValue(), SecurityUtils.getPkCountry()));
|
||||
bs.setRegisterValueLocal(iBdCurrencyService.getDollar(bs.getRegisterValue(), SecurityUtils.getPkCountry()));
|
||||
}
|
||||
}
|
||||
ExcelUtil<BdShopExt> util = new ExcelUtil<>(BdShopExt.class);
|
||||
|
@ -126,11 +104,7 @@ public class BdShopController extends BaseController {
|
|||
|
||||
|
||||
/**
|
||||
* @description: 新增店铺配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [shop]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 新增店铺配置
|
||||
**/
|
||||
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.SHOP, method = EOperationMethod.INSERT)
|
||||
@PostMapping("/generate")
|
||||
|
@ -156,18 +130,18 @@ public class BdShopController extends BaseController {
|
|||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.EFFECTIVE_DATE_NOT_NULL));
|
||||
}
|
||||
|
||||
QueryWrapper<BdShop> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY", pkCountry);
|
||||
LambdaQueryWrapper<BdShop> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdShop::getPkCountry, pkCountry);
|
||||
if (StringUtils.isNotNull(shop.getShopName())) {
|
||||
queryWrapper.eq("SHOP_NAME", shop.getShopName());
|
||||
queryWrapper.eq(BdShop::getShopName, shop.getShopName());
|
||||
}
|
||||
List<BdShop> list = shopService.list(queryWrapper);
|
||||
List<BdShop> list = iBdShopService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.SHOP_NAME_REPEAT));
|
||||
}
|
||||
QueryWrapper<BdShop> queryWrapper1 = new QueryWrapper();
|
||||
queryWrapper1.eq("PK_COUNTRY", pkCountry);
|
||||
list = shopService.list(queryWrapper1);
|
||||
LambdaQueryWrapper<BdShop> queryWrapper1 = new LambdaQueryWrapper<>();
|
||||
queryWrapper1.eq(BdShop::getPkCountry, pkCountry);
|
||||
list = iBdShopService.list(queryWrapper1);
|
||||
int count = 1;
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
count = count + list.size();
|
||||
|
@ -178,19 +152,15 @@ public class BdShopController extends BaseController {
|
|||
}
|
||||
}
|
||||
if (StringUtils.isNotNull(shop.getShopValue())) {
|
||||
//字段翻译保存到数据库
|
||||
R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.SHOP,
|
||||
shop.getShopName(), EYesNo.NO, EYesNo.NO);
|
||||
shop.setPkTransaction(pkTransaction.getData());
|
||||
shop.setPkCountry(pkCountry);
|
||||
shop.setPkCreator(SecurityUtils.getUserId());
|
||||
shop.setCreationTime(new Date());
|
||||
QueryWrapper<BdShop> queryWrapperCheck = new QueryWrapper();
|
||||
queryWrapperCheck.eq("SHOP_VALUE", shop.getShopValue());
|
||||
queryWrapperCheck.eq("PK_COUNTRY", pkCountry);
|
||||
List<BdShop> list1 = shopService.list(queryWrapperCheck);
|
||||
LambdaQueryWrapper<BdShop> queryWrapperCheck = new LambdaQueryWrapper<>();
|
||||
queryWrapperCheck.eq(BdShop::getShopValue, shop.getShopValue());
|
||||
queryWrapperCheck.eq(BdShop::getPkCountry, pkCountry);
|
||||
List<BdShop> list1 = iBdShopService.list(queryWrapperCheck);
|
||||
if (CollectionUtil.isEmpty(list1)) {
|
||||
shopService.save(shop);
|
||||
iBdShopService.save(shop);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
|
@ -199,25 +169,7 @@ public class BdShopController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* @description: 生成店铺(配送中心)
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/22 9:54
|
||||
* @param: [grade]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
// @Log(module = EModuleType.SHOP, method = EMethodType.INSERT)
|
||||
// @PostMapping("/generate")
|
||||
// public AjaxResult generate(@RequestBody BdShop shop) {
|
||||
// return AjaxResult.success(shopService.generate(shop));
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* @description: 修改店铺配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [shop]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 修改店铺配置
|
||||
**/
|
||||
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.SHOP, method = EOperationMethod.UPDATE)
|
||||
@PostMapping("/update")
|
||||
|
@ -243,29 +195,15 @@ public class BdShopController extends BaseController {
|
|||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.EFFECTIVE_DATE_NOT_NULL));
|
||||
}
|
||||
|
||||
//字段翻译保存到数据库
|
||||
if(null!=shop.getPkTransaction()){
|
||||
R<Boolean> b = iTransactionServiceApi.updateTransaction(pkCountry,
|
||||
shop.getShopName(),shop.getPkTransaction(), true);
|
||||
}else{
|
||||
//字段翻译保存到数据库
|
||||
R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.SHOP,
|
||||
shop.getShopName(), EYesNo.NO, EYesNo.NO);
|
||||
shop.setPkTransaction(pkTransaction.getData());
|
||||
}
|
||||
shop.setPkCountry(pkCountry);
|
||||
shop.setPkModified(SecurityUtils.getUserId());
|
||||
shop.setModifiedTime(new Date());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_SHOP + pkCountry);
|
||||
return toAjax(shopService.updateById(shop));
|
||||
return toAjax(iBdShopService.updateById(shop));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description:修改启用状态
|
||||
* @author: zhang jing
|
||||
* @date: 2023/4/24 14:54
|
||||
* @param: [shop]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 修改启用状态
|
||||
**/
|
||||
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.SHOP, method = EOperationMethod.UPDATE)
|
||||
@PostMapping("/updateState")
|
||||
|
@ -276,49 +214,41 @@ public class BdShopController extends BaseController {
|
|||
if (StringUtils.isNull(shop.getPkId())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.HO_OBJECT_NOT_REPEAT));
|
||||
}
|
||||
UpdateWrapper<BdShop> updateWrapper=new UpdateWrapper();
|
||||
updateWrapper.set("ENABLE_STATE",shop.getEnableState());
|
||||
updateWrapper.eq("PK_ID",shop.getPkId());
|
||||
updateWrapper.set("PK_MODIFIED",SecurityUtils.getUserId());
|
||||
updateWrapper.set("MODIFIED_TIME",new Date());
|
||||
shopService.update(updateWrapper);
|
||||
LambdaUpdateWrapper<BdShop> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.set(BdShop::getEnableState, shop.getEnableState());
|
||||
updateWrapper.eq(BdShop::getPkId, shop.getPkId());
|
||||
updateWrapper.set(BdShop::getPkModified, SecurityUtils.getUserId());
|
||||
updateWrapper.set(BdShop::getModifiedTime, new Date());
|
||||
iBdShopService.update(updateWrapper);
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_SHOP + SecurityUtils.getPkCountry());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询单条店铺配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 查询单条店铺配置
|
||||
**/
|
||||
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.SHOP, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/getOne/{pkId}")
|
||||
public AjaxResult getOne(@PathVariable Long pkId) {
|
||||
BdShop shop = shopService.getById(pkId);
|
||||
BdShop shop = iBdShopService.getById(pkId);
|
||||
BdShopExt bdShopExt = BeanUtil.copyProperties(shop, BdShopExt.class);
|
||||
return AjaxResult.success(bdShopExt);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 删除店铺配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/8/30 10:21
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 删除店铺配置
|
||||
**/
|
||||
@Log(module = EOperationModule.LEVEL_CONFIG, business = EOperationBusiness.SHOP, method = EOperationMethod.DELETE)
|
||||
@DeleteMapping("/{pkId}")
|
||||
public AjaxResult delete(@PathVariable Long pkId) {
|
||||
UpdateWrapper<BdShop> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("PK_ID", pkId);
|
||||
updateWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue());
|
||||
updateWrapper.set("PK_MODIFIED", SecurityUtils.getUserId());
|
||||
updateWrapper.set("MODIFIED_TIME", new Date());
|
||||
LambdaUpdateWrapper<BdShop> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(BdShop::getPkId, pkId);
|
||||
updateWrapper.set(BdShop::getDelFlag, EDelFlag.DELETE.getValue());
|
||||
updateWrapper.set(BdShop::getPkModified, SecurityUtils.getUserId());
|
||||
updateWrapper.set(BdShop::getModifiedTime, new Date());
|
||||
redisService.deleteObjectByKey(CacheConstants.BD_SHOP + SecurityUtils.getPkCountry());
|
||||
return toAjax(shopService.update(updateWrapper));
|
||||
return toAjax(iBdShopService.update(updateWrapper));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
package com.hzs.system.config.controller.manage;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.core.utils.poi.ExcelUtil;
|
||||
|
@ -18,11 +15,9 @@ import com.hzs.common.domain.system.config.BdStoreLevel;
|
|||
import com.hzs.common.domain.system.config.BdStoreLevelDetail;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.util.TransactionUtils;
|
||||
import com.hzs.system.base.ITransactionServiceApi;
|
||||
import com.hzs.system.config.service.IBdStoreLevelDetailService;
|
||||
import com.hzs.system.config.service.IBdStoreLevelService;
|
||||
import com.hzs.system.config.vo.BdStoreLevelVO;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -32,12 +27,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 店铺等级配置 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/store-level")
|
||||
|
@ -45,8 +35,6 @@ public class BdStoreLevelController extends BaseController {
|
|||
|
||||
@Autowired
|
||||
private IBdStoreLevelService storeLevelService;
|
||||
@DubboReference
|
||||
private ITransactionServiceApi iTransactionServiceApi;
|
||||
@Autowired
|
||||
private IBdStoreLevelDetailService storeLevelDetailService;
|
||||
|
||||
|
@ -172,10 +160,6 @@ public class BdStoreLevelController extends BaseController {
|
|||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.LEVEL_VALUE_REPEAT));
|
||||
}
|
||||
//字段翻译保存到数据库
|
||||
R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.STORE_LEVEL,
|
||||
storeLevel.getStoreLevelName(), EYesNo.NO, EYesNo.NO);
|
||||
storeLevel.setPkTransaction(pkTransaction.getData());
|
||||
storeLevel.setPkCountry(pkCountry);
|
||||
storeLevel.setPkCreator(SecurityUtils.getUserId());
|
||||
storeLevel.setCreationTime(new Date());
|
||||
|
@ -218,16 +202,6 @@ public class BdStoreLevelController extends BaseController {
|
|||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.LEVEL_VALUE_REPEAT));
|
||||
}
|
||||
|
||||
//字段翻译保存到数据库
|
||||
if(null!=storeLevel.getPkTransaction()){
|
||||
R<Boolean> b = iTransactionServiceApi.updateTransaction(pkCountry,
|
||||
storeLevel.getStoreLevelName(),storeLevel.getPkTransaction(), true);
|
||||
}else{
|
||||
//字段翻译保存到数据库
|
||||
R<Integer> pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.STORE_LEVEL,
|
||||
storeLevel.getStoreLevelName(), EYesNo.NO, EYesNo.NO);
|
||||
storeLevel.setPkTransaction(pkTransaction.getData());
|
||||
}
|
||||
storeLevel.setPkCountry(pkCountry);
|
||||
storeLevel.setPkModified(SecurityUtils.getUserId());
|
||||
storeLevel.setModifiedTime(new Date());
|
||||
|
|
|
@ -3,8 +3,6 @@ package com.hzs.system.config.vo;
|
|||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import com.hzs.common.core.annotation.Transaction;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.web.domain.BaseEntity;
|
||||
import com.hzs.common.domain.system.config.BdStoreLevelDetail;
|
||||
import lombok.Data;
|
||||
|
@ -32,7 +30,6 @@ public class BdStoreLevelVO extends BaseEntity {
|
|||
/**
|
||||
* 等级值 来源于枚举 ELevelValue
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.ELEVEL_VALUE)
|
||||
private Integer levelValue;
|
||||
|
||||
private Integer levelValueVal;
|
||||
|
|
|
@ -5,11 +5,6 @@ package com.hzs.common.core.constant;
|
|||
*/
|
||||
public class EnumsPrefixConstants {
|
||||
|
||||
/**
|
||||
* 提示信息类
|
||||
*/
|
||||
public static final String KEY_MSG = "MSG_";
|
||||
|
||||
/**
|
||||
* 国家类
|
||||
*/
|
||||
|
@ -48,10 +43,6 @@ public class EnumsPrefixConstants {
|
|||
* 账户类
|
||||
*/
|
||||
public static final String KEY_ACC = "ACC_";
|
||||
/**
|
||||
* 店铺类
|
||||
*/
|
||||
public static final String KEY_SHOP = "SHOP_";
|
||||
|
||||
/**
|
||||
* 银行类
|
||||
|
@ -850,21 +841,6 @@ public class EnumsPrefixConstants {
|
|||
*/
|
||||
public static final String ACTIVITY_STATUS = "ENU_ACTIVITY_STATUS_";
|
||||
|
||||
/**
|
||||
* 店铺等级类
|
||||
*/
|
||||
public static final String KEY_STORE_LEVEL = "STORE_LEVEL_";
|
||||
|
||||
/**
|
||||
* 店铺等级枚举
|
||||
*/
|
||||
public static final String ELEVEL_VALUE = "ELEVEL_VALUE_";
|
||||
|
||||
/**
|
||||
* 站内信状态
|
||||
*/
|
||||
public static final String FEEDBACK_STATUS = "ENU_FE_S_";
|
||||
|
||||
|
||||
/**
|
||||
* 站内信状态
|
||||
|
|
|
@ -43,4 +43,17 @@ public enum ECategory {
|
|||
* 国际化翻译key值
|
||||
*/
|
||||
private final String key;
|
||||
|
||||
public static String getLableByValue(Integer val) {
|
||||
if (null == val) {
|
||||
return "";
|
||||
}
|
||||
for (ECategory value : ECategory.values()) {
|
||||
if (value.getValue() == val) {
|
||||
return value.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,11 +5,7 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Description: 店铺配置枚举(配送中心)
|
||||
* @Author: zhangjing
|
||||
* @Time: 2022/9/1 17:39
|
||||
* @Classname: EAwards
|
||||
* @PackageName: com.hzs.common.core.enums
|
||||
* 店铺配置枚举(配送中心)
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
|
|
@ -6,8 +6,6 @@ import lombok.Getter;
|
|||
|
||||
/**
|
||||
* 翻译key规则前缀枚举类
|
||||
*
|
||||
* @author hzs
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
@ -60,20 +58,11 @@ public enum ETransactionKey {
|
|||
*/
|
||||
ACCOUNT(EnumsPrefixConstants.KEY_ACC, "账户类"),
|
||||
|
||||
/**
|
||||
* 店铺类
|
||||
*/
|
||||
SHOP(EnumsPrefixConstants.KEY_SHOP, "店铺类"),
|
||||
/**
|
||||
* 店铺等级类
|
||||
*/
|
||||
STORE_LEVEL(EnumsPrefixConstants.KEY_STORE_LEVEL, "店铺等级类"),
|
||||
/**
|
||||
* 奖项类
|
||||
*/
|
||||
BD_BONUS_ITEMS(EnumsPrefixConstants.BONUS_ITEMS, "奖项类"),
|
||||
|
||||
|
||||
/**
|
||||
* 银行类
|
||||
*/
|
||||
|
|
|
@ -59,11 +59,6 @@ public class CuMemberAchieveExt extends CuMemberAchieve {
|
|||
*/
|
||||
private String teamName;
|
||||
|
||||
/**
|
||||
* 考核状态 (0=考核通过,1=免考通过,2=考核不通过,3=不考核)
|
||||
*/
|
||||
private Integer assessStatus;
|
||||
|
||||
/**
|
||||
* 安置主键
|
||||
*/
|
||||
|
@ -158,4 +153,8 @@ public class CuMemberAchieveExt extends CuMemberAchieve {
|
|||
*/
|
||||
private String oldAwardsName;
|
||||
|
||||
private String pkGradeVal;
|
||||
|
||||
private String pkAwardsVal;
|
||||
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.annotation.KeySequence;
|
|||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.hzs.common.core.annotation.Transaction;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
@ -35,7 +33,6 @@ public class BdStoreLevel extends BaseEntity {
|
|||
/**
|
||||
* 等级值 来源于枚举 ELevelValue
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.ELEVEL_VALUE)
|
||||
@TableField("LEVEL_VALUE")
|
||||
private Integer levelValue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue