## 商品上下架定时任务调整开放;

This commit is contained in:
cabbage 2025-05-20 15:26:11 +08:00
parent d122f15ba8
commit 0aec969d2c
15 changed files with 193 additions and 469 deletions

View File

@ -5,11 +5,7 @@ import com.hzs.common.core.domain.R;
import java.util.Date;
/**
* @Description: 商品对外提供接口
* @Author: sui q
* @Time: 2022/9/15 15:04
* @Classname: IWaresServiceApi
* @PackageName: com.hzs.sale.wares
* 商品对外提供接口
*/
public interface IWaresServiceApi {
@ -29,11 +25,7 @@ public interface IWaresServiceApi {
void updateByAutoStartAndAutoStart(Date currentTime);
/**
* @description: 修改商品预售状态
* @author: zhang jing
* @date: 2024/10/24 16:09
* @param: []
* @return: void
* 修改商品预售状态
**/
void waresPreSale();

View File

@ -31,19 +31,16 @@ import java.util.*;
/**
* 会员账户详情 前端控制器
*
* @author hzs
* @since 2022-10-31
*/
@RestController
@RequestMapping("/manager/account-detail")
public class CuMemberAccountDetailController extends BaseController {
@Autowired
private ICuMemberAccountDetailService memberAccountDetailService;
private ICuMemberAccountDetailService iCuMemberAccountDetailService;
@Autowired
private ICuMemberBaseService baseService;
private ICuMemberBaseService iCuMemberBaseService;
/**
* 余额汇总
@ -62,7 +59,7 @@ public class CuMemberAccountDetailController extends BaseController {
String endDate = accountDetailVO.getEndDate();
if (StringUtils.isNotEmpty(startDate) && StringUtils.isNotEmpty(endDate)) {
startPage();
Object[] objects = memberAccountDetailService.findAccountDetailList(accountDetailVO);
Object[] objects = iCuMemberAccountDetailService.findAccountDetailList(accountDetailVO);
//处理分页
tableDataInfo = getDataTable((List<CuMemberAccountDetail>) objects[0]);
tableDataInfo.setRows((List<CuMemberAccountDetailVO>) objects[1]);
@ -87,9 +84,9 @@ public class CuMemberAccountDetailController extends BaseController {
String startDate = accountDetailVO.getStartDate();
String endDate = accountDetailVO.getEndDate();
if (StringUtils.isNotEmpty(startDate) && StringUtils.isNotEmpty(endDate)) {
List<BdAccount> bdAccounts = baseService.getAccountByCountryId(SecurityUtils.getPkCountry());
List<BdAccount> bdAccounts = iCuMemberBaseService.getAccountByCountryId(SecurityUtils.getPkCountry());
ExcelUtil<CuMemberAccountDetailVO> util = new ExcelUtil<>(CuMemberAccountDetailVO.class, getListShowField(bdAccounts));
List<CuMemberAccountDetailVO> memberAccountDetailVOList = (List<CuMemberAccountDetailVO>) memberAccountDetailService.findAccountDetailList(accountDetailVO)[1];
List<CuMemberAccountDetailVO> memberAccountDetailVOList = (List<CuMemberAccountDetailVO>) iCuMemberAccountDetailService.findAccountDetailList(accountDetailVO)[1];
util.exportExcel(response, memberAccountDetailVOList, FinanceMsgConstants.BALANCE_SUMMARY_EXPORT);
} else {
ExcelUtil<CuMemberAccountDetailVO> util = new ExcelUtil<>(CuMemberAccountDetailVO.class);
@ -136,7 +133,7 @@ public class CuMemberAccountDetailController extends BaseController {
Integer countryId = SecurityUtils.getPkCountry();
memberAccountDetailLookVO.setPkCountry(countryId);
startPage();
Object[] objects = memberAccountDetailService.selectAccountDetailLookList(memberAccountDetailLookVO);
Object[] objects = iCuMemberAccountDetailService.selectAccountDetailLookList(memberAccountDetailLookVO);
TableDataInfo tableDataInfo = getDataTable((List<CuMemberAccountDetailExt>) objects[0]);
tableDataInfo.setRows((List<CuMemberAccountDetailLookExtVO>) objects[1]);
return tableDataInfo;
@ -157,7 +154,7 @@ public class CuMemberAccountDetailController extends BaseController {
Integer pkCountry = SecurityUtils.getPkCountry();
memberAccountDetailLookVO.setPkCountry(pkCountry);
memberAccountDetailLookVOList = StringUtils.isBlank(createTime) ? new ArrayList<>() : (List<CuMemberAccountDetailLookExtVO>) memberAccountDetailService.selectAccountDetailLookList(memberAccountDetailLookVO)[1];
memberAccountDetailLookVOList = StringUtils.isBlank(createTime) ? new ArrayList<>() : (List<CuMemberAccountDetailLookExtVO>) iCuMemberAccountDetailService.selectAccountDetailLookList(memberAccountDetailLookVO)[1];
ExcelUtil<CuMemberAccountDetailLookExtVO> util = new ExcelUtil<>(CuMemberAccountDetailLookExtVO.class, getDetailShowField(memberAccountDetailLookVO));
util.exportExcel(response, memberAccountDetailLookVOList, FinanceMsgConstants.BALANCE_SUMMARY_DETAILS_EXPORT);
}
@ -211,7 +208,7 @@ public class CuMemberAccountDetailController extends BaseController {
@GetMapping("/list-field")
public AjaxResult accountListField() {
List<String> fieldList = new ArrayList<>();
List<BdAccount> bdAccounts = baseService.getAccountByCountryId(SecurityUtils.getPkCountry());
List<BdAccount> bdAccounts = iCuMemberBaseService.getAccountByCountryId(SecurityUtils.getPkCountry());
fieldList.add("createTime");
if (CollUtil.isNotEmpty(bdAccounts)) {
for (BdAccount bdAccount : bdAccounts) {
@ -246,9 +243,7 @@ public class CuMemberAccountDetailController extends BaseController {
list = getDetailShowField(detailLookVO);
}
//List<String> fieldName = Arrays.stream(fields).map(f -> f.getName()).collect(Collectors.toList());
return AjaxResult.success(list);
}
}

View File

@ -1,6 +1,5 @@
package com.hzs.member.account.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.member.account.CuMemberAccountDetail;
import com.hzs.common.domain.member.account.CuMemberAccountDetailExt;
@ -10,12 +9,7 @@ import com.hzs.member.account.vo.CuMemberAccountDetailVO;
import java.util.List;
/**
* <p>
* 会员账户详情 Mapper 接口
* </p>
*
* @author hzs
* @since 2022-10-31
*/
public interface CuMemberAccountDetailMapper extends BaseMapper<CuMemberAccountDetail> {

View File

@ -18,9 +18,6 @@ import java.util.List;
/**
* 会员账户信息 Mapper 接口
*
* @author hzs
* @since 2022-08-11
*/
public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
@ -28,9 +25,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
* 查询会员账户状态账户信息
*
* @param cuMemberAccount 会员账户条件信息
* @return: List<CuMemberAccountExt>
* @Author: sui q
* @Date: 2022/9/5 11:57
*/
List<CuMemberAccountExt> queryMemberAccountByCondition(CuMemberAccount cuMemberAccount);
@ -48,9 +42,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
* 更新账户余额
*
* @param cuMemberAccount 会员账户表
* @return: Integer
* @Author: sui q
* @Date: 2022/9/21 21:42
*/
Integer updateMemberAccount(CuMemberAccount cuMemberAccount);
@ -94,7 +85,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
List<CuMemberAccountExt> queryMemberAccountByMemberCodes(@Param(value = "memberCodes") List<CuMemberRechargeVO> memberCodes,
@Param(value = "memberCodeStrs") List<String> memberCodeStrs);
/**
* 根据用户编号集查询用户账户的全部字段信息
*
@ -166,7 +156,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
*/
Boolean batchUpdateMemberAccountByPkMemberCountry(@Param("pkMemberList") List<MemberAmountDTO> pkMemberList, @Param("isWithdraw") Integer isWithdraw);
/**
* 批理更新会员的钱包状态
*
@ -214,9 +203,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
* 奖金发放根据期间发放奖金更新奖金余额
*
* @param startPeriod 期间
* @return: void
* @Author: sui q
* @Date: 2023/3/21 14:12
*/
void updateMemberAccountGrantByPeriod(@Param("pkCountry") Integer pkCountry, @Param("startPeriod") Integer startPeriod,
@Param("endPeriod") Integer endPeriod);
@ -225,9 +211,6 @@ public interface CuMemberAccountMapper extends BaseMapper<CuMemberAccount> {
* 奖金可提现根据期间更新可提现金额减少可消费金额
*
* @param startPeriod 期间
* @return: void
* @Author: sui q
* @Date: 2023/3/21 14:12
*/
void updateMemberAccountWithdrawalByPeriod(@Param("startPeriod") Integer startPeriod, @Param("endPeriod") Integer endPeriod, @Param("pkCountry") Integer pkCountry);

View File

@ -5,13 +5,8 @@ import com.hzs.common.domain.member.account.CuMemberAccountDetail;
import com.hzs.member.account.vo.CuMemberAccountDetailLookVO;
import com.hzs.member.account.vo.CuMemberAccountDetailVO;
import java.util.List;
/**
* 会员账户详情 服务类
*
* @author hzs
* @since 2022-10-31
*/
public interface ICuMemberAccountDetailService extends IService<CuMemberAccountDetail> {

View File

@ -14,9 +14,6 @@ import java.util.List;
/**
* 会员账户信息 服务类
*
* @author hzs
* @since 2022-08-11
*/
public interface ICuMemberAccountService extends IService<CuMemberAccount> {
@ -24,9 +21,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
* 查询会员账户状态账户信息
*
* @param cuMemberAccount 会员账户条件信息
* @return: List<CuMemberAccountExt>
* @Author: sui q
* @Date: 2022/9/5 11:57
*/
List<CuMemberAccountExt> queryMemberAccountByCondition(CuMemberAccount cuMemberAccount);
@ -62,9 +56,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
*
* @param cuMemberAccount 会员账户表
* @param pkModified 修改人
* @return: Boolean
* @Author: sui q
* @Date: 2022/9/21 21:42
*/
Boolean updateMemberAccount(CuMemberAccount cuMemberAccount, Long pkModified);
@ -80,9 +71,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
* 根据会员id 列表查询账户信息
*
* @param pkMemberList 列表
* @return: List<CuMemberAccount>
* @Author: sui q
* @Date: 2023/3/25 16:28
*/
List<CuMemberAccount> queryCuMemberAccountByPkMembers(List<Long> pkMemberList);
@ -264,9 +252,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
* 奖金发放根据期间发放奖金更新奖金余额
*
* @param startPeriod 期间
* @return: void
* @Author: sui q
* @Date: 2023/3/21 14:12
*/
void updateMemberAccountGrantByPeriod(Integer pkCountry, Integer startPeriod, Integer endPeriod);
@ -274,9 +259,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
* 奖金可提现根据期间更新可提现金额减少可消费金额
*
* @param startPeriod 期间
* @return: void
* @Author: sui q
* @Date: 2023/3/21 14:12
*/
void updateMemberAccountWithdrawalByPeriod(Integer startPeriod, Integer endPeriod, Integer pkCountry);
@ -289,7 +271,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
*/
CuMemberRechargeAccountParam findMemberBalanceById(Integer pkAccount, Long pkMember);
/**
* 批量更新奖金账号
*
@ -300,7 +281,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
*/
Boolean batchUpdateBonusAccountByPkMember(List<CuMemberBonusAccountParam> bonusList, int operateType, Long pkModified);
/**
* 根据来源单号查询奖金账号信息
*
@ -315,9 +295,6 @@ public interface ICuMemberAccountService extends IService<CuMemberAccount> {
* @param pkMember 会员账户
* @param pkApprove 审核人
* @param currentDateTime 当前时间
* @return: void
* @Author: sui q
* @Date: 2023/3/21 14:12
*/
void deleteCuMemberAccountByPkMember(Long pkMember, Long pkApprove, Date currentDateTime);

View File

@ -30,15 +30,13 @@ import java.util.stream.Collectors;
/**
* 会员账户详情 服务实现类
*
* @author hzs
* @since 2022-10-31
*/
@Service
@Slf4j
public class CuMemberAccountDetailServiceImpl extends ServiceImpl<CuMemberAccountDetailMapper, CuMemberAccountDetail> implements ICuMemberAccountDetailService {
@Autowired
ICuMemberBaseService cuMemberBaseService;
private ICuMemberBaseService iCuMemberBaseService;
@Override
public Object[] findAccountDetailList(CuMemberAccountDetailVO memberAccountDetailVO) {
@ -48,10 +46,10 @@ public class CuMemberAccountDetailServiceImpl extends ServiceImpl<CuMemberAccoun
List<CuMemberAccountDetail> memberAccountDetailList = baseMapper.selectAccountDetailList(memberAccountDetailVO);
if (CollUtil.isNotEmpty(memberAccountDetailList)) {
//币种值
List<BdAccount> allAccounts = cuMemberBaseService.getAccountByCountryId(pkCountry);
List<BdAccount> allAccounts = iCuMemberBaseService.getAccountByCountryId(pkCountry);
Map<Integer, BdAccount> map = allAccounts.stream().collect(Collectors.toMap(BdAccount::getFieldValue, o -> o));
//汇率
BigDecimal exchangeRate = cuMemberBaseService.getCurrency(pkCountry).getInExchangeRate();
BigDecimal exchangeRate = iCuMemberBaseService.getCurrency(pkCountry).getInExchangeRate();
for (CuMemberAccountDetail cuMemberAccountDetail : memberAccountDetailList) {
cuMemberAccountDetailVO = new CuMemberAccountDetailVO();
BeanUtils.copyProperties(cuMemberAccountDetail, cuMemberAccountDetailVO);
@ -67,8 +65,7 @@ public class CuMemberAccountDetailServiceImpl extends ServiceImpl<CuMemberAccoun
memberAccountDetailVOList.add(cuMemberAccountDetailVO);
}
}
Object[] objects = new Object[]{memberAccountDetailList, memberAccountDetailVOList};
return objects;
return new Object[]{memberAccountDetailList, memberAccountDetailVOList};
}
@ -96,8 +93,8 @@ public class CuMemberAccountDetailServiceImpl extends ServiceImpl<CuMemberAccoun
List<Integer> pkAccounts = memberAccountDetailLookVO.getPkAccounts();
Integer pkCountry = memberAccountDetailLookVO.getPkCountry();
//币种
List<Integer> allAccounts = cuMemberBaseService.getAccountValuesByPkCountry(pkCountry);
List<BdAccount> allBdAccount = cuMemberBaseService.getAccountByCountryId(pkCountry);
List<Integer> allAccounts = iCuMemberBaseService.getAccountValuesByPkCountry(pkCountry);
List<BdAccount> allBdAccount = iCuMemberBaseService.getAccountByCountryId(pkCountry);
Map<Integer, BdAccount> map = allBdAccount.stream().collect(Collectors.toMap(BdAccount::getFieldValue, o -> o));
pkAccounts = CollUtil.isEmpty(pkAccounts) ? allAccounts : pkAccounts;
for (CuMemberAccountDetailExt cuMemberAccountDetailExt : cuMemberAccountDetailExtList) {
@ -117,8 +114,7 @@ public class CuMemberAccountDetailServiceImpl extends ServiceImpl<CuMemberAccoun
detailLookExtVOList.add(detailLookExtVO);
}
}
Object[] objects = new Object[]{cuMemberAccountDetailExtList, detailLookExtVOList};
return objects;
return new Object[]{cuMemberAccountDetailExtList, detailLookExtVOList};
}
@ -132,7 +128,7 @@ public class CuMemberAccountDetailServiceImpl extends ServiceImpl<CuMemberAccoun
*/
private CuMemberAccountDetailLookExtVO getCuMemberAccountExtVO(CuMemberAccountDetailLookExtVO accountDetailLookVO, List<Integer> pkAccounts, List<Integer> allAccounts) {
//汇率
BigDecimal exchangeRate = cuMemberBaseService.getCurrencyById(accountDetailLookVO.getPkRate()).getInExchangeRate();
BigDecimal exchangeRate = iCuMemberBaseService.getCurrencyById(accountDetailLookVO.getPkRate()).getInExchangeRate();
for (Integer pkAccount : pkAccounts) {
//币种
BigDecimal account = ReflectUtils.invokeGetter(accountDetailLookVO, MemberFieldConstants.ACCOUNT + pkAccount);
@ -158,7 +154,7 @@ public class CuMemberAccountDetailServiceImpl extends ServiceImpl<CuMemberAccoun
}
//锁定提现
if (null != pkAccount && pkAccount.equals(EAccount.BONUS.getValue())) {
if (pkAccount.equals(EAccount.BONUS.getValue())) {
BigDecimal lockWithdraw = ReflectUtils.invokeGetter(accountDetailLookVO, MemberFieldConstants.LOCK_WITHDRAW_ACCOUNT + pkAccount);
availableAccount = availableAccount.subtract(lockWithdraw);
@ -180,7 +176,7 @@ public class CuMemberAccountDetailServiceImpl extends ServiceImpl<CuMemberAccoun
ReflectUtils.invokeSetter(accountDetailLookVO, MemberFieldConstants.LOCK_ACCOUNT + account, null);
ReflectUtils.invokeSetter(accountDetailLookVO, MemberFieldConstants.LOCK_TRANSFER_ACCOUNT + account, null);
}
if (null != account && account.equals(EAccount.BONUS.getValue())) {
if (account.equals(EAccount.BONUS.getValue())) {
ReflectUtils.invokeSetter(accountDetailLookVO, MemberFieldConstants.LOCK_WITHDRAW_ACCOUNT + account, null);
}
}

View File

@ -53,31 +53,24 @@ import java.util.stream.Collectors;
/**
* 会员账户信息 服务实现类
*
* @author hzs
* @since 2022-08-11
*/
@Service
@Slf4j
public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMapper, CuMemberAccount> implements ICuMemberAccountService {
@Autowired
private ICuMemberBaseService cuMemberBaseService;
private ICuMemberBaseService iCuMemberBaseService;
@Autowired
private ICuMemberService cuMemberService;
private ICuMemberService iCuMemberService;
@Autowired
private ICuMemberAccountLogService cuMemberAccountLogService;
private ICuMemberAccountLogService iCuMemberAccountLogService;
@DubboReference
IApprovalServiceApi approvalServiceApi;
IApprovalServiceApi iApprovalServiceApi;
@DubboReference
ITransactionServiceApi transactionServiceApi;
IAccountServiceApi iAccountServiceApi;
@DubboReference
IAccountServiceApi accountServiceApi;
ITransactionServiceApi iTransactionServiceApi;
/**
@ -166,7 +159,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
CuMemberPetitionVO memberPetitionVo = new CuMemberPetitionVO();
SysUser loginUser = memberFrozenParam.getSysUser();
R<Map<Integer, ApprovalInfoDTO>> mapR = approvalServiceApi.queryApprovalInfo(Collections.singletonList(EApprovalBusiness.FROZEN.getValue()), memberFrozenParam.getPkCountry());
R<Map<Integer, ApprovalInfoDTO>> mapR = iApprovalServiceApi.queryApprovalInfo(Collections.singletonList(EApprovalBusiness.FROZEN.getValue()), memberFrozenParam.getPkCountry());
//批次号
String batchNum = CommonUtil.createSerialNumber(EOrderPrefix.FROZEN_CODE.getValue());
memberPetitionVo.setBusinessNo(batchNum);
@ -193,7 +186,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
//用户编号
List<String> memberCodes = memberFrozenParam.getMemberCodes();
List<CuMember> cuMemberList = cuMemberService.findMemberByMembercodesAndPkcountry(memberCodes, memberFrozenParam.getPkCountry());
List<CuMember> cuMemberList = iCuMemberService.findMemberByMembercodesAndPkcountry(memberCodes, memberFrozenParam.getPkCountry());
Map<String, CuMember> memberMap = cuMemberList.stream().collect(Collectors.toMap(CuMember::getMemberCode, o -> o));
for (String memberCode : memberCodes) {
for (CuMemberFrozenDetailParam frozenDetailParam : memberFrozenDetails) {
@ -202,7 +195,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
.lockConsume(frozenDetailParam.getLockConsume())
.lockTransfer(frozenDetailParam.getLockTransfer())
.lockWithdraw(frozenDetailParam.getLockWithdraw())
.pkAccount(cuMemberBaseService.translateAccountValue(frozenDetailParam.getMemberAccount()))
.pkAccount(iCuMemberBaseService.translateAccountValue(frozenDetailParam.getMemberAccount()))
.remarks(frozenDetailParam.getRemarks()).build();
memberFrozenAmountVOList.add(cuMemberFrozenAmountVO);
}
@ -272,7 +265,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
List<CuMemberWalletBalanceVO> memberWalletBalanceVOList = new ArrayList<>();
List<CuMemberRechargeAccountParam> cuMemberRechargeAccountParams = baseMapper.queryWalletBalanceByPkMember(pkMember);
//根据币种值查询币种
List<BdAccount> accounts = accountServiceApi.memberAccountByType(pkCountry).getData();
List<BdAccount> accounts = iAccountServiceApi.memberAccountByType(pkCountry).getData();
Map<Integer, BdAccount> accountMap = accounts.stream().collect(Collectors.toMap(BdAccount::getFieldValue, Function.identity()));
BigDecimal total = BigDecimal.ZERO;
if (CollUtil.isNotEmpty(cuMemberRechargeAccountParams)) {
@ -284,7 +277,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
memberWalletBalanceVO.setUnavailableBalance(memberRechargeAccountParam.getBalance().subtract(memberRechargeAccountParam.getAvailableBalance()));
total = total.add(memberRechargeAccountParam.getBalance());
memberWalletBalanceVO.setPkAccountId(bdAccount.getPkId());
memberWalletBalanceVO.setPkAccount(cuMemberBaseService.translateAccountValue(bdAccount.getPkId()));
memberWalletBalanceVO.setPkAccount(iCuMemberBaseService.translateAccountValue(bdAccount.getPkId()));
memberWalletBalanceVO.setIsRecharge(bdAccount.getIsRecharge());
memberWalletBalanceVO.setIsTransfer(bdAccount.getIsTransfer());
memberWalletBalanceVO.setIsWithdrawal(bdAccount.getIsWithdrawal());
@ -321,7 +314,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
public List<CuMemberAccountShowVO> selectAccountDetail(Long pkMember, Integer pkCountry) {
CuMemberAccountShowVO cuMemberAccountShowVO;
CuMemberAccount cuMemberAccount = this.queryCuMemberAccountByPkMember(pkMember);
List<BdAccount> bdAccounts = cuMemberBaseService.getAccountByCountryId(pkCountry);
List<BdAccount> bdAccounts = iCuMemberBaseService.getAccountByCountryId(pkCountry);
List<CuMemberAccountShowVO> memberAccountShowVOList = new ArrayList<>();
for (BdAccount bdAccount : bdAccounts) {
cuMemberAccountShowVO = new CuMemberAccountShowVO();
@ -334,7 +327,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
cuMemberAccountShowVO.setSort(bdAccount.getSort());
memberAccountShowVOList.add(cuMemberAccountShowVO);
//翻译余额账户
String accountName = transactionServiceApi.readTransactionByCache(EnumsPrefixConstants.ACCOUNT + pkAccount, LocaleContextHolder.getLocale().toLanguageTag()).getData();
String accountName = iTransactionServiceApi.readTransactionByCache(EnumsPrefixConstants.ACCOUNT + pkAccount, LocaleContextHolder.getLocale().toLanguageTag()).getData();
cuMemberAccountShowVO.setAccountName(accountName);
}
return memberAccountShowVOList;
@ -349,18 +342,18 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
public List<CuMemberRechargeAccountParam> queryMemberAccountByMemberCode(String memberCode, List<Integer> accountTypes, Integer pkCountry) {
List<Integer> pkAccounts = new ArrayList<>();
for (Integer accountType : accountTypes) {
pkAccounts.add(cuMemberBaseService.getAccountValueById(accountType));
pkAccounts.add(iCuMemberBaseService.getAccountValueById(accountType));
}
List<CuMemberRechargeAccountParam> cuMemberRechargeAccountParams = baseMapper.queryMemberAccountByMemberCode(memberCode, pkAccounts, null);
if (CollUtil.isNotEmpty(cuMemberRechargeAccountParams)) {
List<BdAccount> accountList = cuMemberBaseService.getAccountByCountryId(pkCountry);
List<BdAccount> accountList = iCuMemberBaseService.getAccountByCountryId(pkCountry);
//币种value对应的币种对象
Map<Integer, BdAccount> accountMap = accountList.stream().collect(Collectors.toMap(BdAccount::getFieldValue, o -> o));
for (CuMemberRechargeAccountParam CuMemberRechargeAccountParam : cuMemberRechargeAccountParams) {
Integer accountType = CuMemberRechargeAccountParam.getAccountType();
Integer pkAccount = accountMap.get(accountType).getPkId();
CuMemberRechargeAccountParam.setPkAccount(pkAccount);
CuMemberRechargeAccountParam.setAccountType(cuMemberBaseService.translateAccountValue(pkAccount));
CuMemberRechargeAccountParam.setAccountType(iCuMemberBaseService.translateAccountValue(pkAccount));
}
}
return cuMemberRechargeAccountParams;
@ -373,7 +366,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
for (Integer pkAccount : pkAccounts) {
CuMemberRechargeAccountParam param = new CuMemberRechargeAccountParam();
param.setPkAccount(pkAccount);
param.setAccountType(cuMemberBaseService.translateAccountValue(pkAccount));
param.setAccountType(iCuMemberBaseService.translateAccountValue(pkAccount));
accountParams.add(param);
}
}
@ -426,7 +419,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
CuMemberWalletDetailVO memberWalletDetailVO;
if (CollUtil.isNotEmpty(cuMemberAccountExts)) {
//查询币种值
List<BdAccount> allAccounts = cuMemberBaseService.getAccountByCountryId(pkCountry);
List<BdAccount> allAccounts = iCuMemberBaseService.getAccountByCountryId(pkCountry);
Map<Integer, BdAccount> map = allAccounts.stream().collect(Collectors.toMap(BdAccount::getFieldValue, o -> o));
for (CuMemberAccountExt cuMemberAccountExt : cuMemberAccountExts) {
memberWalletDetailVO = new CuMemberWalletDetailVO();
@ -497,7 +490,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
memberAccount.setPkModified(loginUser.getUserId());
memberAccount.setPkMembers(pkMembers);
CuMemberAccountLog cuMemberAccountLog = packageCuMemberAccountLog(memberFrozenParam, memberAccount);
result = cuMemberAccountLogService.save(cuMemberAccountLog);
result = iCuMemberAccountLogService.save(cuMemberAccountLog);
}
//提交审批
submitApproval(memberFrozenParam);
@ -543,7 +536,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
cuMemberAccount = new CuMemberAccountExt();
for (CuMemberFrozenDetailParam param : memberFrozenDetails) {
Integer memberAccount = param.getMemberAccount();
Integer accountValue = cuMemberBaseService.getAccountValueById(memberAccount);
Integer accountValue = iCuMemberBaseService.getAccountValueById(memberAccount);
BigDecimal lockConsume = param.getLockConsume();
if (null != lockConsume && lockConsume.compareTo(BigDecimal.ZERO) > 0) {
ReflectUtils.invokeSetter(cuMemberAccount, MemberFieldConstants.LOCK_ACCOUNT + accountValue, lockConsume);
@ -582,7 +575,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
.signType(ESignType.getEnumByValue(memberPetitionVo.getSignType())).userIdList(memberPetitionVo.getUserIdList())
.sendIdList(memberPetitionVo.getSendIdList()).remark(memberPetitionVo.getDescription()).pkMemberList(pkMemberIds).build();
R<String> submit = approvalServiceApi.submit(approvalSubmitDTO, cuMemberFrozenParam.getLoginUser());
R<String> submit = iApprovalServiceApi.submit(approvalSubmitDTO, cuMemberFrozenParam.getLoginUser());
if (!submit.isSuccess()) {
log.error("====" + submit.getData());
throw new RuntimeException(submit.getMsg());
@ -642,9 +635,9 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
List<Integer> selectedPkAccounts = cuMemberAccountVO.getPkAccounts();
Integer pkCountry = cuMemberAccountVO.getPkCountry();
//汇率
BigDecimal exchangeRate = cuMemberBaseService.getCurrency(pkCountry).getInExchangeRate();
BigDecimal exchangeRate = iCuMemberBaseService.getCurrency(pkCountry).getInExchangeRate();
//配置的币种
List<BdAccount> bdAccounts = cuMemberBaseService.getAccountByCountryId(pkCountry);
List<BdAccount> bdAccounts = iCuMemberBaseService.getAccountByCountryId(pkCountry);
List<Integer> allAccountValues = bdAccounts.stream().map(BdAccount::getFieldValue).collect(Collectors.toList());
for (CuMemberAccountExt cuMemberAccountExt : cuMemberAccountExtList) {
cuMemberAccountExtVO = BeanUtil.copyProperties(cuMemberAccountExt, CuMemberAccountExtVO.class);
@ -665,7 +658,7 @@ public class CuMemberAccountServiceImpl extends ServiceImpl<CuMemberAccountMappe
//已选择的币种值
List<Integer> selectedPkAccounts = cuMemberAccountVO.getPkAccounts();
//汇率
BigDecimal exchangeRate = cuMemberBaseService.getCurrency(pkCountry).getInExchangeRate();
BigDecimal exchangeRate = iCuMemberBaseService.getCurrency(pkCountry).getInExchangeRate();
//配置的币种
for (CuMemberAccountExt cuMemberAccountExt : cuMemberAccountExtList) {
memberAccountExportVO = CuMemberAccountExportVO.builder()

View File

@ -55,31 +55,22 @@
<result column="PK_RATE" property="pkRate"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
DEL_FLAG,
PK_COUNTRY,
PK_ID, PK_MEMBER, ACCOUNT1, LOCK_ACCOUNT1, LOCK_TRANSFER_ACCOUNT1, ACCOUNT2, LOCK_ACCOUNT2, LOCK_TRANSFER_ACCOUNT2, ACCOUNT3, LOCK_ACCOUNT3, LOCK_TRANSFER_ACCOUNT3, ACCOUNT4, LOCK_ACCOUNT4, LOCK_TRANSFER_ACCOUNT4, LOCK_WITHDRAW_ACCOUNT4, WITHDRAW_ACCOUNT4, CONSUME_ACCOUNT4, ACCOUNT5, LOCK_ACCOUNT5, LOCK_TRANSFER_ACCOUNT5, ACCOUNT6, LOCK_ACCOUNT6, LOCK_TRANSFER_ACCOUNT6, ACCOUNT7, LOCK_ACCOUNT7, LOCK_TRANSFER_ACCOUNT7, ACCOUNT8,
LOCK_ACCOUNT8, LOCK_TRANSFER_ACCOUNT8, ACCOUNT9, LOCK_ACCOUNT9, LOCK_TRANSFER_ACCOUNT9, ACCOUNT10, LOCK_ACCOUNT10, LOCK_TRANSFER_ACCOUNT10,
ACCOUNT11, ACCOUNT12, ACCOUNT13, ACCOUNT14, ACCOUNT15, ACCOUNT16, ACCOUNT17, ACCOUNT18, ACCOUNT19, ACCOUNT20, CREATE_TIME, PK_RATE
</sql>
<sql id="select_list">
select su.create_time,
sum(su.account1) as account1,
sum(su.account2) as account2,
sum(su.account3) as account3,
sum(su.account4) as account4,
sum(su.account5) as account5,
sum(su.account6) as account6,
sum(su.account7) as account7,
sum(su.account8) as account8,
sum(su.account9) as account9,
sum(su.account10) as account10,
sum(su.account11) as account11,
sum(su.account12) as account12,
sum(su.account13) as account13
from cu_member_account_detail su
select su.create_time,
sum(su.account1) as account1,
sum(su.account2) as account2,
sum(su.account3) as account3,
sum(su.account4) as account4,
sum(su.account5) as account5,
sum(su.account6) as account6,
sum(su.account7) as account7,
sum(su.account8) as account8,
sum(su.account9) as account9,
sum(su.account10) as account10,
sum(su.account11) as account11,
sum(su.account12) as account12,
sum(su.account13) as account13
from cu_member_account_detail su
</sql>
<sql id="list_where">
@ -107,22 +98,22 @@
s.vertex_name vertexName,
s.vertex_id vertexId,
s.team_id teamId
from cu_member_account_detail a,
(select u.member_code,
u.member_name,
u.pk_id,
v.pk_id vertex_id,
t.pk_id team_id,
v.vertex_name,
t.team_name
from cu_member u
left join bd_vertex v
on u.pk_vertex = v.pk_id
and v.del_flag = 0
left join cu_member_team t
on u.pk_team_code = t.pk_id
and t.del_flag = 0
where u.del_flag = 0) s
from cu_member_account_detail a,
(select u.member_code,
u.member_name,
u.pk_id,
v.pk_id vertex_id,
t.pk_id team_id,
v.vertex_name,
t.team_name
from cu_member u
left join bd_vertex v
on u.pk_vertex = v.pk_id
and v.del_flag = 0
left join cu_member_team t
on u.pk_team_code = t.pk_id
and t.del_flag = 0
where u.del_flag = 0) s
</sql>
<sql id="detail_where">
@ -202,119 +193,120 @@
<insert id="insertAccountDetail">
insert into cu_member_account_detail
(pk_id,
pk_member,
account1,
lock_account1,
lock_transfer_account1,
account2,
lock_account2,
lock_transfer_account2,
account3,
lock_account3,
lock_transfer_account3,
account4,
lock_account4,
lock_transfer_account4,
lock_withdraw_account4,
withdraw_account4,
consume_account4,
account5,
lock_account5,
lock_transfer_account5,
account6,
lock_account6,
lock_transfer_account6,
account7,
lock_account7,
lock_transfer_account7,
account8,
lock_account8,
lock_transfer_account8,
account9,
lock_account9,
lock_transfer_account9,
account10,
lock_account10,
lock_transfer_account10,
account11,
account12,
account13,
account14,
account15,
account16,
account17,
account18,
account19,
account20,
create_time,
pk_rate,
del_flag,
pk_country)
pk_member,
account1,
lock_account1,
lock_transfer_account1,
account2,
lock_account2,
lock_transfer_account2,
account3,
lock_account3,
lock_transfer_account3,
account4,
lock_account4,
lock_transfer_account4,
lock_withdraw_account4,
withdraw_account4,
consume_account4,
account5,
lock_account5,
lock_transfer_account5,
account6,
lock_account6,
lock_transfer_account6,
account7,
lock_account7,
lock_transfer_account7,
account8,
lock_account8,
lock_transfer_account8,
account9,
lock_account9,
lock_transfer_account9,
account10,
lock_account10,
lock_transfer_account10,
account11,
account12,
account13,
account14,
account15,
account16,
account17,
account18,
account19,
account20,
create_time,
pk_rate,
del_flag,
pk_country)
select cu_member_account_detail_seq.nextval,
a.pk_member,
a.account1,
a.lock_account1,
a.lock_transfer_account1,
a.account2,
a.lock_account2,
a.lock_transfer_account2,
a.account3,
a.lock_account3,
a.lock_transfer_account3,
a.account4,
a.lock_account4,
a.lock_transfer_account4,
a.lock_withdraw_account4,
a.withdraw_account4,
a.consume_account4,
a.account5,
a.lock_account5,
a.lock_transfer_account5,
a.account6,
a.lock_account6,
a.lock_transfer_account6,
a.account7,
a.lock_account7,
a.lock_transfer_account7,
a.account8,
a.lock_account8,
a.lock_transfer_account8,
a.account9,
a.lock_account9,
a.lock_transfer_account9,
a.account10,
a.lock_account10,
a.lock_transfer_account10,
a.account11,
a.account12,
a.account13,
a.account14,
a.account15,
a.account16,
a.account17,
a.account18,
a.account19,
a.account20,
trunc(sysdate) create_time,
tt.rate pk_rate,
a.del_flag,
a.pk_country
a.pk_member,
a.account1,
a.lock_account1,
a.lock_transfer_account1,
a.account2,
a.lock_account2,
a.lock_transfer_account2,
a.account3,
a.lock_account3,
a.lock_transfer_account3,
a.account4,
a.lock_account4,
a.lock_transfer_account4,
a.lock_withdraw_account4,
a.withdraw_account4,
a.consume_account4,
a.account5,
a.lock_account5,
a.lock_transfer_account5,
a.account6,
a.lock_account6,
a.lock_transfer_account6,
a.account7,
a.lock_account7,
a.lock_transfer_account7,
a.account8,
a.lock_account8,
a.lock_transfer_account8,
a.account9,
a.lock_account9,
a.lock_transfer_account9,
a.account10,
a.lock_account10,
a.lock_transfer_account10,
a.account11,
a.account12,
a.account13,
a.account14,
a.account15,
a.account16,
a.account17,
a.account18,
a.account19,
a.account20,
trunc(sysdate) create_time,
tt.rate pk_rate,
a.del_flag,
a.pk_country
from cu_member_account a
left join (select t.pk_id rate,
t.pk_country,
ROW_NUMBER() OVER(PARTITION BY t.pk_country ORDER BY t.effective_date DESC) rw
from BD_CURRENCY t
where t.del_flag = 0
and t.enable_state = 0
and t.effective_date &lt; sysdate) tt
on a.pk_country = tt.pk_country
and tt.rw = 1
left join (select t.pk_id rate,
t.pk_country,
ROW_NUMBER() OVER(PARTITION BY t.pk_country ORDER BY t.effective_date DESC) rw
from BD_CURRENCY t
where t.del_flag = 0
and t.enable_state = 0
and t.effective_date &lt; sysdate) tt
on a.pk_country = tt.pk_country
and tt.rw = 1
where a.del_flag = 0
and tt.rate is not null
and tt.rate is not null
</insert>
<delete id="deleteAccontDetailByMonth">
delete from CU_MEMBER_ACCOUNT_DETAIL d
delete
from CU_MEMBER_ACCOUNT_DETAIL d
where d.create_time &lt; TRUNC(ADD_MONTHS(SYSDATE, -1), 'month')
</delete>

View File

@ -14,9 +14,6 @@ import java.util.List;
/**
* 商品 Mapper 接口
*
* @author hzs
* @since 2022-09-08
*/
public interface BdWaresMapper extends BaseMapper<BdWares> {
@ -55,7 +52,6 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
*/
List<WaresVo> selectByWaresInfo(WaresParams waresParams);
Integer selectByMoveUpSort(@Param("waresId") Integer waresId, @Param("specialArea") Integer specialArea);
Integer selectByMoveDownSort(@Param("waresId") Integer waresId, @Param("specialArea") Integer specialArea);
@ -113,7 +109,6 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
void waresPreSale();
/**
* 设置符合条件自动下架
*
@ -145,14 +140,6 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
@Param("isRecommend") Integer isRecommend,
@Param("pkCountry") Integer pkCountry);
/**
* 扣减预售数量库存
*
* @param waresCode
* @param quantity
*/
void updatePreSaleQuantityByWaresCode(@Param("waresCode") String waresCode, @Param("quantity") Integer quantity);
/**
* 查询商品可见类型
*

View File

@ -11,33 +11,19 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
/**
* @BelongsProject: hzs_cloud
* @BelongsPackage: com.hzs.sale.wares.provider
* @Author: yh
* @CreateTime: 2023-03-02 17:07
* @Description: TODO
* @Version: 1.0
*/
@DubboService
public class WaresServiceProvider implements IWaresServiceApi {
@Autowired
private IBdWaresService waresService;
private IBdWaresService iBdWaresService;
@Autowired
private IBdWaresLabelService waresLabelService;
private IBdWaresLabelService iBdWaresLabelService;
/**
* 校验标签是否使用
*
* @param pkLabel 标签主键
* @return
*/
@Override
public R<Boolean> checkLabelisUse(Integer pkLabel) {
LambdaQueryWrapper<BdWaresLabel> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BdWaresLabel::getPkLable, pkLabel);
int count = waresLabelService.count(queryWrapper);
int count = iBdWaresLabelService.count(queryWrapper);
if (count > 0) {
return R.ok(true);
} else {
@ -45,36 +31,19 @@ public class WaresServiceProvider implements IWaresServiceApi {
}
}
/**
* 修改自动上下架状态自动上架
*
* @param currentTime 当前时间
*/
@Override
public void updateByAutoStartAndAutoStart(Date currentTime) {
waresService.updateByAutoStartAndAutoStart(currentTime);
iBdWaresService.updateByAutoStartAndAutoStart(currentTime);
}
/**
* @description: 修改商品预售状态
* @author: zhang jing
* @date: 2024/10/24 16:09
* @param: []
* @return: void
**/
@Override
public void waresPreSale() {
waresService.waresPreSale();
iBdWaresService.waresPreSale();
}
/**
* 修改自动上下架状态自动下架
*
* @param currentTime 当前时间
*/
@Override
public void updateByAutoStartAndAutoEnd(Date currentTime) {
waresService.updateByAutoStartAndAutoEnd(currentTime);
iBdWaresService.updateByAutoStartAndAutoEnd(currentTime);
}
}

View File

@ -19,9 +19,6 @@ import java.util.Map;
/**
* 商品 服务类
*
* @author hzs
* @since 2022-09-08
*/
public interface IBdWaresService extends IService<BdWares> {
@ -197,14 +194,6 @@ public interface IBdWaresService extends IService<BdWares> {
*/
List<BdWaresExt> queryByRecommendList(Integer specialArea, Integer isRecommend, Integer pkCountry, Map<Integer, Boolean> waresShowMap);
/**
* 扣减预售数量库存
*
* @param waresCode
* @param quantity
*/
void updatePreSaleQuantityByWaresCode(String waresCode, Integer quantity);
/**
* 查询商品可见类型
*

View File

@ -569,12 +569,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
}
}
/**
* 修改商品基础信息
*
* @param waresParams
* @param user
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void updateWares(WaresParams waresParams, LoginUser user) {
@ -810,11 +804,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
rabbitTemplate.convertAndSend(RabbitMqConstants.BUSINESS_LOG_EXCHANGE, RabbitMqConstants.BUSINESS_LOG_KEY, log);
}
/**
* 删除商品
*
* @param pkId
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void removeWares(Integer pkId, LoginUser loginUser) {
@ -909,12 +898,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return baseMapper.queryWaresByCondition(null, null, null, null, null, null, null);
}
/**
* 根据商品外键查询商品
*
* @param waresId
* @return
*/
@Override
public BdWares getWares(Integer waresId) {
String redisKey = CacheConstants.BD_WARES + waresId;
@ -928,11 +911,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return wares;
}
/**
* 查询最末商品编号
*
* @return
*/
@Override
public String getLastWaresCode() {
return baseMapper.getLastWaresCode();
@ -943,13 +921,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return baseMapper.selectByWaresInfo(waresParams);
}
/**
* 上移 下移
*
* @param waresId
* @param waresMoveType
* @param specialArea 所属专区
*/
@Override
public void waresMove(Integer waresId, Integer waresMoveType, LoginUser loginUser, Integer specialArea) {
BdWares bdWares = baseMapper.selectById(waresId);
@ -1005,7 +976,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
createWaresMoveLog(bdWares, EApprovalBusiness.WARES_MOVEDOWN.getValue(), waresMoveType, loginUser);
}
}
}
/**
@ -1046,13 +1016,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return baseMapper.selectByMoveDownSort(waresId, specialArea);
}
/**
* 置顶
*
* @param waresId
* @param loginUser
*/
@Override
public void floatingRoof(Integer waresId, LoginUser loginUser) {
BdWares bdWares = new BdWares();
@ -1061,22 +1024,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
this.updateById(bdWares);
}
/**
* 获取最大商品序号
*
* @return
*/
@Override
public Integer getMaxSort(Integer pkCountry) {
return baseMapper.getMaxSort(pkCountry);
}
/**
* 根据商品编号查询商品信息
*
* @param waresCodeList
* @return
*/
@Override
public List<BdAgreement> selectByWaresCodeList(List<String> waresCodeList) {
return baseMapper.selectByWaresCodeList(waresCodeList);
@ -1088,15 +1040,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return baseMapper.queryWaresByCondition(specialArea, pkAreaClassify, null, waresName, waresCodeInList, waresCodeNotInList, pkCountry);
}
/**
* 根据条件查询推荐商品 专区商品列表
*
* @param specialArea 所属专区
* @param pkAreaClassify 所属分类
* @param waresName 名称
* @param pkCountry 所属国家
* @return: List<BdWaresExt>
*/
@Override
public List<BdWaresExt> queryRecommendWaresByCondition(Integer specialArea, Integer pkAreaClassify, String waresName, Integer pkCountry) {
return baseMapper.queryRecommendWaresByCondition(specialArea, pkAreaClassify, null, waresName, pkCountry);
@ -1113,9 +1056,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return bdLabel;
}
/**
* 查询app 首页推荐专区 和推荐商品
*/
@Override
public RecommendWaresInfoVo queryRecommendInfo(Integer pkCountry, String memberCode, Long userId, Map<Integer, Boolean> waresShowMap) {
// 注册专区 只有报单中心 和服务中心 能看国内 海粉可以看到复购升级海粉合作 pk_settle_grade=1
@ -1369,9 +1309,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
}
/**
* 查询app 首页推荐专区 和推荐商品
*/
@Override
public RecommendWaresInfoVo listWares(Integer pkCountry, Long userId, Map<Integer, Boolean> waresShowMap) {
// 登录用户
@ -1475,14 +1412,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return recommendWaresInfoVo;
}
/**
* 查询推荐商品
*
* @param specialArea
* @param isRecommend
* @param pkCountry
* @return
*/
@Override
public List<BdWaresExt> queryByRecommendList(Integer specialArea, Integer isRecommend, Integer pkCountry, Map<Integer, Boolean> waresShowMap) {
List<BdWaresExt> bdWares = baseMapper.queryByRecommendList(specialArea, isRecommend, pkCountry);
@ -1497,41 +1426,21 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return waresList;
}
/**
* 修改自动上下架状态自动上架
*
* @param currentTime 当前时间
*/
@Override
public void updateByAutoStartAndAutoStart(Date currentTime) {
baseMapper.updateByAutoStartAndAutoStart(currentTime);
}
/**
* @description: 修改商品预售状态
* @author: zhang jing
* @date: 2024/10/24 16:10
* @param: []
* @return: void
**/
@Override
public void waresPreSale() {
baseMapper.waresPreSale();
}
/**
* 修改自动上下架状态自动下架
*
* @param currentTime 当前时间
*/
@Override
public void updateByAutoStartAndAutoEnd(Date currentTime) {
baseMapper.updateByAutoStartAndAutoEnd(currentTime);
}
/**
* 计算商品业绩
*/
@Override
public List<ComputeWaresPrice> computeWaresPrice(List<ComputeWaresPrice> computeWaresPriceList) {
// 极差
@ -1540,9 +1449,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return computeWaresPrice(computeWaresPriceList, rangeList);
}
/**
* 计算商品业绩
*/
@Override
public List<ComputeWaresPrice> computeWaresPrice(List<ComputeWaresPrice> computeWaresPriceList, List<BdRangeExt> rangeList) {
// 极差
@ -1621,7 +1527,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
rangePriceVo.setSpecsNames(StringUtils.join(specsNames, ","));
rangePriceVoList.add(rangePriceVo);
}
} else {
for (Map.Entry<Integer, List<BdWaresSpecsRelationExt>> integerListEntry : collect.entrySet()) {
List<BdWaresSpecsRelationExt> waresSpecsRelationExtList = integerListEntry.getValue();
@ -1676,14 +1581,8 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
}
}
return computeWaresPriceList;
}
/**
* 查询商品团队信息
*
* @return
*/
@Override
public Map<Integer, List<BdWaresAuthority>> getWaresAuthority(List<Integer> pkWaresList) {
Map<Integer, List<BdWaresAuthority>> map = new HashMap<>();
@ -1707,34 +1606,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return baseMapper.selectByRecommentList(pkCountry, specialAreaList);
}
/**
* 扣减预售数量库存
*
* @param waresCode
* @param quantity
*/
@Override
public void updatePreSaleQuantityByWaresCode(String waresCode, Integer quantity) {
baseMapper.updatePreSaleQuantityByWaresCode(waresCode, quantity);
}
/**
* 查询商品可见类型
*
* @param pkWares
* @return
*/
@Override
public WaresAuthorityVo getWaresAuthorityFirst(Integer pkWares) {
return baseMapper.getWaresAuthorityFirst(pkWares);
}
/**
* 置底
*
* @param waresId
* @param loginUser
*/
@Override
public void bottomUp(Integer waresId, LoginUser loginUser) {
BdWares bdWares = new BdWares();

View File

@ -311,15 +311,14 @@
update BD_WARES_EXTEND
set IS_PUT_ON = 0
where to_char(PUT_ON_TIME, 'yyyy-mm-dd hh24:mi:ss') &lt;= to_char(#{currentTime}, 'yyyy-mm-dd hh24:mi:ss')
and IS_PUT_ON = '1'
and IS_PUT_ON = 1
</update>
<update id="updateByAutoStartAndAutoEnd">
update BD_WARES_EXTEND
set IS_PUT_ON = 1
where to_char(PUT_OFF_TIME, 'yyyy-mm-dd hh24:mi:ss') &lt;= to_char(#{currentTime}, 'yyyy-mm-dd hh24:mi:ss')
and IS_PUT_ON = '0'
and IS_PUT_ON = 0
</update>
<!-- 修改商品预售状态-->
@ -397,13 +396,6 @@
order by bw.SORT desc, bw.wares_price
</select>
<update id="updatePreSaleQuantityByWaresCode">
update BD_WARES
set PRE_SALE_QUANTITY = PRE_SALE_QUANTITY - #{quantity}
where WARES_CODE = #{waresCode}
and PRE_SALE_QUANTITY > 0
</update>
<select id="getWaresAuthorityFirst" resultType="com.hzs.sale.wares.vo.WaresAuthorityVo">
select wa.AUTHORITY_TYPE authorityType, cm.MEMBER_CODE memberCode, cm.MEMBER_NAME memberName
from bd_wares_authority wa

View File

@ -9,13 +9,6 @@ import org.springframework.stereotype.Component;
import java.util.Date;
/**
* @BelongsProject: hzs_cloud
* @BelongsPackage: com.hzs.third.job
* @Author: yh
* @CreateTime: 2023-06-01 10:44
* @Version: 1.0
*/
@Slf4j
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
@Component
@ -45,4 +38,5 @@ public class WaresJob {
// 修改商品预售状态
waresServiceApi.waresPreSale();
}
}