|
@@ -30,6 +30,7 @@ import javax.servlet.ServletOutputStream;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* Created by CodeGenerator on 2025/07/15.
|
|
@@ -104,7 +105,7 @@ public class RechargeRecordController {
|
|
|
|
|
|
@PostMapping("/list")
|
|
|
@ApiOperation(value = "rechargeRecord获取列表",httpMethod = "POST")
|
|
|
- public Result<List<RechargeRecord>> list(@RequestBody RecordParam param) {
|
|
|
+ public Result<List<RechargeRecordBO>> list(@RequestBody RecordParam param) {
|
|
|
|
|
|
PageHelper.startPage(param.getPage(), param.getSize());
|
|
|
|
|
@@ -141,6 +142,22 @@ public class RechargeRecordController {
|
|
|
condition.setOrderByClause("create_time desc");
|
|
|
List<RechargeRecord> list = rechargeRecordService.findByCondition(condition);
|
|
|
pageInfo = new PageInfo(list);
|
|
|
+ pageInfo.setList(list.stream().map(e-> {
|
|
|
+ RechargeRecordBO bo = BeanUtil.toBean(e,RechargeRecordBO.class);
|
|
|
+ if (e.getMethodId() != null){
|
|
|
+ PaymentMethod method = paymentMethodService.findById(e.getMethodId());
|
|
|
+ if (method != null){
|
|
|
+ bo.setMethodName(method.getMethodName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (e.getChannelId() != null){
|
|
|
+ PaymentChannel channel = paymentChannelService.findById(e.getChannelId());
|
|
|
+ if (channel != null){
|
|
|
+ bo.setChannelName(channel.getChannelName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return bo;
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
} catch (Exception e) {
|
|
|
log.error("查询对象操作异常e:{}",e);
|
|
|
return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
|