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.

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