Browse Source

Merge branch 'milestone-20251104-现金管理二期' into sunjiabei/feature-20251021102635-银行接口

sunjiabei/feature-20251021102635-银行接口
sunjiabei 11 hours ago
parent
commit
9226ffd22a
  1. 2
      src/main/java/com/example/demo/controller/bean/BeanConsumeController.java
  2. 46
      src/main/java/com/example/demo/domain/DTO/BeanConsumeCartDTO.java
  3. 1
      src/main/java/com/example/demo/domain/entity/CashRecord.java
  4. 9
      src/main/java/com/example/demo/domain/vo/bean/BeanConsumeCartVo.java
  5. 3
      src/main/java/com/example/demo/domain/vo/coin/Page.java
  6. 8
      src/main/java/com/example/demo/mapper/cash/CashCollectionMapper.java
  7. 3
      src/main/java/com/example/demo/mapper/coin/BeanRechargeMapper1.java
  8. 3
      src/main/java/com/example/demo/service/bean/BeanConsumeService.java
  9. 2
      src/main/java/com/example/demo/serviceImpl/bean/BeanAuditServiceImpl.java
  10. 21
      src/main/java/com/example/demo/serviceImpl/bean/BeanConsumeServiceImpl.java
  11. 4
      src/main/java/com/example/demo/serviceImpl/bean/BeanRechargeServiceImpl.java
  12. 2
      src/main/java/com/example/demo/serviceImpl/bean/BeanUserServiceImpl.java
  13. 5
      src/main/java/com/example/demo/serviceImpl/cash/CashAuditServiceImpl.java
  14. 2
      src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java
  15. 6
      src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java
  16. 4
      src/main/java/com/example/demo/serviceImpl/coin/AuditServiceImpl.java
  17. 4
      src/main/java/com/example/demo/serviceImpl/coin/ConsumeServiceImpl.java
  18. 4
      src/main/java/com/example/demo/serviceImpl/coin/GoldDetailServiceImpl.java
  19. 2
      src/main/java/com/example/demo/serviceImpl/coin/PermissionServiceImpl.java
  20. 2
      src/main/java/com/example/demo/serviceImpl/coin/RateServiceImpl.java
  21. 2
      src/main/java/com/example/demo/serviceImpl/coin/RechargeActivityCenterServiceImpl.java
  22. 4
      src/main/java/com/example/demo/serviceImpl/coin/RechargeServiceImpl.java
  23. 4
      src/main/java/com/example/demo/serviceImpl/coin/RefundServiceImpl.java
  24. 2
      src/main/java/com/example/demo/serviceImpl/coin/RoleServiceImpl.java
  25. 11
      src/main/resources/cashMapper/CashCollectionMapper.xml
  26. 32
      src/main/resources/mapper/BeanRechargeMapper1.xml

2
src/main/java/com/example/demo/controller/bean/BeanConsumeController.java

@ -122,7 +122,7 @@ public class BeanConsumeController {
return Result.error("页大小为空!"); return Result.error("页大小为空!");
} else { } else {
return Result.success(beanConsumeService.selectCartBy(page.getPageNum(), page.getPageSize(), page.getBeanConsumeCart()));
return Result.success(beanConsumeService.selectCartBy(page.getPageNum(), page.getPageSize(), page.getBeanConsumeCartDTO()));
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

46
src/main/java/com/example/demo/domain/DTO/BeanConsumeCartDTO.java

@ -0,0 +1,46 @@
package com.example.demo.domain.DTO;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @program: gold-java
* @ClassName BeanConsumeCartDTO
* @description:
* @author: Ethan
* @create: 202511-25 09:59
* @Version 1.0
**/
@Data
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class BeanConsumeCartDTO implements Serializable {
private Integer id;
private Integer roleId;
private String nickname; // 姓名
private Integer jwcode; // 精网号
// private Integer productId; // 产品 ID
private String productName; //产品名称
private String market; //用户地区
//private BigDecimal totalMoney; // 金额
private String liveName; // 直播间名称
private String sourceName; // 班级或频道名称
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date endTime;
private Long createdAt; // 创建时间
private String startAt; //时间戳开始时间
private String endAt; //时间戳结束时间
private String sortField; //排序字段
private String sortOrder; //排序顺序
}

1
src/main/java/com/example/demo/domain/entity/CashRecord.java

@ -24,6 +24,7 @@ public class CashRecord implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Integer id; // 序号 private Integer id; // 序号
private Integer version; // 版本号
// 订单信息 // 订单信息
private Integer orderType; // 订单类型1-收款2-退款 private Integer orderType; // 订单类型1-收款2-退款

9
src/main/java/com/example/demo/domain/vo/bean/BeanConsumeCartVo.java

@ -5,8 +5,10 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
/** /**
* @program: gold-java * @program: gold-java
@ -19,7 +21,7 @@ import java.time.LocalDateTime;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public class BeanConsumeCartVo {
public class BeanConsumeCartVo implements Serializable {
private Integer id; private Integer id;
private String nickname; // 姓名 private String nickname; // 姓名
private Integer jwcode; // 精网号 private Integer jwcode; // 精网号
@ -29,7 +31,6 @@ public class BeanConsumeCartVo {
private BigDecimal totalMoney; // 应付金额 private BigDecimal totalMoney; // 应付金额
private String liveName; // 直播间名称 private String liveName; // 直播间名称
private String sourceName; // 班级或频道名称 private String sourceName; // 班级或频道名称
private Long tradeTime; // 支付成功时间
private Long createdAt; // 创建时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdAt; // 创建时间
} }

3
src/main/java/com/example/demo/domain/vo/coin/Page.java

@ -1,5 +1,6 @@
package com.example.demo.domain.vo.coin; package com.example.demo.domain.vo.coin;
import com.example.demo.domain.DTO.BeanConsumeCartDTO;
import com.example.demo.domain.entity.User; import com.example.demo.domain.entity.User;
import com.example.demo.domain.vo.bean.*; import com.example.demo.domain.vo.bean.*;
import com.example.demo.domain.vo.cash.CashCollection; import com.example.demo.domain.vo.cash.CashCollection;
@ -37,6 +38,7 @@ public class Page {
private BeanConsumeFan beanConsumeFan; //铁粉金豆消费 private BeanConsumeFan beanConsumeFan; //铁粉金豆消费
private BeanConsumeArticle beanConsumeArticle; //文章金豆消费 private BeanConsumeArticle beanConsumeArticle; //文章金豆消费
private BeanConsumeCart beanConsumeCart; //小黄车金豆消费 private BeanConsumeCart beanConsumeCart; //小黄车金豆消费
private BeanConsumeCartDTO beanConsumeCartDTO; //小黄车dto
private BeanSystemRechargeInfo beanSystemRechargeInfo; //金豆充值信息 private BeanSystemRechargeInfo beanSystemRechargeInfo; //金豆充值信息
private BeanOnlineRechargeInfo beanOnlineRechargeInfo; //金豆充值信息 private BeanOnlineRechargeInfo beanOnlineRechargeInfo; //金豆充值信息
private BeanConsumeGold beanConsumeGold; //金豆消费合计数 private BeanConsumeGold beanConsumeGold; //金豆消费合计数
@ -49,4 +51,5 @@ public class Page {
private RechargeActivity rechargeActivity; //充值活动 private RechargeActivity rechargeActivity; //充值活动
private CashRecordDTO cashRecordDTO; private CashRecordDTO cashRecordDTO;
} }

8
src/main/java/com/example/demo/mapper/cash/CashCollectionMapper.java

@ -62,6 +62,14 @@ public interface CashCollectionMapper {
List<CashCollection> selectBatchIds(Set<Integer> relatedIds); List<CashCollection> selectBatchIds(Set<Integer> relatedIds);
//根据glodcoin订单号查询收款订单 //根据glodcoin订单号查询收款订单
CashCollection selectByGoldCoinOrderCode(String orderNo); CashCollection selectByGoldCoinOrderCode(String orderNo);
/**
* 带版本号的审核更新
* @return 更新成功返回 1失败返回 0
*/
int updateOrderWithVersion(@Param("orderCode") String orderCode,
@Param("status") Integer status,
@Param("auditId") Integer auditId,
@Param("version") Integer version);
void updateByGoldCoinOrderCodeByPayment(PaymentDTO paymentDTO); void updateByGoldCoinOrderCodeByPayment(PaymentDTO paymentDTO);
void updateByGoldCoinOrderCodeByStripe(StripeDTO stripeDTO); void updateByGoldCoinOrderCodeByStripe(StripeDTO stripeDTO);

3
src/main/java/com/example/demo/mapper/coin/BeanRechargeMapper1.java

@ -1,6 +1,7 @@
package com.example.demo.mapper.coin; package com.example.demo.mapper.coin;
import com.example.demo.domain.DTO.BeanConsumeCartDTO;
import com.example.demo.domain.vo.bean.BeanConsumeCart; import com.example.demo.domain.vo.bean.BeanConsumeCart;
import com.example.demo.domain.vo.bean.BeanConsumeCartVo; import com.example.demo.domain.vo.bean.BeanConsumeCartVo;
import com.example.demo.domain.vo.bean.BeanRecharge; import com.example.demo.domain.vo.bean.BeanRecharge;
@ -20,6 +21,6 @@ import java.util.List;
@Mapper @Mapper
public interface BeanRechargeMapper1 { public interface BeanRechargeMapper1 {
//筛选查询小黄车消费 //筛选查询小黄车消费
List<BeanConsumeCartVo> selectCartBy(BeanConsumeCart beanConsumeCart);
List<BeanConsumeCartVo> selectCartBy(BeanConsumeCartDTO beanConsumeCartDTO);
int add(BeanRecharge recharge); int add(BeanRecharge recharge);
} }

3
src/main/java/com/example/demo/service/bean/BeanConsumeService.java

@ -1,5 +1,6 @@
package com.example.demo.service.bean; package com.example.demo.service.bean;
import com.example.demo.domain.DTO.BeanConsumeCartDTO;
import com.example.demo.domain.vo.bean.*; import com.example.demo.domain.vo.bean.*;
import com.example.demo.domain.vo.coin.Gold; import com.example.demo.domain.vo.coin.Gold;
import com.example.demo.domain.vo.coin.Page; import com.example.demo.domain.vo.coin.Page;
@ -37,5 +38,5 @@ public interface BeanConsumeService {
List<String> getLiveChannel(); List<String> getLiveChannel();
//筛选查询小黄车消费 //筛选查询小黄车消费
Object selectCartBy(Integer pageNum, Integer pageSize, BeanConsumeCart beanConsumeCart);
Object selectCartBy(Integer pageNum, Integer pageSize, BeanConsumeCartDTO beanConsumeCartDTO);
} }

2
src/main/java/com/example/demo/serviceImpl/bean/BeanAuditServiceImpl.java

@ -57,7 +57,7 @@ public class BeanAuditServiceImpl implements BeanAuditService {
//查找审核信息 //查找审核信息
@Override @Override
public PageInfo<BeanAuditInfo> selectBy(Integer pageNum, Integer pageSize, BeanAuditInfo beanAuditInfo) { public PageInfo<BeanAuditInfo> selectBy(Integer pageNum, Integer pageSize, BeanAuditInfo beanAuditInfo) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<BeanAuditInfo> beanAuditInfos = beanAuditMapper.selectBy(beanAuditInfo); List<BeanAuditInfo> beanAuditInfos = beanAuditMapper.selectBy(beanAuditInfo);
return new PageInfo<>(beanAuditInfos); return new PageInfo<>(beanAuditInfos);
} }

21
src/main/java/com/example/demo/serviceImpl/bean/BeanConsumeServiceImpl.java

@ -1,6 +1,7 @@
package com.example.demo.serviceImpl.bean; package com.example.demo.serviceImpl.bean;
import com.example.demo.Util.BaseDES2; import com.example.demo.Util.BaseDES2;
import com.example.demo.domain.DTO.BeanConsumeCartDTO;
import com.example.demo.domain.vo.bean.*; import com.example.demo.domain.vo.bean.*;
import com.example.demo.domain.vo.coin.*; import com.example.demo.domain.vo.coin.*;
import com.example.demo.mapper.bean.BeanConsumeMapper; import com.example.demo.mapper.bean.BeanConsumeMapper;
@ -166,7 +167,7 @@ public class BeanConsumeServiceImpl implements BeanConsumeService {
if (!channel.equals("全部")){ if (!channel.equals("全部")){
beanConsumeLive.setLiveChannel(channel); beanConsumeLive.setLiveChannel(channel);
} }
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<BeanConsumeLive> beanConsumeLives = liveMapper.selectLiveBy(beanConsumeLive); List<BeanConsumeLive> beanConsumeLives = liveMapper.selectLiveBy(beanConsumeLive);
//int total = liveMapper.selectLiveCount(beanConsumeLive); //int total = liveMapper.selectLiveCount(beanConsumeLive);
return new PageInfo<>(beanConsumeLives); return new PageInfo<>(beanConsumeLives);
@ -182,22 +183,30 @@ public class BeanConsumeServiceImpl implements BeanConsumeService {
if (!channel.equals("全部")){ if (!channel.equals("全部")){
beanConsumeFan.setChannel(channel); beanConsumeFan.setChannel(channel);
} }
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<BeanConsumeFan> beanConsumeFans = beanConsumeMapper.selectFanBy(beanConsumeFan); List<BeanConsumeFan> beanConsumeFans = beanConsumeMapper.selectFanBy(beanConsumeFan);
return new PageInfo<>(beanConsumeFans); return new PageInfo<>(beanConsumeFans);
} }
//筛选查询文章消费 //筛选查询文章消费
@Override @Override
public Object selectArticleBy(Integer pageNum, Integer pageSize, BeanConsumeArticle beanConsumeArticle) { public Object selectArticleBy(Integer pageNum, Integer pageSize, BeanConsumeArticle beanConsumeArticle) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<BeanConsumeArticle> beanConsumeArticles = beanConsumeMapper.selectArticleBy(beanConsumeArticle); List<BeanConsumeArticle> beanConsumeArticles = beanConsumeMapper.selectArticleBy(beanConsumeArticle);
return new PageInfo<>(beanConsumeArticles); return new PageInfo<>(beanConsumeArticles);
} }
//筛选查询小黄车消费 //筛选查询小黄车消费
@Override @Override
public Object selectCartBy(Integer pageNum, Integer pageSize, BeanConsumeCart beanConsumeCart) {
PageHelper.startPage(pageNum, pageSize);
List<BeanConsumeCartVo> beanConsumeCarts = beanRechargeMapper1.selectCartBy(beanConsumeCart);
public Object selectCartBy(Integer pageNum, Integer pageSize, BeanConsumeCartDTO beanConsumeCartDTO) {
String channel=roleMapper.getChannel(beanConsumeCartDTO.getRoleId());
if (channel==null){
return "角色频道有误";
}
if (!channel.equals("全部")){
beanConsumeCartDTO.setSourceName(channel);
}
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<BeanConsumeCartVo> beanConsumeCarts = beanRechargeMapper1.selectCartBy(beanConsumeCartDTO);
return new PageInfo<>(beanConsumeCarts); return new PageInfo<>(beanConsumeCarts);
} }
@Override @Override

4
src/main/java/com/example/demo/serviceImpl/bean/BeanRechargeServiceImpl.java

@ -124,7 +124,7 @@ public class BeanRechargeServiceImpl implements BeanRechargeService {
//系统充值明细 //系统充值明细
@Override @Override
public PageInfo<BeanSystemRechargeInfo> selectBySystem(Integer pageNum, Integer pageSize, BeanSystemRechargeInfo beanSystemRechargeInfo){ public PageInfo<BeanSystemRechargeInfo> selectBySystem(Integer pageNum, Integer pageSize, BeanSystemRechargeInfo beanSystemRechargeInfo){
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<BeanSystemRechargeInfo> beanSystemRechargeInfos = beanRechargeMapper2.selectBySystem(beanSystemRechargeInfo); List<BeanSystemRechargeInfo> beanSystemRechargeInfos = beanRechargeMapper2.selectBySystem(beanSystemRechargeInfo);
return new PageInfo<>(beanSystemRechargeInfos); return new PageInfo<>(beanSystemRechargeInfos);
} }
@ -167,7 +167,7 @@ public class BeanRechargeServiceImpl implements BeanRechargeService {
//线上充值明细 //线上充值明细
@Override @Override
public PageInfo<BeanOnlineRechargeInfo> selectByOnline(Integer pageNum, Integer pageSize, BeanOnlineRechargeInfo beanOnlineRechargeInfo){ public PageInfo<BeanOnlineRechargeInfo> selectByOnline(Integer pageNum, Integer pageSize, BeanOnlineRechargeInfo beanOnlineRechargeInfo){
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<BeanOnlineRechargeInfo> beanOnlineRechargeInfos = beanRechargeMapper3.selectByOnline(beanOnlineRechargeInfo); List<BeanOnlineRechargeInfo> beanOnlineRechargeInfos = beanRechargeMapper3.selectByOnline(beanOnlineRechargeInfo);
return new PageInfo<>(beanOnlineRechargeInfos); return new PageInfo<>(beanOnlineRechargeInfos);
} }

2
src/main/java/com/example/demo/serviceImpl/bean/BeanUserServiceImpl.java

@ -51,7 +51,7 @@ public class BeanUserServiceImpl implements BeanUserService {
//查询客户金豆余额 //查询客户金豆余额
@Override @Override
public Object selectUserBy(Integer pageNum, Integer pageSize, BeanUser beanUser) { public Object selectUserBy(Integer pageNum, Integer pageSize, BeanUser beanUser) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<BeanUser> beanUsers = beanUserMapper.selectUserBy(beanUser); List<BeanUser> beanUsers = beanUserMapper.selectUserBy(beanUser);
return new PageInfo<>(beanUsers); return new PageInfo<>(beanUsers);
} }

5
src/main/java/com/example/demo/serviceImpl/cash/CashAuditServiceImpl.java

@ -54,6 +54,11 @@ public class CashAuditServiceImpl implements CashAuditService {
) { ) {
throw new IllegalArgumentException("订单不存在或已被审核"); throw new IllegalArgumentException("订单不存在或已被审核");
} }
//带版本更新
int updated=cashCollectionMapper.updateOrderWithVersion(orderCode, action==1?1:2, auditId, order.getVersion());
if (updated==0){
throw new IllegalArgumentException("订单已被其他审核员审核");
}
CashRecord updateOrder = new CashRecord(); CashRecord updateOrder = new CashRecord();
//设置审核人 //设置审核人
updateOrder.setAuditId(auditId); updateOrder.setAuditId(auditId);

2
src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java

@ -278,7 +278,7 @@ public class CashCollectionServiceImpl implements CashCollectionService {
cashCollection.setReceivedMarket(null); cashCollection.setReceivedMarket(null);
} }
// cashCollection.setMarkets(markets); // cashCollection.setMarkets(markets);
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<CashCollection> cashCollections = cashCollectionMapper.selectCollection1(pageNum, pageSize, cashCollection); List<CashCollection> cashCollections = cashCollectionMapper.selectCollection1(pageNum, pageSize, cashCollection);
return new PageInfo<>(cashCollections); return new PageInfo<>(cashCollections);
} }

6
src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java

@ -61,7 +61,7 @@ public class CashRefundServiceImpl implements RefundService {
@Override @Override
public PageInfo<CashRecordDTO> select(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) { public PageInfo<CashRecordDTO> select(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<CashRecordDTO> list = cashRefundMapper.select(cashRecordDTO); List<CashRecordDTO> list = cashRefundMapper.select(cashRecordDTO);
if (list.isEmpty()) { if (list.isEmpty()) {
@ -403,7 +403,7 @@ CashRecordDone cashRecordDone1 = new CashRecordDone();
@Override @Override
public PageInfo<CashRecordDTO> financeSelect(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) { public PageInfo<CashRecordDTO> financeSelect(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
// System.out.println(goldDetail.getMarkets()); // System.out.println(goldDetail.getMarkets());
List<CashRecordDTO> list = cashRefundMapper.financeSelect(cashRecordDTO); List<CashRecordDTO> list = cashRefundMapper.financeSelect(cashRecordDTO);
if (list.isEmpty()) { if (list.isEmpty()) {
@ -470,7 +470,7 @@ CashRecordDone cashRecordDone1 = new CashRecordDone();
@Override @Override
public PageInfo<CashRecordDTO> exSelect(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) { public PageInfo<CashRecordDTO> exSelect(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
// System.out.println(goldDetail.getMarkets()); // System.out.println(goldDetail.getMarkets());
List<CashRecordDTO> list = cashRefundMapper.exSelect(cashRecordDTO); List<CashRecordDTO> list = cashRefundMapper.exSelect(cashRecordDTO);
System.out.println( list); System.out.println( list);

4
src/main/java/com/example/demo/serviceImpl/coin/AuditServiceImpl.java

@ -174,7 +174,7 @@ public class AuditServiceImpl implements AuditService {
markets=null; markets=null;
} }
rechargeAudit.setMarkets(markets); rechargeAudit.setMarkets(markets);
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<RechargeAudit> rechargeAudits = auditMapper.selectRechargeBy(pageNum, pageSize, rechargeAudit); List<RechargeAudit> rechargeAudits = auditMapper.selectRechargeBy(pageNum, pageSize, rechargeAudit);
// rechargeAudit.setFreeGold(rechargeAudit.getFreeJune()+rechargeAudit.getFreeDecember()); // rechargeAudit.setFreeGold(rechargeAudit.getFreeJune()+rechargeAudit.getFreeDecember());
return new PageInfo<>(rechargeAudits); return new PageInfo<>(rechargeAudits);
@ -191,7 +191,7 @@ public class AuditServiceImpl implements AuditService {
markets=null; markets=null;
} }
refundAudit.setMarkets(markets); refundAudit.setMarkets(markets);
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<RefundAudit> refundAudits = auditMapper.selectRefundBy(pageNum, pageSize, refundAudit); List<RefundAudit> refundAudits = auditMapper.selectRefundBy(pageNum, pageSize, refundAudit);
//refundAudit.setFreeGold(refundAudit.getFreeJune()+refundAudit.getFreeDecember()); //refundAudit.setFreeGold(refundAudit.getFreeJune()+refundAudit.getFreeDecember());

4
src/main/java/com/example/demo/serviceImpl/coin/ConsumeServiceImpl.java

@ -56,7 +56,7 @@ public class ConsumeServiceImpl implements ConsumeService {
//获取市场id //获取市场id
List<String> markets = marketMapper.getMarketIds(consumeUser.getMarkets()); List<String> markets = marketMapper.getMarketIds(consumeUser.getMarkets());
consumeUser.setMarkets(markets); consumeUser.setMarkets(markets);
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<ConsumeUser> consumeUsers = consumeMapper.selectAll(consumeUser); List<ConsumeUser> consumeUsers = consumeMapper.selectAll(consumeUser);
return new PageInfo<>(consumeUsers); return new PageInfo<>(consumeUsers);
} }
@ -83,7 +83,7 @@ public class ConsumeServiceImpl implements ConsumeService {
markets=null; markets=null;
} }
consumeUser.setMarkets(markets); consumeUser.setMarkets(markets);
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<ConsumeUser> consumeUsers = consumeMapper.selectBy(consumeUser); List<ConsumeUser> consumeUsers = consumeMapper.selectBy(consumeUser);
return new PageInfo<>(consumeUsers); return new PageInfo<>(consumeUsers);
} }

4
src/main/java/com/example/demo/serviceImpl/coin/GoldDetailServiceImpl.java

@ -48,7 +48,7 @@ public class GoldDetailServiceImpl implements GoldDetailService {
@Override @Override
public PageInfo<GoldDetail> getGoldDetail(Integer pageNum, Integer pageSize, GoldDetail goldDetail) { public PageInfo<GoldDetail> getGoldDetail(Integer pageNum, Integer pageSize, GoldDetail goldDetail) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
// System.out.println(goldDetail.getMarkets()); // System.out.println(goldDetail.getMarkets());
List<GoldDetail> list = goldDetailMapper.getGoldDetail(goldDetail); List<GoldDetail> list = goldDetailMapper.getGoldDetail(goldDetail);
return new PageInfo<>(list); return new PageInfo<>(list);
@ -62,7 +62,7 @@ public class GoldDetailServiceImpl implements GoldDetailService {
@Override @Override
public PageInfo<User> getGold(Integer pageNum, Integer pageSize, User user) { public PageInfo<User> getGold(Integer pageNum, Integer pageSize, User user) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<User> list = goldDetailMapper.getGold(user); List<User> list = goldDetailMapper.getGold(user);
return new PageInfo<>(list); return new PageInfo<>(list);

2
src/main/java/com/example/demo/serviceImpl/coin/PermissionServiceImpl.java

@ -54,7 +54,7 @@ public class PermissionServiceImpl implements PermissionService {
@Override @Override
public PageInfo<Permission> getpermission(Integer pageNum, Integer pageSize, Permission permission) { public PageInfo<Permission> getpermission(Integer pageNum, Integer pageSize, Permission permission) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<Permission> list = permissionMapper.getPermission(permission); List<Permission> list = permissionMapper.getPermission(permission);
for (Permission item : list) { for (Permission item : list) {
String machineIdsStr = item.getMachineId(); // 假设原始字段是 String 类型 String machineIdsStr = item.getMachineId(); // 假设原始字段是 String 类型

2
src/main/java/com/example/demo/serviceImpl/coin/RateServiceImpl.java

@ -23,7 +23,7 @@ public class RateServiceImpl implements RateService {
@Override @Override
public PageInfo<RateDetail> selectAll(Integer pageNum, Integer pageSize) { public PageInfo<RateDetail> selectAll(Integer pageNum, Integer pageSize) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<RateDetail> rates = rateMapper.selectAll(); List<RateDetail> rates = rateMapper.selectAll();
return new PageInfo<>(rates); return new PageInfo<>(rates);
} }

2
src/main/java/com/example/demo/serviceImpl/coin/RechargeActivityCenterServiceImpl.java

@ -35,7 +35,7 @@ public class RechargeActivityCenterServiceImpl implements RechargeActivityCenter
@Override @Override
public PageInfo<RechargeActivity> queryActivity(Integer pageNum, Integer pageSize, RechargeActivity activity) { public PageInfo<RechargeActivity> queryActivity(Integer pageNum, Integer pageSize, RechargeActivity activity) {
updateStatus(); updateStatus();
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<RechargeActivity> activityList = rechargeActivityCenterMapper.queryActivity(activity); List<RechargeActivity> activityList = rechargeActivityCenterMapper.queryActivity(activity);
return new PageInfo<>(activityList); return new PageInfo<>(activityList);
} }

4
src/main/java/com/example/demo/serviceImpl/coin/RechargeServiceImpl.java

@ -55,7 +55,7 @@ public class RechargeServiceImpl implements RechargeService {
//获取市场id //获取市场id
List<String> markets = marketMapper.getMarketIds(rechargeUser.getMarkets()); List<String> markets = marketMapper.getMarketIds(rechargeUser.getMarkets());
rechargeUser.setMarkets(markets); rechargeUser.setMarkets(markets);
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<RechargeUser> rechargeUsers = rechargeMapper.selectAll(rechargeUser); List<RechargeUser> rechargeUsers = rechargeMapper.selectAll(rechargeUser);
return new PageInfo<>(rechargeUsers); return new PageInfo<>(rechargeUsers);
} }
@ -68,7 +68,7 @@ public class RechargeServiceImpl implements RechargeService {
markets=null; markets=null;
} }
rechargeUser.setMarkets(markets); rechargeUser.setMarkets(markets);
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<RechargeUser> rechargeUsers = rechargeMapper.selectBy(rechargeUser); List<RechargeUser> rechargeUsers = rechargeMapper.selectBy(rechargeUser);
return new PageInfo<>(rechargeUsers); return new PageInfo<>(rechargeUsers);
} }

4
src/main/java/com/example/demo/serviceImpl/coin/RefundServiceImpl.java

@ -51,7 +51,7 @@ public class RefundServiceImpl implements RefundService {
public PageInfo<RefundUser> selectAll(Integer pageNum, Integer pageSize, RefundUser refundUser) throws Exception { public PageInfo<RefundUser> selectAll(Integer pageNum, Integer pageSize, RefundUser refundUser) throws Exception {
List<String> markets = marketMapper.getMarketIds(refundUser.getMarkets()); List<String> markets = marketMapper.getMarketIds(refundUser.getMarkets());
refundUser.setMarkets(markets); refundUser.setMarkets(markets);
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<RefundUser> refundUsers = refundMapper.selectAll(refundUser); List<RefundUser> refundUsers = refundMapper.selectAll(refundUser);
return new PageInfo<>(refundUsers); return new PageInfo<>(refundUsers);
} }
@ -76,7 +76,7 @@ public class RefundServiceImpl implements RefundService {
markets = null; markets = null;
} }
refundUser.setMarkets(markets); refundUser.setMarkets(markets);
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<RefundUser> refundUsers = refundMapper.selectBy(refundUser); List<RefundUser> refundUsers = refundMapper.selectBy(refundUser);
return new PageInfo<>(refundUsers); return new PageInfo<>(refundUsers);
} }

2
src/main/java/com/example/demo/serviceImpl/coin/RoleServiceImpl.java

@ -237,7 +237,7 @@ public class RoleServiceImpl implements RoleService {
//分页查找角色 //分页查找角色
@Override @Override
public PageInfo<RoleVo> selectBy(Integer pageNum, Integer pageSize, RoleVo roleVo) { public PageInfo<RoleVo> selectBy(Integer pageNum, Integer pageSize, RoleVo roleVo) {
PageHelper.startPage(pageNum, pageSize);
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<RoleVo> roleVos = roleMapper.selectBy(roleVo); List<RoleVo> roleVos = roleMapper.selectBy(roleVo);
// 遍历 roleVos 列表 // 遍历 roleVos 列表
for (RoleVo role : roleVos) { for (RoleVo role : roleVos) {

11
src/main/resources/cashMapper/CashCollectionMapper.xml

@ -206,7 +206,7 @@
select crc.id,jwcode,name,market,ra.activity_name as activity, select crc.id,jwcode,name,market,ra.activity_name as activity,
order_code,bank_code,goods_name,good_num,num_unit,permanent_gold,free_gold, order_code,bank_code,goods_name,good_num,num_unit,permanent_gold,free_gold,
payment_currency,payment_amount,pay_type,pay_time,crc.status,submitter_id, payment_currency,payment_amount,pay_type,pay_time,crc.status,submitter_id,
voucher,remark
voucher,remark,version
from cash_record_collection crc from cash_record_collection crc
left join recharge_activity ra on ra.id = crc.activity left join recharge_activity ra on ra.id = crc.activity
where order_code=#{orderCode} where order_code=#{orderCode}
@ -303,4 +303,13 @@
order_no_status=0 order_no_status=0
where order_no=#{orderNo} where order_no=#{orderNo}
</update> </update>
<update id="updateOrderWithVersion">
UPDATE cash_record_collection
SET status = #{status},
audit_id = #{auditId},
version = version + 1
WHERE order_code = #{orderCode}
AND status = 0
AND version = #{version}
</update>
</mapper> </mapper>

32
src/main/resources/mapper/BeanRechargeMapper1.xml

@ -29,10 +29,40 @@
<!--筛选查询小黄车消费数据--> <!--筛选查询小黄车消费数据-->
<select id="selectCartBy" resultType="com.example.demo.domain.vo.bean.BeanConsumeCartVo"> <select id="selectCartBy" resultType="com.example.demo.domain.vo.bean.BeanConsumeCartVo">
select select
co.nickname,co.jwcode,m.name AS market,pd.name AS productName,co.total_money,co.live_name,co.source_name,co.created_at
co.id, co.nickname,co.jwcode,m.name AS market,pd.name AS productName,co.total_money,co.source_name,co.live_name, FROM_UNIXTIME(co.created_at) AS createdAt
from cart_order co from cart_order co
left join user u on u.jwcode = co.jwcode left join user u on u.jwcode = co.jwcode
left join market m on m.id = u.market left join market m on m.id = u.market
left join product_dict pd on pd.id = co.product_id left join product_dict pd on pd.id = co.product_id
<where>
<if test="jwcode!= null and jwcode!=''">
and co.jwcode =#{jwcode}
</if>
<if test="market!= null and market!=''">
and m.id = #{market}
</if>
<if test="productName!= null and productName!=''">
and pd.name = #{productName}
</if>
<if test="liveName!= null and liveName!=''">
and co.live_name = #{liveName}
</if>
<if test="sourceName!= null and sourceName!=''">
and co.source_name = #{sourceName}
</if>
<if test="startAt!= null and startAt!='' and endAt!=null and endAt!=''">
and co.created_at between
UNIX_TIMESTAMP(#{beanConsumeCartDTO.startTime}) and
UNIX_TIMESTAMP(#{beanConsumeCartDTO.endTime})
</if>
</where>
<choose>
<when test="sortField != null and sortField.length > 0 or sortOrder != null and sortOrder.length > 0">
ORDER BY ${sortField} ${sortOrder}
</when>
<otherwise>
ORDER BY created_at DESC
</otherwise>
</choose>
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save