Browse Source

Merge remote-tracking branch 'origin/milestone-20251104-现金管理二期' into milestone-20251104-现金管理二期

sunjiabei/feature-20251021102635-银行接口
huangqizhen 5 days ago
parent
commit
5b79fbd5be
  1. 18
      src/main/java/com/example/demo/controller/bean/BeanConsumeController.java
  2. 63
      src/main/java/com/example/demo/domain/vo/bean/BeanConsumeCart.java
  3. 1
      src/main/java/com/example/demo/domain/vo/coin/Page.java
  4. 4
      src/main/java/com/example/demo/service/bean/BeanConsumeService.java
  5. 7
      src/main/java/com/example/demo/serviceImpl/bean/BeanConsumeServiceImpl.java
  6. 21
      src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java
  7. 2
      src/main/java/com/example/demo/serviceImpl/coin/RechargeActivityCenterServiceImpl.java
  8. 13
      src/main/resources/cashMapper/CashCollectionMapper.xml

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

@ -111,6 +111,24 @@ public class BeanConsumeController {
return Result.error(e.toString());
}}
//筛选查询小黄车消费记录
@PostMapping("/selectCartBy")
public Result selectCartBy(@RequestBody Page page){
try {
if (ObjectUtils.isEmpty(page.getPageNum())) {
return Result.error("页码数为空!");
}
if (ObjectUtils.isEmpty(page.getPageSize())) {
return Result.error("页大小为空!");
} else {
return Result.success(beanConsumeService.selectCartBy(page.getPageNum(), page.getPageSize(), page.getBeanConsumeCart()));
}
} catch (Exception e) {
e.printStackTrace();
return Result.error(e.toString());
}
}
//消费合计数
@PostMapping("sumConsumeGold")
public BeanConsumeGold sumConsumeGold(@RequestBody Page page) {

63
src/main/java/com/example/demo/domain/vo/bean/BeanConsumeCart.java

@ -0,0 +1,63 @@
package com.example.demo.domain.vo.bean;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @program: gold-java
* @ClassName BeanConsumeCart
* @description:
* @author: Ethan
* @create: 202511-20 10:28
* @Version 1.0
**/
@Data
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class BeanConsumeCart {
private Integer id;
private String nickname; // 姓名
private String phone; // 电话
private Integer jwcode; // 精网号
private Integer productId; // 产品 ID
private BigDecimal totalMoney; // 应付金额
private BigDecimal money; // 实际付款金额
private BigDecimal coupon; // 优惠券金额
private String tradeNo; // 订单号
private Integer payWay; // 1微信 2支付宝 3金币 4金豆
private Integer payType; // 1一次支付 2多次支付
private String payAccount; // 收款账户
private Integer pid; // 关联的订单
private Integer type; // 1全款 2定金 3尾款
private Integer state; // 1新订单 2成功支付 3取消支付 4退款 5多笔支付支付进行中
private String liveName; // 直播间名称
private Integer liveId; // 直播间 id
private Integer channelId; // 频道 id
private Integer classId; // 班级 ID
private String sourceName; // 班级或频道名称
private Integer platform; // 1 app 2 h5
private Integer devicePlatform; // 1 pc 2 手机
private String demo; // 备用字段
private Integer from; // 1直播间 2crm
private Integer teacherJwcode; // 讲师标识
private String teacherName; // 讲师名字
private String oaAccount; // 班主任标识
private String oaName; // 班主任名字
private String anchorMark; // 号主标识
private String anchorName; // 号主名称
private String transactionId; // 支付成功第三方交易号
private String transactionNo; // 备用交易号
private Integer productVersion; // 1半年 2终免
private Integer autoUpdate; // 是否同步过 0否 1是
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private LocalDateTime createdAt;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private LocalDateTime updatedAt;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private LocalDateTime tradeTime; // 支付成功时间
}

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

@ -36,6 +36,7 @@ public class Page {
private BeanConsumeLive beanConsumeLive; //直播金豆消费
private BeanConsumeFan beanConsumeFan; //铁粉金豆消费
private BeanConsumeArticle beanConsumeArticle; //文章金豆消费
private BeanConsumeCart beanConsumeCart; //小黄车金豆消费
private BeanSystemRechargeInfo beanSystemRechargeInfo; //金豆充值信息
private BeanOnlineRechargeInfo beanOnlineRechargeInfo; //金豆充值信息
private BeanConsumeGold beanConsumeGold; //金豆消费合计数

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

@ -36,6 +36,6 @@ public interface BeanConsumeService {
//获取直播频道
List<String> getLiveChannel();
//筛选查询小黄车消费
Object selectCartBy(Integer pageNum, Integer pageSize, BeanConsumeCart beanConsumeCart);
}

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

@ -172,7 +172,13 @@ public class BeanConsumeServiceImpl implements BeanConsumeService {
List<BeanConsumeArticle> beanConsumeArticles = beanConsumeMapper.selectArticleBy(beanConsumeArticle);
return new PageInfo<>(beanConsumeArticles);
}
//筛选查询小黄车消费
@Override
public Object selectCartBy(Integer pageNum, Integer pageSize, BeanConsumeCart beanConsumeCart) {
PageHelper.startPage(pageNum, pageSize);
return null;
}
@Override
public BeanConsumeGold sumConsumeGold(Page page) {
BeanConsumeGold gold = new BeanConsumeGold();
@ -203,4 +209,5 @@ public class BeanConsumeServiceImpl implements BeanConsumeService {
}
}

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

@ -61,13 +61,13 @@ public class CashCollectionServiceImpl implements CashCollectionService {
if (cashCollection.getJwcode() < 10000000 || cashCollection.getJwcode() > 99999999) {
throw new IllegalArgumentException("精网号必须为8位");
}
if (cashCollection.getName() == null) {
if (cashCollection.getName() == null || cashCollection.getName().isEmpty()){
throw new IllegalArgumentException("客户姓名不能为空");
}
if (cashCollection.getActivity() == null) {
if (cashCollection.getActivity() == null || cashCollection.getActivity().isEmpty()) {
throw new IllegalArgumentException("活动不能为空");
}
if (cashCollection.getGoodsName() == null) {
if (cashCollection.getGoodsName() == null|| cashCollection.getGoodsName().isEmpty()) {
throw new IllegalArgumentException("商品名不能为空");
}
if (cashCollection.getGoodsName().equals("金币充值")) {
@ -79,20 +79,20 @@ public class CashCollectionServiceImpl implements CashCollectionService {
if (cashCollection.getGoodNum() == 0) {
throw new IllegalArgumentException("产品数量不能为空");
}
if (cashCollection.getNumUnit() == null) {
if (cashCollection.getNumUnit() == null|| cashCollection.getNumUnit().isEmpty()) {
throw new IllegalArgumentException("数量单位不能为空");
}
}
if (cashCollection.getPaymentCurrency() == null) {
if (cashCollection.getPaymentCurrency() == null || cashCollection.getPaymentCurrency().isEmpty()) {
throw new IllegalArgumentException("支付币种不能为空");
}
if (cashCollection.getPaymentAmount() == null || cashCollection.getPaymentAmount().compareTo(BigDecimal.ZERO) == 0) {
throw new IllegalArgumentException("支付金额不能为空");
}
if (cashCollection.getPayType() == null) {
if (cashCollection.getPayType() == null|| cashCollection.getPayType().isEmpty()) {
throw new IllegalArgumentException("支付方式不能为空");
}
if (cashCollection.getReceivedMarket() == null) {
if (cashCollection.getReceivedMarket() == null||cashCollection.getReceivedMarket().isEmpty()) {
throw new IllegalArgumentException("到账地区不能为空");
}
if (cashCollection.getPayTime() == null) {
@ -261,11 +261,12 @@ public class CashCollectionServiceImpl implements CashCollectionService {
cashCollection.setReceivedMarket(null);
}
//状态为已通过和Link通过时按收款地区筛选
if (cashCollection.getStatus() == 13) {
/* if (cashCollection.getStatus() == 13) {
cashCollection.setSubmitterMarket(null);
}
}*/
//状态为1346已通过和已退款满足收款地区或提交人地区即可
cashCollection.setSubmitterId(null);
//状态为46已通过和已退款满足收款地区或提交人地区即可
}
if (cashCollection.getCashRoleId() == 0) {

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

@ -29,7 +29,7 @@ public class RechargeActivityCenterServiceImpl implements RechargeActivityCenter
@Autowired
private RechargeActivityCenterMapper rechargeActivityCenterMapper;
private static final String ACTIVITY_NAME_REGEX = "^[\\u4e00-\\u9fa5a-zA-Z0-9,。!?、;:\"'()《》【】——~,.:;!'()\\[\\]-_&+=]{1,50}$";
private static final String ACTIVITY_NAME_REGEX = "^[\\u4e00-\\u9fa5a-zA-Z0-9,。!?、;:\"'()《》【】——~,.:;!'()\\[\\]-_&+=]{1,100}$";
private static final Pattern ACTIVITY_NAME_PATTERN = Pattern.compile(ACTIVITY_NAME_REGEX);
// 根据ID查询活动
@Override

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

@ -62,23 +62,14 @@
<update id="complete">
UPDATE cash_record_collection
<set>
<if test="cashRecordCollection.handlingCharge != null ">
handling_charge = #{cashRecordCollection.handlingCharge},
</if>
<if test="cashRecordCollection.receivedCurrency != null and cashRecordCollection.receivedCurrency != ''">
received_currency = #{cashRecordCollection.receivedCurrency},
</if>
<if test="cashRecordCollection.receivedAmount != null and cashRecordCollection.receivedAmount != ''">
<if test="cashRecordCollection.receivedAmount != 0">
received_amount = #{cashRecordCollection.receivedAmount},
</if>
<if test="cashRecordCollection.receivedTime != null">
received_time = #{cashRecordCollection.receivedTime},
</if>
<if test="cashRecordCollection.paymentCurrency != null and cashRecordCollection.paymentCurrency != ''">
payment_currency = #{cashRecordCollection.paymentCurrency},
</if>
<!-- 关键:null 就不拼这一列 -->
<if test="cashRecordCollection.paymentAmount != null">
<if test="cashRecordCollection.paymentAmount != 0">
payment_amount = #{cashRecordCollection.paymentAmount},
</if>
<!-- 只有 这些字段全部非空才更新状态 -->

Loading…
Cancel
Save