You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
5.5 KiB

6 months ago
3 months ago
6 months ago
6 months ago
5 months ago
6 months ago
3 months ago
6 months ago
  1. package com.example.demo.mapper.cash;
  2. //import com.example.demo.domain.DTO.PaymentDTO;
  3. import com.example.demo.domain.DTO.*;
  4. import com.example.demo.domain.entity.*;
  5. import com.example.demo.domain.vo.cash.CashCollection;
  6. import com.example.demo.domain.vo.cash.PerformanceVO;
  7. import com.example.demo.domain.vo.cash.UserWalletRecordVO;
  8. import com.example.demo.domain.vo.cash.UserWalletVO;
  9. import org.apache.ibatis.annotations.Mapper;
  10. import org.apache.ibatis.annotations.Param;
  11. import java.time.LocalDateTime;
  12. import java.util.List;
  13. import java.util.Set;
  14. /**
  15. * @program: gold-java
  16. * @ClassName CashCollectionMapper
  17. * @description:
  18. * @author: Ethan
  19. * @create: 202509-26 17:17
  20. * @Version 1.0
  21. **/
  22. @Mapper
  23. public interface CashCollectionMapper {
  24. //ceshi
  25. // 检查用户是否存在
  26. int checkUserExists(@Param("jwcode") Integer jwcode);
  27. //根据jwcode获取所属地区
  28. String getMarketByJwcode(@Param("jwcode") Integer jwcode);
  29. //新增收款订单
  30. void add(CashRecord cashRecord);
  31. //根据订单号获取订单id、状态、钱包id、永久金币数量、精网号和备注
  32. CashRecord selectByOrderCode(@Param("orderCode") String orderCode);
  33. //更新订单状态
  34. int updateStatus(@Param("orderCode") String orderCode,
  35. @Param("status") Integer status);
  36. //编辑订单
  37. // 编辑订单(状态=5)后重新提交
  38. int updateByOrderCode(@Param("cashRecordCollection") CashRecord cashRecord);
  39. //多条件查询收款订单列表
  40. List<CashCollection> selectCollection1(@Param("pageNum") Integer pageNum,
  41. @Param("pageSize") Integer pageSize,
  42. @Param("cashCollection") CashCollection cashCollection);
  43. //根据订单号查询待审核的现金收款订单
  44. CashRecord selectAuditByOrderCode(@Param("orderCode") String orderCode);
  45. //补全手续费等信息
  46. int complete(@Param("cashRecordCollection") CashRecord cashRecord);
  47. //根据精网号获取姓名
  48. String getNameByJwcode(@Param("jwcode") Integer jwcode);
  49. //根据精网号获取市场名
  50. String getMarketNameByJwcode(Integer jwcode);
  51. //获取收款活动列表
  52. List<RechargeActivity> getActivityList(@Param("now")LocalDateTime now);
  53. //查找未同步的订单
  54. List<GOrder>getUnSync(@Param("size")int size);
  55. //给同步过去的gOrder设置同步状态
  56. int markSynced(@Param("orderId") Integer orderId);
  57. //根据id查询收款订单
  58. CashCollection selectById(Integer id);
  59. List<CashCollection> selectBatchIds(Set<Integer> relatedIds);
  60. //根据glodcoin订单号查询收款订单
  61. CashCollection selectByGoldCoinOrderCode(String orderNo);
  62. /**
  63. * 带版本号的审核更新
  64. * @return 更新成功返回 1失败返回 0
  65. */
  66. int updateOrderWithVersion(@Param("orderCode") String orderCode,
  67. @Param("status") Integer status,
  68. @Param("auditId") Integer auditId,
  69. @Param("version") Integer version);
  70. List<PerformanceVO> performanceSelect(PerformanceDTO performanceDTO);
  71. CashCollection selectByBankCode(String bankCode);
  72. void updateByGoldCoinOrderCodeByPayment(PaymentDTO paymentDTO);
  73. void updateByGoldCoinOrderCodeByStripe(StripeDTO stripeDTO);
  74. void updateByGoldCoinOrderCodeByStripe2(StripeDTO stripeDTO);
  75. void updateByGoldCoinOrderCodeByFirstdata(FirstdataDTO firstdataDTO);
  76. void updateByGoldCoinOrderCodeByIpay88(Ipay88DTO ipay88DTO);
  77. List<String> selectFirstdataList();
  78. List<CashCollection> selectIpayList();
  79. List<String> selectStripeList();
  80. List<String> selectStripe2List();
  81. List<String> selectPaymentList();
  82. //补全手续费后,修改金币订单
  83. void updateGoldOrder(@Param("cashRecordCollection")CashRecord cashRecord);
  84. //根据订单号查询商品名称
  85. String selectGoodsNameByCode(String orderCode);
  86. // 根据 typeId 和 type 更新消息记录的 flag 字段
  87. int updateMessageFlagByTypeIdAndType(@Param("typeId") Integer typeId,
  88. @Param("type") Integer type,
  89. @Param("flag") Integer flag);
  90. // 根据 jwcode 和 walletId 查询用户钱包
  91. UserRegionWallet selectUserWallet(@Param("jwcode") Integer jwcode,
  92. @Param("walletId") Integer walletId);
  93. // 增加用户钱包永久金币
  94. int addUserWalletPermanentGold(@Param("jwcode") Integer jwcode,
  95. @Param("walletId") Integer walletId,
  96. @Param("amount") Integer amount);
  97. // 插入或更新用户钱包记录
  98. void insertUserWallet(UserRegionWallet userRegionWallet);
  99. // 插入用户钱包明细记录
  100. void insertUserWalletRecord(UserWalletRecord userWalletRecord);
  101. // 根据精网号和钱包 ID 查询用户钱包明细列表
  102. List<UserWalletRecordVO> selectWalletRecordsByJwcodeAndWalletId(
  103. @Param("jwcode") Integer jwcode,
  104. @Param("walletId") Integer walletId);
  105. // 查询符合条件的精网号列表(用于分页,每个精网号算一条记录)
  106. List<Integer> selectDistinctJwcodes(@Param("jwcode") Integer jwcode,
  107. @Param("market") String market);
  108. // 根据精网号列表查询用户的所有钱包信息
  109. List<UserWalletVO> selectUserWalletsByJwcodes(@Param("jwcodeList") List<Integer> jwcodeList,
  110. @Param("market") String market);
  111. }