## 去掉部分不用接口及功能;
This commit is contained in:
parent
655e98c319
commit
096e5744f1
|
|
@ -4,20 +4,12 @@ import com.hzs.common.core.domain.R;
|
|||
import com.hzs.common.domain.member.achieve.CuMemberSettlePeriod;
|
||||
|
||||
/**
|
||||
* @Description: 会员结算期间api接口
|
||||
* @Author: zhangjing
|
||||
* @Time: 2022/10/26 15:12
|
||||
* @Classname: IMemberAchieveServiceAPI
|
||||
* @PackageName: com.hzs.member.achieve
|
||||
* 会员结算期间api接口
|
||||
*/
|
||||
public interface ICuMemberSettlePeriodServiceApi {
|
||||
|
||||
/**
|
||||
* @description: 根据日期获得日期对应的期间
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/26 10:25
|
||||
* @param: [date]
|
||||
* @return: com.hzs.common.core.domain.R<com.hzs.common.domain.member.achieve.CuMemberSettlePeriod>
|
||||
* 根据日期获得日期对应的期间
|
||||
**/
|
||||
R<CuMemberSettlePeriod> getCuMemberSettlePeriodByDate(String date);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 行政区划接口
|
||||
* @Author: jiang chao
|
||||
* @Time: 2022/10/21 11:30
|
||||
* @Classname: IAreaServiceApi
|
||||
* @PackageName: com.hzs.system.base
|
||||
* 行政区划接口
|
||||
*/
|
||||
public interface IAreaServiceApi {
|
||||
|
||||
|
|
@ -49,8 +45,8 @@ public interface IAreaServiceApi {
|
|||
*/
|
||||
R<?> updateArea(List<AreaDTO> provinceDTOList);
|
||||
|
||||
/*
|
||||
* @description: 查询省绑定的产品仓库
|
||||
**/
|
||||
/**
|
||||
* 查询省绑定的产品仓库
|
||||
*/
|
||||
R<List<BdProductStorehouseExt>> queryBdProductStorehouseByCondition(List<Integer> productId, Integer province);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,6 @@ import java.util.Collection;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Classname: ICurrencyServiceApi
|
||||
* @PackageName: com.hzs.system.base
|
||||
*/
|
||||
public interface ICurrencyServiceApi {
|
||||
|
||||
/**
|
||||
|
|
@ -50,11 +45,6 @@ public interface ICurrencyServiceApi {
|
|||
**/
|
||||
R<BdStorehouse> queryBdStorehouseByProvince(Integer province, Integer... type);
|
||||
|
||||
/*
|
||||
* @description: 根据省查询对应的发货仓库
|
||||
**/
|
||||
R<BdStorehouse> queryBdStorehouseById(Integer pkId);
|
||||
|
||||
/**
|
||||
* 根据省查询对应的发货仓库
|
||||
*
|
||||
|
|
|
|||
|
|
@ -3,65 +3,32 @@ package com.hzs.system.config;
|
|||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.system.config.BdAwards;
|
||||
import com.hzs.common.domain.system.config.BdRangeAwards;
|
||||
import com.hzs.common.domain.system.config.ext.BdAwardsExt;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询奖衔配置列表api
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/29 15:31
|
||||
* @param:
|
||||
* @return:
|
||||
* 根据国家查询奖衔配置列表api
|
||||
**/
|
||||
public interface IAwardsServiceApi {
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询奖衔配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/29 15:31
|
||||
* @param: [pkCountry]
|
||||
* @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.common.domain.system.config.BdAwards>>
|
||||
* 根据国家查询奖衔配置列表
|
||||
**/
|
||||
R<List<BdAwards>> queryAwards(Integer pkCountry);
|
||||
|
||||
/*
|
||||
* @description:
|
||||
* @author: sui q
|
||||
* @date: 2024/10/15 16:45
|
||||
* @param: null null
|
||||
**/
|
||||
R<List<BdRangeAwards>> queryRangeAwards();
|
||||
|
||||
/**
|
||||
* @description: 根据PKID查询奖衔信息
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/10 11:49
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.domain.R<com.hzs.common.domain.system.config.BdAwards>
|
||||
* 根据PKID查询奖衔信息
|
||||
**/
|
||||
R<BdAwards> getAwardsOne(Integer pkId);
|
||||
|
||||
/**
|
||||
* 根据国家获取该国家的奖衔
|
||||
*
|
||||
* @throws
|
||||
* @return: R<List < BdAwards>>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/11/4 16:38
|
||||
*/
|
||||
R<Map<String, BdAwards>> getAwards();
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询辅导分红
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/11 14:14
|
||||
* @param: [pkCountry]
|
||||
* @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.common.domain.system.config.ext.BdAwardsExt>>
|
||||
**/
|
||||
R<List<BdAwardsExt>> coachBonusList(Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 根据所属国家查询奖衔
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.hzs.system.config;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.system.config.BdAwards;
|
||||
import com.hzs.common.domain.system.config.BdGrade;
|
||||
import com.hzs.system.config.dto.GradeDTO;
|
||||
|
||||
|
|
@ -11,11 +10,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @Description: 等级公共的api
|
||||
* @Author: sui q
|
||||
* @Time: 2022/9/9 14:07
|
||||
* @Classname: IGradeServiceApi
|
||||
* @PackageName: com.hzs.system.config
|
||||
* 等级公共的api
|
||||
*/
|
||||
public interface IGradeServiceApi {
|
||||
|
||||
|
|
@ -23,45 +18,30 @@ public interface IGradeServiceApi {
|
|||
* 获取等级
|
||||
*
|
||||
* @param pkId 主键
|
||||
* @return: R<GradeDTO>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/24 17:57
|
||||
*/
|
||||
R<GradeDTO> getGrade(Integer pkId);
|
||||
|
||||
/*
|
||||
* @description: 根据等级值获得等级
|
||||
* @author: sui q
|
||||
* @date: 2023/4/23 19:21
|
||||
* @param: null null
|
||||
**/
|
||||
/**
|
||||
* 根据等级值获得等级
|
||||
*/
|
||||
R<GradeDTO> getGradeByGradeValue(Integer gradeValue, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 根据国家查询等级配置列表
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return: R<List < AreaCurrencyDTO>>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/6 10:37
|
||||
*/
|
||||
R<List<GradeDTO>> queryGradeConfigByCondition(Integer pkCountry);
|
||||
|
||||
/*
|
||||
* @description: 查询不同国家的等级参数
|
||||
* @author: sui q
|
||||
* @date: 2023/5/9 17:31
|
||||
* @param: null null
|
||||
**/
|
||||
/**
|
||||
* 查询不同国家的等级参数
|
||||
*/
|
||||
R<Map<Integer, List<GradeDTO>>> queryCountryGradeConfigByCondition(Set<Integer> pkCountrySet);
|
||||
|
||||
/**
|
||||
* 根据国家查询全部等级配置
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return: R<List < AreaCurrencyDTO>>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/6 10:37
|
||||
*/
|
||||
R<List<GradeDTO>> queryGradeList(Integer pkCountry);
|
||||
|
||||
|
|
@ -70,9 +50,6 @@ public interface IGradeServiceApi {
|
|||
*
|
||||
* @param pkCountry 国家
|
||||
* @param pkGrade 等级
|
||||
* @return: R<GradeDTO>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/10/25 14:12
|
||||
*/
|
||||
R<GradeDTO> queryGradeConfigByCondition(Integer pkCountry, Integer pkGrade);
|
||||
|
||||
|
|
@ -88,9 +65,6 @@ public interface IGradeServiceApi {
|
|||
* 根据国家查询等级配置列表
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return: R<List < AreaCurrencyDTO>>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/6 10:37
|
||||
*/
|
||||
R<List<BdGrade>> queryGrowUpFootmarkGrade(Integer pkCountry);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@ import com.hzs.system.config.dto.VertexDTO;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2022/11/16 15:55
|
||||
* @Classname: IVertexServiceApi
|
||||
* @PackageName: com.hzs.sale.vertex
|
||||
*/
|
||||
public interface IVertexServiceApi {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,122 +0,0 @@
|
|||
package com.hzs.bonus.bonus.controller.manage;
|
||||
|
||||
import com.hzs.bonus.bonus.param.BdWaresBonusItemsParam;
|
||||
import com.hzs.bonus.bonus.param.BdWaresBonusParam;
|
||||
import com.hzs.bonus.bonus.service.IBdWaresBonusService;
|
||||
import com.hzs.common.core.annotation.AccessPermissions;
|
||||
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
||||
import com.hzs.common.core.utils.ComputeUtil;
|
||||
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.member.bonus.BdWaresBonus;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 特殊商品分配奖金 前端控制器
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wares-bonus/special")
|
||||
public class BdWaresBonusController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBdWaresBonusService bdWaresBonusService;
|
||||
|
||||
/**
|
||||
* 在管理页面修改保存4-n参数
|
||||
*
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/insert")
|
||||
public AjaxResult insertBdWaresBonus(@RequestBody BdWaresBonusParam waresBonusParam) {
|
||||
if (waresBonusParam.getPkId() != null) {
|
||||
return AjaxResult.error(MemberMsgConstants.REQUIRED_NOT_EMPTY);
|
||||
}
|
||||
String msg = validateParam(waresBonusParam);
|
||||
if (msg != null) {
|
||||
return AjaxResult.error(msg);
|
||||
}
|
||||
waresBonusParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
bdWaresBonusService.insertOrUpdateBdWaresBonusByParam(waresBonusParam, SecurityUtils.getUserId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
private String validateParam(BdWaresBonusParam waresBonusParam) {
|
||||
if (waresBonusParam.getPkWares() == null ||
|
||||
waresBonusParam.getTotalAlgebra() == null || waresBonusParam.getOrderAssAchieve() == null ||
|
||||
waresBonusParam.getWaresBonusItemsParamList() == null || waresBonusParam.getWaresBonusItemsParamList().size() == 0) {
|
||||
return MemberMsgConstants.REQUIRED_NOT_EMPTY;
|
||||
}
|
||||
BigDecimal totalAssAchieve = BigDecimal.ZERO;
|
||||
for (BdWaresBonusItemsParam bdWaresBonusItemsParam : waresBonusParam.getWaresBonusItemsParamList()) {
|
||||
if (bdWaresBonusItemsParam.getAlgebra() == null || bdWaresBonusItemsParam.getAssAchieve() == null) {
|
||||
return MemberMsgConstants.REQUIRED_NOT_EMPTY;
|
||||
}
|
||||
totalAssAchieve = ComputeUtil.computeAdd(totalAssAchieve, bdWaresBonusItemsParam.getAssAchieve());
|
||||
}
|
||||
if (!ComputeUtil.compareEqual(totalAssAchieve, waresBonusParam.getOrderAssAchieve())) {
|
||||
return "分配总ev跟各子ev合计不相等!";
|
||||
}
|
||||
BdWaresBonus bdWaresBonus = bdWaresBonusService.queryWaresBonusById(waresBonusParam);
|
||||
if (bdWaresBonus != null && bdWaresBonus.getPkId() != null) {
|
||||
return "该商品已经配置过,不能再次配置!";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在管理页面修改保存4-n参数
|
||||
*
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public AjaxResult updateBdWaresBonus(@RequestBody BdWaresBonusParam waresBonusParam) {
|
||||
if (waresBonusParam.getPkId() == null) {
|
||||
return AjaxResult.error(MemberMsgConstants.REQUIRED_NOT_EMPTY);
|
||||
}
|
||||
String msg = validateParam(waresBonusParam);
|
||||
if (msg != null) {
|
||||
return AjaxResult.error(msg);
|
||||
}
|
||||
waresBonusParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
bdWaresBonusService.insertOrUpdateBdWaresBonusByParam(waresBonusParam, SecurityUtils.getUserId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 在管理页面修改保存4-n参数
|
||||
*
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@DeleteMapping("/delete/{pkId}")
|
||||
public AjaxResult deleteBdWaresBonus(@PathVariable Long pkId) {
|
||||
bdWaresBonusService.deleteSpecialWaresBonus(pkId, SecurityUtils.getUserId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询会员某个时间段内的奖金汇总
|
||||
*/
|
||||
@AccessPermissions("WaresBonus")
|
||||
@PostMapping("/query")
|
||||
public TableDataInfo listWaresBonusParam(@RequestBody BdWaresBonusParam waresBonusParam) {
|
||||
waresBonusParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
startPage();
|
||||
return getDataTable(bdWaresBonusService.querySpecialWaresBonus(waresBonusParam));
|
||||
}
|
||||
|
||||
/**
|
||||
* 极差团队特殊商品配置ev的分配规则
|
||||
*/
|
||||
@GetMapping("/ev-query")
|
||||
public TableDataInfo querySpecialWaresBonus() {
|
||||
return getDataTable(bdWaresBonusService.querySpecialWaresBonus());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.hzs.bonus.bonus.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.member.bonus.BdWaresBonusItems;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 特殊商品分配ev奖金明细 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-30
|
||||
*/
|
||||
public interface BdWaresBonusItemsMapper extends BaseMapper<BdWaresBonusItems> {
|
||||
|
||||
}
|
||||
|
|
@ -8,28 +8,13 @@ import com.hzs.common.domain.member.ext.BdWaresBonusExt;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 特殊商品分配奖金 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-30
|
||||
*/
|
||||
public interface BdWaresBonusMapper extends BaseMapper<BdWaresBonus> {
|
||||
|
||||
/*
|
||||
* @description: 查询特殊品奖金配置
|
||||
* @author: sui q
|
||||
* @date: 2024/10/30 10:55
|
||||
* @param: null null
|
||||
* 查询特殊品奖金配置
|
||||
**/
|
||||
List<BdWaresBonusExt> querySpecialWaresBonus(BdWaresBonusParam waresBonusParam);
|
||||
|
||||
/*
|
||||
* @description: 查询能设置奖金的特殊品
|
||||
* @author: sui q
|
||||
* @date: 2024/11/8 10:19
|
||||
* @param: null null
|
||||
**/
|
||||
List<BdWaresBonusExt> queryAllSpecialWaresBonus();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
package com.hzs.bonus.bonus.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.bonus.BdWaresBonusItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 特殊商品分配ev奖金明细 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-30
|
||||
*/
|
||||
public interface IBdWaresBonusItemsService extends IService<BdWaresBonusItems> {
|
||||
|
||||
/*
|
||||
* @description: 插入奖金特殊项奖金
|
||||
* @author: sui q
|
||||
* @date: 2024/11/7 15:04
|
||||
* @param: null null
|
||||
**/
|
||||
void insetWaresBonusItems(List<BdWaresBonusItems> waresBonusItemsList);
|
||||
|
||||
/*
|
||||
* @description: 插入奖金特殊项奖金
|
||||
* @author: sui q
|
||||
* @date: 2024/11/7 15:04
|
||||
* @param: null null
|
||||
**/
|
||||
void updateWaresBonusItems(List<BdWaresBonusItems> waresBonusItemsList);
|
||||
|
||||
/*
|
||||
* @description: 插入奖金特殊项奖金
|
||||
* @author: sui q
|
||||
* @date: 2024/11/7 15:04
|
||||
* @param: null null
|
||||
**/
|
||||
void deleteWaresBonusItems(List<BdWaresBonusItems> waresBonusItemsList, Long pkWaresBonus, Long userId);
|
||||
|
||||
}
|
||||
|
|
@ -8,52 +8,13 @@ import com.hzs.common.domain.member.ext.BdWaresBonusExt;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 特殊商品分配奖金 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-30
|
||||
*/
|
||||
public interface IBdWaresBonusService extends IService<BdWaresBonus> {
|
||||
|
||||
/*
|
||||
* @description: 查询特殊品奖金配置
|
||||
* @author: sui q
|
||||
* @date: 2024/10/30 10:55
|
||||
* @param: null null
|
||||
* 查询特殊品奖金配置
|
||||
**/
|
||||
List<BdWaresBonusExt> querySpecialWaresBonus(BdWaresBonusParam waresBonusParam);
|
||||
|
||||
/*
|
||||
* @description: 根据主键删除特殊商品奖金配置
|
||||
* @author: sui q
|
||||
* @date: 2024/11/8 9:58
|
||||
* @param: null null
|
||||
**/
|
||||
void deleteSpecialWaresBonus(Long pkId, Long userId);
|
||||
|
||||
/*
|
||||
* @description: 根据商品id查询是否已经存在数据
|
||||
* @author: sui q
|
||||
* @date: 2024/11/7 15:51
|
||||
* @param: null null
|
||||
**/
|
||||
BdWaresBonus queryWaresBonusById(BdWaresBonusParam waresBonusParam);
|
||||
|
||||
/*
|
||||
* @description: 插入商品奖金根据参数
|
||||
* @author: sui q
|
||||
* @date: 2024/11/7 13:47
|
||||
* @param: null null
|
||||
**/
|
||||
void insertOrUpdateBdWaresBonusByParam(BdWaresBonusParam bdWaresBonusParam, Long userId);
|
||||
|
||||
/*
|
||||
* @description: 查询能设置奖金的特殊品
|
||||
* @author: sui q
|
||||
* @date: 2024/11/8 10:19
|
||||
* @param: null null
|
||||
**/
|
||||
List<BdWaresBonusExt> querySpecialWaresBonus();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
package com.hzs.bonus.bonus.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.bonus.bonus.mapper.BdWaresBonusItemsMapper;
|
||||
import com.hzs.bonus.bonus.service.IBdWaresBonusItemsService;
|
||||
import com.hzs.common.core.enums.EDelFlag;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.domain.member.bonus.BdWaresBonusItems;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 特殊商品分配ev奖金明细 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-30
|
||||
*/
|
||||
@Service
|
||||
public class BdWaresBonusItemsServiceImpl extends ServiceImpl<BdWaresBonusItemsMapper, BdWaresBonusItems> implements IBdWaresBonusItemsService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void insetWaresBonusItems(List<BdWaresBonusItems> waresBonusItemsList) {
|
||||
saveBatch(waresBonusItemsList);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateWaresBonusItems(List<BdWaresBonusItems> waresBonusItemsList) {
|
||||
updateBatchById(waresBonusItemsList);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteWaresBonusItems(List<BdWaresBonusItems> waresBonusItemsList, Long pkWaresBonus, Long userId) {
|
||||
LambdaUpdateWrapper<BdWaresBonusItems> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
if (waresBonusItemsList != null && waresBonusItemsList.size() > 0) {
|
||||
Set<Long> itemIdList = waresBonusItemsList.stream().map(BdWaresBonusItems::getPkId).collect(Collectors.toSet());
|
||||
updateWrapper.notIn(BdWaresBonusItems::getPkId, itemIdList);
|
||||
}
|
||||
updateWrapper.eq(BdWaresBonusItems::getPkWaresBonus, pkWaresBonus);
|
||||
updateWrapper.set(BdWaresBonusItems::getDelFlag, EDelFlag.DELETE.getValue());
|
||||
updateWrapper.set(BdWaresBonusItems::getPkModified, userId);
|
||||
updateWrapper.set(BdWaresBonusItems::getModifiedTime, DateUtils.currentDateTime());
|
||||
update(updateWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,110 +1,24 @@
|
|||
package com.hzs.bonus.bonus.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.bonus.bonus.mapper.BdWaresBonusMapper;
|
||||
import com.hzs.bonus.bonus.param.BdWaresBonusParam;
|
||||
import com.hzs.bonus.bonus.service.IBdWaresBonusItemsService;
|
||||
import com.hzs.bonus.bonus.service.IBdWaresBonusService;
|
||||
import com.hzs.common.core.constant.SystemFieldConstants;
|
||||
import com.hzs.common.core.enums.EYesNo;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.domain.member.bonus.BdWaresBonus;
|
||||
import com.hzs.common.domain.member.bonus.BdWaresBonusItems;
|
||||
import com.hzs.common.domain.member.ext.BdWaresBonusExt;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特殊商品分配奖金 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-30
|
||||
*/
|
||||
@Service
|
||||
public class BdWaresBonusServiceImpl extends ServiceImpl<BdWaresBonusMapper, BdWaresBonus> implements IBdWaresBonusService {
|
||||
|
||||
@Autowired
|
||||
private IBdWaresBonusItemsService waresBonusItemsService;
|
||||
|
||||
@Override
|
||||
public List<BdWaresBonusExt> querySpecialWaresBonus(BdWaresBonusParam waresBonusParam) {
|
||||
return baseMapper.querySpecialWaresBonus(waresBonusParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteSpecialWaresBonus(Long pkId, Long userId) {
|
||||
// 删除明细表
|
||||
waresBonusItemsService.deleteWaresBonusItems(null, pkId, userId);
|
||||
UpdateWrapper<BdWaresBonus> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.set(SystemFieldConstants.PK_MODIFIED, userId);
|
||||
updateWrapper.set(SystemFieldConstants.DEL_FLAG, EYesNo.NO.getIntValue());
|
||||
updateWrapper.set(SystemFieldConstants.MODIFIED_TIME, DateUtils.currentDateTime());
|
||||
updateWrapper.eq(SystemFieldConstants.PK_ID, pkId);
|
||||
update(updateWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BdWaresBonus queryWaresBonusById(BdWaresBonusParam waresBonusParam) {
|
||||
QueryWrapper<BdWaresBonus> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(SystemFieldConstants.PK_WARES, waresBonusParam.getPkWares());
|
||||
if (waresBonusParam.getPkId() != null) {
|
||||
queryWrapper.ne(SystemFieldConstants.PK_ID, waresBonusParam.getPkId());
|
||||
}
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void insertOrUpdateBdWaresBonusByParam(BdWaresBonusParam bdWaresBonusParam, Long userId) {
|
||||
// 主表
|
||||
BdWaresBonus bdWaresBonus = BeanUtil.copyProperties(bdWaresBonusParam, BdWaresBonus.class);
|
||||
if (bdWaresBonus.getPkId() == null) {
|
||||
bdWaresBonus.setPkCreator(userId);
|
||||
baseMapper.insert(bdWaresBonus);
|
||||
} else {
|
||||
bdWaresBonus.setPkModified(userId);
|
||||
baseMapper.updateById(bdWaresBonus);
|
||||
}
|
||||
// 明细
|
||||
List<BdWaresBonusItems> bdWaresBonusItems = BeanUtil.copyToList(bdWaresBonusParam.getWaresBonusItemsParamList(), BdWaresBonusItems.class);
|
||||
// 分类分为有id和没有id的
|
||||
List<BdWaresBonusItems> insertWaresBonusItems = new ArrayList<>();
|
||||
List<BdWaresBonusItems> updateWaresBonusItems = new ArrayList<>();
|
||||
Date currentDate = DateUtils.currentDateTime();
|
||||
for (BdWaresBonusItems bdWaresBonusItem : bdWaresBonusItems) {
|
||||
bdWaresBonusItem.setPkWaresBonus(bdWaresBonus.getPkId());
|
||||
bdWaresBonusItem.setPkCountry(bdWaresBonus.getPkCountry());
|
||||
if (bdWaresBonusItem.getPkId() == null) {
|
||||
bdWaresBonusItem.setPkCreator(userId);
|
||||
insertWaresBonusItems.add(bdWaresBonusItem);
|
||||
} else {
|
||||
bdWaresBonusItem.setPkModified(userId);
|
||||
bdWaresBonusItem.setModifiedTime(currentDate);
|
||||
updateWaresBonusItems.add(bdWaresBonusItem);
|
||||
}
|
||||
}
|
||||
if (updateWaresBonusItems.size() > 0) {
|
||||
// 删除
|
||||
waresBonusItemsService.deleteWaresBonusItems(updateWaresBonusItems, updateWaresBonusItems.get(0).getPkWaresBonus(), userId);
|
||||
waresBonusItemsService.updateWaresBonusItems(updateWaresBonusItems);
|
||||
}
|
||||
// 新增
|
||||
if (insertWaresBonusItems.size() > 0) {
|
||||
waresBonusItemsService.insetWaresBonusItems(insertWaresBonusItems);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BdWaresBonusExt> querySpecialWaresBonus() {
|
||||
return baseMapper.queryAllSpecialWaresBonus();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzs.bonus.bonus.mapper.BdWaresBonusItemsMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.member.bonus.BdWaresBonusItems">
|
||||
<id column="PK_ID" property="pkId" />
|
||||
<result column="DEL_FLAG" property="delFlag" />
|
||||
<result column="PK_COUNTRY" property="pkCountry" />
|
||||
<result column="CREATION_TIME" property="creationTime" />
|
||||
<result column="MODIFIED_TIME" property="modifiedTime" />
|
||||
<result column="PK_CREATOR" property="pkCreator" />
|
||||
<result column="PK_MODIFIED" property="pkModified" />
|
||||
<result column="PK_WARES_BONUS" property="pkWaresBonus" />
|
||||
<result column="ASS_ACHIEVE" property="assAchieve" />
|
||||
<result column="ALGEBRA" property="algebra" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -4,22 +4,23 @@
|
|||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BdWaresBonusExt" type="com.hzs.common.domain.member.ext.BdWaresBonusExt">
|
||||
<id column="PK_ID" property="pkId" />
|
||||
<result column="DEL_FLAG" property="delFlag" />
|
||||
<result column="PK_COUNTRY" property="pkCountry" />
|
||||
<result column="CREATION_TIME" property="creationTime" />
|
||||
<result column="MODIFIED_TIME" property="modifiedTime" />
|
||||
<result column="PK_CREATOR" property="pkCreator" />
|
||||
<result column="PK_MODIFIED" property="pkModified" />
|
||||
<result column="PK_WARES" property="pkWares" />
|
||||
<result column="ORDER_ASS_ACHIEVE" property="orderAssAchieve" />
|
||||
<result column="TOTAL_ALGEBRA" property="totalAlgebra" />
|
||||
<id column="PK_ID" property="pkId"/>
|
||||
<result column="DEL_FLAG" property="delFlag"/>
|
||||
<result column="PK_COUNTRY" property="pkCountry"/>
|
||||
<result column="CREATION_TIME" property="creationTime"/>
|
||||
<result column="MODIFIED_TIME" property="modifiedTime"/>
|
||||
<result column="PK_CREATOR" property="pkCreator"/>
|
||||
<result column="PK_MODIFIED" property="pkModified"/>
|
||||
<result column="PK_WARES" property="pkWares"/>
|
||||
<result column="ORDER_ASS_ACHIEVE" property="orderAssAchieve"/>
|
||||
<result column="TOTAL_ALGEBRA" property="totalAlgebra"/>
|
||||
<collection property="bdWaresBonusItemsList" ofType="com.hzs.common.domain.member.bonus.BdWaresBonusItems">
|
||||
<result column="PK_ID_ITEM" property="pkId" />
|
||||
<result column="ASS_ACHIEVE" property="assAchieve" />
|
||||
<result column="ALGEBRA" property="algebra" />
|
||||
<result column="PK_ID_ITEM" property="pkId"/>
|
||||
<result column="ASS_ACHIEVE" property="assAchieve"/>
|
||||
<result column="ALGEBRA" property="algebra"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<select id="querySpecialWaresBonus" resultMap="BdWaresBonusExt">
|
||||
select bw.*,ba.wares_code,ba.wares_name,bt.pk_id pk_id_item,bt.ass_achieve,bt.algebra from bd_wares_bonus bw
|
||||
inner join bd_wares_bonus_items bt
|
||||
|
|
@ -35,16 +36,5 @@
|
|||
</if>
|
||||
order by bw.pk_wares,bt.algebra
|
||||
</select>
|
||||
<select id="queryAllSpecialWaresBonus" resultMap="BdWaresBonusExt">
|
||||
select bw.pk_id,bw.wares_code, bw.wares_name
|
||||
from bd_wares bw
|
||||
inner join bd_wares_extend be on bw.pk_id = be.pk_wares
|
||||
left join bd_wares_bonus bwb on bw.pk_id = bwb.pk_wares and bwb.del_flag = 0
|
||||
where bw.del_flag = 0
|
||||
and be.del_flag = 0
|
||||
and bw.special_area = 40
|
||||
and be.is_put_on = 0
|
||||
and bwb.pk_wares is null
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.member.account.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.member.account.CuMemberTrade;
|
||||
import com.hzs.common.domain.member.account.CuMemberTradeExt;
|
||||
|
|
@ -10,12 +9,7 @@ import org.apache.ibatis.annotations.Param;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会员交易明细 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-09-06
|
||||
*/
|
||||
public interface CuMemberTradeMapper extends BaseMapper<CuMemberTrade> {
|
||||
|
||||
|
|
@ -92,27 +86,6 @@ public interface CuMemberTradeMapper extends BaseMapper<CuMemberTrade> {
|
|||
@Param("sourceCode") String sourceCode,
|
||||
@Param("tradeClassify") Integer tradeClassify);
|
||||
|
||||
|
||||
/**
|
||||
* 批量获取cuMemberBonus主键
|
||||
*
|
||||
* @param rowNum 数量
|
||||
* @return: List<Integer>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/12/13 13:47
|
||||
*/
|
||||
List<Long> batchQueryCuMemberTradeSeq(Integer rowNum);
|
||||
|
||||
/**
|
||||
* 批量插入会员交易流水,用于奖金发放插入流水
|
||||
*
|
||||
* @param cuMemberTradeList 交易流水
|
||||
* @return: void
|
||||
* @Author: sui q
|
||||
* @Date: 2023/3/21 11:45
|
||||
*/
|
||||
void batchInsertCuMemberTrade(@Param("cuMemberTradeList") List<?> cuMemberTradeList);
|
||||
|
||||
/**
|
||||
* 根据来源单号查询会员奖金币种的流水信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -22,13 +22,9 @@ public interface ICuMemberTradeService extends IService<CuMemberTrade> {
|
|||
*
|
||||
* @param pkMember 会员主键
|
||||
* @param sourceCode 订单编号
|
||||
* @return: List<CuMemberTrade>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/10/22 21:26
|
||||
*/
|
||||
List<CuMemberTrade> queryCuMemberTrade(Long pkMember, String sourceCode);
|
||||
|
||||
|
||||
/**
|
||||
* 查询列表信息
|
||||
*
|
||||
|
|
@ -37,7 +33,6 @@ public interface ICuMemberTradeService extends IService<CuMemberTrade> {
|
|||
*/
|
||||
Object[] selectMemberTradeList(CuMemberTradeVO cuMemberTradeVO);
|
||||
|
||||
|
||||
/**
|
||||
* 批量插入流水信息
|
||||
*
|
||||
|
|
@ -46,7 +41,6 @@ public interface ICuMemberTradeService extends IService<CuMemberTrade> {
|
|||
*/
|
||||
Integer batchSaveTradeByMemberCode(@Param("cuMemberTrades") List<CuMemberTrade> cuMemberTrades);
|
||||
|
||||
|
||||
/**
|
||||
* 查询钱包明细详情信息
|
||||
*
|
||||
|
|
@ -88,24 +82,15 @@ public interface ICuMemberTradeService extends IService<CuMemberTrade> {
|
|||
List<MemberBalanceDTO> selectBalanceNotEnoughMember(BusinessCommissionDTO businessCommissionDTO);
|
||||
|
||||
/**
|
||||
* @description: 办理业务专用查询会员余额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/11/10 15:19
|
||||
* @param: [mbbList]
|
||||
* @return: java.util.List<com.hzs.member.account.dto.MemberBalanceDTO>
|
||||
* 办理业务专用查询会员余额
|
||||
**/
|
||||
List<MemberBusinessBalanceDTO> selectBusinessBalanceNotEnoughMember(List<MemberBusinessBalanceDTO> mbbList, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* @description: 特殊业务业务办理专用查询会员余额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/11/14 11:10
|
||||
* @param: [mbbList, pkCountry]
|
||||
* @return: java.util.List<com.hzs.member.account.dto.MemberBusinessBalanceDTO>
|
||||
* 特殊业务业务办理专用查询会员余额
|
||||
**/
|
||||
List<MemberBusinessBalanceDTO> selectSpecialBusinessBalanceNotEnoughMember(List<MemberBusinessBalanceDTO> mbbList, Integer pkCountry);
|
||||
|
||||
|
||||
/**
|
||||
* 查询钱包明细(前端)
|
||||
*
|
||||
|
|
@ -114,7 +99,6 @@ public interface ICuMemberTradeService extends IService<CuMemberTrade> {
|
|||
*/
|
||||
List<CuMemberTradeVO> selectWattleDetail(CuMemberTradeVO cuMemberTradeVO);
|
||||
|
||||
|
||||
/**
|
||||
* 根据 来源编号更新交易编号
|
||||
*
|
||||
|
|
@ -141,27 +125,6 @@ public interface ICuMemberTradeService extends IService<CuMemberTrade> {
|
|||
*/
|
||||
Integer saveMemberTradeAndAccountByRechargeCode(String rechargeCode);
|
||||
|
||||
|
||||
/**
|
||||
* 批量获取cuMemberBonus主键
|
||||
*
|
||||
* @param rowNum 数量
|
||||
* @return: List<Integer>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/12/13 13:47
|
||||
*/
|
||||
List<Long> batchQueryCuMemberTradeSeq(Integer rowNum);
|
||||
|
||||
/**
|
||||
* 批量插入会员交易流水,用于奖金发放插入流水
|
||||
*
|
||||
* @param cuMemberTradeList 交易流水
|
||||
* @return: void
|
||||
* @Author: sui q
|
||||
* @Date: 2023/3/21 11:45
|
||||
*/
|
||||
void batchInsertCuMemberTrade(@Param("cuMemberTradeList") List<CuMemberTrade> cuMemberTradeList);
|
||||
|
||||
/**
|
||||
* 根据来源单号查询会员奖金币种的流水信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -41,30 +41,18 @@ import java.util.stream.Collectors;
|
|||
|
||||
/**
|
||||
* 会员交易明细 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-09-06
|
||||
*/
|
||||
@Service
|
||||
public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, CuMemberTrade> implements ICuMemberTradeService {
|
||||
|
||||
@Autowired
|
||||
ICuMemberBaseService cuMemberBaseService;
|
||||
private ICuMemberBaseService iCuMemberBaseService;
|
||||
@Autowired
|
||||
ICuMemberAccountService cuMemberAccountService;
|
||||
|
||||
private ICuMemberAccountService iCuMemberAccountService;
|
||||
@Autowired
|
||||
ICuMemberRechargeService cuMemberRechargeService;
|
||||
|
||||
private ICuMemberRechargeService iCuMemberRechargeService;
|
||||
@Autowired
|
||||
ITransactionCommonService iTransactionCommonService;
|
||||
|
||||
private CuMemberBonusSettle cuMemberBonusSettle;
|
||||
|
||||
@Autowired
|
||||
public void setCuMemberBonusSettle(CuMemberBonusSettle cuMemberBonusSettle) {
|
||||
this.cuMemberBonusSettle = cuMemberBonusSettle;
|
||||
}
|
||||
private ITransactionCommonService iTransactionCommonService;
|
||||
|
||||
@Override
|
||||
public List<CuMemberTrade> queryCuMemberTrade(Long pkMember, String sourceCode) {
|
||||
|
|
@ -98,10 +86,10 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
Integer pkRate = memberTradeExt.getPkRate();
|
||||
if (null != pkRate) {
|
||||
//汇率
|
||||
exchangeRate = cuMemberBaseService.getCurrencyById(pkRate).getInExchangeRate();
|
||||
exchangeRate = iCuMemberBaseService.getCurrencyById(pkRate).getInExchangeRate();
|
||||
} else {
|
||||
//取最新的汇率
|
||||
CurrencyDTO currencyDTO = cuMemberBaseService.getCurrency(cuMemberTradeVO.getPkCountry());
|
||||
CurrencyDTO currencyDTO = iCuMemberBaseService.getCurrency(cuMemberTradeVO.getPkCountry());
|
||||
exchangeRate = currencyDTO.getInExchangeRate();
|
||||
}
|
||||
//交易金额
|
||||
|
|
@ -112,7 +100,7 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
BigDecimal settleTradeBeforeBalance = null != exchangeRate ? memberTradeExt.getTradeBeforeBalance().divide(exchangeRate, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
|
||||
//翻译Key
|
||||
Integer pkAccount = cuMemberTradeVO.getPkAccount();
|
||||
cuMemberTradeVO.setPkAccount(cuMemberBaseService.translateAccountValue(pkAccount));
|
||||
cuMemberTradeVO.setPkAccount(iCuMemberBaseService.translateAccountValue(pkAccount));
|
||||
cuMemberTradeVO.setExchangeRate(exchangeRate);
|
||||
}
|
||||
|
||||
|
|
@ -131,11 +119,11 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
if (CollUtil.isNotEmpty(cuMemberTradeExtList)) {
|
||||
Integer pkCountry = memberTradeDetailVO.getPkCountry();
|
||||
//查询币种值
|
||||
List<BdAccount> allAccounts = cuMemberBaseService.getAccountByCountryId(pkCountry);
|
||||
List<BdAccount> allAccounts = iCuMemberBaseService.getAccountByCountryId(pkCountry);
|
||||
Map<Integer, BdAccount> map = allAccounts.stream().collect(Collectors.toMap(BdAccount::getPkId, o -> o));
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(ETradeType.values());
|
||||
//根据国家查询汇率
|
||||
CurrencyDTO currency = cuMemberBaseService.getCurrency(pkCountry);
|
||||
CurrencyDTO currency = iCuMemberBaseService.getCurrency(pkCountry);
|
||||
//汇率
|
||||
BigDecimal exchangeRate = currency.getInExchangeRate();
|
||||
for (CuMemberTradeExt cuMemberTradeExt : cuMemberTradeExtList) {
|
||||
|
|
@ -196,14 +184,14 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
// 更新余额
|
||||
Integer pkCountry = businessCommissionDTO.getPkCountry();
|
||||
if (null != pkCountry) {
|
||||
Integer accountValue = cuMemberBaseService.getAccountValueById(businessCommissionDTO.getPkAccount());
|
||||
Integer accountValue = iCuMemberBaseService.getAccountValueById(businessCommissionDTO.getPkAccount());
|
||||
if (accountValue.equals(EAccount.BONUS.getValue())) {
|
||||
isWithdraw = 0;
|
||||
}
|
||||
return cuMemberAccountService.batchUpdateMemberAccountByPkmember(
|
||||
return iCuMemberAccountService.batchUpdateMemberAccountByPkmember(
|
||||
(List<MemberAmountDTO>) objects[1], accountValue, isWithdraw);
|
||||
} else {
|
||||
return cuMemberAccountService.batchUpdateMemberAccountByPkMemberCountry(
|
||||
return iCuMemberAccountService.batchUpdateMemberAccountByPkMemberCountry(
|
||||
(List<MemberAmountDTO>) objects[1], null);
|
||||
}
|
||||
}
|
||||
|
|
@ -228,14 +216,14 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
if (CollUtil.isNotEmpty(cuMemberTrades)) {
|
||||
List<Long> pkMembers = cuMemberTrades.stream().map(CuMemberTrade::getPkMember).collect(Collectors.toList());
|
||||
//查询账户余额
|
||||
List<CuMemberAccount> cuMemberAccounts = cuMemberAccountService.selectMemberAccountByPkMember(pkMembers);
|
||||
List<CuMemberAccount> cuMemberAccounts = iCuMemberAccountService.selectMemberAccountByPkMember(pkMembers);
|
||||
Map<Long, CuMemberAccount> memberAccountMap = cuMemberAccounts.stream().collect(Collectors.toMap(CuMemberAccount::getPkMember, o -> o));
|
||||
Integer pkAccountValue = null;
|
||||
Map<Long, MemberAmountDTO> memberAmountMap = new HashMap<>();
|
||||
for (CuMemberTrade cuMemberTrade : cuMemberTrades) {
|
||||
Long pkMember = cuMemberTrade.getPkMember();
|
||||
Integer pkAccount = cuMemberTrade.getPkAccount();
|
||||
pkAccountValue = cuMemberBaseService.getAccountValueById(pkAccount);
|
||||
pkAccountValue = iCuMemberBaseService.getAccountValueById(pkAccount);
|
||||
rejectTrade = new CuMemberTrade();
|
||||
BeanUtils.copyProperties(cuMemberTrade, rejectTrade);
|
||||
BigDecimal tradeAmount = cuMemberTrade.getTradeAmount().negate();
|
||||
|
|
@ -268,9 +256,9 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
}
|
||||
this.saveBatch(rejectList);
|
||||
//会员余额信息
|
||||
List<MemberAmountDTO> memberAmountDTOList = memberAmountMap.entrySet().stream().map(a -> a.getValue()).collect(Collectors.toList());
|
||||
List<MemberAmountDTO> memberAmountDTOList = memberAmountMap.entrySet().stream().map(Map.Entry::getValue).collect(Collectors.toList());
|
||||
//更新余额
|
||||
return cuMemberAccountService.batchUpdateMemberAccountByPkMemberCountry(memberAmountDTOList, isWithdraw);
|
||||
return iCuMemberAccountService.batchUpdateMemberAccountByPkMemberCountry(memberAmountDTOList, isWithdraw);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -283,7 +271,7 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
Integer pkAccount = businessCommissionDTO.getPkAccount();
|
||||
List<MemberAmountDTO> memberAmountDTOList = businessCommissionDTO.getMemberAmountDTOList();
|
||||
Map<Long, MemberAmountDTO> memberAccountExtMap = memberAmountDTOList.stream().collect(Collectors.toMap(MemberAmountDTO::getPkMember, o -> o));
|
||||
List<CuMemberAccountExt> cuMemberAccountExts = cuMemberAccountService.queryMemberAccountByPkMember(memberAmountDTOList);
|
||||
List<CuMemberAccountExt> cuMemberAccountExts = iCuMemberAccountService.queryMemberAccountByPkMember(memberAmountDTOList);
|
||||
for (CuMemberAccountExt memberAccountExt : cuMemberAccountExts) {
|
||||
BigDecimal availableBalance = getAvailableBalance(memberAccountExt, pkAccount);
|
||||
if (availableBalance.compareTo(memberAccountExtMap.get(memberAccountExt.getPkMember()).getTradeAmount()) < 0) {
|
||||
|
|
@ -294,27 +282,19 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
memberBalanceDTOList.add(memberBalanceDTO);
|
||||
}
|
||||
}
|
||||
|
||||
return memberBalanceDTOList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 基础业务办理专用查询会员余额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/11/10 15:17
|
||||
* @param: [mbbList]
|
||||
* @return: java.util.List<com.hzs.member.account.dto.MemberBalanceDTO>
|
||||
**/
|
||||
@Override
|
||||
public List<MemberBusinessBalanceDTO> selectBusinessBalanceNotEnoughMember(List<MemberBusinessBalanceDTO> mbbList, Integer pkCountry) {
|
||||
// 根据国家查询固定币种
|
||||
List<BdAccount> accList = cuMemberBaseService.getAccountByCountryId(pkCountry);
|
||||
List<BdAccount> accList = iCuMemberBaseService.getAccountByCountryId(pkCountry);
|
||||
Map<Integer, BdAccount> accountMap = accList.stream()
|
||||
.collect(Collectors.toMap(BdAccount::getFieldValue, Function.identity()));
|
||||
List<MemberAmountDTO> memberAmountDTOList = mbbList.stream()
|
||||
.map(item -> BeanUtil.copyProperties(item, MemberAmountDTO.class))
|
||||
.collect(Collectors.toList());
|
||||
List<CuMemberAccountExt> cuMemberAccountExts = cuMemberAccountService.queryMemberAccountByPkMember(memberAmountDTOList);
|
||||
List<CuMemberAccountExt> cuMemberAccountExts = iCuMemberAccountService.queryMemberAccountByPkMember(memberAmountDTOList);
|
||||
Map<Long, CuMemberAccountExt> cuMemberAccountExtsMap = cuMemberAccountExts.stream()
|
||||
.collect(Collectors.toMap(CuMemberAccountExt::getPkMember, Function.identity()));
|
||||
Map<Long, List<MemberAmountDTO>> memberAmountMap = memberAmountDTOList.stream()
|
||||
|
|
@ -434,25 +414,15 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return mbbList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 特殊业务业务办理专用查询会员余额
|
||||
* @author: zhang jing
|
||||
* @date: 2023/11/10 15:17
|
||||
* @param: [mbbList]
|
||||
* @return: java.util.List<com.hzs.member.account.dto.MemberBalanceDTO>
|
||||
**/
|
||||
@Override
|
||||
public List<MemberBusinessBalanceDTO> selectSpecialBusinessBalanceNotEnoughMember(List<MemberBusinessBalanceDTO> mbbList, Integer pkCountry) {
|
||||
// 根据国家查询固定币种
|
||||
List<BdAccount> accList = cuMemberBaseService.getAccountByCountryId(pkCountry);
|
||||
List<BdAccount> accList = iCuMemberBaseService.getAccountByCountryId(pkCountry);
|
||||
Map<Integer, BdAccount> accountMap = accList.stream().collect(Collectors.toMap(BdAccount::getFieldValue, Function.identity()));
|
||||
|
||||
List<MemberAmountDTO> memberAmountDTOList = mbbList.stream()
|
||||
|
|
@ -462,7 +432,7 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
Map<Long, MemberAmountDTO> memberAccountExtMap = memberAmountDTOList.stream()
|
||||
.collect(Collectors.toMap(MemberAmountDTO::getPkMember, Function.identity()));
|
||||
|
||||
List<CuMemberAccountExt> cuMemberAccountExts = cuMemberAccountService.queryMemberAccountByPkMember(memberAmountDTOList);
|
||||
List<CuMemberAccountExt> cuMemberAccountExts = iCuMemberAccountService.queryMemberAccountByPkMember(memberAmountDTOList);
|
||||
|
||||
for (CuMemberAccountExt memberAccountExt : cuMemberAccountExts) {
|
||||
processAccountBalance(accountMap, memberAccountExt, memberAccountExtMap, mbbList);
|
||||
|
|
@ -535,7 +505,7 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
private BigDecimal getAvailableBalance(CuMemberAccountExt memberAccountExt, Integer pkAccount) {
|
||||
BigDecimal balance;
|
||||
//币种值
|
||||
Integer accountValue = cuMemberBaseService.getAccountValueById(pkAccount);
|
||||
Integer accountValue = iCuMemberBaseService.getAccountValueById(pkAccount);
|
||||
//奖金账号
|
||||
if (accountValue.equals(EAccount.BONUS.getValue())) {
|
||||
//账户余额
|
||||
|
|
@ -589,12 +559,12 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
//是多国不同账户
|
||||
Boolean isMany = isMultinational(pkCountry, pkAccount);
|
||||
if (!isMany) {
|
||||
currencyDTO = cuMemberBaseService.getCurrency(pkCountry);
|
||||
currencyDTO = iCuMemberBaseService.getCurrency(pkCountry);
|
||||
}
|
||||
List<MemberAmountDTO> memberAmountDTOList = businessCommissionDTO.getMemberAmountDTOList();
|
||||
if (CollUtil.isNotEmpty(memberAmountDTOList)) {
|
||||
//查询账户余额
|
||||
List<CuMemberAccountExt> cuMemberAccountExts = cuMemberAccountService.queryMemberAccountByPkMember(memberAmountDTOList);
|
||||
List<CuMemberAccountExt> cuMemberAccountExts = iCuMemberAccountService.queryMemberAccountByPkMember(memberAmountDTOList);
|
||||
Map<Long, CuMemberAccountExt> memberAccountExtMap = cuMemberAccountExts.stream().collect(Collectors.toMap(CuMemberAccountExt::getPkMember, o -> o));
|
||||
Integer tradeType = ETradeType.getValueByApprovalValue(businessCommissionDTO.getTradeType());
|
||||
tradeType = tradeType == 0 ? businessCommissionDTO.getTradeType() : tradeType;
|
||||
|
|
@ -609,14 +579,14 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
//兼容多个国家汇率
|
||||
if (isMany) {
|
||||
pkCountry = memberAmountDTO.getPkCountry();
|
||||
currencyDTO = cuMemberBaseService.getCurrency(pkCountry);
|
||||
currencyDTO = iCuMemberBaseService.getCurrency(pkCountry);
|
||||
pkAccount = memberAmountDTO.getPkAccount();
|
||||
}
|
||||
//扣款金额
|
||||
BigDecimal tradeAmount = eApproveStatus.getValue() == EApproveStatus.FINISH.getValue() ? memberAmountDTO.getTradeAmount().negate() : memberAmountDTO.getTradeAmount();
|
||||
//账户余额
|
||||
CuMemberAccountExt cuMemberAccountExt = memberAccountExtMap.get(pkMember);
|
||||
Integer pkAccountValue = cuMemberBaseService.getAccountValueById(pkAccount);
|
||||
Integer pkAccountValue = iCuMemberBaseService.getAccountValueById(pkAccount);
|
||||
BigDecimal balance = ReflectUtils.invokeGetter(cuMemberAccountExt, MemberFieldConstants.ACCOUNT + pkAccountValue);
|
||||
if (balance == null) {
|
||||
balance = BigDecimal.ZERO;
|
||||
|
|
@ -650,7 +620,7 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
bonusAccountBalance(memberAmount, pkAccountValue, cuMemberAccountExt);
|
||||
}
|
||||
if (isMany) {
|
||||
memberAmount.setPkAccount(cuMemberBaseService.getAccountValueById(pkAccount));
|
||||
memberAmount.setPkAccount(iCuMemberBaseService.getAccountValueById(pkAccount));
|
||||
memberAmount.setPkCountry(pkCountry);
|
||||
BigDecimal totalBalance = null == memberAmountMap.get(pkMember) ? tradeAmount : memberAmountMap.get(pkMember).getTradeAmount().add(tradeAmount);
|
||||
memberAmount.setTradeAmount(totalBalance);
|
||||
|
|
@ -662,7 +632,7 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
}
|
||||
|
||||
if (null != memberAmountMap) {
|
||||
memberAmountList = memberAmountMap.entrySet().stream().map(a -> a.getValue()).collect(Collectors.toList());
|
||||
memberAmountList = memberAmountMap.entrySet().stream().map(Map.Entry::getValue).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
return new Object[]{cuMemberTradeLsit, memberAmountList};
|
||||
|
|
@ -699,7 +669,6 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
}
|
||||
}
|
||||
return memberAmount;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -710,10 +679,7 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
* @return Boolean
|
||||
*/
|
||||
private Boolean isMultinational(Integer pkCountry, Integer pkAccount) {
|
||||
if (null == pkCountry && null == pkAccount) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return null == pkCountry && null == pkAccount;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -755,11 +721,10 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
* @return Map<Integer, Integer>
|
||||
*/
|
||||
private Map<Integer, String> getTranslateAccountValue(Integer pkCountry) {
|
||||
List<BdAccount> accountList = cuMemberBaseService.getAccountByCountry(null, pkCountry);
|
||||
List<BdAccount> accountList = iCuMemberBaseService.getAccountByCountry(null, pkCountry);
|
||||
return accountList.stream().collect(Collectors.toMap(BdAccount::getPkId, BdAccount::getAccountName));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer updateSourceCodeByTradeCode(CuMemberTradeVO cuMemberTradeVO) {
|
||||
return baseMapper.updateSourceCodeByTradeCode(cuMemberTradeVO);
|
||||
|
|
@ -770,17 +735,16 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
return baseMapper.querySourceCodeLastTrade(pkMember, sourceCode, tradeClassify);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer saveMemberTradeAndAccountByRechargeCode(String rechargeCode) {
|
||||
CuMemberRecharge cuMemberRecharge = cuMemberRechargeService.getCuMemberRechargeByRechargeCode(rechargeCode);
|
||||
CuMemberRecharge cuMemberRecharge = iCuMemberRechargeService.getCuMemberRechargeByRechargeCode(rechargeCode);
|
||||
Long pkMember = cuMemberRecharge.getPkMember();
|
||||
Integer pkAccount = cuMemberRecharge.getPkAccount();
|
||||
//币种值
|
||||
Integer accountType = cuMemberBaseService.getAccountValueById(pkAccount);
|
||||
Integer accountType = iCuMemberBaseService.getAccountValueById(pkAccount);
|
||||
//查询用户余额
|
||||
CuMemberAccount cuMemberAccount = cuMemberAccountService.queryCuMemberAccountByPkMember(pkMember);
|
||||
CuMemberAccount cuMemberAccount = iCuMemberAccountService.queryCuMemberAccountByPkMember(pkMember);
|
||||
BigDecimal balance = ReflectUtils.invokeGetter(cuMemberAccount, MemberFieldConstants.ACCOUNT + accountType);
|
||||
//充值金额
|
||||
BigDecimal amount = cuMemberRecharge.getRechargeAmount();
|
||||
|
|
@ -802,22 +766,9 @@ public class CuMemberTradeServiceImpl extends ServiceImpl<CuMemberTradeMapper, C
|
|||
.transferType(0).build();
|
||||
|
||||
//更新余额
|
||||
return cuMemberAccountService.updateMemberAccountByMemberCode(param);
|
||||
return iCuMemberAccountService.updateMemberAccountByMemberCode(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> batchQueryCuMemberTradeSeq(Integer rowNum) {
|
||||
return baseMapper.batchQueryCuMemberTradeSeq(rowNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchInsertCuMemberTrade(List<CuMemberTrade> cuMemberTradeList) {
|
||||
List<List<?>> cutList = cuMemberBonusSettle.handleCutList(cuMemberTradeList);
|
||||
cutList.forEach(memberTradeList ->
|
||||
baseMapper.batchInsertCuMemberTrade(memberTradeList));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuMemberTrade> selectMemberTradeBySourceCode(String sourceCode) {
|
||||
return baseMapper.selectMemberTradeBySourceCode(sourceCode);
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@ import org.apache.dubbo.config.annotation.DubboService;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 会员结算期间
|
||||
* @Author: zhangjing
|
||||
* @Time: 2022/10/26 15:14
|
||||
* @Classname: MemberAchieveServiceProvider
|
||||
* @PackageName: com.hzs.member.achieve.provider
|
||||
* 会员结算期间
|
||||
*/
|
||||
@DubboService
|
||||
public class CuMemberSettlePeriodServiceProvider implements ICuMemberSettlePeriodServiceApi {
|
||||
|
|
@ -20,13 +16,6 @@ public class CuMemberSettlePeriodServiceProvider implements ICuMemberSettlePerio
|
|||
@Autowired
|
||||
private ICuMemberSettlePeriodService iCuMemberSettlePeriodService;
|
||||
|
||||
/**
|
||||
* @description: 根据日期获得日期对应的期间
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/26 10:25
|
||||
* @param: [date]
|
||||
* @return: com.hzs.common.core.domain.R<com.hzs.common.domain.member.achieve.CuMemberSettlePeriod>
|
||||
**/
|
||||
@Override
|
||||
public R<CuMemberSettlePeriod> getCuMemberSettlePeriodByDate(String date) {
|
||||
return R.ok(iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date));
|
||||
|
|
|
|||
|
|
@ -269,65 +269,6 @@ public class CuMemberAchieveLogController extends BaseController {
|
|||
return AjaxResult.success(listNew);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据选中的会员查询会员的历史业绩
|
||||
**/
|
||||
@Log(module = EOperationModule.SPECIAL_BUSINESS, business = EOperationBusiness.MODIFY_ACHIEVEMENT, method = EOperationMethod.SELECT)
|
||||
@PostMapping("/infusingWaterBelow")
|
||||
public AjaxResult infusingWaterBelow(@RequestBody CuMemberAchieveLogVO cuMemberAchieveLogVO) {
|
||||
if (CollectionUtil.isEmpty(cuMemberAchieveLogVO.getPkMemberList())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_NOT_VALID));
|
||||
}
|
||||
if (CollectionUtil.isEmpty(cuMemberAchieveLogVO.getAchieveList())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.ACHIEVE_NOT_NULL));
|
||||
}
|
||||
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
List<CuMemberAchieveLogVO> listNew = new ArrayList<>();
|
||||
for (Long pkid : cuMemberAchieveLogVO.getPkMemberList()) {
|
||||
CuMemberAchieveLogVO cma = new CuMemberAchieveLogVO();
|
||||
cma.setPkMember(pkid);
|
||||
CuMemberAchieveLogVO cmal = iCuMemberAchieveLogService.searchOne(cma, pkCountry);
|
||||
if (StringUtils.isNotNull(cmal)) {
|
||||
CuMemberAchieveLogVO cmalnew = new CuMemberAchieveLogVO();
|
||||
cmalnew.setPkMember(cma.getPkMember());
|
||||
for (int i = 0; i < cuMemberAchieveLogVO.getAchieveList().size(); i++) {
|
||||
if (cuMemberAchieveLogVO.getAchieveList().get(i) == EMemberAchieve.ASUMREALMODIFY_PV.getValue()) {
|
||||
cmalnew.setAsumRealPv(cma.getAsumRealPv());
|
||||
}
|
||||
if (cuMemberAchieveLogVO.getAchieveList().get(i) == EMemberAchieve.BSUMREALMODIFY_PV.getValue()) {
|
||||
cmalnew.setBsumRealPv(cma.getBsumRealPv());
|
||||
}
|
||||
if (cuMemberAchieveLogVO.getAchieveList().get(i) == EMemberAchieve.AFIRSTMODIFY_PV.getValue()) {
|
||||
cmalnew.setAfirstModifyPv(cma.getAfirstModifyPv());
|
||||
}
|
||||
if (cuMemberAchieveLogVO.getAchieveList().get(i) == EMemberAchieve.BFIRSTMODIFY_PV.getValue()) {
|
||||
cmalnew.setBfirstModifyPv(cma.getBfirstModifyPv());
|
||||
}
|
||||
if (cuMemberAchieveLogVO.getAchieveList().get(i) == EMemberAchieve.REPAFIRSTMODIFY_BALANCE.getValue()) {
|
||||
cmalnew.setRepAFirstModifyBalance(cma.getRepAFirstModifyBalance());
|
||||
}
|
||||
if (cuMemberAchieveLogVO.getAchieveList().get(i) == EMemberAchieve.REPBFIRSTMODIFY_BALANCE.getValue()) {
|
||||
cmalnew.setRepBFirstModifyBalance(cma.getRepBFirstModifyBalance());
|
||||
}
|
||||
}
|
||||
Integer maxSecond = iCuMemberAchieveLogService.selectByMaxApproveNumber(cmal.getPkMember(), EApproveStatus.FINISH.getValue());
|
||||
//查询扣费金额,账户信息
|
||||
ServiceChargeDTO serviceChargeDTO = new ServiceChargeDTO();
|
||||
serviceChargeDTO.setType(EApprovalBusiness.MEMBER_ACHIEVE.getValue());
|
||||
serviceChargeDTO.setQuantity(maxSecond + 1);
|
||||
serviceChargeDTO.setPkCountry(pkCountry);
|
||||
R<ServiceChargeDTO> serviceChargeDTOR = iServiceChargeServiceApi.getServiceChargeByType(serviceChargeDTO);
|
||||
//接口查询金额是否足够
|
||||
cmalnew.setCost(serviceChargeDTOR.getData().getCost());
|
||||
cmalnew.setPkAccount(serviceChargeDTOR.getData().getPkAccount());
|
||||
cmalnew.setPkAccountKey(iCuMemberBaseService.translateAccountValue(serviceChargeDTOR.getData().getPkAccount()));
|
||||
listNew.add(cmalnew);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(listNew);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注水业绩 确认
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -62,17 +62,17 @@ import java.util.stream.Collectors;
|
|||
public class CuMemberController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ICuMemberWithdrawService memberWithdrawService;
|
||||
private ICuMemberWithdrawService iCuMemberWithdrawService;
|
||||
@Autowired
|
||||
private ICuMemberSettlePeriodService memberSettlePeriodService;
|
||||
private ICuMemberSettlePeriodService iCuMemberSettlePeriodService;
|
||||
@Autowired
|
||||
private ICuMemberTransferService memberTransferService;
|
||||
private ICuMemberTransferService iCuMemberTransferService;
|
||||
@Autowired
|
||||
private ICuMemberService cuMemberService;
|
||||
private ICuMemberService iCuMemberService;
|
||||
@Autowired
|
||||
private ICuMemberTeamService memberTeamService;
|
||||
private ICuMemberTeamService iCuMemberTeamService;
|
||||
@Autowired
|
||||
private ICuMemberTreeService memberTreeService;
|
||||
private ICuMemberTreeService iCuMemberTreeService;
|
||||
@Autowired
|
||||
private ITransactionCommonService iTransactionCommonService;
|
||||
@Autowired
|
||||
|
|
@ -93,11 +93,6 @@ public class CuMemberController extends BaseController {
|
|||
@DubboReference
|
||||
IMenuColumnServiceApi iMenuColumnServiceApi;
|
||||
|
||||
@Autowired
|
||||
public void setCuMemberService(ICuMemberService cuMemberService) {
|
||||
this.cuMemberService = cuMemberService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员
|
||||
*/
|
||||
|
|
@ -145,12 +140,12 @@ public class CuMemberController extends BaseController {
|
|||
memberParam.setTeamList(userAuthorityDTO.getUserTeamList());
|
||||
|
||||
startPage();
|
||||
List<CuMemberVO> queryCuMemberVoList = cuMemberService.queryCuMemberByCondition(memberParam);
|
||||
List<CuMemberVO> queryCuMemberVoList = iCuMemberService.queryCuMemberByCondition(memberParam);
|
||||
List<CuMemberVO> cuMemberVOList = new ArrayList<>();
|
||||
|
||||
if (CollectionUtil.isNotEmpty(queryCuMemberVoList)) {
|
||||
|
||||
cuMemberVOList = cuMemberService.queryCuMemberByMemberList(queryCuMemberVoList, memberParam);
|
||||
cuMemberVOList = iCuMemberService.queryCuMemberByMemberList(queryCuMemberVoList, memberParam);
|
||||
if (CollectionUtil.isNotEmpty(cuMemberVOList)) {
|
||||
// 获取需要翻译的枚举翻译
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EMemberAccount.values());
|
||||
|
|
@ -307,7 +302,7 @@ public class CuMemberController extends BaseController {
|
|||
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
|
||||
memberParam.setVertexList(userAuthorityDTO.getUserVertexList());
|
||||
memberParam.setTeamList(userAuthorityDTO.getUserTeamList());
|
||||
List<CuMemberVO> cuMemberVOList = cuMemberService.queryCuMemberByMemberListExcel(memberParam);
|
||||
List<CuMemberVO> cuMemberVOList = iCuMemberService.queryCuMemberByMemberListExcel(memberParam);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(cuMemberVOList)) {
|
||||
// 获取需要翻译的枚举翻译
|
||||
|
|
@ -395,7 +390,7 @@ public class CuMemberController extends BaseController {
|
|||
@PostMapping("/real-member")
|
||||
public TableDataInfo realMember(@RequestBody CuMemberVO memberParam) {
|
||||
memberParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<CuMemberVO> cuMemberVOS = cuMemberService.realCuMemberByCondition(memberParam);
|
||||
List<CuMemberVO> cuMemberVOS = iCuMemberService.realCuMemberByCondition(memberParam);
|
||||
if (CollectionUtil.isNotEmpty(cuMemberVOS)) {
|
||||
for (CuMemberVO cvo : cuMemberVOS) {
|
||||
|
||||
|
|
@ -431,7 +426,7 @@ public class CuMemberController extends BaseController {
|
|||
**/
|
||||
@GetMapping("/getOne/{memberCode}")
|
||||
public AjaxResult getOne(@PathVariable String memberCode) {
|
||||
CuMember cuMember = cuMemberService.getMember(memberCode);
|
||||
CuMember cuMember = iCuMemberService.getMember(memberCode);
|
||||
return AjaxResult.success(cuMember);
|
||||
}
|
||||
|
||||
|
|
@ -494,7 +489,7 @@ public class CuMemberController extends BaseController {
|
|||
* @param param
|
||||
*/
|
||||
private void handleMemberSelect(List<MemberSelectVO> resultList, MemberSelectParam param) {
|
||||
List<CuMemberExt> cuMemberExtList = cuMemberService.queryMemberSelect(param, SecurityUtils.getPkCountry());
|
||||
List<CuMemberExt> cuMemberExtList = iCuMemberService.queryMemberSelect(param, SecurityUtils.getPkCountry());
|
||||
|
||||
if (CollectionUtil.isNotEmpty(cuMemberExtList)) {
|
||||
for (CuMemberExt cuMemberExt : cuMemberExtList) {
|
||||
|
|
@ -529,7 +524,7 @@ public class CuMemberController extends BaseController {
|
|||
memberRealInfoParam.setBirthDate(memberRealInfoParam.getBirthDate().replace("-", ""));
|
||||
}
|
||||
startPage();
|
||||
List<MemberRealInfoVO> resultList = cuMemberService.selectByMemberRealInfo(memberRealInfoParam);
|
||||
List<MemberRealInfoVO> resultList = iCuMemberService.selectByMemberRealInfo(memberRealInfoParam);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(resultList)) {
|
||||
//数据库内容翻译
|
||||
|
|
@ -604,7 +599,7 @@ public class CuMemberController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@AccessPermissions("TeamInfo")
|
||||
@GetMapping("member-team-info")
|
||||
@GetMapping("/member-team-info")
|
||||
public TableDataInfo memberTeamInfo(MemberTeamInfoParam memberTeamInfoParam) {
|
||||
String time;
|
||||
String settleTableName;
|
||||
|
|
@ -615,13 +610,13 @@ public class CuMemberController extends BaseController {
|
|||
|
||||
// 昨日
|
||||
time = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtil.offsetDay(new Date(), -1));
|
||||
csPeriod = memberSettlePeriodService.getCuMemberSettlePeriodByDate(time);
|
||||
csPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(time);
|
||||
settleTableName = TableNameConstants.CU_MEMBER_SETTLE + csPeriod.getPkId();
|
||||
} else {
|
||||
String queryDate = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, memberTeamInfoParam.getQueryDate());
|
||||
String currentDate = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.currentDate());
|
||||
time = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, memberTeamInfoParam.getQueryDate());
|
||||
csPeriod = memberSettlePeriodService.getCuMemberSettlePeriodByDate(time);
|
||||
csPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(time);
|
||||
if (queryDate.equals(currentDate)) {
|
||||
settleTableName = TableNameConstants.CU_MEMBER_SETTLE + csPeriod.getPkId();
|
||||
} else {
|
||||
|
|
@ -630,7 +625,7 @@ public class CuMemberController extends BaseController {
|
|||
}
|
||||
}
|
||||
// 如果表格不存在则返回空数据
|
||||
Integer tableNumber = memberTreeService.queryExistOracleTable(settleTableName);
|
||||
Integer tableNumber = iCuMemberTreeService.queryExistOracleTable(settleTableName);
|
||||
if (tableNumber == null || tableNumber == 0) {
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
|
|
@ -640,10 +635,10 @@ public class CuMemberController extends BaseController {
|
|||
if (StringUtils.isNotBlank(memberTeamInfoParam.getMemberCode())) {
|
||||
if (memberTeamInfoParam.getRelaType() != null && memberTeamInfoParam.getRelaType().equals(ERealType.XY.getIntValue())) {
|
||||
// 血缘
|
||||
memberTeamList = memberTeamService.queryMemberTeamInfoList(memberTeamInfoParam);
|
||||
memberTeamList = iCuMemberTeamService.queryMemberTeamInfoList(memberTeamInfoParam);
|
||||
} else {
|
||||
// 安置
|
||||
memberTeamList = memberTeamService.queryMemberTeamInfoPlaceParentList(memberTeamInfoParam);
|
||||
memberTeamList = iCuMemberTeamService.queryMemberTeamInfoPlaceParentList(memberTeamInfoParam);
|
||||
}
|
||||
}
|
||||
for (MemberTeamVo memberTeamVo : memberTeamList) {
|
||||
|
|
@ -660,7 +655,7 @@ public class CuMemberController extends BaseController {
|
|||
}
|
||||
}
|
||||
if (memberTeamVo.getPkPlaceParent() != null) {
|
||||
CuMember member = cuMemberService.getMember(memberTeamVo.getPkPlaceParent());
|
||||
CuMember member = iCuMemberService.getMember(memberTeamVo.getPkPlaceParent());
|
||||
if (member != null) {
|
||||
memberTeamVo.setPlaceParentCode(member.getMemberCode());
|
||||
}
|
||||
|
|
@ -671,18 +666,18 @@ public class CuMemberController extends BaseController {
|
|||
//TODO 奖金大盘占比
|
||||
memberTeamVo.setBonusLargeMarketProportion(BigDecimal.ZERO);
|
||||
// 直推人数
|
||||
Long directPushPeopleNumber = memberTreeService.queryCuMemberTreeParentTableCount(settleTableName, memberTeamVo.getMemberId());
|
||||
Long directPushPeopleNumber = iCuMemberTreeService.queryCuMemberTreeParentTableCount(settleTableName, memberTeamVo.getMemberId());
|
||||
memberTeamVo.setDirectPushPeopleNumber(directPushPeopleNumber);
|
||||
// 转账次数
|
||||
QueryWrapper<CuMemberTransfer> qew = new QueryWrapper<>();
|
||||
qew.eq("PK_MEMBER", memberTeamVo.getMemberId());
|
||||
int memberTransferCount = memberTransferService.count(qew);
|
||||
int memberTransferCount = iCuMemberTransferService.count(qew);
|
||||
memberTeamVo.setMemberTransferCount(memberTransferCount);
|
||||
|
||||
// 提现次数
|
||||
QueryWrapper<CuMemberWithdraw> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_MEMBER", memberTeamVo.getMemberId());
|
||||
int memberWithdrawCount = memberWithdrawService.count(queryWrapper);
|
||||
int memberWithdrawCount = iCuMemberWithdrawService.count(queryWrapper);
|
||||
memberTeamVo.setWithdrawalNumber(memberWithdrawCount);
|
||||
// 最后一次登录时间
|
||||
if (memberTeamVo.getLastLoginTime() != null) {
|
||||
|
|
@ -696,7 +691,7 @@ public class CuMemberController extends BaseController {
|
|||
/**
|
||||
* 会员团队信息导出
|
||||
*/
|
||||
@PostMapping("member-team-info-export")
|
||||
@PostMapping("/member-team-info-export")
|
||||
public void memberTeamInfoExport(MemberTeamInfoParam memberTeamInfoParam, HttpServletResponse response) {
|
||||
String time;
|
||||
String settleTableName;
|
||||
|
|
@ -707,13 +702,13 @@ public class CuMemberController extends BaseController {
|
|||
|
||||
// 昨日
|
||||
time = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtil.offsetDay(new Date(), -1));
|
||||
csPeriod = memberSettlePeriodService.getCuMemberSettlePeriodByDate(time);
|
||||
csPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(time);
|
||||
settleTableName = TableNameConstants.CU_MEMBER_SETTLE + csPeriod.getPkId();
|
||||
} else {
|
||||
String queryDate = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, memberTeamInfoParam.getQueryDate());
|
||||
String currentDate = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.currentDate());
|
||||
time = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, memberTeamInfoParam.getQueryDate());
|
||||
csPeriod = memberSettlePeriodService.getCuMemberSettlePeriodByDate(time);
|
||||
csPeriod = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(time);
|
||||
if (queryDate.equals(currentDate)) {
|
||||
settleTableName = TableNameConstants.CU_MEMBER_SETTLE + csPeriod.getPkId();
|
||||
} else {
|
||||
|
|
@ -722,7 +717,7 @@ public class CuMemberController extends BaseController {
|
|||
}
|
||||
}
|
||||
// 如果表格不存在则返回空数据
|
||||
Integer tableNumber = memberTreeService.queryExistOracleTable(settleTableName);
|
||||
Integer tableNumber = iCuMemberTreeService.queryExistOracleTable(settleTableName);
|
||||
if (tableNumber == null || tableNumber == 0) {
|
||||
ExcelUtil<MemberTeamVo> util = new ExcelUtil<>(MemberTeamVo.class);
|
||||
util.exportExcel(response, memberTeamList, "会员团队信息");
|
||||
|
|
@ -733,10 +728,10 @@ public class CuMemberController extends BaseController {
|
|||
if (StringUtils.isNotBlank(memberTeamInfoParam.getMemberCode())) {
|
||||
if (memberTeamInfoParam.getRelaType() != null && memberTeamInfoParam.getRelaType().equals(ERealType.XY.getIntValue())) {
|
||||
// 血缘
|
||||
memberTeamList = memberTeamService.queryMemberTeamInfoList(memberTeamInfoParam);
|
||||
memberTeamList = iCuMemberTeamService.queryMemberTeamInfoList(memberTeamInfoParam);
|
||||
} else {
|
||||
// 安置
|
||||
memberTeamList = memberTeamService.queryMemberTeamInfoPlaceParentList(memberTeamInfoParam);
|
||||
memberTeamList = iCuMemberTeamService.queryMemberTeamInfoPlaceParentList(memberTeamInfoParam);
|
||||
}
|
||||
}
|
||||
for (MemberTeamVo memberTeamVo : memberTeamList) {
|
||||
|
|
@ -754,7 +749,7 @@ public class CuMemberController extends BaseController {
|
|||
}
|
||||
}
|
||||
if (memberTeamVo.getPkPlaceParent() != null) {
|
||||
CuMember member = cuMemberService.getMember(memberTeamVo.getPkPlaceParent());
|
||||
CuMember member = iCuMemberService.getMember(memberTeamVo.getPkPlaceParent());
|
||||
if (member != null) {
|
||||
memberTeamVo.setPlaceParentCode(member.getMemberCode());
|
||||
}
|
||||
|
|
@ -767,18 +762,18 @@ public class CuMemberController extends BaseController {
|
|||
//奖金大盘占比
|
||||
memberTeamVo.setBonusLargeMarketProportion(BigDecimal.ZERO);
|
||||
// 直推人数
|
||||
Long directPushPeopleNumber = memberTreeService.queryCuMemberTreeParentTableCount(settleTableName, memberTeamVo.getMemberId());
|
||||
Long directPushPeopleNumber = iCuMemberTreeService.queryCuMemberTreeParentTableCount(settleTableName, memberTeamVo.getMemberId());
|
||||
memberTeamVo.setDirectPushPeopleNumber(directPushPeopleNumber);
|
||||
// 转账次数
|
||||
QueryWrapper<CuMemberTransfer> qew = new QueryWrapper<>();
|
||||
qew.eq("PK_MEMBER", memberTeamVo.getMemberId());
|
||||
int memberTransferCount = memberTransferService.count(qew);
|
||||
int memberTransferCount = iCuMemberTransferService.count(qew);
|
||||
memberTeamVo.setMemberTransferCount(memberTransferCount);
|
||||
|
||||
// 提现次数
|
||||
QueryWrapper<CuMemberWithdraw> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_MEMBER", memberTeamVo.getMemberId());
|
||||
int memberWithdrawCount = memberWithdrawService.count(queryWrapper);
|
||||
int memberWithdrawCount = iCuMemberWithdrawService.count(queryWrapper);
|
||||
memberTeamVo.setWithdrawalNumber(memberWithdrawCount);
|
||||
// 最后一次登录时间
|
||||
if (memberTeamVo.getLastLoginTime() != null) {
|
||||
|
|
@ -813,7 +808,7 @@ public class CuMemberController extends BaseController {
|
|||
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
|
||||
memberRealInfoParam.setVertexList(userAuthorityDTO.getUserVertexList());
|
||||
memberRealInfoParam.setTeamList(userAuthorityDTO.getUserTeamList());
|
||||
List<MemberRealInfoVO> resultList = cuMemberService.selectByMemberRealInfo(memberRealInfoParam);
|
||||
List<MemberRealInfoVO> resultList = iCuMemberService.selectByMemberRealInfo(memberRealInfoParam);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(resultList)) {
|
||||
// 获取需要翻译的枚举翻译
|
||||
|
|
@ -896,7 +891,7 @@ public class CuMemberController extends BaseController {
|
|||
@GetMapping("/query-top-member")
|
||||
public AjaxResult queryTopMember() {
|
||||
List<TopMemberVO> resultList = new ArrayList<>();
|
||||
List<CuMemberExt> list = cuMemberService.queryPlaceMemberList(MemberConstants.GJ30720200CODE, SecurityUtils.getPkCountry());
|
||||
List<CuMemberExt> list = iCuMemberService.queryPlaceMemberList(MemberConstants.GJ30720200CODE, SecurityUtils.getPkCountry());
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
resultList = BeanUtil.copyToList(list, TopMemberVO.class);
|
||||
}
|
||||
|
|
@ -924,7 +919,7 @@ public class CuMemberController extends BaseController {
|
|||
BigDecimal chinaInExchangeRate = chinaCurrency.getData().getInExchangeRate();
|
||||
startPage();
|
||||
memberConsumptionStatParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<MemberConsumptionStatVo> memberConsumptionStatVoList = cuMemberService.getMemberConsumptionStat(memberConsumptionStatParam);
|
||||
List<MemberConsumptionStatVo> memberConsumptionStatVoList = iCuMemberService.getMemberConsumptionStat(memberConsumptionStatParam);
|
||||
for (MemberConsumptionStatVo memberConsumptionStatVo : memberConsumptionStatVoList) {
|
||||
memberConsumptionStatVo.setOrderAchieve(memberConsumptionStatVo.getOrderAchieve().multiply(chinaInExchangeRate).setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
|
|
@ -952,7 +947,7 @@ public class CuMemberController extends BaseController {
|
|||
R<CurrencyDTO> chinaCurrency = iCurrencyServiceApi.getCurrency(CountryConstants.CHINA_COUNTRY);
|
||||
BigDecimal chinaInExchangeRate = chinaCurrency.getData().getInExchangeRate();
|
||||
memberConsumptionStatParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<MemberConsumptionStatVo> memberConsumptionStatVoList = cuMemberService.getMemberConsumptionStat(memberConsumptionStatParam);
|
||||
List<MemberConsumptionStatVo> memberConsumptionStatVoList = iCuMemberService.getMemberConsumptionStat(memberConsumptionStatParam);
|
||||
for (MemberConsumptionStatVo memberConsumptionStatVo : memberConsumptionStatVoList) {
|
||||
memberConsumptionStatVo.setOrderAchieve(memberConsumptionStatVo.getOrderAchieve().multiply(chinaInExchangeRate).setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
|
|
@ -960,55 +955,4 @@ public class CuMemberController extends BaseController {
|
|||
util.exportExcel(response, memberConsumptionStatVoList, "用户消费统计");
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员奖衔查询
|
||||
*/
|
||||
@AccessPermissions("memberFind")
|
||||
@GetMapping("/member_awards_query")
|
||||
public TableDataInfo memberAwardsQuery(MemberAwardsQueryParam param) {
|
||||
startPage();
|
||||
List<MemberAwardsQueryVO> memberAwardsList = cuMemberService.listMemberAwards(param, SecurityUtils.getPkCountry());
|
||||
if (CollectionUtil.isNotEmpty(memberAwardsList)) {
|
||||
// 中国汇率
|
||||
CurrencyDTO currency = iCurrencyServiceApi.getCurrency(CountryConstants.CHINA_COUNTRY).getData();
|
||||
|
||||
for (MemberAwardsQueryVO vo : memberAwardsList) {
|
||||
if (vo.getPkAwards() > vo.getPkMaxAwards()) {
|
||||
// 当月奖衔 大于 最高奖衔,最高奖衔就为当月奖衔
|
||||
vo.setPkMaxAwards(vo.getPkAwards());
|
||||
vo.setMaxAwardsName(vo.getAwardsName());
|
||||
}
|
||||
if (null != vo.getNewPv()) {
|
||||
vo.setNewPv(vo.getNewPv().multiply(currency.getInExchangeRate()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return getDataTable(memberAwardsList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员奖衔导出
|
||||
*/
|
||||
@PostMapping("/member_awards_query_export")
|
||||
public void memberAwardsQueryExport(MemberAwardsQueryParam param, HttpServletResponse response) {
|
||||
List<MemberAwardsQueryVO> memberAwardsList = cuMemberService.listMemberAwards(param, SecurityUtils.getPkCountry());
|
||||
if (CollectionUtil.isNotEmpty(memberAwardsList)) {
|
||||
// 中国汇率
|
||||
CurrencyDTO currency = iCurrencyServiceApi.getCurrency(CountryConstants.CHINA_COUNTRY).getData();
|
||||
|
||||
for (MemberAwardsQueryVO vo : memberAwardsList) {
|
||||
if (vo.getPkAwards() > vo.getPkMaxAwards()) {
|
||||
// 当月奖衔 大于 最高奖衔,最高奖衔就为当月奖衔
|
||||
vo.setPkMaxAwards(vo.getPkAwards());
|
||||
vo.setMaxAwardsName(vo.getAwardsName());
|
||||
}
|
||||
if (null != vo.getNewPv()) {
|
||||
vo.setNewPv(vo.getNewPv().multiply(currency.getInExchangeRate()));
|
||||
}
|
||||
}
|
||||
}
|
||||
ExcelUtil<MemberAwardsQueryVO> util = new ExcelUtil<>(MemberAwardsQueryVO.class);
|
||||
util.exportExcel(response, memberAwardsList, "会员奖衔查询");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,343 +0,0 @@
|
|||
package com.hzs.member.base.controller.manage;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.hzs.common.core.annotation.AccessPermissions;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
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;
|
||||
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.member.base.CuMember;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.service.ITransactionCommonService;
|
||||
import com.hzs.common.util.TransactionUtils;
|
||||
import com.hzs.member.account.dto.BusinessCommissionDTO;
|
||||
import com.hzs.member.account.dto.MemberAmountDTO;
|
||||
import com.hzs.member.account.dto.MemberBalanceDTO;
|
||||
import com.hzs.member.account.service.ICuMemberBaseService;
|
||||
import com.hzs.member.account.service.ICuMemberTradeService;
|
||||
import com.hzs.member.base.service.ICuMemberService;
|
||||
import com.hzs.member.base.vo.ZeroElementRevokeVO;
|
||||
import com.hzs.member.detail.service.ICuMemberServiceLogService;
|
||||
import com.hzs.system.config.IServiceChargeServiceApi;
|
||||
import com.hzs.system.config.dto.ServiceChargeDTO;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description: 特殊业务-零元撤单
|
||||
* @author: zhang jing
|
||||
* @date: 2022/12/29 11:39
|
||||
* @param:
|
||||
* @return:
|
||||
**/
|
||||
@RequestMapping("/manager/zeroRevoke")
|
||||
@RestController
|
||||
public class ZeroElementRevokeController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ICuMemberService cuMemberService;
|
||||
|
||||
@Autowired
|
||||
public void setCuMemberService(ICuMemberService cuMemberService) {
|
||||
this.cuMemberService = cuMemberService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ICuMemberServiceLogService memberServiceLogService;
|
||||
@Autowired
|
||||
private ICuMemberTradeService cuMemberTradeService;
|
||||
@Autowired
|
||||
private ICuMemberBaseService cuMemberBaseService;
|
||||
@Autowired
|
||||
private ITransactionCommonService iTransactionCommonService;
|
||||
|
||||
@DubboReference
|
||||
IServiceChargeServiceApi serviceChargeServiceApi;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 特殊业务-零元撤单列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/17 15:39
|
||||
* @param: []
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@AccessPermissions("ZeroBuy")
|
||||
@Log(module = EOperationModule.SPECIAL_BUSINESS, business = EOperationBusiness.ZERO_REVOKE, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo puCodeList(ZeroElementRevokeVO zeroElementRevokeVO) {
|
||||
startPage();
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
zeroElementRevokeVO.setPkCountry(pkCountry);
|
||||
List<ZeroElementRevokeVO> list = cuMemberService.zeroList(zeroElementRevokeVO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*
|
||||
* @param response
|
||||
* @param zeroElementRevokeVO
|
||||
*/
|
||||
@Log(module = EOperationModule.SPECIAL_BUSINESS, business = EOperationBusiness.ZERO_REVOKE, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ZeroElementRevokeVO zeroElementRevokeVO) {
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
zeroElementRevokeVO.setPkCountry(pkCountry);
|
||||
List<ZeroElementRevokeVO> list = cuMemberService.zeroList(zeroElementRevokeVO);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
Map<Integer, String> transactionMap1 = iTransactionCommonService.exportEnumTransactionByDB(EnumsPrefixConstants.KEY_GRADE,
|
||||
EnumsPrefixConstants.KEY_AWARD);
|
||||
list.forEach(itm -> {
|
||||
//注册等级key
|
||||
itm.setPkSettleGradeVal(transactionMap1.get(itm.getPkSettleGrade()));
|
||||
itm.setPkAwardsVal(transactionMap1.get(itm.getPkAwards()));
|
||||
});
|
||||
}
|
||||
ExcelUtil<ZeroElementRevokeVO> util = new ExcelUtil<>(ZeroElementRevokeVO.class);
|
||||
util.exportExcel(response, list, "导出零元撤单");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 查询选择零元注册的会员
|
||||
* @author: zhang jing
|
||||
* @date: 2023/3/27 17:52
|
||||
* @param: [updateCodeVO]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.SPECIAL_BUSINESS, business = EOperationBusiness.ZERO_REVOKE, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/selected")
|
||||
public AjaxResult selected(ZeroElementRevokeVO zeroElementRevokeVO) {
|
||||
if (StringUtils.isEmpty(zeroElementRevokeVO.getPkIdListStr())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_NOT_VALID));
|
||||
}
|
||||
List<ZeroElementRevokeVO> errorlist = new ArrayList<>();
|
||||
List<Long> pkIdList = Arrays.stream(zeroElementRevokeVO.getPkIdListStr().split(","))
|
||||
.map(Long::parseLong)
|
||||
.collect(Collectors.toList());
|
||||
zeroElementRevokeVO.setPkIdList(pkIdList);
|
||||
List<Long> list = zeroElementRevokeVO.getPkIdList();
|
||||
List<ZeroElementRevokeVO> newlist = new ArrayList<>();
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
for (Long lo : list) {
|
||||
CuMember cm = cuMemberService.getMemberById(lo);
|
||||
ZeroElementRevokeVO zrvo = BeanUtil.copyProperties(cm, ZeroElementRevokeVO.class);
|
||||
if (zrvo != null) {
|
||||
newlist.add(zrvo);
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(newlist)) {
|
||||
for (ZeroElementRevokeVO zer : newlist) {
|
||||
//查询会员是否存在三方订单
|
||||
Integer count = cuMemberService.checkThreeOrder(zer.getPkId());
|
||||
if (count > 0) {
|
||||
ZeroElementRevokeVO err = new ZeroElementRevokeVO();
|
||||
err.setErrorMsg(zer.getMemberCode() + " : " + TransactionUtils.getContent(ConfigMsgConstants.CHECK_THREE_ORDER));
|
||||
errorlist.add(err);
|
||||
}
|
||||
//当前最大次数
|
||||
Integer approveNumber = memberServiceLogService.selectByMaxApproveNumber(zer.getPkId(),
|
||||
EApprovalBusiness.ZERO_ELEMENT_REVOKE.getValue(), EApproveStatus.FINISH.getValue());
|
||||
zer.setChangeNumber(approveNumber + 1);
|
||||
//查询扣费金额,账户信息
|
||||
ServiceChargeDTO serviceChargeDTO = new ServiceChargeDTO();
|
||||
serviceChargeDTO.setType(EApprovalBusiness.ZERO_ELEMENT_REVOKE.getValue());
|
||||
serviceChargeDTO.setQuantity(approveNumber + 1);
|
||||
serviceChargeDTO.setPkCountry(pkCountry);
|
||||
R<ServiceChargeDTO> serviceChargeDTOR = serviceChargeServiceApi.getServiceChargeByType(serviceChargeDTO);
|
||||
if (null == serviceChargeDTOR.getData() ||
|
||||
null == serviceChargeDTOR.getData().getPkAccount()) {
|
||||
return AjaxResult.error(ConfigMsgConstants.BUSINESS_ACCOUNT_IS_NULL);
|
||||
}
|
||||
zer.setCost(serviceChargeDTOR.getData().getCost());
|
||||
zer.setPkAccount(serviceChargeDTOR.getData().getPkAccount());
|
||||
zer.setPkAccountKey(cuMemberBaseService.translateAccountValue(serviceChargeDTOR.getData().getPkAccount()));
|
||||
}
|
||||
}
|
||||
zeroElementRevokeVO.setZeroVOList(newlist);
|
||||
zeroElementRevokeVO.setErroList(errorlist);
|
||||
return AjaxResult.success(zeroElementRevokeVO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 零元撤单
|
||||
* @author: zhang jing
|
||||
* @date: 2022/12/30 10:22
|
||||
* @param: [postageParams]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.SPECIAL_BUSINESS, business = EOperationBusiness.ZERO_REVOKE, method = EOperationMethod.SUBMIT)
|
||||
@PostMapping("/confirm")
|
||||
public AjaxResult confirm(@RequestBody ZeroElementRevokeVO zeroElementRevokeVO) {
|
||||
if (CollectionUtil.isEmpty(zeroElementRevokeVO.getZeroVOList())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_NOT_VALID));
|
||||
}
|
||||
List<ZeroElementRevokeVO> errorlist = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(zeroElementRevokeVO.getZeroVOList())) {
|
||||
List<MemberAmountDTO> memberAmountDTOList = new ArrayList<>();
|
||||
if (StringUtils.isNull(zeroElementRevokeVO.getProcessType())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PROCESS_TYPE_NOT_NULL));
|
||||
}
|
||||
Date date = new Date();
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
zeroElementRevokeVO.setPkCountry(pkCountry);
|
||||
zeroElementRevokeVO.setPkCreator(SecurityUtils.getUserId());
|
||||
zeroElementRevokeVO.setCreationTime(date);
|
||||
BusinessCommissionDTO businessCommissionDTO = new BusinessCommissionDTO();
|
||||
for (ZeroElementRevokeVO zrvo : zeroElementRevokeVO.getZeroVOList()) {
|
||||
Integer count = cuMemberService.checkmsLogCount(zrvo.getPkId(), EApprovalBusiness.ZERO_ELEMENT_REVOKE.getValue());
|
||||
if (count > 0) {
|
||||
zrvo.setErrorMsg(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_UPDATE_CODE_REPEAT));
|
||||
errorlist.add(zrvo);
|
||||
continue;
|
||||
}
|
||||
//当前最大次数
|
||||
Integer approveNumber = memberServiceLogService.selectByMaxApproveNumber(zrvo.getPkId(),
|
||||
EApprovalBusiness.ZERO_ELEMENT_REVOKE.getValue(), EApproveStatus.FINISH.getValue());
|
||||
zrvo.setChangeNumber(approveNumber + 1);
|
||||
if (zeroElementRevokeVO.getProcessType() == EProcessType.AVOIDSIGNING.getValue() ||
|
||||
zeroElementRevokeVO.getProcessType() == EProcessType.DOUBLEPAY.getValue()) {
|
||||
//查询扣费金额,账户信息
|
||||
ServiceChargeDTO serviceChargeDTO = new ServiceChargeDTO();
|
||||
serviceChargeDTO.setType(EApprovalBusiness.ZERO_ELEMENT_REVOKE.getValue());
|
||||
serviceChargeDTO.setPkCountry(pkCountry);
|
||||
serviceChargeDTO.setQuantity(approveNumber + 1);
|
||||
R<ServiceChargeDTO> serviceChargeDTOR = serviceChargeServiceApi.getServiceChargeByType(serviceChargeDTO);
|
||||
if (null == serviceChargeDTOR.getData() ||
|
||||
null == serviceChargeDTOR.getData().getPkAccount()) {
|
||||
return AjaxResult.error(ConfigMsgConstants.BUSINESS_ACCOUNT_IS_NULL);
|
||||
}
|
||||
//接口查询金额是否足够
|
||||
businessCommissionDTO.setPkAccount(serviceChargeDTOR.getData().getPkAccount());
|
||||
businessCommissionDTO.setPkCountry(pkCountry);
|
||||
MemberAmountDTO memberAmountDTO = new MemberAmountDTO();
|
||||
memberAmountDTO.setPkMember(zrvo.getPkId());
|
||||
memberAmountDTO.setTradeAmount(serviceChargeDTOR.getData().getCost());
|
||||
zrvo.setCost(serviceChargeDTOR.getData().getCost());
|
||||
zrvo.setPkAccount(serviceChargeDTOR.getData().getPkAccount());
|
||||
memberAmountDTOList.add(memberAmountDTO);
|
||||
zeroElementRevokeVO.setMemberAmountDTOList(memberAmountDTOList);
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(errorlist)) {
|
||||
return AjaxResult.error(504, ConfigMsgConstants.MEMBER_DATA_ERROR, errorlist);
|
||||
}
|
||||
businessCommissionDTO.setMemberAmountDTOList(memberAmountDTOList);
|
||||
if (CollectionUtil.isNotEmpty(memberAmountDTOList)) {
|
||||
//接口查询金额是否足够
|
||||
List<MemberBalanceDTO> memberBalanceList = cuMemberTradeService.selectBalanceNotEnoughMember(businessCommissionDTO);
|
||||
if (CollectionUtil.isNotEmpty(memberBalanceList)) {
|
||||
return AjaxResult.error(504, TransactionUtils.getContent(ConfigMsgConstants.MEMBER_BALANCE_INSUFFICIENT), memberBalanceList);
|
||||
}
|
||||
}
|
||||
|
||||
zeroElementRevokeVO = cuMemberService.zeroRevokeBusiness(zeroElementRevokeVO);
|
||||
} else {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_DATA_NOT_NULL));
|
||||
}
|
||||
return AjaxResult.success(zeroElementRevokeVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 发起签呈 免付,需要签呈需要付费
|
||||
* @author: zhang jing
|
||||
* @date: 2023/3/4 11:06
|
||||
* @param: [updateCodeVO]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.SPECIAL_BUSINESS, business = EOperationBusiness.ZERO_REVOKE, method = EOperationMethod.SUBMIT)
|
||||
@PostMapping("/petition")
|
||||
public AjaxResult petition(@RequestBody ZeroElementRevokeVO zeroElementRevokeVO) {
|
||||
List<ZeroElementRevokeVO> errorlist = new ArrayList<>();
|
||||
if (StringUtils.isEmpty(zeroElementRevokeVO.getZeroVOList())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_DATA_NOT_NULL));
|
||||
}
|
||||
if (StringUtils.isNull(zeroElementRevokeVO.getProcessType())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PROCESS_TYPE_NOT_NULL));
|
||||
}
|
||||
if (StringUtils.isNull(zeroElementRevokeVO.getSignType())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.SIGN_TYPE_NOT_NULL));
|
||||
}
|
||||
if (CollectionUtil.isEmpty(zeroElementRevokeVO.getUserIdList())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.EXAMINE_AND_APPROVE_NOT_NULL));
|
||||
}
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
Date date = new Date();
|
||||
zeroElementRevokeVO.setPkCountry(pkCountry);
|
||||
zeroElementRevokeVO.setPkCreator(SecurityUtils.getUserId());
|
||||
zeroElementRevokeVO.setCreationTime(date);
|
||||
Set<Long> pkMemberIds = new HashSet<>();
|
||||
BusinessCommissionDTO businessCommissionDTO = new BusinessCommissionDTO();
|
||||
List<MemberAmountDTO> memberAmountDTOList = new ArrayList<>();
|
||||
for (ZeroElementRevokeVO zero : zeroElementRevokeVO.getZeroVOList()) {
|
||||
if (StringUtils.isEmpty(zero.getMemberCode())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_CODE_NOT_NULL));
|
||||
}
|
||||
if (StringUtils.isNull(zero.getPkId())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.PKID_NOT_NULL));
|
||||
}
|
||||
Integer count = cuMemberService.checkmsLogCount(zero.getPkId(), EApprovalBusiness.ZERO_ELEMENT_REVOKE.getValue());
|
||||
if (count > 0) {
|
||||
zero.setErrorMsg(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_UPDATE_CODE_REPEAT));
|
||||
errorlist.add(zero);
|
||||
continue;
|
||||
}
|
||||
pkMemberIds.add(zero.getPkId());
|
||||
|
||||
//当前最大次数
|
||||
Integer approveNumber = memberServiceLogService.selectByMaxApproveNumber(zero.getPkId(),
|
||||
EApprovalBusiness.ZERO_ELEMENT_REVOKE.getValue(), EApproveStatus.FINISH.getValue());
|
||||
zero.setChangeNumber(approveNumber + 1);
|
||||
if (zeroElementRevokeVO.getProcessType() == EProcessType.DOUBLEPAY.getValue()) {
|
||||
//查询扣费金额,账户信息
|
||||
ServiceChargeDTO serviceChargeDTO = new ServiceChargeDTO();
|
||||
serviceChargeDTO.setType(EApprovalBusiness.ZERO_ELEMENT_REVOKE.getValue());
|
||||
serviceChargeDTO.setQuantity(approveNumber + 1);
|
||||
serviceChargeDTO.setPkCountry(pkCountry);
|
||||
R<ServiceChargeDTO> serviceChargeDTOR = serviceChargeServiceApi.getServiceChargeByType(serviceChargeDTO);
|
||||
//接口查询金额是否足够
|
||||
businessCommissionDTO.setPkAccount(serviceChargeDTOR.getData().getPkAccount());
|
||||
businessCommissionDTO.setPkCountry(pkCountry);
|
||||
MemberAmountDTO memberAmountDTO = new MemberAmountDTO();
|
||||
memberAmountDTO.setPkMember(zero.getPkId());
|
||||
memberAmountDTO.setTradeAmount(serviceChargeDTOR.getData().getCost());
|
||||
zero.setCost(serviceChargeDTOR.getData().getCost());
|
||||
zero.setPkAccount(serviceChargeDTOR.getData().getPkAccount());
|
||||
memberAmountDTOList.add(memberAmountDTO);
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(errorlist)) {
|
||||
return AjaxResult.error(504, ConfigMsgConstants.MEMBER_DATA_ERROR, errorlist);
|
||||
}
|
||||
zeroElementRevokeVO.setPkMemberList(pkMemberIds);
|
||||
zeroElementRevokeVO.setMemberAmountDTOList(memberAmountDTOList);
|
||||
businessCommissionDTO.setMemberAmountDTOList(memberAmountDTOList);
|
||||
if (CollectionUtil.isNotEmpty(memberAmountDTOList)) {
|
||||
//接口查询金额是否足够
|
||||
if (zeroElementRevokeVO.getProcessType() == EProcessType.DOUBLEPAY.getValue()) {
|
||||
List<MemberBalanceDTO> memberBalanceList = cuMemberTradeService.selectBalanceNotEnoughMember(businessCommissionDTO);
|
||||
if (CollectionUtil.isNotEmpty(memberBalanceList)) {
|
||||
return AjaxResult.error(504, TransactionUtils.getContent(ConfigMsgConstants.MEMBER_BALANCE_INSUFFICIENT), memberBalanceList);
|
||||
}
|
||||
}
|
||||
}
|
||||
cuMemberService.zeroPetition(zeroElementRevokeVO);
|
||||
return AjaxResult.success(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -5,10 +5,8 @@ import com.hzs.common.domain.member.detail.CuMemberAchieveLog;
|
|||
import com.hzs.member.base.vo.CuMemberAchieveLogVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 注水业绩记录表 Mapper 接口
|
||||
|
|
|
|||
|
|
@ -791,15 +791,6 @@ public interface CuMemberMapper extends BaseMapper<CuMember> {
|
|||
*/
|
||||
CuMember getParentMember(@Param("memberCode") String memberCode);
|
||||
|
||||
/**
|
||||
* 查询会员奖衔列表
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @param pkCountry 所属国家
|
||||
* @return
|
||||
*/
|
||||
List<MemberAwardsQueryVO> listMemberAwards(@Param("param") MemberAwardsQueryParam param, @Param("pkCountry") Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 查询同姓名同手机号指定等级会员数量
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1008,15 +1008,6 @@ public interface ICuMemberService extends IService<CuMember> {
|
|||
*/
|
||||
CuMember getParentMember(String memberCode);
|
||||
|
||||
/**
|
||||
* 会员奖衔查询列表
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @param pkCountry 所属国家
|
||||
* @return
|
||||
*/
|
||||
List<MemberAwardsQueryVO> listMemberAwards(MemberAwardsQueryParam param, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 查询同姓名同手机号指定等级会员数量
|
||||
*
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import com.hzs.common.core.exception.ServiceException;
|
|||
import com.hzs.common.core.utils.CommonUtil;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.domain.member.achieve.CuMemberSettlePeriod;
|
||||
import com.hzs.common.domain.member.detail.CuMemberAchieveLog;
|
||||
import com.hzs.common.security.service.UserTokenService;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
|
|
|
|||
|
|
@ -3491,11 +3491,6 @@ public class CuMemberServiceImpl extends ServiceImpl<CuMemberMapper, CuMember> i
|
|||
return baseMapper.getParentMember(memberCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MemberAwardsQueryVO> listMemberAwards(MemberAwardsQueryParam param, Integer pkCountry) {
|
||||
return baseMapper.listMemberAwards(param, pkCountry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countGradeMemberPoint(String memberName, String phone, Integer pkGrade, Integer pkCountry) {
|
||||
return baseMapper.countGradeMemberPoint(memberName, phone, pkGrade, pkCountry);
|
||||
|
|
|
|||
|
|
@ -17,18 +17,14 @@ public interface CuMemberServiceLogMapper extends BaseMapper<CuMemberServiceLog>
|
|||
Integer selectByMaxApproveNumber(@Param("pkMember") Long pkMember, @Param("editType") Integer editType, @Param("approveStatus") Integer approveStatus);
|
||||
|
||||
/**
|
||||
* @description: 查询会员办理业务日志最新数据
|
||||
* @param: [pkMember, editType, approveStatus]
|
||||
* @return: com.hzs.member.detail.vo.CuMemberServiceLogVO
|
||||
* 查询会员办理业务日志最新数据
|
||||
**/
|
||||
CuMemberServiceLog selectTopData(@Param("pkMember") Long pkMember,
|
||||
@Param("editType") int editType,
|
||||
@Param("approveStatus") int approveStatus);
|
||||
|
||||
/**
|
||||
* @description: 查询用户是否已经存在未审核业务
|
||||
* @param: [cuMemberServiceLogVO]
|
||||
* @return: java.util.List<com.hzs.common.domain.member.detail.CuMemberServiceLog>
|
||||
* 查询用户是否已经存在未审核业务
|
||||
**/
|
||||
List<CuMemberServiceLogVO> selectServiceLogList(CuMemberServiceLogVO cuMemberServiceLogVO);
|
||||
|
||||
|
|
@ -41,9 +37,7 @@ public interface CuMemberServiceLogMapper extends BaseMapper<CuMemberServiceLog>
|
|||
List<CuMemberServiceLogExt> selectByServiceLogList(CuMemberServiceLog cuMemberServiceLog);
|
||||
|
||||
/**
|
||||
* @description: 查询会员原值
|
||||
* @param: [cuMemberOldValueVO]
|
||||
* @return: java.util.List<com.hzs.member.handleBusiness.vo.CuMemberOldValueVO>
|
||||
* 查询会员原值
|
||||
**/
|
||||
List<BusinessMemberVO> selectOldValue(BusinessMemberVO businessMemberVO);
|
||||
|
||||
|
|
@ -91,4 +85,12 @@ public interface CuMemberServiceLogMapper extends BaseMapper<CuMemberServiceLog>
|
|||
*/
|
||||
List<CuMemberServiceLog> selectByList(CuMemberServiceLogExt memberServiceLogExt);
|
||||
|
||||
/**
|
||||
* 查询指定会员政策币信息
|
||||
*
|
||||
* @param pkMember 会员ID
|
||||
* @return
|
||||
*/
|
||||
CuMemberServiceLogExt queryPolicy(@Param("pkMember") Long pkMember);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,11 @@ public interface ICuMemberServiceLogService extends IService<CuMemberServiceLog>
|
|||
List<BusinessMemberVO> selectOldValue(BusinessMemberVO businessMemberVO);
|
||||
|
||||
/**
|
||||
* 再次发起签呈
|
||||
* @description: 再次发起签呈
|
||||
* @author: zhang jing
|
||||
* @date: 2023/2/2 11:15
|
||||
* @param: [cmslList, cuMemberServiceLogVO]
|
||||
* @return: com.hzs.member.detail.vo.CuMemberServiceLogVO
|
||||
**/
|
||||
CuMemberServiceLogVO againBusiness(List<CuMemberServiceLog> cmslList, CuMemberServiceLogVO cuMemberServiceLogVO);
|
||||
|
||||
|
|
@ -103,6 +107,11 @@ public interface ICuMemberServiceLogService extends IService<CuMemberServiceLog>
|
|||
*/
|
||||
List<CuMemberServiceLog> queryList(Integer editType, String memberCode, String memberName, Integer pkCountry, Integer approveStatus);
|
||||
|
||||
/**
|
||||
* 根据业务单号查询业务日志
|
||||
**/
|
||||
R<List<CuMemberServiceLog>> selectCuMemberServiceLog(String businessNo);
|
||||
|
||||
/**
|
||||
* 查询展示列表
|
||||
*
|
||||
|
|
@ -110,4 +119,12 @@ public interface ICuMemberServiceLogService extends IService<CuMemberServiceLog>
|
|||
*/
|
||||
List<CuMemberServiceLog> selectByList(CuMemberServiceLogExt memberServiceLogExt);
|
||||
|
||||
/**
|
||||
* 查询指定会员政策币信息
|
||||
*
|
||||
* @param pkMember 会员ID
|
||||
* @return
|
||||
*/
|
||||
CuMemberServiceLogExt queryPolicy(Long pkMember);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,4 +124,10 @@ public class CuMemberServiceLogServiceImpl extends ServiceImpl<CuMemberServiceLo
|
|||
return baseMapper.selectServiceValue(cuMemberServiceLog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuMemberServiceLogExt queryPolicy(Long pkMember) {
|
||||
return baseMapper.queryPolicy(pkMember);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -231,37 +231,6 @@
|
|||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="batchInsertCuMemberTrade">
|
||||
merge into cu_member_trade a
|
||||
using (
|
||||
select m.pk_id, m.pk_member, m.trade_code, m.pk_account, m.trade_type,m.trade_classify, m.pk_rate, m.trade_amount,
|
||||
(case when ba.field_value=4 then ca.account4 + m.trade_amount when ba.field_value=5 then ca.account5 + m.trade_amount
|
||||
when ba.field_value=8 then ca.account8 + m.trade_amount when ba.field_value=9 then ca.account9 + m.trade_amount
|
||||
else ca.account10 + m.trade_amount end) trade_balance,
|
||||
(case when ba.field_value=4 then ca.account4 when ba.field_value=5 then ca.account5 when ba.field_value=8 then ca.account8
|
||||
when ba.field_value=9 then ca.account9 else ca.account10 end) trade_before_balance,
|
||||
m.source_code, m.trade_statue, m.remarks, m.pk_country, m.creation_time, m.pk_creator from(
|
||||
<foreach collection="cuMemberTradeList" item="item" open=" " separator=" union all " close=" ">
|
||||
select #{item.pkId} pk_id,#{item.tradeCode} trade_code, #{item.tradeClassify} trade_classify,
|
||||
#{item.pkMember} pk_member,#{item.pkAccount} pk_account,#{item.pkRate} pk_rate,#{item.tradeAmount} trade_amount,
|
||||
#{item.sourceCode} source_code,#{item.tradeStatue} trade_statue,#{item.remarks} remarks,
|
||||
#{item.tradeType} trade_type,#{item.pkCountry} pk_country,#{item.pkCreator} pk_creator,
|
||||
#{item.creationTime} creation_time from dual
|
||||
</foreach>) m
|
||||
inner join cu_member_account ca
|
||||
on m.pk_member = ca.pk_member
|
||||
inner join bd_account ba
|
||||
on ba.pk_id = m.pk_account
|
||||
) b
|
||||
on (a.pk_id = b.pk_id)
|
||||
when not matched then
|
||||
insert (pk_id, pk_member, trade_code, pk_account, trade_type,
|
||||
trade_classify, pk_rate, trade_amount, trade_balance,trade_before_balance,
|
||||
source_code, trade_statue, remarks, pk_country, creation_time, pk_creator)
|
||||
values(b.pk_id,b.pk_member,b.trade_code,b.pk_account,b.trade_type,
|
||||
b.trade_classify,b.pk_rate,b.trade_amount,b.trade_balance,b.trade_before_balance,
|
||||
b.source_code,b.trade_statue,b.remarks,b.pk_country,b.creation_time,b.pk_creator)
|
||||
</update>
|
||||
|
||||
<!-- 查询会员订单产生的最新交易明细 -->
|
||||
<select id="querySourceCodeLastTrade" resultMap="CuMemberTrade">
|
||||
|
|
@ -278,11 +247,6 @@
|
|||
</if>
|
||||
group by cmt.trade_classify, cmt.pk_account)
|
||||
</select>
|
||||
<select id="batchQueryCuMemberTradeSeq" resultType="java.lang.Long">
|
||||
select cu_member_trade_seq.nextval
|
||||
from dual connect by rownum <= #{rowNum}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMemberTradeBySourceCode" resultMap="CuMemberTrade">
|
||||
select *
|
||||
|
|
|
|||
|
|
@ -3243,70 +3243,6 @@
|
|||
where cm.member_code = #{memberCode}
|
||||
</select>
|
||||
|
||||
<!-- 查询会员奖衔列表 -->
|
||||
<select id="listMemberAwards" resultType="com.hzs.member.base.vo.MemberAwardsQueryVO">
|
||||
select cm.member_code,
|
||||
cm.member_name,
|
||||
cm.phone,
|
||||
cmsa.pk_awards,
|
||||
ba.awards_name,
|
||||
cm.pk_max_awards,
|
||||
bam.awards_name max_awards_name,
|
||||
bha.awards_name history_awards_name,
|
||||
bv.vertex_name,
|
||||
bg.grade_name,
|
||||
cmsa.new_pv,
|
||||
cmsp.settle_date
|
||||
from cu_member_settle_awards cmsa
|
||||
left join cu_member cm
|
||||
on cmsa.pk_member = cm.pk_id
|
||||
left join cu_member_histroy_awards cmha
|
||||
on cmha.pk_member = cm.pk_id
|
||||
left join bd_histroy_awards bha
|
||||
on bha.pk_id = cmha.pk_awards
|
||||
left join bd_awards ba
|
||||
on ba.pk_id = cmsa.pk_awards
|
||||
left join bd_awards bam
|
||||
on bam.pk_id = cm.pk_max_awards
|
||||
left join bd_vertex bv
|
||||
on bv.pk_id = cm.pk_vertex
|
||||
left join bd_grade bg
|
||||
on bg.pk_id = cm.pk_settle_grade
|
||||
left join CU_MEMBER_SETTLE_PERIOD cmsp
|
||||
on cmsp.pk_id = cmsa.period
|
||||
where cm.del_flag = 0
|
||||
and cm.pk_settle_country = #{pkCountry}
|
||||
and cm.category = 0
|
||||
<if test="param.memberCode != null and param.memberCode != ''">
|
||||
and cm.member_code like #{param.memberCode} || '%'
|
||||
</if>
|
||||
<if test="param.pkGrade != null">
|
||||
and cm.pk_settle_grade = #{param.pkGrade}
|
||||
</if>
|
||||
<if test="param.pkAwards != null">
|
||||
and cmsa.pk_awards = #{param.pkAwards}
|
||||
</if>
|
||||
<if test="param.pkVertex != null">
|
||||
and cm.pk_vertex = #{param.pkVertex}
|
||||
</if>
|
||||
<if test="param.startDate != null">
|
||||
and cmsp.settle_date >= #{param.startDate}
|
||||
</if>
|
||||
<if test="param.endDate != null">
|
||||
and #{param.endDate} >= cmsp.settle_date
|
||||
</if>
|
||||
order by cmsp.settle_date desc
|
||||
<!--
|
||||
select cm.PK_ID pkId,cm.MEMBER_CODE memberCode,cm.MEMBER_NAME memberName,cm.PK_COUNTRY pkCountry,cm.PK_AWARDS pkAwards,cm.PK_MAX_AWARDS pkMaxAwards from CU_MEMBER cm where 1 = 1
|
||||
<if test="pkCountry != null">
|
||||
and cm.PK_SETTLE_COUNTRY = #{pkCountry}
|
||||
</if>
|
||||
<if test="memberCode != null and memberCode != ''">
|
||||
and cm.MEMBER_CODE = #{memberCode}
|
||||
</if>
|
||||
-->
|
||||
</select>
|
||||
|
||||
<!-- 查询同姓名同手机号指定等级会员数量 -->
|
||||
<select id="countGradeMemberPoint" resultType="int">
|
||||
select count(1)
|
||||
|
|
|
|||
|
|
@ -346,4 +346,16 @@
|
|||
order by cms.CREATION_TIME desc
|
||||
</select>
|
||||
|
||||
<!-- 查询指定会员政策币信息 -->
|
||||
<select id="queryPolicy" resultType="com.hzs.common.domain.member.detail.CuMemberServiceLogExt">
|
||||
select *
|
||||
from (select *
|
||||
from CU_MEMBER_SERVICE_LOG
|
||||
where EDIT_TYPE = 125
|
||||
and PK_MEMBER = #{pkMember}
|
||||
and APPROVE_STATUS = 5
|
||||
order by CREATION_TIME desc)
|
||||
where rownum = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.report.member.controller.manage;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
|
|
@ -13,14 +12,10 @@ import com.hzs.common.core.utils.poi.ExcelUtil;
|
|||
import com.hzs.common.core.web.controller.BaseController;
|
||||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
import com.hzs.common.domain.member.base.CuMember;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.service.ITransactionCommonService;
|
||||
import com.hzs.member.base.IMemberServiceApi;
|
||||
import com.hzs.report.member.service.IMemberService;
|
||||
import com.hzs.report.member.vo.MallPVStatVO;
|
||||
import com.hzs.report.member.vo.UmbrellaBelowPushVO;
|
||||
import com.hzs.sale.order.ISaOrderServiceApi;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -36,32 +31,22 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 伞下直推
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-05-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/umbrella-below-push")
|
||||
public class CuUmbrellaBelowPushController extends BaseController {
|
||||
|
||||
@DubboReference
|
||||
private IMemberServiceApi memberServiceApi;
|
||||
@Autowired
|
||||
private IMemberService memberService;
|
||||
@DubboReference
|
||||
private ISaOrderServiceApi orderServiceApi;
|
||||
@Autowired
|
||||
private ITransactionCommonService iTransactionCommonService;
|
||||
|
||||
@DubboReference
|
||||
IMemberServiceApi memberServiceApi;
|
||||
|
||||
/**
|
||||
* @description: 伞下直推
|
||||
* @author: zhang jing
|
||||
* @date: 2023/5/18 9:57
|
||||
* @param: []
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
* 伞下直推
|
||||
**/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.UMBRELLA_DIRECT_PUSH, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/list")
|
||||
|
|
@ -88,18 +73,12 @@ public class CuUmbrellaBelowPushController extends BaseController {
|
|||
Map<Long, BigDecimal> orderMap = new HashMap<>();
|
||||
if (CollectionUtil.isNotEmpty(ordeList)) {
|
||||
ordeList.forEach(itms -> {
|
||||
if (null != orderMap.get(itms.getPkMember())) {
|
||||
orderMap.put(itms.getPkMember(), itms.getOrderAchieve().add(orderMap.get(itms.getPkMember())));
|
||||
} else {
|
||||
orderMap.put(itms.getPkMember(), itms.getOrderAchieve());
|
||||
}
|
||||
});
|
||||
}
|
||||
if (orderMap != null) {
|
||||
uvoExtList.forEach(itm -> {
|
||||
itm.setOrderAchieve(orderMap.get(itm.getPkMember()));
|
||||
orderMap.merge(itms.getPkMember(), itms.getOrderAchieve(), (a, b) -> b.add(a));
|
||||
});
|
||||
}
|
||||
uvoExtList.forEach(itm -> {
|
||||
itm.setOrderAchieve(orderMap.get(itm.getPkMember()));
|
||||
});
|
||||
}
|
||||
}
|
||||
TableDataInfo tableDataInfo = getDataTable(uvoExtList);
|
||||
|
|
@ -108,11 +87,7 @@ public class CuUmbrellaBelowPushController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* @description: 导出 伞下直推
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/31 9:15
|
||||
* @param: [response, uvo]
|
||||
* @return: void
|
||||
* 导出 伞下直推
|
||||
**/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.UMBRELLA_DIRECT_PUSH, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/export")
|
||||
|
|
@ -142,20 +117,14 @@ public class CuUmbrellaBelowPushController extends BaseController {
|
|||
Map<Long, BigDecimal> orderMap = new HashMap<>();
|
||||
if (CollectionUtil.isNotEmpty(ordeList)) {
|
||||
ordeList.forEach(itms -> {
|
||||
if (null != orderMap.get(itms.getPkMember())) {
|
||||
orderMap.put(itms.getPkMember(), itms.getOrderAchieve().add(orderMap.get(itms.getPkMember())));
|
||||
} else {
|
||||
orderMap.put(itms.getPkMember(), itms.getOrderAchieve());
|
||||
}
|
||||
});
|
||||
}
|
||||
if (orderMap != null) {
|
||||
list.forEach(itm -> {
|
||||
itm.setOrderAchieve(orderMap.get(itm.getPkMember()));
|
||||
itm.setPkAwardsVal(transactionMap1.get(itm.getPkAwards()));
|
||||
itm.setPkRegisterGradeVal(transactionMap1.get(itm.getPkRegisterGrade()));
|
||||
orderMap.merge(itms.getPkMember(), itms.getOrderAchieve(), (a, b) -> b.add(a));
|
||||
});
|
||||
}
|
||||
list.forEach(itm -> {
|
||||
itm.setOrderAchieve(orderMap.get(itm.getPkMember()));
|
||||
itm.setPkAwardsVal(transactionMap1.get(itm.getPkAwards()));
|
||||
itm.setPkRegisterGradeVal(transactionMap1.get(itm.getPkRegisterGrade()));
|
||||
});
|
||||
}
|
||||
}
|
||||
ExcelUtil<UmbrellaBelowPushVO> util = new ExcelUtil<>(UmbrellaBelowPushVO.class);
|
||||
|
|
|
|||
|
|
@ -94,16 +94,6 @@ public interface CuMemberAwardsStatMapper extends BaseMapper<CuMemberAwards> {
|
|||
|
||||
List<RevenueDetailsVO> selectRevenueDetailsList(RevenueDetailsVO revenueDetailsVO);
|
||||
|
||||
/**
|
||||
* 复购bv统计-业绩,考核记录
|
||||
**/
|
||||
List<RepurchasePVStatVO> selectRepurchasePVStatList(RepurchasePVStatVO repurchasePVStatVO);
|
||||
|
||||
/**
|
||||
* 商城BV统计
|
||||
**/
|
||||
List<MallPVStatVO> selectMallPVStatList(MallPVStatVO mallPVStatVO);
|
||||
|
||||
/**
|
||||
* 个人统计业绩查询
|
||||
**/
|
||||
|
|
@ -199,9 +189,4 @@ public interface CuMemberAwardsStatMapper extends BaseMapper<CuMemberAwards> {
|
|||
**/
|
||||
List<VertexAchieveStatVO> vertexAchieveStat(VertexAchieveStatVO vertexAchieveStatVO);
|
||||
|
||||
/**
|
||||
* 月度职级名单查询
|
||||
**/
|
||||
List<MonthlyJobLevelVo> monthlyJobLevelList(MonthlyJobLevelVo mjlvo);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,16 +96,6 @@ public interface ICuMemberAwardsStatService {
|
|||
**/
|
||||
List<RevenueDetailsVO> selectRevenueDetailsList(RevenueDetailsVO revenueDetailsVO);
|
||||
|
||||
/**
|
||||
* 复购bv统计
|
||||
**/
|
||||
List<RepurchasePVStatVO> selectRepurchasePVStatList(RepurchasePVStatVO repurchasePVStatVO);
|
||||
|
||||
/**
|
||||
* 商城BV统计
|
||||
**/
|
||||
List<MallPVStatVO> selectMallPVStatList(MallPVStatVO mallPVStatVO);
|
||||
|
||||
/**
|
||||
* 个人统计业绩查询
|
||||
**/
|
||||
|
|
@ -223,9 +213,4 @@ public interface ICuMemberAwardsStatService {
|
|||
void exportExcelVertexWithMergedCells(HttpServletResponse response, String fileName,
|
||||
List<VertexAchieveStatVO> dataList) throws IOException;
|
||||
|
||||
/**
|
||||
* 月度职级名单查询
|
||||
**/
|
||||
List<MonthlyJobLevelVo> monthlyJobLevelList(MonthlyJobLevelVo mjlvo);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,16 +132,6 @@ public class CuMemberAwardsStatServiceImpl implements ICuMemberAwardsStatService
|
|||
return cuMemberAwardsStatMapper.selectRevenueDetailsList(revenueDetailsVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepurchasePVStatVO> selectRepurchasePVStatList(RepurchasePVStatVO repurchasePVStatVO) {
|
||||
return cuMemberAwardsStatMapper.selectRepurchasePVStatList(repurchasePVStatVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MallPVStatVO> selectMallPVStatList(MallPVStatVO mallPVStatVO) {
|
||||
return cuMemberAwardsStatMapper.selectMallPVStatList(mallPVStatVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PersonStatVO> selectPersonPvList(List<PersonStatVO> perList) {
|
||||
return cuMemberAwardsStatMapper.selectPersonPvList(perList);
|
||||
|
|
@ -529,11 +519,6 @@ public class CuMemberAwardsStatServiceImpl implements ICuMemberAwardsStatService
|
|||
workbook.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MonthlyJobLevelVo> monthlyJobLevelList(MonthlyJobLevelVo mjlvo) {
|
||||
return cuMemberAwardsStatMapper.monthlyJobLevelList(mjlvo);
|
||||
}
|
||||
|
||||
// 获取对象属性值的通用方法
|
||||
private long getPropertyValue(AreaAchieveStatVO data, String methodName) {
|
||||
long value = 0;
|
||||
|
|
|
|||
|
|
@ -10,12 +10,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 国内报表统计VO
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-10-19
|
||||
*/
|
||||
@Data
|
||||
public class HomeDataStatVO {
|
||||
|
|
@ -74,7 +69,6 @@ public class HomeDataStatVO {
|
|||
private BigDecimal repurchasePv;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 首购累计金额(¥)
|
||||
*/
|
||||
|
|
@ -89,7 +83,7 @@ public class HomeDataStatVO {
|
|||
* 复购专区累计金额(¥)
|
||||
*/
|
||||
@Excel(name = "复购专区累计金额(¥)")
|
||||
private BigDecimal repurchaseOrderSumMo;
|
||||
private BigDecimal repurchaseOrderSumMo;
|
||||
/**
|
||||
* 复购专区累计业绩(PV)
|
||||
*/
|
||||
|
|
@ -99,7 +93,7 @@ public class HomeDataStatVO {
|
|||
* 复购累计金额(¥)
|
||||
*/
|
||||
@Excel(name = "复购累计金额(¥)")
|
||||
private BigDecimal repurchaseSumMo;
|
||||
private BigDecimal repurchaseSumMo;
|
||||
/**
|
||||
* 复购累计业绩(PV)
|
||||
*/
|
||||
|
|
@ -135,7 +129,7 @@ public class HomeDataStatVO {
|
|||
/**
|
||||
* 订单日期
|
||||
*/
|
||||
@Excel(name = "订单日期",dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "订单日期", dateFormat = "yyyy-MM-dd")
|
||||
private String payTime;
|
||||
|
||||
/**
|
||||
|
|
@ -170,5 +164,4 @@ public class HomeDataStatVO {
|
|||
private String endDate;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,162 +0,0 @@
|
|||
package com.hzs.report.member.vo;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: 复购PV统计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/29 14:59
|
||||
* @param:
|
||||
* @return:
|
||||
**/
|
||||
@Data
|
||||
public class MallPVStatVO implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long pkId;
|
||||
|
||||
/**
|
||||
* 会员编号
|
||||
*/
|
||||
private Long pkMember;
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@Excel(name = "日期",dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date creationTime;
|
||||
/**
|
||||
* 会员编号
|
||||
*/
|
||||
@Excel(name = "会员编号")
|
||||
private String memberCode;
|
||||
|
||||
/**
|
||||
* 会员姓名
|
||||
*/
|
||||
@Excel(name = "会员姓名")
|
||||
private String memberName;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@Excel(name = "联系方式")
|
||||
private String phone;
|
||||
/**
|
||||
* 奖衔
|
||||
*/
|
||||
@Excel(name = "真实奖衔")
|
||||
private String pkAwardsVal;
|
||||
|
||||
/**
|
||||
* 隶属体系
|
||||
*/
|
||||
@Excel(name = "隶属体系")
|
||||
private String vertexName;
|
||||
/**
|
||||
* 团队名称
|
||||
*/
|
||||
@Excel(name = "隶属团队")
|
||||
private String teamName;
|
||||
/**
|
||||
* 单月累计业绩(商城新增业绩)
|
||||
*/
|
||||
@Excel(name = "单月累计业绩(PV)")
|
||||
private BigDecimal mallNewPv=BigDecimal.ZERO;
|
||||
/**
|
||||
* 历史业绩 商城累计业绩
|
||||
*
|
||||
*/
|
||||
@Excel(name = "历史累计业绩(PV)")
|
||||
private BigDecimal historyPv=BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 考核金额
|
||||
*/
|
||||
@Excel(name = "考核金额(¥)")
|
||||
private BigDecimal assessTarget=BigDecimal.ZERO;
|
||||
/**
|
||||
* 右区首购累计业绩
|
||||
*/
|
||||
@Excel(name = "剩余业绩(PV)")
|
||||
private BigDecimal monthSurplus=BigDecimal.ZERO;
|
||||
|
||||
|
||||
/**
|
||||
* 考核状态 EAssessStatus
|
||||
*/
|
||||
@Transaction(transactionKey =EnumsPrefixConstants.ASSESS_STATUS)
|
||||
private Integer assessStatus;
|
||||
/**
|
||||
* 考核状态
|
||||
*/
|
||||
@Excel(name = "考核状态")
|
||||
private String assessStatusVal;
|
||||
/**
|
||||
* 是否免考
|
||||
*/
|
||||
@Transaction(transactionKey =EnumsPrefixConstants.DEALER_YES_NO)
|
||||
private Integer isExamine;
|
||||
/**
|
||||
* 是否免考
|
||||
*/
|
||||
@Excel(name = "是否免考")
|
||||
private String isExamineVal;
|
||||
/**
|
||||
* 结算期间
|
||||
*/
|
||||
private Integer period;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间开始时间
|
||||
*/
|
||||
private String startDate;
|
||||
|
||||
/**
|
||||
* 创建时间结束时间
|
||||
*/
|
||||
private String endDate;
|
||||
|
||||
/**
|
||||
* 业绩表名
|
||||
*/
|
||||
private String achieveTableName;
|
||||
/**
|
||||
* 考核记录表名
|
||||
*/
|
||||
private String assessTableName;
|
||||
/**
|
||||
* 奖衔
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
|
||||
private Integer pkAwards;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 隶属体系
|
||||
*/
|
||||
private Integer pkVertex;
|
||||
/**
|
||||
* 隶属团队
|
||||
*/
|
||||
private Integer pkTeamCode;
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private Integer pkCountry;
|
||||
|
||||
}
|
||||
|
|
@ -1,23 +1,9 @@
|
|||
package com.hzs.report.member.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/8/31 14:18
|
||||
* @Classname: MemberTradeVo
|
||||
* @PackageName: com.hzs.report.member.vo
|
||||
*/
|
||||
package com.hzs.report.member.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.report.member.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-08-31 14:18
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class MemberTradeVo {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
package com.hzs.report.member.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 统计历史网体VO
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-05-31
|
||||
*/
|
||||
@Data
|
||||
public class MemberTreeStatVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*期数
|
||||
*/
|
||||
private Integer period;
|
||||
|
||||
/**
|
||||
* 会员结算日表表名
|
||||
*/
|
||||
private String memberTreeTableName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
package com.hzs.report.member.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzs.common.core.annotation.BigDecimalFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import com.hzs.common.core.annotation.Transaction;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: 月度职级名单查询VO
|
||||
* @author: zhang jing
|
||||
* @date: 2024/6/20 16:43
|
||||
* @param:
|
||||
* @return:
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Data
|
||||
public class MonthlyJobLevelVo {
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@Excel(name = "会员编号")
|
||||
private String memberCode;
|
||||
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
@Excel(name = "会员姓名")
|
||||
private String memberName;
|
||||
/**
|
||||
* 统计日期
|
||||
*/
|
||||
@Excel(name = "统计日期", dateFormat = "yyyy-MM")
|
||||
@JsonFormat(pattern = "yyyy-MM")
|
||||
private Date statDate;
|
||||
|
||||
/**
|
||||
* 上月累计首购业绩(左区)
|
||||
*/
|
||||
@Excel(name = "上月累计首购业绩(左区)")
|
||||
@BigDecimalFormat()
|
||||
private BigDecimal lastMonthASumPv;
|
||||
/**
|
||||
* 上月累计首购业绩(右区)
|
||||
*/
|
||||
@Excel(name = "上月累计首购业绩(右区)")
|
||||
@BigDecimalFormat()
|
||||
private BigDecimal lastMonthBSumPv;
|
||||
|
||||
/**
|
||||
* 本月新增首购业绩(左区)
|
||||
*/
|
||||
@Excel(name = "本月新增首购业绩(左区)")
|
||||
@BigDecimalFormat()
|
||||
private BigDecimal newASumPv=new BigDecimal(0);
|
||||
/**
|
||||
* 本月新增首购业绩(右区)
|
||||
*/
|
||||
@Excel(name = "本月新增首购业绩(右区)")
|
||||
@BigDecimalFormat()
|
||||
private BigDecimal newBSumPv=new BigDecimal(0);
|
||||
|
||||
/**
|
||||
* 累计首购业绩(左区)
|
||||
*/
|
||||
@Excel(name = "累计首购业绩(左区)")
|
||||
@BigDecimalFormat()
|
||||
private BigDecimal asumPv;
|
||||
/**
|
||||
* 累计首购业绩(右区)
|
||||
*/
|
||||
@Excel(name = "累计首购业绩(右区)")
|
||||
@BigDecimalFormat()
|
||||
private BigDecimal bsumPv;
|
||||
/**
|
||||
* 本月推荐人数
|
||||
*/
|
||||
@Excel(name = "本月推荐人数")
|
||||
private Integer dyNewTotal=0;
|
||||
/**
|
||||
* 累计推荐人数
|
||||
*/
|
||||
@Excel(name = "累计推荐人数")
|
||||
private Integer dyTotal;
|
||||
/**
|
||||
* 上月累计推荐人数
|
||||
*/
|
||||
private Integer syTotal;
|
||||
|
||||
|
||||
|
||||
private Long pkMember;
|
||||
|
||||
/**
|
||||
* 当前月结束期数
|
||||
*/
|
||||
private Integer periodEnd;
|
||||
|
||||
/**
|
||||
* 上个月结束期数
|
||||
*/
|
||||
private Integer lastMonthPeriodEnd;
|
||||
|
||||
/**
|
||||
* 当月业绩表
|
||||
*/
|
||||
private String achieveTableName;
|
||||
/**
|
||||
* 本月会员网体表
|
||||
*/
|
||||
private String settleTableName;
|
||||
|
||||
/**
|
||||
* 上个月业绩表
|
||||
*/
|
||||
private String lastMonthAchieveTableName;
|
||||
|
||||
/**
|
||||
* 上个会员网体表
|
||||
*/
|
||||
private String lastMonthSettleTableName;
|
||||
|
||||
|
||||
/**
|
||||
* 当前月开始日期
|
||||
*/
|
||||
private String startDate;
|
||||
/**
|
||||
* 当前月结束日期
|
||||
*/
|
||||
private String endDate;
|
||||
|
||||
/**
|
||||
* 上个月结束日期
|
||||
*/
|
||||
private String lastMonthEndDate;
|
||||
/**
|
||||
* 汇率
|
||||
*/
|
||||
private BigDecimal rate;
|
||||
|
||||
private Integer pkCountry;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +1,19 @@
|
|||
package com.hzs.report.member.vo;
|
||||
|
||||
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.BaseApprovalEntity;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 直推数据-发送站内信VO
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-05-31
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class NoticeMemberVO extends BaseApprovalEntity {
|
||||
|
||||
|
|
@ -76,8 +69,4 @@ public class NoticeMemberVO extends BaseApprovalEntity {
|
|||
private Date creationTime;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,9 @@
|
|||
package com.hzs.report.member.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/8/31 10:49
|
||||
* @Classname: OrderCurrencyVo
|
||||
* @PackageName: com.hzs.report.member.vo
|
||||
*/
|
||||
package com.hzs.report.member.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.report.member.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-08-31 10:49
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class OrderCurrencyVo {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,73 +0,0 @@
|
|||
package com.hzs.report.member.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/8/31 10:07
|
||||
* @Classname: OrderVo
|
||||
* @PackageName: com.hzs.report.member.vo
|
||||
*/
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.report.member.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-08-31 10:07
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class OrderVo {
|
||||
|
||||
/**
|
||||
* 会员编号
|
||||
*/
|
||||
private String memberCode;
|
||||
|
||||
/**
|
||||
* 会员姓名
|
||||
*/
|
||||
private String memberName;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
private Integer orderType;
|
||||
|
||||
/**
|
||||
* 订单金额(¥)
|
||||
*/
|
||||
private BigDecimal orderAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 产品邮费(¥)
|
||||
*/
|
||||
private BigDecimal postage;
|
||||
|
||||
/**
|
||||
* 现金账户(¥)
|
||||
*/
|
||||
private BigDecimal cashAccount;
|
||||
|
||||
/**
|
||||
* 奖金账户(¥)
|
||||
*/
|
||||
private BigDecimal bonusAccount;
|
||||
|
||||
/**
|
||||
* 消费账户(¥)
|
||||
*/
|
||||
private BigDecimal expendAccount;
|
||||
/**
|
||||
* 政策账户(¥)
|
||||
*/
|
||||
private BigDecimal policyAccount;
|
||||
}
|
||||
|
|
@ -1,10 +1,4 @@
|
|||
package com.hzs.report.member.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/9/20 9:11
|
||||
* @Classname: ReportSummaryVo
|
||||
* @PackageName: com.hzs.report.member.vo
|
||||
*/
|
||||
package com.hzs.report.member.vo;
|
||||
|
||||
import com.hzs.common.core.annotation.BigDecimalFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
|
|
@ -13,14 +7,6 @@ import lombok.Data;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.report.member.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-09-20 09:11
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ReportSummaryVo {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,160 +0,0 @@
|
|||
package com.hzs.report.member.vo;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: 复购PV统计
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/29 14:59
|
||||
* @param:
|
||||
* @return:
|
||||
**/
|
||||
@Data
|
||||
public class RepurchasePVStatVO implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long pkId;
|
||||
|
||||
/**
|
||||
* 会员编号
|
||||
*/
|
||||
private Long pkMember;
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@Excel(name = "日期",dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date creationTime;
|
||||
/**
|
||||
* 会员编号
|
||||
*/
|
||||
@Excel(name = "会员编号")
|
||||
private String memberCode;
|
||||
|
||||
/**
|
||||
* 会员姓名
|
||||
*/
|
||||
@Excel(name = "会员姓名")
|
||||
private String memberName;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@Excel(name = "联系方式")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 隶属体系
|
||||
*/
|
||||
@Excel(name = "隶属体系")
|
||||
private String vertexName;
|
||||
/**
|
||||
* 团队名称
|
||||
*/
|
||||
@Excel(name = "隶属团队")
|
||||
private String teamName;
|
||||
/**
|
||||
* 单月业绩(复购新增)
|
||||
*/
|
||||
@Excel(name = "单月业绩(PV)")
|
||||
private BigDecimal repurchaseNewPv=BigDecimal.ZERO;
|
||||
/**
|
||||
* 历史业绩 REP_A_SUM_PV 复购A区累计业绩
|
||||
* REP_B_SUM_PV 复购B区累计业绩
|
||||
*/
|
||||
@Excel(name = "历史业绩(PV)")
|
||||
private BigDecimal historyPv=BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 考核金额
|
||||
*/
|
||||
@Excel(name = "考核金额(¥)")
|
||||
private BigDecimal assessTarget=BigDecimal.ZERO;
|
||||
/**
|
||||
* 右区首购累计业绩
|
||||
*/
|
||||
@Excel(name = "剩余业绩(PV)")
|
||||
private BigDecimal monthSurplus=BigDecimal.ZERO;
|
||||
|
||||
|
||||
/**
|
||||
* 考核状态
|
||||
*/
|
||||
@Transaction(transactionKey =EnumsPrefixConstants.ASSESS_STATUS)
|
||||
private Integer assessStatus;
|
||||
/**
|
||||
* 考核状态
|
||||
*/
|
||||
@Excel(name = "考核状态")
|
||||
private String assessStatusVal;
|
||||
/**
|
||||
* 是否免考
|
||||
*/
|
||||
@Transaction(transactionKey =EnumsPrefixConstants.DEALER_YES_NO)
|
||||
private Integer isExamine;
|
||||
/**
|
||||
* 是否免考
|
||||
*/
|
||||
@Excel(name = "是否免考")
|
||||
private String isExamineVal;
|
||||
/**
|
||||
* 结算期间
|
||||
*/
|
||||
private Integer period;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间开始时间
|
||||
*/
|
||||
private String startDate;
|
||||
|
||||
/**
|
||||
* 创建时间结束时间
|
||||
*/
|
||||
private String endDate;
|
||||
|
||||
/**
|
||||
* 业绩表名
|
||||
*/
|
||||
private String achieveTableName;
|
||||
/**
|
||||
* 考核记录表名
|
||||
*/
|
||||
private String assessTableName;
|
||||
/**
|
||||
* 奖衔
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
|
||||
private Integer pkAwards;
|
||||
|
||||
/**
|
||||
* 奖衔
|
||||
*/
|
||||
private String pkAwardsVal;
|
||||
|
||||
/**
|
||||
* 隶属体系
|
||||
*/
|
||||
private Integer pkVertex;
|
||||
/**
|
||||
* 隶属团队
|
||||
*/
|
||||
private Integer pkTeamCode;
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private Integer pkCountry;
|
||||
|
||||
}
|
||||
|
|
@ -9,12 +9,7 @@ import lombok.Data;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 安置血缘查询VO
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-31
|
||||
*/
|
||||
@Data
|
||||
public class ResettleBloodExcel {
|
||||
|
|
@ -58,7 +53,7 @@ public class ResettleBloodExcel {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "日期",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "日期", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
|
|
@ -66,6 +61,4 @@ public class ResettleBloodExcel {
|
|||
private Integer memberCount;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,14 +13,7 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 小区新增业绩
|
||||
*
|
||||
* @Description:
|
||||
* @Author: ljc
|
||||
* @Time: 2024/3/1 15:00
|
||||
* @Classname: SmallAreaNewAddAchieveParam
|
||||
* @Package_name: com.hzs.report.member.param
|
||||
*/
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
|
|
@ -86,8 +79,6 @@ public class SmallAreaNewAddAchieveVO implements Serializable {
|
|||
private BigDecimal rightSumPv;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 国家ID
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,20 +2,13 @@ package com.hzs.report.member.vo;
|
|||
|
||||
import com.hzs.common.core.annotation.BigDecimalFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import com.hzs.common.core.annotation.Transaction;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 伞下直推统计产品VO
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-31
|
||||
*/
|
||||
@Data
|
||||
public class StatProductVO {
|
||||
|
|
@ -60,7 +53,7 @@ public class StatProductVO {
|
|||
* 产品单价(¥)
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "产品单价(¥)",scale = 2)
|
||||
@Excel(name = "产品单价(¥)", scale = 2)
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 产品数量
|
||||
|
|
@ -71,13 +64,13 @@ public class StatProductVO {
|
|||
* 产品总价
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "产品总价(¥)",scale = 2)
|
||||
@Excel(name = "产品总价(¥)", scale = 2)
|
||||
private BigDecimal totalPrice;
|
||||
/**
|
||||
* 产品业绩
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "产品业绩(¥)",scale = 2)
|
||||
@Excel(name = "产品业绩(¥)", scale = 2)
|
||||
private BigDecimal achievement;
|
||||
|
||||
/**
|
||||
|
|
@ -102,7 +95,4 @@ public class StatProductVO {
|
|||
private Integer pkCountry;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,12 +12,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 伞下直推产品查询VO
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-31
|
||||
*/
|
||||
@Data
|
||||
public class UmbrellaBelowProductVO {
|
||||
|
|
@ -82,14 +77,14 @@ public class UmbrellaBelowProductVO {
|
|||
* 累计金额
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "累计金额(¥)",scale = 2)
|
||||
private BigDecimal orderAmount=BigDecimal.ZERO;
|
||||
@Excel(name = "累计金额(¥)", scale = 2)
|
||||
private BigDecimal orderAmount = BigDecimal.ZERO;
|
||||
/**
|
||||
* 累计业绩
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "累计业绩(¥)",scale = 2)
|
||||
private BigDecimal orderAchieve=BigDecimal.ZERO;
|
||||
@Excel(name = "累计业绩(¥)", scale = 2)
|
||||
private BigDecimal orderAchieve = BigDecimal.ZERO;
|
||||
/**
|
||||
* 订单类型集合
|
||||
*/
|
||||
|
|
@ -141,5 +136,4 @@ public class UmbrellaBelowProductVO {
|
|||
private Integer pkGrade;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,12 +12,7 @@ import java.util.List;
|
|||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 伞下直推VO
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2023-05-31
|
||||
*/
|
||||
@Data
|
||||
public class UmbrellaBelowPushVO {
|
||||
|
|
@ -103,7 +98,7 @@ public class UmbrellaBelowPushVO {
|
|||
/**
|
||||
* 注册日期
|
||||
*/
|
||||
@Excel(name = "注册日期",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "注册日期", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
/**
|
||||
|
|
@ -129,6 +124,4 @@ public class UmbrellaBelowPushVO {
|
|||
List<Long> pkMemberList;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,12 +12,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 伞下直推产品去重VO
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-31
|
||||
*/
|
||||
@Data
|
||||
public class UmbrellaBelowRepeatVO {
|
||||
|
|
@ -62,13 +57,13 @@ public class UmbrellaBelowRepeatVO {
|
|||
* 产品单价(¥)
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "产品单价(¥)",scale = 2)
|
||||
@Excel(name = "产品单价(¥)", scale = 2)
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 产品业绩
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "产品业绩(¥)",scale = 2)
|
||||
@Excel(name = "产品业绩(¥)", scale = 2)
|
||||
private BigDecimal achievement;
|
||||
/**
|
||||
* 产品数量
|
||||
|
|
@ -80,14 +75,14 @@ public class UmbrellaBelowRepeatVO {
|
|||
* 产品总价
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "产品总价(¥)",scale = 2)
|
||||
@Excel(name = "产品总价(¥)", scale = 2)
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 产品业绩
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "产品总业绩(¥)",scale = 2)
|
||||
@Excel(name = "产品总业绩(¥)", scale = 2)
|
||||
private BigDecimal totalAchievement;
|
||||
/**
|
||||
* 订单编号
|
||||
|
|
@ -153,13 +148,13 @@ public class UmbrellaBelowRepeatVO {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
@Excel(name = "支付时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "支付时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date payTime;
|
||||
/**
|
||||
|
|
@ -184,6 +179,4 @@ public class UmbrellaBelowRepeatVO {
|
|||
private Integer pkCountry;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,7 @@
|
|||
package com.hzs.report.member.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2024/7/17 15:15
|
||||
* @Classname: WaresInfoVo
|
||||
* @PackageName: com.hzs.report.member.vo
|
||||
*/
|
||||
package com.hzs.report.member.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.report.member.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2024-07-17 15:15
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class WaresInfoVO {
|
||||
|
||||
|
|
@ -49,7 +35,7 @@ public class WaresInfoVO {
|
|||
/**
|
||||
* 规格数量
|
||||
*/
|
||||
private Integer specsQuantity ;
|
||||
private Integer specsQuantity;
|
||||
|
||||
/**
|
||||
* 产品主键
|
||||
|
|
|
|||
|
|
@ -508,146 +508,6 @@
|
|||
ORDER BY realIncomeTotal DESC
|
||||
</select>
|
||||
|
||||
<!-- 复购bv统计 -->
|
||||
<select id="selectRepurchasePVStatList"
|
||||
resultType="com.hzs.report.member.vo.RepurchasePVStatVO">
|
||||
select
|
||||
cm.MEMBER_CODE memberCode,
|
||||
cm.MEMBER_NAME memberName,
|
||||
cm.PHONE phone,
|
||||
ver.VERTEX_NAME as vertexName,
|
||||
ct.TEAM_NAME as teamName,
|
||||
aw.PK_TRANSACTION as pkAwards,
|
||||
cma.REPURCHASE_NEW_PV repurchaseNewPv,
|
||||
(cma.REP_A_SUM_PV+cma.REP_B_SUM_PV) as historyPv ,
|
||||
cmas.ASSESS_TARGET assessTarget,
|
||||
cmas.MONTH_SURPLUS monthSurplus,
|
||||
cmas.ASSESS_STATUS assessStatus,
|
||||
cmas.IS_EXAMINE isExamine,
|
||||
cmas.CREATION_TIME creationTime
|
||||
from ${achieveTableName} cma
|
||||
LEFT JOIN CU_MEMBER cm on cma.PK_MEMBER=cm.pk_id
|
||||
LEFT JOIN BD_AWARDS aw on aw.pk_ID=cm.PK_AWARDS
|
||||
left join bd_vertex ver on cm.pk_vertex = ver.pk_id
|
||||
LEFT JOIN cu_member_team ct ON ct.pk_id = cm.pk_team_code
|
||||
LEFT JOIN ${assessTableName} cmas on cma.PK_MEMBER=cmas.PK_MEMBER
|
||||
where
|
||||
cm.DEL_FLAG=0
|
||||
AND cmas.DEL_FLAG = 0 and cmas.ASSESS_TYPE=0
|
||||
and cm.PK_SETTLE_COUNTRY=#{pkCountry}
|
||||
<if test="pkMember != null ">
|
||||
AND cm.pk_id =#{pkMember}
|
||||
</if>
|
||||
<if test="memberCode != null and memberCode !='' ">
|
||||
AND cm.MEMBER_CODE like #{memberCode} || '%'
|
||||
</if>
|
||||
<if test="memberName != null and memberName !='' ">
|
||||
AND cm.MEMBER_NAME like #{memberName} || '%'
|
||||
</if>
|
||||
<if test="phone != null and phone !='' ">
|
||||
AND cm.phone like #{phone} || '%'
|
||||
</if>
|
||||
|
||||
<if test="pkVertex != null">
|
||||
AND cm.pk_vertex=#{pkVertex}
|
||||
</if>
|
||||
<if test="pkTeamCode != null">
|
||||
AND cm.pk_team_code=#{pkTeamCode}
|
||||
</if>
|
||||
<if test="period != null">
|
||||
AND cma.PERIOD=#{period}
|
||||
</if>
|
||||
<if test="period != null">
|
||||
AND cmas.PERIOD=#{period}
|
||||
</if>
|
||||
|
||||
<if test="pkAwards != null">
|
||||
AND cm.PK_AWARDS=#{pkAwards}
|
||||
</if>
|
||||
<if test="assessStatus != null">
|
||||
AND cmas.ASSESS_STATUS=#{assessStatus}
|
||||
</if>
|
||||
<if test="isExamine != null">
|
||||
AND cmas.IS_EXAMINE=#{isExamine}
|
||||
</if>
|
||||
<if test="startDate != null and startDate!='' ">
|
||||
and cmas.CREATION_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate != null and endDate!='' ">
|
||||
and cmas.CREATION_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
|
||||
ORDER BY cmas.CREATION_TIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 商城BV统计-->
|
||||
<select id="selectMallPVStatList"
|
||||
resultType="com.hzs.report.member.vo.MallPVStatVO">
|
||||
select
|
||||
cm.MEMBER_CODE memberCode,
|
||||
cm.MEMBER_NAME memberName,
|
||||
cm.PHONE phone,
|
||||
ver.VERTEX_NAME as vertexName,
|
||||
ct.TEAM_NAME as teamName,
|
||||
aw.PK_TRANSACTION as pkAwards,
|
||||
cma.MALL_NEW_PV mallNewPv,
|
||||
cma.MALL_PV as historyPv ,
|
||||
cmas.ASSESS_TARGET assessTarget,
|
||||
cmas.MONTH_SURPLUS monthSurplus,
|
||||
cmas.ASSESS_STATUS assessStatus,
|
||||
cmas.IS_EXAMINE isExamine,
|
||||
cmas.CREATION_TIME creationTime
|
||||
from ${achieveTableName} cma
|
||||
LEFT JOIN CU_MEMBER cm on cma.PK_MEMBER=cm.pk_id
|
||||
LEFT JOIN BD_AWARDS aw on aw.pk_ID=cm.PK_AWARDS
|
||||
left join bd_vertex ver on cm.pk_vertex = ver.pk_id
|
||||
LEFT JOIN cu_member_team ct ON ct.pk_id = cm.pk_team_code
|
||||
LEFT JOIN ${assessTableName} cmas on cma.PK_MEMBER=cmas.PK_MEMBER
|
||||
where
|
||||
cm.DEL_FLAG=0
|
||||
AND cmas.DEL_FLAG = 0 and cmas.ASSESS_TYPE=1
|
||||
and cm.PK_SETTLE_COUNTRY=#{pkCountry}
|
||||
<if test="pkMember != null ">
|
||||
AND cm.pk_id =#{pkMember}
|
||||
</if>
|
||||
<if test="memberCode != null and memberCode !='' ">
|
||||
AND cm.MEMBER_CODE like #{memberCode} || '%'
|
||||
</if>
|
||||
<if test="memberName != null and memberName !='' ">
|
||||
AND cm.MEMBER_NAME like #{memberName} || '%'
|
||||
</if>
|
||||
<if test="phone != null and phone !='' ">
|
||||
AND cm.phone like #{phone} || '%'
|
||||
</if>
|
||||
|
||||
<if test="pkVertex != null">
|
||||
AND cm.pk_vertex=#{pkVertex}
|
||||
</if>
|
||||
<if test="pkTeamCode != null">
|
||||
AND cm.pk_team_code=#{pkTeamCode}
|
||||
</if>
|
||||
<if test="period != null">
|
||||
AND cma.PERIOD=#{period}
|
||||
</if>
|
||||
|
||||
<if test="pkAwards != null">
|
||||
AND cm.PK_AWARDS=#{pkAwards}
|
||||
</if>
|
||||
<if test="assessStatus != null">
|
||||
AND cmas.ASSESS_STATUS=#{assessStatus}
|
||||
</if>
|
||||
<if test="isExamine != null">
|
||||
AND cmas.IS_EXAMINE=#{isExamine}
|
||||
</if>
|
||||
<if test="startDate != null and startDate!='' ">
|
||||
and cmas.CREATION_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="endDate != null and endDate!='' ">
|
||||
and cmas.CREATION_TIME <= to_date(#{endDate} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
|
||||
</if>
|
||||
ORDER BY cmas.CREATION_TIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询个人统计-->
|
||||
<select id="selectPersonStatList"
|
||||
resultType="com.hzs.report.member.vo.PersonStatVO">
|
||||
|
|
@ -2299,50 +2159,4 @@
|
|||
ORDER BY so.PK_VERTEX asc, creationTime asc
|
||||
</select>
|
||||
|
||||
<!-- 月度职级名单查询-->
|
||||
<select id="monthlyJobLevelList" resultType="com.hzs.report.member.vo.MonthlyJobLevelVo">
|
||||
select #{statDate} statDate,
|
||||
dy.A_SUM_PV * #{rate} aSumPv,
|
||||
dy.B_SUM_PV * #{rate} bSumPv,
|
||||
dy.pk_member pkMember,
|
||||
sy.a_sum_pv * #{rate} lastMonthASumPv,
|
||||
sy.b_sum_pv * #{rate} lastMonthBSumPv,
|
||||
dy_total dyTotal,
|
||||
sy_total syTotal
|
||||
from (
|
||||
select dy.A_SUM_PV,
|
||||
dy.B_SUM_PV,
|
||||
dy.PK_MEMBER,
|
||||
(
|
||||
SELECT count(1)
|
||||
FROM ${settleTableName}
|
||||
WHERE PERIOD = #{periodEnd}
|
||||
AND PK_PARENT = #{pkMember}
|
||||
AND PK_COUNTRY = #{pkCountry}
|
||||
) as dy_total,
|
||||
(
|
||||
SELECT count(1)
|
||||
FROM ${lastMonthSettleTableName}
|
||||
WHERE PERIOD = #{lastMonthPeriodEnd}
|
||||
AND PK_PARENT = #{pkMember}
|
||||
AND PK_COUNTRY = #{pkCountry}
|
||||
) as sy_total
|
||||
from ${achieveTableName} dy
|
||||
where dy.PERIOD = #{periodEnd}
|
||||
and dy.PK_MEMBER = #{pkMember}
|
||||
and dy.PK_COUNTRY = #{pkCountry}
|
||||
) dy
|
||||
LEFT JOIN
|
||||
(
|
||||
select sy.A_SUM_PV,
|
||||
sy.B_SUM_PV,
|
||||
sy.PK_MEMBER
|
||||
from ${lastMonthAchieveTableName} sy
|
||||
where sy.PERIOD = #{lastMonthPeriodEnd}
|
||||
and sy.PK_MEMBER = #{pkMember}
|
||||
and sy.PK_COUNTRY = #{pkCountry}
|
||||
) sy on dy.PK_MEMBER = sy.PK_MEMBER
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,176 +0,0 @@
|
|||
package com.hzs.system.base.controller.manage;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
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.enums.EDelFlag;
|
||||
import com.hzs.common.core.enums.EOperationBusiness;
|
||||
import com.hzs.common.core.enums.EOperationMethod;
|
||||
import com.hzs.common.core.enums.EOperationModule;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.core.utils.poi.ExcelUtil;
|
||||
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.BdProductStorehouse;
|
||||
import com.hzs.common.domain.system.base.BdProductStorehouseArea;
|
||||
import com.hzs.common.domain.system.base.BdStorehouseAreaMiddle;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.system.base.service.IBdProductStorehouseAreaService;
|
||||
import com.hzs.system.base.service.IBdProductStorehouseService;
|
||||
import com.hzs.system.base.vo.BdProductStorehouseAreaVO;
|
||||
import com.hzs.system.base.vo.BdProductStorehouseVO;
|
||||
import com.hzs.system.base.vo.BdStorehouseAreaMiddleVO;
|
||||
import com.hzs.system.base.vo.BdStorehouseVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品绑定仓库表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/bd-product-storehouse")
|
||||
public class BdProductStorehouseController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBdProductStorehouseService iBdProductStorehouseService;
|
||||
@Autowired
|
||||
private IBdProductStorehouseAreaService iBdProductStorehouseAreaService;
|
||||
/**
|
||||
* 获取地区仓库列表
|
||||
*/
|
||||
@Log(module = EOperationModule.PRODUCT_STOREHOUSE, business = EOperationBusiness.PRODUCT_STOREHOUSE, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BdProductStorehouseVO productStorehouseVO) {
|
||||
startPage();
|
||||
productStorehouseVO.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<BdProductStorehouseVO> list = iBdProductStorehouseService.getProductStorehouseList(productStorehouseVO);
|
||||
list.forEach(itm -> {
|
||||
BdProductStorehouseArea psa = new BdProductStorehouseArea();
|
||||
psa.setPkProductStorehouse(itm.getPkId());
|
||||
psa.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<BdProductStorehouseAreaVO> samList = iBdProductStorehouseAreaService.getStorehouseAreaList(psa);
|
||||
itm.setSamList(samList);
|
||||
});
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取单条
|
||||
* @author: zhang jing
|
||||
* @date: 2023/5/5 20:14
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.PRODUCT_STOREHOUSE, business = EOperationBusiness.PRODUCT_STOREHOUSE, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/geOne/{pkId}")
|
||||
public AjaxResult getBdStorehouse(@PathVariable Long pkId) {
|
||||
BdProductStorehouse productStorehouse = iBdProductStorehouseService.getById(pkId);
|
||||
BdProductStorehouseVO ps = BeanUtil.copyProperties(productStorehouse, BdProductStorehouseVO.class);
|
||||
BdProductStorehouseArea psa = new BdProductStorehouseArea();
|
||||
psa.setPkProductStorehouse(ps.getPkId());
|
||||
psa.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<Integer> provinceList = new ArrayList<>();
|
||||
List<BdProductStorehouseAreaVO> samList = iBdProductStorehouseAreaService.getStorehouseAreaList(psa);
|
||||
if (CollectionUtil.isNotEmpty(samList)) {
|
||||
samList.forEach(itm -> provinceList.add(itm.getProvince()));
|
||||
}
|
||||
ps.setProvinceList(provinceList);
|
||||
return AjaxResult.success(ps);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出产品绑定仓库
|
||||
* @author: zhang jing
|
||||
* @date: 2023/5/5 20:16
|
||||
* @param: [response, productStorehouseVO]
|
||||
* @return: void
|
||||
**/
|
||||
@Log(module = EOperationModule.PRODUCT_STOREHOUSE, business = EOperationBusiness.PRODUCT_STOREHOUSE, method = EOperationMethod.SELECT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BdProductStorehouseVO productStorehouseVO) {
|
||||
productStorehouseVO.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<BdProductStorehouseVO> list = iBdProductStorehouseService.getProductStorehouseList(productStorehouseVO);
|
||||
ExcelUtil<BdProductStorehouseVO> util = new ExcelUtil<>(BdProductStorehouseVO.class);
|
||||
util.exportExcel(response, list, "产品绑定仓库");
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增地区产品绑定仓库
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 10:25
|
||||
* @param: [productStorehouseVO]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.PRODUCT_STOREHOUSE, business = EOperationBusiness.PRODUCT_STOREHOUSE, method = EOperationMethod.INSERT)
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(@RequestBody BdProductStorehouseVO productStorehouseVO) {
|
||||
if (StringUtils.isNull(productStorehouseVO.getPkStorehouse())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.STOREHOUSE_NOT_NULL);
|
||||
}
|
||||
if (StringUtils.isNull(productStorehouseVO.getPkProduct())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.PK_PRODUCT_NOT_NULL);
|
||||
}
|
||||
|
||||
if (CollectionUtil.isEmpty(productStorehouseVO.getProvinceList())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.HO_REGION_NOT_NULL);
|
||||
}
|
||||
Long userId= SecurityUtils.getUserId();
|
||||
Integer pkCountry=SecurityUtils.getPkCountry();
|
||||
Date date= new Date();
|
||||
productStorehouseVO.setCreationTime(date);
|
||||
productStorehouseVO.setPkCreator(userId);
|
||||
productStorehouseVO.setPkCountry(pkCountry);
|
||||
return toAjax(iBdProductStorehouseService.insertProductStorehouse(productStorehouseVO));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 修改保存地区产品绑定仓库
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 10:25
|
||||
* @param: [productStorehouseVO]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.PRODUCT_STOREHOUSE, business = EOperationBusiness.PRODUCT_STOREHOUSE, method = EOperationMethod.UPDATE)
|
||||
@PostMapping("/update")
|
||||
public AjaxResult update(@RequestBody BdProductStorehouseVO productStorehouseVO) {
|
||||
if (StringUtils.isNull(productStorehouseVO.getPkStorehouse())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.STOREHOUSE_NOT_NULL);
|
||||
}
|
||||
if (CollectionUtil.isEmpty(productStorehouseVO.getProvinceList())) {
|
||||
return AjaxResult.error(ConfigMsgConstants.HO_REGION_NOT_NULL);
|
||||
}
|
||||
Long userId= SecurityUtils.getUserId();
|
||||
Date date= new Date();
|
||||
productStorehouseVO.setCreationTime(date);
|
||||
productStorehouseVO.setPkModified(userId);
|
||||
return toAjax(iBdProductStorehouseService.upProductStorehouseVO(productStorehouseVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除地区产品绑定仓库
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 10:25
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.PRODUCT_STOREHOUSE, business = EOperationBusiness.PRODUCT_STOREHOUSE, method = EOperationMethod.DELETE)
|
||||
@PostMapping("/del/{pkId}")
|
||||
public AjaxResult delBdStorehouse(@PathVariable Long pkId) {
|
||||
return toAjax(iBdProductStorehouseService.delBdStorehouse(pkId));
|
||||
}
|
||||
}
|
||||
|
|
@ -8,9 +8,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 行政区划 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-04
|
||||
*/
|
||||
public interface BdAreaMapper extends BaseMapper<BdArea> {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
package com.hzs.system.base.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.system.base.BdProductStorehouseArea;
|
||||
import com.hzs.system.base.vo.BdProductStorehouseAreaVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品仓库绑定地区表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-12
|
||||
*/
|
||||
public interface BdProductStorehouseAreaMapper extends BaseMapper<BdProductStorehouseArea> {
|
||||
|
||||
List<BdProductStorehouseAreaVO> getStorehouseAreaList(BdProductStorehouseArea psa);
|
||||
}
|
||||
|
|
@ -1,38 +1,20 @@
|
|||
package com.hzs.system.base.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.system.base.BdProductStorehouse;
|
||||
import com.hzs.common.domain.system.base.ext.BdProductStorehouseExt;
|
||||
import com.hzs.system.base.vo.BdProductStorehouseVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品绑定仓库表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-12
|
||||
*/
|
||||
public interface BdProductStorehouseMapper extends BaseMapper<BdProductStorehouse> {
|
||||
|
||||
/**
|
||||
* @description: 产品绑定仓库列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 11:30
|
||||
* @param: [productStorehouseVO]
|
||||
* @return: java.util.List<com.hzs.system.base.vo.BdProductStorehouseVO>
|
||||
**/
|
||||
List<BdProductStorehouseVO> getProductStorehouseList(BdProductStorehouseVO productStorehouseVO);
|
||||
|
||||
/*
|
||||
* @description: 查询省绑定的产品仓库
|
||||
* @author: sui q
|
||||
* @date: 2024/4/26 11:35
|
||||
* @param: null null
|
||||
**/
|
||||
* 查询省绑定的产品仓库
|
||||
*/
|
||||
List<BdProductStorehouseExt> queryBdProductStorehouseByCondition(@Param("productId") List<Integer> productId, @Param("province") Integer province);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 行政区划dubbo服务
|
||||
* @Author: jiang chao
|
||||
* @Time: 2022/10/21 11:32
|
||||
* @Classname: AreaServiceProvider
|
||||
* @PackageName: com.hzs.system.base.provider
|
||||
* 行政区划dubbo服务
|
||||
*/
|
||||
@Slf4j
|
||||
@DubboService
|
||||
|
|
@ -31,7 +27,7 @@ public class AreaServiceProvider implements IAreaServiceApi {
|
|||
private IBdAreaService iBdAreaService;
|
||||
|
||||
@Autowired
|
||||
private IBdProductStorehouseService bdProductStorehouseService;
|
||||
private IBdProductStorehouseService iBdProductStorehouseService;
|
||||
|
||||
@Override
|
||||
public R<Map<Integer, String>> getAreaMap(Integer pkCountry) {
|
||||
|
|
@ -74,7 +70,7 @@ public class AreaServiceProvider implements IAreaServiceApi {
|
|||
|
||||
@Override
|
||||
public R<List<BdProductStorehouseExt>> queryBdProductStorehouseByCondition(List<Integer> productId, Integer province) {
|
||||
return R.ok(bdProductStorehouseService.queryBdProductStorehouseByCondition(productId, province));
|
||||
return R.ok(iBdProductStorehouseService.queryBdProductStorehouseByCondition(productId, province));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Classname: ICurrencyServiceProvider
|
||||
* @PackageName: com.hzs.system.base.provider
|
||||
*/
|
||||
@DubboService
|
||||
public class CurrencyServiceProvider implements ICurrencyServiceApi {
|
||||
|
||||
|
|
@ -81,11 +76,6 @@ public class CurrencyServiceProvider implements ICurrencyServiceApi {
|
|||
return R.ok(iBdStorehouseAreaMiddleService.queryBdStorehouseByProvince(province, storeType));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<BdStorehouse> queryBdStorehouseById(Integer pkId) {
|
||||
return R.ok(iBdStorehouseService.getById(pkId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<BdStorehouse>> queryBdStorehouseMapByProvince(Collection<Integer> provinceList) {
|
||||
return R.ok(iBdStorehouseAreaMiddleService.queryStorehouseListByProvince(provinceList));
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 行政区划 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-04
|
||||
*/
|
||||
public interface IBdAreaService extends IService<BdArea> {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
package com.hzs.system.base.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.system.base.BdProductStorehouseArea;
|
||||
import com.hzs.system.base.vo.BdProductStorehouseAreaVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品仓库绑定地区表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-12
|
||||
*/
|
||||
public interface IBdProductStorehouseAreaService extends IService<BdProductStorehouseArea> {
|
||||
|
||||
List<BdProductStorehouseAreaVO> getStorehouseAreaList(BdProductStorehouseArea psa);
|
||||
}
|
||||
|
|
@ -1,57 +1,18 @@
|
|||
package com.hzs.system.base.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.system.base.BdProductStorehouse;
|
||||
import com.hzs.common.domain.system.base.ext.BdProductStorehouseExt;
|
||||
import com.hzs.system.base.vo.BdProductStorehouseVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品绑定仓库表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-12
|
||||
*/
|
||||
public interface IBdProductStorehouseService extends IService<BdProductStorehouse> {
|
||||
|
||||
/**
|
||||
* @description: 产品绑定仓库列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 11:31
|
||||
* @param: [productStorehouseVO]
|
||||
* @return: java.util.List<com.hzs.system.base.vo.BdProductStorehouseVO>
|
||||
**/
|
||||
List<BdProductStorehouseVO> getProductStorehouseList(BdProductStorehouseVO productStorehouseVO);
|
||||
|
||||
/**
|
||||
* @description: 新增产品绑定仓库列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 14:04
|
||||
* @param: [productStorehouseVO]
|
||||
* @return: boolean
|
||||
**/
|
||||
boolean insertProductStorehouse(BdProductStorehouseVO productStorehouseVO);
|
||||
|
||||
/**
|
||||
* @description: 修改产品绑定仓库列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 14:04
|
||||
* @param: [productStorehouseVO]
|
||||
* @return: boolean
|
||||
**/
|
||||
boolean upProductStorehouseVO(BdProductStorehouseVO productStorehouseVO);
|
||||
|
||||
boolean delBdStorehouse(Long pkId);
|
||||
|
||||
/*
|
||||
* @description: 查询省绑定的产品仓库
|
||||
* @author: sui q
|
||||
* @date: 2024/4/26 11:35
|
||||
* @param: null null
|
||||
* 查询省绑定的产品仓库
|
||||
**/
|
||||
List<BdProductStorehouseExt> queryBdProductStorehouseByCondition(List<Integer> productId, Integer province);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,9 +25,6 @@ import java.util.stream.Collectors;
|
|||
|
||||
/**
|
||||
* 行政区划 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-04
|
||||
*/
|
||||
@Service
|
||||
public class BdAreaServiceImpl extends ServiceImpl<BdAreaMapper, BdArea> implements IBdAreaService {
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
package com.hzs.system.base.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.system.base.BdProductStorehouseArea;
|
||||
import com.hzs.system.base.mapper.BdProductStorehouseAreaMapper;
|
||||
import com.hzs.system.base.service.IBdProductStorehouseAreaService;
|
||||
import com.hzs.system.base.vo.BdProductStorehouseAreaVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品仓库绑定地区表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-12
|
||||
*/
|
||||
@Service
|
||||
public class BdProductStorehouseAreaServiceImpl extends ServiceImpl<BdProductStorehouseAreaMapper, BdProductStorehouseArea> implements IBdProductStorehouseAreaService {
|
||||
|
||||
@Override
|
||||
public List<BdProductStorehouseAreaVO> getStorehouseAreaList(BdProductStorehouseArea psa) {
|
||||
return baseMapper.getStorehouseAreaList(psa);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,140 +1,23 @@
|
|||
package com.hzs.system.base.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.enums.EDelFlag;
|
||||
import com.hzs.common.domain.system.base.BdProductStorehouse;
|
||||
import com.hzs.common.domain.system.base.BdProductStorehouseArea;
|
||||
import com.hzs.common.domain.system.base.ext.BdProductStorehouseExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.system.base.mapper.BdProductStorehouseMapper;
|
||||
import com.hzs.system.base.service.IBdProductStorehouseAreaService;
|
||||
import com.hzs.system.base.service.IBdProductStorehouseService;
|
||||
import com.hzs.system.base.vo.BdProductStorehouseVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品绑定仓库表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-12
|
||||
*/
|
||||
@Service
|
||||
public class BdProductStorehouseServiceImpl extends ServiceImpl<BdProductStorehouseMapper, BdProductStorehouse> implements IBdProductStorehouseService {
|
||||
|
||||
@Autowired
|
||||
private IBdProductStorehouseAreaService ipsAreaService;
|
||||
/**
|
||||
* @description: 产品绑定仓库列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 11:31
|
||||
* @param: [productStorehouseVO]
|
||||
* @return: java.util.List<com.hzs.system.base.vo.BdProductStorehouseVO>
|
||||
**/
|
||||
@Override
|
||||
public List<BdProductStorehouseVO> getProductStorehouseList(BdProductStorehouseVO productStorehouseVO) {
|
||||
return baseMapper.getProductStorehouseList(productStorehouseVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增产品绑定仓库列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 14:15
|
||||
* @param: [productStorehouseVO]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public boolean insertProductStorehouse(BdProductStorehouseVO productStorehouseVO) {
|
||||
BdProductStorehouse bps= BeanUtil.copyProperties(productStorehouseVO, BdProductStorehouse.class);
|
||||
baseMapper.insert(bps);
|
||||
if(CollectionUtil.isNotEmpty(productStorehouseVO.getProvinceList())){
|
||||
//新增产品仓库绑定地区
|
||||
for(Integer i:productStorehouseVO.getProvinceList()){
|
||||
BdProductStorehouseArea bpsa=new BdProductStorehouseArea();
|
||||
bpsa.setPkProductStorehouse(bps.getPkId());
|
||||
bpsa.setProvince(i);
|
||||
bpsa.setCreationTime(productStorehouseVO.getCreationTime());
|
||||
bpsa.setPkCountry(productStorehouseVO.getPkCountry());
|
||||
bpsa.setPkCreator(productStorehouseVO.getPkCreator());
|
||||
ipsAreaService.save(bpsa);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增产品绑定仓库列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 14:15
|
||||
* @param: [productStorehouseVO]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean upProductStorehouseVO(BdProductStorehouseVO productStorehouseVO) {
|
||||
BdProductStorehouse bps= BeanUtil.copyProperties(productStorehouseVO, BdProductStorehouse.class);
|
||||
baseMapper.updateById(bps);
|
||||
if(CollectionUtil.isNotEmpty(productStorehouseVO.getProvinceList())){
|
||||
//删除之前绑定的地区
|
||||
UpdateWrapper<BdProductStorehouseArea> updateWrapper=new UpdateWrapper();
|
||||
updateWrapper.set("DEL_FLAG",EDelFlag.DELETE.getValue());
|
||||
updateWrapper.set("PK_MODIFIED",productStorehouseVO.getPkCreator());
|
||||
updateWrapper.set("MODIFIED_TIME",productStorehouseVO.getCreationTime());
|
||||
updateWrapper.eq("PK_PRODUCT_STOREHOUSE",bps.getPkId());
|
||||
ipsAreaService.update(updateWrapper);
|
||||
//新增产品仓库绑定地区
|
||||
for(Integer i:productStorehouseVO.getProvinceList()){
|
||||
BdProductStorehouseArea bpsa=new BdProductStorehouseArea();
|
||||
bpsa.setPkProductStorehouse(bps.getPkId());
|
||||
bpsa.setProvince(i);
|
||||
bpsa.setPkCreator(productStorehouseVO.getPkCreator());
|
||||
bpsa.setCreationTime(productStorehouseVO.getCreationTime());
|
||||
bpsa.setPkCountry(bps.getPkCountry());
|
||||
ipsAreaService.save(bpsa);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增产品绑定仓库列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/12 14:15
|
||||
* @param: [pkId]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean delBdStorehouse(Long pkId) {
|
||||
Date date=new Date();
|
||||
UpdateWrapper<BdProductStorehouse> 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", date);
|
||||
baseMapper.update(null,updateWrapper);
|
||||
//删除绑定的地区
|
||||
UpdateWrapper<BdProductStorehouseArea> updateWrapper1=new UpdateWrapper();
|
||||
updateWrapper1.set("DEL_FLAG",EDelFlag.DELETE.getValue());
|
||||
updateWrapper1.set("PK_MODIFIED",SecurityUtils.getUserId());
|
||||
updateWrapper1.set("MODIFIED_TIME",date);
|
||||
updateWrapper1.eq("PK_PRODUCT_STOREHOUSE",pkId);
|
||||
ipsAreaService.update(updateWrapper1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BdProductStorehouseExt> queryBdProductStorehouseByCondition(List<Integer> productId, Integer province) {
|
||||
return baseMapper.queryBdProductStorehouseByCondition(productId, province);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,12 +9,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 后台公告显示
|
||||
*
|
||||
* @Description:
|
||||
* @Author: ljc
|
||||
* @Time: 2023/4/25 16:11
|
||||
* @Classname: BdNoticeAdminShowVO
|
||||
* @Package_name: com.hzs.system.base.vo
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
|
|
|||
|
|
@ -15,11 +15,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 公告VO
|
||||
* @Author: ljc
|
||||
* @Time: 2023/2/3 11:24
|
||||
* @Classname: BdNoticeVO
|
||||
* @Package_name: com.hzs.system.base.vo
|
||||
* 公告VO
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.system.base.vo;
|
||||
|
||||
|
||||
import com.hzs.common.core.enums.EApprovalBusiness;
|
||||
import com.hzs.common.core.enums.EApproveRechargeStatus;
|
||||
import com.hzs.common.core.enums.ENoticeBusinessType;
|
||||
|
|
@ -13,13 +12,6 @@ import java.io.Serializable;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: ljc
|
||||
* @Time: 2023/4/4 16:30
|
||||
* @Classname: BdPlatformMessageDetailVO
|
||||
* @Package_name: com.hzs.system.base.vo
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
|
|
|
|||
|
|
@ -14,18 +14,13 @@ import java.util.Date;
|
|||
|
||||
/**
|
||||
* 后台站内信 VO
|
||||
*
|
||||
* @Description:
|
||||
* @Author: ljc
|
||||
* @Time: 2023/4/4 16:20
|
||||
* @Classname: BdPlatformMessageVO
|
||||
* @Package_name: com.hzs.system.base.vo
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BdPlatformMessageVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -636094618562659818L;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,73 +0,0 @@
|
|||
package com.hzs.system.base.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓库地区中间表VO
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-05
|
||||
*/
|
||||
@Data
|
||||
public class BdProductStorehouseAreaVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long pkId;
|
||||
|
||||
/**
|
||||
* 产品绑定仓库表主键
|
||||
*/
|
||||
private Long pkProductStorehouse;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private Integer province;
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private List<Integer> provinceList;
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private String provinceVal;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
private Integer delFlag;
|
||||
private Integer pkCountry;
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long pkCreator;
|
||||
/**
|
||||
* 修改人ID
|
||||
*/
|
||||
private Long pkModified;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifiedTime;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
package com.hzs.system.base.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品绑定仓库表VO
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-05
|
||||
*/
|
||||
@Data
|
||||
public class BdProductStorehouseVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long pkId;
|
||||
|
||||
/**
|
||||
* 仓库表主键
|
||||
*/
|
||||
private Integer pkStorehouse;
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
@Excel(name = "仓库名称")
|
||||
private String name;
|
||||
/**
|
||||
* 产品主键
|
||||
*/
|
||||
private Integer pkProduct;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@Excel(name = "产品编号")
|
||||
private String productCode;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
/**
|
||||
* 仓库编号
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 仓库地址
|
||||
*/
|
||||
private String wareAddress;
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
private Integer city;
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
private Integer county;
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
private String mobilePhone;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contacts;
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private String provinceval;
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
private String cityval;
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
private String countyval;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private Integer province;
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private List<Integer> provinceList;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
private Integer delFlag;
|
||||
private Integer pkCountry;
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long pkCreator;
|
||||
/**
|
||||
* 修改人ID
|
||||
*/
|
||||
private Long pkModified;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifiedTime;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String startDate;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private String endDate;
|
||||
/**
|
||||
* 绑定地区集合
|
||||
*/
|
||||
List<BdProductStorehouseAreaVO> samList;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,21 +1,14 @@
|
|||
package com.hzs.system.base.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import com.hzs.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 仓库地区中间表VO
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-05
|
||||
*/
|
||||
@Data
|
||||
public class BdStorehouseAreaMiddleVO {
|
||||
|
|
@ -48,7 +41,7 @@ public class BdStorehouseAreaMiddleVO {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
|
|
@ -70,6 +63,4 @@ public class BdStorehouseAreaMiddleVO {
|
|||
private Date modifiedTime;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,15 +9,10 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*仓库信息实体类VO
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-08-02
|
||||
* 仓库信息实体类VO
|
||||
*/
|
||||
@Data
|
||||
public class BdStorehouseVO {
|
||||
public class BdStorehouseVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
@ -43,7 +38,7 @@ public class BdStorehouseVO {
|
|||
* 绑定地区集合
|
||||
*/
|
||||
@Excel(name = "绑定地区")
|
||||
private String areaStr;
|
||||
private String areaStr;
|
||||
|
||||
@Excel(name = "省")
|
||||
private String provinceVal;
|
||||
|
|
@ -89,7 +84,7 @@ public class BdStorehouseVO {
|
|||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
|
|
@ -105,7 +100,6 @@ public class BdStorehouseVO {
|
|||
private Date modifiedTime;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
|
|
@ -132,7 +126,6 @@ public class BdStorehouseVO {
|
|||
private Date endDate;
|
||||
|
||||
|
||||
|
||||
private Integer pkCorp;
|
||||
/**
|
||||
* 库存类型 1 正常 2 不良品 EStorehouseType
|
||||
|
|
|
|||
|
|
@ -1,197 +0,0 @@
|
|||
package com.hzs.system.config.controller.manage;
|
||||
|
||||
|
||||
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.enums.*;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.core.utils.poi.ExcelUtil;
|
||||
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.config.BdPurpose;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.util.TransactionUtils;
|
||||
import com.hzs.system.config.service.IBdPurposeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 领用用途表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/bd-purpose")
|
||||
public class BdPurposeController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBdPurposeService iBdPurposeService;
|
||||
|
||||
/**
|
||||
* @description: 领用用途配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/22 10:51
|
||||
* @param: [purpose]
|
||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
||||
**/
|
||||
@Log(module = EOperationModule.BDPURPOSE_CONFIG,business = EOperationBusiness.BDPURPOSE_CONFIG, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BdPurpose purpose) {
|
||||
startPage();
|
||||
QueryWrapper<BdPurpose> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
if (StringUtils.isNotNull(purpose.getPurpose())) {
|
||||
queryWrapper.like("PURPOSE", purpose.getPurpose());
|
||||
}
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
List<BdPurpose> list = iBdPurposeService.list(queryWrapper);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 用途下拉选列表
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/23 14:25
|
||||
* @param: [purpose]
|
||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
||||
**/
|
||||
@Log(module = EOperationModule.BDPURPOSE_CONFIG,business = EOperationBusiness.BDPURPOSE_CONFIG, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/allList")
|
||||
public TableDataInfo allList(BdPurpose purpose) {
|
||||
QueryWrapper<BdPurpose> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
if (StringUtils.isNotNull(purpose.getPurpose())) {
|
||||
queryWrapper.like("PURPOSE", purpose.getPurpose());
|
||||
}
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
List<BdPurpose> list = iBdPurposeService.list(queryWrapper);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出领用用途配置
|
||||
* @author: zhang jing
|
||||
* @date: 2023/3/9 16:08
|
||||
* @param: [response, purpose]
|
||||
* @return: void
|
||||
**/
|
||||
@Log(module = EOperationModule.BDPURPOSE_CONFIG,business = EOperationBusiness.BDPURPOSE_CONFIG, method = EOperationMethod.SELECT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BdPurpose purpose) {
|
||||
QueryWrapper<BdPurpose> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||
if (StringUtils.isNotNull(purpose.getPurpose())) {
|
||||
queryWrapper.like("PURPOSE", purpose.getPurpose());
|
||||
}
|
||||
queryWrapper.orderByDesc("CREATION_TIME");
|
||||
List<BdPurpose> list = iBdPurposeService.list(queryWrapper);
|
||||
ExcelUtil<BdPurpose> util = new ExcelUtil<>(BdPurpose.class);
|
||||
util.exportExcel(response, list, "领用用途配置");
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增领用用途配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/22 10:51
|
||||
* @param: [purpose]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.BDPURPOSE_CONFIG,business = EOperationBusiness.BDPURPOSE_CONFIG, method = EOperationMethod.INSERT)
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(@RequestBody BdPurpose purpose) {
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
if (StringUtils.isEmpty(purpose.getPurpose())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.BD_PURPOSE_NOT_NULL));
|
||||
}
|
||||
QueryWrapper<BdPurpose> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY", pkCountry);
|
||||
if (StringUtils.isNotNull(purpose.getPurpose())) {
|
||||
queryWrapper.eq("PURPOSE", purpose.getPurpose());
|
||||
}
|
||||
List<BdPurpose> list = iBdPurposeService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.BD_PURPOSE_REPEAT));
|
||||
}
|
||||
purpose.setCreationTime(new Date());
|
||||
purpose.setPkCreator(SecurityUtils.getUserId());
|
||||
purpose.setPkCountry(pkCountry);
|
||||
return AjaxResult.success(iBdPurposeService.save(purpose));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description:修改领用用途配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/22 10:51
|
||||
* @param: [purpose]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.BDPURPOSE_CONFIG,business = EOperationBusiness.BDPURPOSE_CONFIG, method = EOperationMethod.UPDATE)
|
||||
@PostMapping("/update")
|
||||
public AjaxResult update(@RequestBody BdPurpose purpose) {
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
if (StringUtils.isEmpty(purpose.getPurpose())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.BD_PURPOSE_NOT_NULL));
|
||||
}
|
||||
QueryWrapper<BdPurpose> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("PK_COUNTRY", pkCountry);
|
||||
if (StringUtils.isNotNull(purpose.getPurpose())) {
|
||||
queryWrapper.eq("PURPOSE", purpose.getPurpose());
|
||||
queryWrapper.ne("PK_ID",purpose.getPkId());
|
||||
}
|
||||
List<BdPurpose> list = iBdPurposeService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.BD_PURPOSE_REPEAT));
|
||||
}
|
||||
purpose.setCreationTime(new Date());
|
||||
purpose.setPkCreator(SecurityUtils.getUserId());
|
||||
purpose.setPkCountry(pkCountry);
|
||||
return toAjax(iBdPurposeService.updateById(purpose));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改领用用途配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/22 10:51
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.BDPURPOSE_CONFIG,business = EOperationBusiness.BDPURPOSE_CONFIG, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/getOne/{pkId}")
|
||||
public AjaxResult getOne(@PathVariable Long pkId) {
|
||||
BdPurpose purpose = iBdPurposeService.getById(pkId);
|
||||
return AjaxResult.success(purpose);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 删除领用用途配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/4/22 10:52
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
||||
**/
|
||||
@Log(module = EOperationModule.BDPURPOSE_CONFIG,business = EOperationBusiness.BDPURPOSE_CONFIG, method = EOperationMethod.DELETE)
|
||||
@DeleteMapping("/{pkId}")
|
||||
public AjaxResult delete(@PathVariable Long pkId) {
|
||||
UpdateWrapper<BdPurpose> 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());
|
||||
return toAjax(iBdPurposeService.update(updateWrapper));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +1,13 @@
|
|||
package com.hzs.system.config.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.system.config.BdAwards;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
public interface BdAwardsMapper extends BaseMapper<BdAwards> {
|
||||
|
||||
/**
|
||||
* @description: 查询等级或奖衔是否被使用
|
||||
* @author: zhang jing
|
||||
* @date: 2023/3/2 17:37
|
||||
* @param: [pkRegisterGrade, pkSettleGrade, pkAwards]
|
||||
* @return: java.lang.Integer
|
||||
* 查询等级或奖衔是否被使用
|
||||
**/
|
||||
Integer checkGradeAwards(@Param("pkRegisterGrade") Long pkRegisterGrade,
|
||||
@Param("pkSettleGrade") Long pkSettleGrade,
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@ import java.math.BigDecimal;
|
|||
|
||||
/**
|
||||
* 等级配置表 Mapper 接口
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
public interface BdGradeMapper extends BaseMapper<BdGrade> {
|
||||
|
||||
|
|
|
|||
|
|
@ -8,18 +8,11 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 等级范围 Mapper 接口
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-10-24
|
||||
*/
|
||||
public interface BdGradeScopeMapper extends BaseMapper<BdGradeScope> {
|
||||
|
||||
/**
|
||||
* @description: 查询等级范围配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/25 10:34
|
||||
* @param: [gradeScopeParam]
|
||||
* @return: java.util.List<com.hzs.system.config.param.BdGradeScopeParam>
|
||||
* 查询等级范围配置列表
|
||||
**/
|
||||
List<BdGradeScopeExt> selectGradeScopeList(BdGradeScopeExt gradeScopeExt);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
package com.hzs.system.config.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.system.config.BdPurpose;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 领用用途表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-22
|
||||
*/
|
||||
public interface BdPurposeMapper extends BaseMapper<BdPurpose> {
|
||||
|
||||
}
|
||||
|
|
@ -4,12 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
import com.hzs.common.domain.system.config.BdRangeAwards;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 极差奖衔配置表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-15
|
||||
*/
|
||||
public interface BdRangeAwardsMapper extends BaseMapper<BdRangeAwards> {
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 体系配置 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-10-31
|
||||
*/
|
||||
public interface BdVertexMapper extends BaseMapper<BdVertex> {
|
||||
|
||||
|
|
@ -33,12 +30,9 @@ public interface BdVertexMapper extends BaseMapper<BdVertex> {
|
|||
*/
|
||||
List<BdVertex> queryListByUserId(@Param("userId") Long userId);
|
||||
|
||||
/*
|
||||
* @description: 更新所属体系
|
||||
* @author: sui q
|
||||
* @date: 2023/4/25 10:52
|
||||
* @param: null null
|
||||
**/
|
||||
/**
|
||||
* 更新所属体系
|
||||
*/
|
||||
void updateBdVertexById(@Param("pkMember") Long pkMember, @Param("pkVertex") Integer pkVertex);
|
||||
|
||||
/**
|
||||
|
|
@ -52,12 +46,9 @@ public interface BdVertexMapper extends BaseMapper<BdVertex> {
|
|||
@Param("pkVertex") Integer pkVertex,
|
||||
@Param("pkCountry") Integer pkCountry);
|
||||
|
||||
/*
|
||||
* @description: 更新所属体系
|
||||
* @author: sui q
|
||||
* @date: 2023/4/25 10:52
|
||||
* @param: null null
|
||||
**/
|
||||
/**
|
||||
* 更新所属体系
|
||||
*/
|
||||
void updateBdVertexNullById(@Param("pkVertex") Integer pkVertex);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.system.config.BdAwards;
|
||||
import com.hzs.common.domain.system.config.BdRangeAwards;
|
||||
import com.hzs.common.domain.system.config.ext.BdAwardsExt;
|
||||
import com.hzs.system.config.IAwardsServiceApi;
|
||||
import com.hzs.system.config.service.IBdAwardsService;
|
||||
import com.hzs.system.config.service.IBdRangeAwardsService;
|
||||
|
|
@ -23,13 +22,6 @@ public class AwardsServiceProvider implements IAwardsServiceApi {
|
|||
@Autowired
|
||||
private IBdRangeAwardsService iBdRangeAwardsService;
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询奖衔配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/29 15:17
|
||||
* @param: [pkCountry]
|
||||
* @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.common.domain.system.config.BdAwards>>
|
||||
**/
|
||||
@Override
|
||||
public R<List<BdAwards>> queryAwards(Integer pkCountry) {
|
||||
return R.ok(iBdAwardsService.queryAwards(pkCountry));
|
||||
|
|
@ -40,25 +32,11 @@ public class AwardsServiceProvider implements IAwardsServiceApi {
|
|||
return R.ok(iBdRangeAwardsService.queryRangeAwards());
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据pkID查询奖衔信息
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/10 11:52
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.domain.R<com.hzs.common.domain.system.config.BdAwards>
|
||||
**/
|
||||
@Override
|
||||
public R<BdAwards> getAwardsOne(Integer pkId) {
|
||||
return R.ok(BeanUtil.copyProperties(iBdAwardsService.getBdAwardsOne(pkId), BdAwards.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询奖衔配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/11 14:17
|
||||
* @param: [pkCountrySet]
|
||||
* @return: com.hzs.common.core.domain.R<java.util.Map < java.lang.Integer, java.util.List < com.hzs.common.domain.system.config.BdAwards>>>
|
||||
**/
|
||||
@Override
|
||||
public R<Map<String, BdAwards>> getAwards() {
|
||||
List<BdAwards> awardsList = iBdAwardsService.queryAwards();
|
||||
|
|
@ -70,24 +48,6 @@ public class AwardsServiceProvider implements IAwardsServiceApi {
|
|||
return R.ok(countryAwardsMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询辅导分红列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/11 14:16
|
||||
* @param: [pkCountry]
|
||||
* @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.common.domain.system.config.ext.BdAwardsExt>>
|
||||
**/
|
||||
@Override
|
||||
public R<List<BdAwardsExt>> coachBonusList(Integer pkCountry) {
|
||||
return R.ok(iBdAwardsService.coachBonusList(pkCountry));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据所属国家查询奖衔
|
||||
*
|
||||
* @param pkCountry
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<List<BdAwards>> queryByPkCountryAwards(Integer pkCountry) {
|
||||
return R.ok(iBdAwardsService.queryByPkCountryAwards(pkCountry));
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.hzs.system.config.provider;
|
|||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.system.config.BdAwards;
|
||||
import com.hzs.common.domain.system.config.BdGrade;
|
||||
import com.hzs.common.domain.system.ext.BdGradeScopeExt;
|
||||
import com.hzs.system.config.IGradeServiceApi;
|
||||
|
|
@ -17,11 +16,7 @@ import java.math.BigDecimal;
|
|||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 等级的dubbo服务类
|
||||
* @Author: sui q
|
||||
* @Time: 2022/9/9 14:11
|
||||
* @Classname: GradeServiceProvider
|
||||
* @PackageName: com.hzs.system.config.provider
|
||||
* 等级的dubbo服务类
|
||||
*/
|
||||
@DubboService
|
||||
public class GradeServiceProvider implements IGradeServiceApi {
|
||||
|
|
@ -31,13 +26,6 @@ public class GradeServiceProvider implements IGradeServiceApi {
|
|||
@Autowired
|
||||
private IBdGradeScopeService iBdGradeScopeService;
|
||||
|
||||
/**
|
||||
* @description: 查询等级配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/28 15:18
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.core.domain.R<com.hzs.system.config.dto.GradeDTO>
|
||||
**/
|
||||
@Override
|
||||
public R<GradeDTO> getGrade(Integer pkId) {
|
||||
return R.ok(BeanUtil.copyProperties(iBdGradeService.getBdGrade(pkId), GradeDTO.class));
|
||||
|
|
@ -48,13 +36,6 @@ public class GradeServiceProvider implements IGradeServiceApi {
|
|||
return R.ok(BeanUtil.copyProperties(iBdGradeService.getGradeByGradeValue(gradeValue, pkCountry), GradeDTO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询等级配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/28 15:18
|
||||
* @param: [pkCountry]
|
||||
* @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.system.config.dto.GradeDTO>>
|
||||
**/
|
||||
@Override
|
||||
public R<List<GradeDTO>> queryGradeConfigByCondition(Integer pkCountry) {
|
||||
List<BdGrade> gradeList = iBdGradeService.queryGradeConfigByCondition(pkCountry);
|
||||
|
|
@ -99,14 +80,6 @@ public class GradeServiceProvider implements IGradeServiceApi {
|
|||
return R.ok(gradeDtoMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据国家查询全部等级配置
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return: R<List < AreaCurrencyDTO>>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/6 10:37
|
||||
*/
|
||||
@Override
|
||||
public R<List<GradeDTO>> queryGradeList(Integer pkCountry) {
|
||||
List<BdGrade> gradeList = iBdGradeService.queryGradeConfigByCondition(pkCountry);
|
||||
|
|
@ -126,12 +99,6 @@ public class GradeServiceProvider implements IGradeServiceApi {
|
|||
return R.ok(gradeDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部等级列表数据
|
||||
*
|
||||
* @param pkCountry
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<List<GradeDTO>> selectGradeAll(Integer pkCountry) {
|
||||
List<BdGrade> gradeList = iBdGradeService.selectGradeAll(pkCountry);
|
||||
|
|
@ -140,24 +107,11 @@ public class GradeServiceProvider implements IGradeServiceApi {
|
|||
return R.ok(gradeDTOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据国家查询等级配置列表
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return: R<List < AreaCurrencyDTO>>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/6 10:37
|
||||
*/
|
||||
@Override
|
||||
public R<List<BdGrade>> queryGrowUpFootmarkGrade(Integer pkCountry) {
|
||||
return R.ok(iBdGradeService.queryGrowUpFootmarkGrade(pkCountry));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部的等级
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<List<GradeDTO>> findAll() {
|
||||
List<BdGrade> gradeList = iBdGradeService.list();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.hzs.system.config.provider;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.vertex.BdVertex;
|
||||
|
||||
|
|
@ -15,24 +15,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2022/11/16 15:58
|
||||
* @Classname: IVertexServiceProvider
|
||||
* @PackageName: com.hzs.sale.vertex.provider
|
||||
*/
|
||||
@DubboService
|
||||
public class IVertexServiceProvider implements IVertexServiceApi {
|
||||
|
||||
@Autowired
|
||||
private IBdVertexService vertexService;
|
||||
|
||||
/**
|
||||
* 查询所有体系配置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<List<VertexDTO>> findAll() {
|
||||
List<BdVertex> list = vertexService.list();
|
||||
|
|
@ -44,15 +32,10 @@ public class IVertexServiceProvider implements IVertexServiceApi {
|
|||
return R.ok(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有体系配置(根据国家)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<List<VertexDTO>> findAllByPkCountry(Integer pkCountry) {
|
||||
QueryWrapper<BdVertex> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_COUNTRY", pkCountry);
|
||||
LambdaQueryWrapper<BdVertex> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdVertex::getPkCountry, pkCountry);
|
||||
List<BdVertex> list = vertexService.list(queryWrapper);
|
||||
List<VertexDTO> resultList = new ArrayList<>();
|
||||
for (BdVertex bdVertex : list) {
|
||||
|
|
|
|||
|
|
@ -8,28 +8,16 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 服务类
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
public interface IBdAwardsService extends IService<BdAwards> {
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询奖衔配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/29 15:15
|
||||
* @param: [pkCountry]
|
||||
* @return: java.util.List<com.hzs.common.domain.system.config.BdAwards>
|
||||
* 根据国家查询奖衔配置列表
|
||||
**/
|
||||
List<BdAwards> queryAwards(Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 根据pkID查询奖衔信息
|
||||
*
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/10 11:52
|
||||
* @param: [pkId] 奖衔主键
|
||||
* @return: com.hzs.common.domain.system.config.BdAwards
|
||||
**/
|
||||
BdAwards getBdAwardsOne(Integer pkId);
|
||||
|
||||
|
|
@ -43,65 +31,32 @@ public interface IBdAwardsService extends IService<BdAwards> {
|
|||
List<BdAwards> getBdAwards(Integer pkCountry, Integer enableState);
|
||||
|
||||
/**
|
||||
* @description: 生成奖衔
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/22 9:55
|
||||
* @param: [awards]
|
||||
* @return: boolean
|
||||
* 生成奖衔
|
||||
**/
|
||||
boolean generate(BdAwards awards);
|
||||
|
||||
/**
|
||||
* @description: 修改辅导分红配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/1 10:50
|
||||
* @param: [awardsExt]
|
||||
* @return: boolean
|
||||
* 修改辅导分红配置
|
||||
**/
|
||||
boolean updateAwards(BdAwardsExt awardsExt);
|
||||
|
||||
/**
|
||||
* @description: 修改环球积分
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/2 9:46
|
||||
* @param: [awardsExt]
|
||||
* @return: boolean
|
||||
* 修改环球积分
|
||||
**/
|
||||
boolean updateLobalIntegral(BdAwardsExt awardsExt);
|
||||
|
||||
/**
|
||||
* @description: 修改车奖积分
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/2 9:46
|
||||
* @param: [awardsExt]
|
||||
* @return: boolean
|
||||
* 修改车奖积分
|
||||
**/
|
||||
boolean updateGlobalIntegral(BdAwardsExt awardsExt);
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询辅导分红列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/11 9:45
|
||||
* @param: [pkCountry]
|
||||
* @return: java.util.List<com.hzs.common.domain.system.config.ext.BdAwardsExt>
|
||||
**/
|
||||
List<BdAwardsExt> coachBonusList(Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 查询所有奖衔
|
||||
*
|
||||
* @return: List<BdAwards>
|
||||
* @Author: sui q
|
||||
* @Date: 2023/2/21 15:46
|
||||
*/
|
||||
List<BdAwards> queryAwards();
|
||||
|
||||
/**
|
||||
* @description: 查询等级或奖衔是否被使用
|
||||
* @author: zhang jing
|
||||
* @date: 2023/3/2 17:36
|
||||
* @param: [pkRegisterGrade, pkSettleGrade, pkAwards]
|
||||
* @return: java.lang.Integer
|
||||
* 查询等级或奖衔是否被使用
|
||||
**/
|
||||
Integer checkGradeAwards(Long pkRegisterGrade,
|
||||
Long pkSettleGrade,
|
||||
|
|
|
|||
|
|
@ -8,18 +8,11 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 等级范围 服务类
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-10-24
|
||||
*/
|
||||
public interface IBdGradeScopeService extends IService<BdGradeScope> {
|
||||
|
||||
/**
|
||||
* @description: 查询等级范围配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/25 10:42
|
||||
* @param: [gradeScopeParam]
|
||||
* @return: java.util.List<com.hzs.system.config.param.BdGradeScopeParam>
|
||||
* 查询等级范围配置列表
|
||||
**/
|
||||
List<BdGradeScopeExt> selectGradeScopeList(BdGradeScopeExt gradeScopeExt);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 等级配置表 服务类
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
public interface IBdGradeService extends IService<BdGrade> {
|
||||
|
||||
|
|
@ -19,72 +16,43 @@ public interface IBdGradeService extends IService<BdGrade> {
|
|||
* 获取等级
|
||||
*
|
||||
* @param pkId 主键
|
||||
* @return: R<GradeDTO>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/24 17:57
|
||||
*/
|
||||
BdGrade getBdGrade(Integer pkId);
|
||||
|
||||
/*
|
||||
* @description: 根据等级值获得等级
|
||||
* @author: sui q
|
||||
* @date: 2023/4/23 19:21
|
||||
* @param: null null
|
||||
**/
|
||||
/**
|
||||
* 根据等级值获得等级
|
||||
*/
|
||||
BdGrade getGradeByGradeValue(Integer gradeValue, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 根据国家查询等级配置列表
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return: R<List < AreaCurrencyDTO>>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/6 10:37
|
||||
*/
|
||||
List<BdGrade> queryGradeConfigByCondition(Integer pkCountry);
|
||||
|
||||
/**
|
||||
* @description: 生成等级配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/18 16:42
|
||||
* @param: [grade]
|
||||
* @return: boolean
|
||||
* 生成等级配置
|
||||
**/
|
||||
boolean generate(BdGrade grade);
|
||||
|
||||
/**
|
||||
* @description: 新增等级配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/26 11:57
|
||||
* @param: [grade]
|
||||
* @return: boolean
|
||||
* 新增等级配置
|
||||
**/
|
||||
boolean saveBdGrade(BdGradeExt gradeExt);
|
||||
|
||||
/**
|
||||
* @description: 修改等级配置+新增等级范围
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/26 14:28
|
||||
* @param: [gradeExt]
|
||||
* @return: boolean
|
||||
* 修改等级配置+新增等级范围
|
||||
**/
|
||||
boolean updateBdGrade(BdGradeExt gradeExt);
|
||||
|
||||
/**
|
||||
* @description: 修改拓展信息
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/31 16:47
|
||||
* @param: [gradeExt]
|
||||
* @return: boolean
|
||||
* 修改拓展信息
|
||||
**/
|
||||
boolean updateExpand(BdGradeExt gradeExt);
|
||||
|
||||
/**
|
||||
* 查询所有国家的等级配置
|
||||
*
|
||||
* @return: List<BdGrade>
|
||||
* @Author: sui q
|
||||
* @Date: 2023/2/21 15:32
|
||||
*/
|
||||
List<BdGrade> queryBdGrade();
|
||||
|
||||
|
|
@ -109,9 +77,6 @@ public interface IBdGradeService extends IService<BdGrade> {
|
|||
* 根据国家查询等级配置列表
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return: R<List < AreaCurrencyDTO>>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/6 10:37
|
||||
*/
|
||||
List<BdGrade> queryGrowUpFootmarkGrade(Integer pkCountry);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
package com.hzs.system.config.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.system.config.BdPurpose;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 领用用途表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-22
|
||||
*/
|
||||
public interface IBdPurposeService extends IService<BdPurpose> {
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +1,14 @@
|
|||
package com.hzs.system.config.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.system.config.BdRangeAwards;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 极差奖衔配置表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-15
|
||||
*/
|
||||
public interface IBdRangeAwardsService extends IService<BdRangeAwards> {
|
||||
|
||||
/*
|
||||
* @description:
|
||||
* @author: sui q
|
||||
* @date: 2024/10/15 16:45
|
||||
* @param: null null
|
||||
**/
|
||||
List<BdRangeAwards> queryRangeAwards();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 办理业务手续费配置主表 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-01-03
|
||||
*/
|
||||
public interface IBdServiceChargeService extends IService<BdServiceCharge> {
|
||||
|
||||
|
|
@ -46,10 +43,7 @@ public interface IBdServiceChargeService extends IService<BdServiceCharge> {
|
|||
|
||||
/**
|
||||
* 根据业务类型查询扣款
|
||||
*
|
||||
* @param serviceChargeDTO
|
||||
* @return
|
||||
*/
|
||||
**/
|
||||
ServiceChargeDTO getServiceChargeByType(ServiceChargeDTO serviceChargeDTO);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,9 +11,6 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* 体系配置 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-10-31
|
||||
*/
|
||||
public interface IBdVertexService extends IService<BdVertex> {
|
||||
|
||||
|
|
@ -48,12 +45,9 @@ public interface IBdVertexService extends IService<BdVertex> {
|
|||
*/
|
||||
List<BdVertex> queryListByUserId(Long userId);
|
||||
|
||||
/*
|
||||
* @description: 根据主键更新所属体系
|
||||
* @author: sui q
|
||||
* @date: 2023/4/25 10:47
|
||||
* @param: null null
|
||||
**/
|
||||
/**
|
||||
* 根据主键更新所属体系
|
||||
*/
|
||||
void updateBdVertexById(Integer pkVertex);
|
||||
|
||||
/**
|
||||
|
|
@ -75,7 +69,7 @@ public interface IBdVertexService extends IService<BdVertex> {
|
|||
/**
|
||||
* 查询刷新体系数据
|
||||
*
|
||||
* @param pkCountry 所属国家
|
||||
* @param pkCountry 所属国家
|
||||
* @return
|
||||
*/
|
||||
void flushAllVertex(Integer pkCountry);
|
||||
|
|
|
|||
|
|
@ -20,15 +20,11 @@ import org.apache.dubbo.config.annotation.DubboReference;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 奖衔配置服务实现类
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
@Service
|
||||
public class BdAwardsServiceImpl extends ServiceImpl<BdAwardsMapper, BdAwards> implements IBdAwardsService {
|
||||
|
|
@ -40,26 +36,10 @@ public class BdAwardsServiceImpl extends ServiceImpl<BdAwardsMapper, BdAwards> i
|
|||
ITransactionServiceApi iTransactionServiceApi;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询奖衔配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/29 15:10
|
||||
* @param: [pkCountry]
|
||||
* @return: java.util.List<com.hzs.common.domain.system.config.BdAwards>
|
||||
**/
|
||||
@Override
|
||||
public List<BdAwards> queryAwards(Integer pkCountry) {
|
||||
return getBdAwards(pkCountry, EnableStatus.ENABLE.getValue());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 根据pkID查询奖衔信息
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/10 11:51
|
||||
* @param: [pkId]
|
||||
* @return: com.hzs.common.domain.system.config.BdAwards
|
||||
**/
|
||||
@Override
|
||||
public BdAwards getBdAwardsOne(Integer pkId) {
|
||||
LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
|
@ -67,13 +47,6 @@ public class BdAwardsServiceImpl extends ServiceImpl<BdAwardsMapper, BdAwards> i
|
|||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询奖衔配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/10 16:59
|
||||
* @param: [pkCountry, enableState]
|
||||
* @return: java.util.List<com.hzs.common.domain.system.config.BdAwards>
|
||||
**/
|
||||
@Override
|
||||
public List<BdAwards> getBdAwards(Integer pkCountry, Integer enableState) {
|
||||
LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
|
@ -87,13 +60,6 @@ public class BdAwardsServiceImpl extends ServiceImpl<BdAwardsMapper, BdAwards> i
|
|||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 生成奖衔
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/22 9:58
|
||||
* @param: [awards]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
public boolean generate(BdAwards awards) {
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
|
|
@ -118,13 +84,6 @@ public class BdAwardsServiceImpl extends ServiceImpl<BdAwardsMapper, BdAwards> i
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改辅导分红配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/1 10:49
|
||||
* @param: [awardsExt]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
public boolean updateAwards(BdAwardsExt awardsExt) {
|
||||
for (BdAwards awards : awardsExt.getAwardsList()) {
|
||||
|
|
@ -133,13 +92,6 @@ public class BdAwardsServiceImpl extends ServiceImpl<BdAwardsMapper, BdAwards> i
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改环球积分
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/2 9:48
|
||||
* @param: [awardsExt]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
public boolean updateLobalIntegral(BdAwardsExt awardsExt) {
|
||||
for (BdAwards awards : awardsExt.getLobalIntegralList()) {
|
||||
|
|
@ -148,13 +100,6 @@ public class BdAwardsServiceImpl extends ServiceImpl<BdAwardsMapper, BdAwards> i
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改车奖积分
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/2 9:48
|
||||
* @param: [awardsExt]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
public boolean updateGlobalIntegral(BdAwardsExt awardsExt) {
|
||||
for (BdAwards awards : awardsExt.getCarAwardPointsList()) {
|
||||
|
|
@ -163,64 +108,17 @@ public class BdAwardsServiceImpl extends ServiceImpl<BdAwardsMapper, BdAwards> i
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询辅导分红列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/11/11 9:47
|
||||
* @param: [pkCountry]
|
||||
* @return: java.util.List<com.hzs.common.domain.system.config.ext.BdAwardsExt>
|
||||
**/
|
||||
@Override
|
||||
public List<BdAwardsExt> coachBonusList(Integer pkCountry) {
|
||||
List<BdAwardsExt> listExt = redisService.getCacheList(CacheConstants.BD_AWARDS_COACH + pkCountry);
|
||||
List<BdAwardsExt> listExtNew = new ArrayList<>();
|
||||
if (CollectionUtil.isEmpty(listExt)) {
|
||||
LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdAwards::getPkCountry, SecurityUtils.getPkCountry());
|
||||
queryWrapper.orderByAsc(BdAwards::getAwardsValue);
|
||||
List<BdAwards> list = baseMapper.selectList(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
for (BdAwards ba : list) {
|
||||
BdAwardsExt baExt = new BdAwardsExt();
|
||||
baExt.setPkId(ba.getPkId());
|
||||
baExt.setAwardsName(ba.getAwardsName());
|
||||
baExt.setCoachAlgebra(ba.getCoachAlgebra());
|
||||
baExt.setCoachRatio(ba.getCoachRatio());
|
||||
baExt.setAbonusRatio(ba.getAbonusRatio());
|
||||
listExtNew.add(baExt);
|
||||
}
|
||||
redisService.setCacheList(CacheConstants.BD_AWARDS_COACH + pkCountry, listExtNew);
|
||||
}
|
||||
return listExtNew;
|
||||
} else {
|
||||
return listExt;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BdAwards> queryAwards() {
|
||||
LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询等级或奖衔是否被使用
|
||||
* @author: zhang jing
|
||||
* @date: 2023/3/2 17:37
|
||||
* @param: [pkRegisterGrade, pkSettleGrade, pkAwards]
|
||||
* @return: java.lang.Integer
|
||||
**/
|
||||
@Override
|
||||
public Integer checkGradeAwards(Long pkRegisterGrade, Long pkSettleGrade, Long pkAwards) {
|
||||
return baseMapper.checkGradeAwards(pkRegisterGrade, pkSettleGrade, pkAwards);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据所属国家查询奖衔
|
||||
*
|
||||
* @param pkCountry
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<BdAwards> queryByPkCountryAwards(Integer pkCountry) {
|
||||
LambdaQueryWrapper<BdAwards> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
|
|
|||
|
|
@ -10,10 +10,7 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 奖金4—N配置 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-10-31
|
||||
* 奖金4—N配置服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class BdBonusExpandServiceImpl extends ServiceImpl<BdBonusExpandMapper, BdBonusExpand> implements IBdBonusExpandService {
|
||||
|
|
|
|||
|
|
@ -11,20 +11,10 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 等级范围 服务实现类
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-10-24
|
||||
*/
|
||||
@Service
|
||||
public class BdGradeScopeServiceImpl extends ServiceImpl<BdGradeScopeMapper, BdGradeScope> implements IBdGradeScopeService {
|
||||
|
||||
/**
|
||||
* @description: 查询等级范围配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/25 10:34
|
||||
* @param: [gradeScopeParam]
|
||||
* @return: java.util.List<com.hzs.system.config.param.BdGradeScopeParam>
|
||||
**/
|
||||
@Override
|
||||
public List<BdGradeScopeExt> selectGradeScopeList(BdGradeScopeExt gradeScopeExt) {
|
||||
return baseMapper.selectGradeScopeList(gradeScopeExt);
|
||||
|
|
|
|||
|
|
@ -31,9 +31,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 等级配置表 服务实现类
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-09-08
|
||||
*/
|
||||
@Service
|
||||
public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> implements IBdGradeService {
|
||||
|
|
@ -81,13 +78,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
|
|||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 生成等级配置
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/18 16:43
|
||||
* @param: [grade]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean generate(BdGrade grade) {
|
||||
|
|
@ -113,13 +103,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增等级配置+增加等级(推荐)范围
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/26 11:58
|
||||
* @param: [gradeExt]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
public boolean saveBdGrade(BdGradeExt gradeExt) {
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
|
|
@ -149,13 +132,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改等级配置+增加等级(推荐)范围
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/26 14:00
|
||||
* @param: [gradeExt]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean updateBdGrade(BdGradeExt gradeExt) {
|
||||
|
|
@ -190,13 +166,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改拓展信息
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/31 16:46
|
||||
* @param: [gradeExt]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean updateExpand(BdGradeExt gradeExt) {
|
||||
|
|
@ -230,14 +199,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
|
|||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 删除等级配置
|
||||
* @author: zhang jing
|
||||
* @date: 2023/4/22 14:30
|
||||
* @param: [pkId]
|
||||
* @return: boolean
|
||||
**/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public boolean updateGrade(Long pkId, Long userId) {
|
||||
|
|
@ -257,12 +218,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部等级列表数据
|
||||
*
|
||||
* @param pkCountry
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<BdGrade> selectGradeAll(Integer pkCountry) {
|
||||
LambdaQueryWrapper<BdGrade> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
|
@ -274,14 +229,6 @@ public class BdGradeServiceImpl extends ServiceImpl<BdGradeMapper, BdGrade> impl
|
|||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据国家查询等级配置列表
|
||||
*
|
||||
* @param pkCountry 国家
|
||||
* @return: R<List < AreaCurrencyDTO>>
|
||||
* @Author: sui q
|
||||
* @Date: 2022/9/6 10:37
|
||||
*/
|
||||
@Override
|
||||
public List<BdGrade> queryGrowUpFootmarkGrade(Integer pkCountry) {
|
||||
LambdaQueryWrapper<BdGrade> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
package com.hzs.system.config.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.system.config.BdPurpose;
|
||||
import com.hzs.system.config.mapper.BdPurposeMapper;
|
||||
import com.hzs.system.config.service.IBdPurposeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 领用用途表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2024-04-22
|
||||
*/
|
||||
@Service
|
||||
public class BdPurposeServiceImpl extends ServiceImpl<BdPurposeMapper, BdPurpose> implements IBdPurposeService {
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
package com.hzs.system.config.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.constant.SystemFieldConstants;
|
||||
import com.hzs.common.core.enums.ERangeAwards;
|
||||
import com.hzs.common.domain.system.config.BdRangeAwards;
|
||||
import com.hzs.system.config.mapper.BdRangeAwardsMapper;
|
||||
|
|
@ -12,21 +11,16 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 极差奖衔配置表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-10-15
|
||||
*/
|
||||
@Service
|
||||
public class BdRangeAwardsServiceImpl extends ServiceImpl<BdRangeAwardsMapper, BdRangeAwards> implements IBdRangeAwardsService {
|
||||
|
||||
@Override
|
||||
public List<BdRangeAwards> queryRangeAwards() {
|
||||
QueryWrapper<BdRangeAwards> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.gt("AWARDS_VALUE", ERangeAwards.S0.getValue());
|
||||
queryWrapper.orderByAsc("AWARDS_VALUE");
|
||||
LambdaQueryWrapper<BdRangeAwards> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.gt(BdRangeAwards::getAwardsValue, ERangeAwards.S0.getValue());
|
||||
queryWrapper.orderByAsc(BdRangeAwards::getAwardsValue);
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,25 +17,15 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* 体系配置 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-10-31
|
||||
*/
|
||||
@Service
|
||||
public class BdVertexServiceImpl extends ServiceImpl<BdVertexMapper, BdVertex> implements IBdVertexService {
|
||||
|
||||
/**
|
||||
* 根据id查询体系配置
|
||||
*
|
||||
* @param pkId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public BdVertex getVertex(Integer pkId) {
|
||||
return baseMapper.selectById(pkId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<Integer, BdVertex> getAllVertexMap() {
|
||||
Map<Integer, BdVertex> resultMap = new HashMap<>();
|
||||
|
|
@ -48,12 +38,6 @@ public class BdVertexServiceImpl extends ServiceImpl<BdVertexMapper, BdVertex> i
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询体系配置
|
||||
*
|
||||
* @param vertexParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<VertexVo> selectByList(VertexParam vertexParam) {
|
||||
return baseMapper.selectByList(vertexParam);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue