Merge remote-tracking branch 'origin/master'

This commit is contained in:
sxu 2025-04-24 12:12:10 +08:00
commit c2c1ee45f7
9 changed files with 38 additions and 25 deletions

View File

@ -21,6 +21,7 @@ public class AccWalletOperationQueryParam extends BaseEntity {
private LocalDateTime endDateTime; private LocalDateTime endDateTime;
@ApiModelProperty("交易类型") @ApiModelProperty("交易类型")
private Integer tradeType; private Integer tradeType;
private Integer payState;
private String searchValue; private String searchValue;
private String createBy; private String createBy;
private Long userId; private Long userId;

View File

@ -28,9 +28,4 @@ public class AccountInfoQueryParam extends BaseEntity {
// private BigDecimal walletMinAmount; // private BigDecimal walletMinAmount;
// @ApiModelProperty("钱包最大金额") // @ApiModelProperty("钱包最大金额")
// private BigDecimal walletMaxAmount; // private BigDecimal walletMaxAmount;
public AccountInfoQueryParam() {
this.endDateTime = LocalDateTime.now().plusDays(7);
this.startDateTime = LocalDateTime.now().minusDays(7);
}
} }

View File

@ -470,9 +470,11 @@ public class AccInfoServiceImpl implements IAccInfoService {
@Override @Override
public List<AccOperationListVO> queryAccPersonalWalOperationAddList(AccWalletOperationQueryParam param) { public List<AccOperationListVO> queryAccPersonalWalOperationAddList(AccWalletOperationQueryParam param) {
List<AccOperationListVO> operationListVOList = accTradeService.queryAccOperationList(param); List<AccOperationListVO> operationListVOList = accTradeService.queryAccOperationList(param);
operationListVOList = operationListVOList.stream().peek(operation -> { if(CollUtil.isNotEmpty(operationListVOList)) {
operation.setPhoneNumber(SM4EncryptUtils.sm4Decrypt(operation.getPhoneNumber())); for(AccOperationListVO vo: operationListVOList) {
}).collect(Collectors.toList()); vo.setPhoneNumber(SM4EncryptUtils.sm4Decrypt(vo.getPhoneNumber()));
}
}
return operationListVOList ; return operationListVOList ;
} }
} }

View File

@ -31,9 +31,9 @@ public class AccOperationHistoryServiceImpl extends ServiceImpl<AccOperationHist
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue()); String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue());
List<AccOperationHistory> operationRecordList = this.baseMapper.queryPageAccOperationRecord(param, encryptedSearchValue); List<AccOperationHistory> operationRecordList = this.baseMapper.queryPageAccOperationRecord(param, encryptedSearchValue);
if(CollUtil.isNotEmpty(operationRecordList)) { if(CollUtil.isNotEmpty(operationRecordList)) {
operationRecordList = operationRecordList.stream().peek(accOperationRecord -> { for(AccOperationHistory history : operationRecordList) {
accOperationRecord.setPhone(SM4EncryptUtils.sm4Decrypt(accOperationRecord.getPhone())); history.setPhone(SM4EncryptUtils.sm4Decrypt(history.getPhone()));
}).collect(Collectors.toList()); }
} }
return operationRecordList; return operationRecordList;
} }

View File

@ -368,9 +368,11 @@ public class AccSubServiceImpl implements AccSubService {
@Override @Override
public List<AccOperationListVO> queryAccSubOperationList(AccWalletOperationQueryParam param) { public List<AccOperationListVO> queryAccSubOperationList(AccWalletOperationQueryParam param) {
List<AccOperationListVO> operationListVOList = accTradeService.queryAccOperationList(param); List<AccOperationListVO> operationListVOList = accTradeService.queryAccOperationList(param);
operationListVOList = operationListVOList.stream().peek(operation -> { if(CollUtil.isNotEmpty(operationListVOList)) {
operation.setPhoneNumber(SM4EncryptUtils.sm4Decrypt(operation.getPhoneNumber())); for(AccOperationListVO vo: operationListVOList) {
}).collect(Collectors.toList()); vo.setPhoneNumber(SM4EncryptUtils.sm4Decrypt(vo.getPhoneNumber()));
}
}
return operationListVOList ; return operationListVOList ;
} }
} }

View File

@ -140,9 +140,9 @@ public class AccTradeServiceImpl implements IAccTradeService {
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue()); String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue());
List<AccOperationListVO> list = accTradeMapper.queryAccOperationList(param, encryptedSearchValue); List<AccOperationListVO> list = accTradeMapper.queryAccOperationList(param, encryptedSearchValue);
if(CollUtil.isNotEmpty(list)) { if(CollUtil.isNotEmpty(list)) {
list = list.stream().peek(operation -> { for(AccOperationListVO vo : list) {
operation.setPhoneNumber(SM4EncryptUtils.sm4Decrypt(operation.getPhoneNumber())); vo.setPhoneNumber(SM4EncryptUtils.sm4Decrypt(vo.getPhoneNumber()));
}).collect(Collectors.toList()); }
} }
return list; return list;
} }

View File

@ -34,7 +34,7 @@ public class TradeReportController extends BaseController
@ApiOperation("交易流水") @ApiOperation("交易流水")
@PostMapping("/flow") @PostMapping("/flow")
@ResponseBody @ResponseBody
public TableDataInfo tradeFlowList(TradeFlowParam param) public TableDataInfo tradeFlowList(@RequestBody TradeFlowParam param)
{ {
startPage(); startPage();
List<TradeFlowVO> list = tradeReportService.selectTradeFlow(param); List<TradeFlowVO> list = tradeReportService.selectTradeFlow(param);
@ -43,7 +43,7 @@ public class TradeReportController extends BaseController
@ApiOperation("营业汇总") @ApiOperation("营业汇总")
@PostMapping("/revenue/operating") @PostMapping("/revenue/operating")
@ResponseBody @ResponseBody
public TableDataInfo selectOperatingRevenue(OperatingRevenueParam param) public TableDataInfo selectOperatingRevenue(@RequestBody OperatingRevenueParam param)
{ {
startPage(); startPage();
List<OperatingRevenueVO> list = tradeReportService.selectOperatingRevenue(param); List<OperatingRevenueVO> list = tradeReportService.selectOperatingRevenue(param);
@ -52,7 +52,7 @@ public class TradeReportController extends BaseController
@ApiOperation("食堂档口汇总") @ApiOperation("食堂档口汇总")
@PostMapping("/revenue/canteen") @PostMapping("/revenue/canteen")
@ResponseBody @ResponseBody
public TableDataInfo selectCanteenStallRevenue(CanteenStallRevenueParam param) public TableDataInfo selectCanteenStallRevenue(@RequestBody CanteenStallRevenueParam param)
{ {
startPage(); startPage();
List<CanteenStallRevenueVO> list = tradeReportService.selectCanteenStallRevenue(param); List<CanteenStallRevenueVO> list = tradeReportService.selectCanteenStallRevenue(param);
@ -61,7 +61,7 @@ public class TradeReportController extends BaseController
@ApiOperation("设备汇总") @ApiOperation("设备汇总")
@PostMapping("/revenue/device") @PostMapping("/revenue/device")
@ResponseBody @ResponseBody
public TableDataInfo selectDeviceRevenue(DeviceRevenueParam param) public TableDataInfo selectDeviceRevenue(@RequestBody DeviceRevenueParam param)
{ {
startPage(); startPage();
List<DeviceRevenueVO> list = tradeReportService.selectDeviceRevenue(param); List<DeviceRevenueVO> list = tradeReportService.selectDeviceRevenue(param);
@ -70,7 +70,7 @@ public class TradeReportController extends BaseController
@ApiOperation("个人消费汇总") @ApiOperation("个人消费汇总")
@PostMapping("/revenue/user") @PostMapping("/revenue/user")
@ResponseBody @ResponseBody
public TableDataInfo selectUserRevenue(UserRevenueParam param) public TableDataInfo selectUserRevenue(@RequestBody UserRevenueParam param)
{ {
startPage(); startPage();
List<UserRevenueVO> list = tradeReportService.selectUserRevenue(param); List<UserRevenueVO> list = tradeReportService.selectUserRevenue(param);
@ -79,7 +79,7 @@ public class TradeReportController extends BaseController
@ApiOperation("菜品销售汇总") @ApiOperation("菜品销售汇总")
@PostMapping("/revenue/goods") @PostMapping("/revenue/goods")
@ResponseBody @ResponseBody
public TableDataInfo selectGoodsRevenue(GoodsRevenueParam param) public TableDataInfo selectGoodsRevenue(@RequestBody GoodsRevenueParam param)
{ {
startPage(); startPage();
List<GoodsRevenueVO> list = tradeReportService.selectGoodsRevenue(param); List<GoodsRevenueVO> list = tradeReportService.selectGoodsRevenue(param);

View File

@ -1,5 +1,6 @@
package com.bonus.canteen.core.report.service.impl; package com.bonus.canteen.core.report.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.bonus.canteen.core.report.domain.*; import com.bonus.canteen.core.report.domain.*;
import com.bonus.canteen.core.report.mapper.TradeReportMapper; import com.bonus.canteen.core.report.mapper.TradeReportMapper;
import com.bonus.canteen.core.report.service.TradeReportService; import com.bonus.canteen.core.report.service.TradeReportService;
@ -8,6 +9,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@Service @Service
public class TradeReportServiceImpl implements TradeReportService { public class TradeReportServiceImpl implements TradeReportService {
@ -17,7 +19,13 @@ public class TradeReportServiceImpl implements TradeReportService {
@Override @Override
public List<TradeFlowVO> selectTradeFlow(TradeFlowParam param) { public List<TradeFlowVO> selectTradeFlow(TradeFlowParam param) {
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue()); String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue());
return tradeReportMapper.selectTradeFlow(param, encryptedSearchValue); List<TradeFlowVO> tradeFlowVOList = tradeReportMapper.selectTradeFlow(param, encryptedSearchValue);
if(CollUtil.isNotEmpty(tradeFlowVOList)) {
for(TradeFlowVO vo : tradeFlowVOList) {
vo.setPhonenumber(SM4EncryptUtils.sm4Decrypt(vo.getPhonenumber()));
}
}
return tradeFlowVOList;
} }
@Override @Override

View File

@ -242,7 +242,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN sys_dept sd ON sd.dept_id = ate.dept_id LEFT JOIN sys_dept sd ON sd.dept_id = ate.dept_id
LEFT JOIN acc_trade_wallet_detail atwd ON ate.trade_id = atwd.trade_id LEFT JOIN acc_trade_wallet_detail atwd ON ate.trade_id = atwd.trade_id
<where> <where>
ate.trade_type = #{param.tradeType} and ate.pay_state = 3 <if test="param.tradeType != null">
ate.trade_type = #{param.tradeType}
</if>
<if test="param.payState != null">
and ate.pay_state = #{param.payState}
</if>
<if test="param.startDateTime != null"> <if test="param.startDateTime != null">
and ate.trade_time <![CDATA[ >= ]]> #{param.startDateTime} and ate.trade_time <![CDATA[ >= ]]> #{param.startDateTime}
</if> </if>