Ver Fonte

remove price config module
move to goods modules

Mr.qian há 1 semana atrás
pai
commit
65a29d7bec

+ 35 - 34
cif-service/src/main/java/com/txz/cif/model/Goods.java

@@ -6,9 +6,9 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.*;
 
+import javax.persistence.*;
 import java.math.BigDecimal;
 import java.util.Date;
-import javax.persistence.*;
 
 @Getter
 @Setter
@@ -16,78 +16,79 @@ import javax.persistence.*;
 @AllArgsConstructor
 @Builder
 
-@ApiModel(value="com.txz.cif.model.Goods")
+@ApiModel(value = "com.txz.cif.model.Goods")
 @Table(name = "c_goods")
 public class Goods {
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @ApiModelProperty(value="id")
+    @ApiModelProperty(value = "id")
     private Integer id;
-
+    
     /**
      * 商品名称
      */
-    @ApiModelProperty(value="name商品名称")
+    @ApiModelProperty(value = "name商品名称")
     private String name;
-
+    
     /**
      * 均价说明
      */
-    @ApiModelProperty(value="intro均价说明")
+    @ApiModelProperty(value = "intro均价说明")
     private String intro;
-
+    
     /**
      * 小图
      */
-    @ApiModelProperty(value="pic小图")
+    @ApiModelProperty(value = "pic小图")
     private String pic;
-
-    @ApiModelProperty(value="折扣金额")
+    
+    @ApiModelProperty(value = "折扣金额")
     private BigDecimal discount;
-
-    @ApiModelProperty(value="折扣率")
+    
+    @ApiModelProperty(value = "折扣率")
     private BigDecimal discountRate;
-
-
+    
+    /**
+     * 渠道id
+     */
+    private Long methodId;
+    
     /**
      * 大图
      */
     @Column(name = "big_pic")
-    @ApiModelProperty(value="bigPic大图")
+    @ApiModelProperty(value = "bigPic大图")
     private String bigPic;
-
-
-
+    
+    
     /**
      * 状态 0未启用 1正常 2停用
      */
-    @ApiModelProperty(value="status状态 0未启用 1正常 2停用")
+    @ApiModelProperty(value = "status状态 0未启用 1正常 2停用")
     private Byte status;
-
+    
     /**
      * 定价
      */
-    @ApiModelProperty(value="amount定价")
+    @ApiModelProperty(value = "amount定价")
     private BigDecimal amount;
-
-
-
+    
+    
     @Column(name = "sort_num")
-    @ApiModelProperty(value="sortNum")
+    @ApiModelProperty(value = "sortNum")
     private Integer sortNum;
-
+    
     @Column(name = "create_time")
-    @ApiModelProperty(value="createTime")
+    @ApiModelProperty(value = "createTime")
     private Date createTime;
-
+    
     @Column(name = "update_time")
-    @ApiModelProperty(value="updateTime")
+    @ApiModelProperty(value = "updateTime")
     private Date updateTime;
-
-
-
+    
+    
     public GoodsBO generator() {
-        GoodsBO bo = BeanUtil.toBean(this,GoodsBO.class);
+        GoodsBO bo = BeanUtil.toBean(this, GoodsBO.class);
         bo.setGoodsId(this.id);
         return bo;
     }

+ 181 - 179
cif-service/src/main/java/com/txz/cif/web/RechargeRecordApiController.java

@@ -1,4 +1,5 @@
 package com.txz.cif.web;
+
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONObject;
@@ -28,195 +29,196 @@ import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 
 /**
-* Created by CodeGenerator on 2025/07/15.
-*/
+ * Created by CodeGenerator on 2025/07/15.
+ */
 @Api(tags = "[api]充值记录")
 @RestController
 @RequestMapping("/api/recharge/record")
 public class RechargeRecordApiController {
-
-	private static Logger log = LoggerFactory.getLogger(RechargeRecordApiController.class);
-
+    
+    private static Logger log = LoggerFactory.getLogger(RechargeRecordApiController.class);
+    
     @Resource
     private RechargeRecordService rechargeRecordService;
-
-	@Resource
-	private GoodsService goodsService;
-
-	@Resource
-	private AuthService authService;
-
-	@Resource
-	private UserService userService;
-
-	@Resource
-	private BizLogService bizLogService;
-
-	@Resource
-	private SequenceService sequenceService;
-
-	@Resource
-	private  PaymentChannelService paymentChannelService;
-
-	@GetMapping("/goodsList")
-	@ApiOperation(value = "充值商品",httpMethod = "GET")
-	public Result<List<Goods>> goodsList() {
-		Condition c = new Condition(Goods.class);
-		c.createCriteria().andEqualTo("status",1);
-		List<Goods> goods = goodsService.findByCondition(c);
-		return ResultGenerator.genSuccessResult(goods);
-	}
-
-
-	@GetMapping("/add")
-	@ApiOperation(value = "创建充值订单",httpMethod = "GET")
-    public Result add(@RequestParam Integer goodsId,@RequestParam Long methodId, HttpServletRequest request) {
-		Long userId = authService.getTokenUserId(request);
-		if(goodsId == null){
-			return ResultGenerator.genFailResult(ResultCode.OAUTH_INVALID_ACCESS_TOKEN);
-		}
-		try {
-			Goods goods = goodsService.findById(goodsId);
-			if (goods == null){
-				return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
-			}
-			if (goods.getStatus() != 1){
-				return ResultGenerator.genFailResult(ResultCode.STATUS_IS_NULL);
-			}
-			User user = userService.findById(userId);
-			if (user == null){
-				return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
-			}
-			PaymentChannel paymentChannel = paymentChannelService.paymentChannelReturnsByWeight(methodId);
-
-//			long id = IdUtil.getSnowflake(1, 1).nextId();
-			String orderNo = sequenceService.genSerialNumber("recharge_rule",null);
-			RechargeRecord rechargeRecord = RechargeRecord.builder()
-					.discount(goods.getDiscount())
-					.amount(goods.getAmount())
-					.currency("BDT").userId(userId)
-					.userName(user.getName()).userPhone(user.getPhoneNo())
-					.bank(user.getBank())
-					.methodId(methodId)
-					.channelId(paymentChannel == null? null:paymentChannel.getId())
-					.bankAccount(user.getBankAccount())
-					.bankAccountName(user.getBankAccountName())
-					.orderNo(orderNo).goodsId(goodsId)
-					.createUser(user.getName())
-					.status(1).createTime(DateUtil.date())
-					.build();
-    		rechargeRecordService.save(rechargeRecord);
-			//TODO 发起第三方支付
-
-
-			try{
-				//新增日志
-				bizLogService.save(BizLog.builder().bizType(1).bizNo(orderNo)
-						.type(1).createTime(DateUtil.date()).createUser(user.getName())
-						.memo("提交充值订单").build());
-			}catch (Exception e){
-				log.error("新增充值提交订单日志失败",e);
-			}
-			return ResultGenerator.genSuccessResult(rechargeRecord);
-		} catch (Exception e) {
-			log.error("新增对象操作异常e:{}",e);
-			return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
-		}
-
+    
+    @Resource
+    private GoodsService goodsService;
+    
+    @Resource
+    private AuthService authService;
+    
+    @Resource
+    private UserService userService;
+    
+    @Resource
+    private BizLogService bizLogService;
+    
+    @Resource
+    private SequenceService sequenceService;
+    
+    @Resource
+    private PaymentChannelService paymentChannelService;
+    
+    @GetMapping("/goodsList/{methodId:^\\d+$}")
+    @ApiOperation(value = "充值商品", httpMethod = "GET")
+    public Result<List<Goods>> goodsList(@PathVariable("methodId") Long methodId) {
+        Condition c = new Condition(Goods.class);
+        c.createCriteria().andEqualTo("status", 1);
+        c.createCriteria().andEqualTo("methodId", methodId);
+        List<Goods> goods = goodsService.findByCondition(c);
+        return ResultGenerator.genSuccessResult(goods);
     }
-
-	@GetMapping("/callback")
-	@ApiOperation(value = "三方回调",httpMethod = "GET")
-	public Result<RechargeRecord> detail(@RequestParam String data) {
-		//TODO 回调成功
-		JSONObject json = JSONUtil.parseObj(data);
-		String orderNo = json.getStr("orderNo");
-		RechargeRecord record = rechargeRecordService.findBy("orderNo", orderNo);
-		if (record == null){
-			return ResultGenerator.genFailResult("订单未找到");
-		}
-		if (StrUtil.equals("1",json.getStr("status"))){
-			rechargeRecordService.success(record);
-		} else {
-			rechargeRecordService.fail(record);
-		}
-		try{
-			//新增充值回调日志
-			bizLogService.save(BizLog.builder().bizType(1).bizNo(orderNo)
-					.type(3).createTime(DateUtil.date()).createUser("第三方")
-					.memo("充值回调").build());
-		}catch (Exception e){
-			log.error("新增充值回调日志失败",e);
-		}
-		return ResultGenerator.genSuccessResult();
-	}
-
-
+    
+    
+    @GetMapping("/add")
+    @ApiOperation(value = "创建充值订单", httpMethod = "GET")
+    public Result add(@RequestParam Integer goodsId, @RequestParam Long methodId, HttpServletRequest request) {
+        Long userId = authService.getTokenUserId(request);
+        if (goodsId == null) {
+            return ResultGenerator.genFailResult(ResultCode.OAUTH_INVALID_ACCESS_TOKEN);
+        }
+        try {
+            Goods goods = goodsService.findById(goodsId);
+            if (goods == null) {
+                return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+            }
+            if (goods.getStatus() != 1) {
+                return ResultGenerator.genFailResult(ResultCode.STATUS_IS_NULL);
+            }
+            User user = userService.findById(userId);
+            if (user == null) {
+                return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+            }
+            PaymentChannel paymentChannel = paymentChannelService.paymentChannelReturnsByWeight(methodId);
+            
+            //			long id = IdUtil.getSnowflake(1, 1).nextId();
+            String orderNo = sequenceService.genSerialNumber("recharge_rule", null);
+            RechargeRecord rechargeRecord = RechargeRecord.builder()
+                    .discount(goods.getDiscount())
+                    .amount(goods.getAmount())
+                    .currency("BDT").userId(userId)
+                    .userName(user.getName()).userPhone(user.getPhoneNo())
+                    .bank(user.getBank())
+                    .methodId(methodId)
+                    .channelId(paymentChannel == null ? null : paymentChannel.getId())
+                    .bankAccount(user.getBankAccount())
+                    .bankAccountName(user.getBankAccountName())
+                    .orderNo(orderNo).goodsId(goodsId)
+                    .createUser(user.getName())
+                    .status(1).createTime(DateUtil.date())
+                    .build();
+            rechargeRecordService.save(rechargeRecord);
+            // TODO 发起第三方支付
+            
+            
+            try {
+                // 新增日志
+                bizLogService.save(BizLog.builder().bizType(1).bizNo(orderNo)
+                        .type(1).createTime(DateUtil.date()).createUser(user.getName())
+                        .memo("提交充值订单").build());
+            } catch (Exception e) {
+                log.error("新增充值提交订单日志失败", e);
+            }
+            return ResultGenerator.genSuccessResult(rechargeRecord);
+        } catch (Exception e) {
+            log.error("新增对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        
+    }
+    
+    @GetMapping("/callback")
+    @ApiOperation(value = "三方回调", httpMethod = "GET")
+    public Result<RechargeRecord> detail(@RequestParam String data) {
+        // TODO 回调成功
+        JSONObject json = JSONUtil.parseObj(data);
+        String orderNo = json.getStr("orderNo");
+        RechargeRecord record = rechargeRecordService.findBy("orderNo", orderNo);
+        if (record == null) {
+            return ResultGenerator.genFailResult("订单未找到");
+        }
+        if (StrUtil.equals("1", json.getStr("status"))) {
+            rechargeRecordService.success(record);
+        } else {
+            rechargeRecordService.fail(record);
+        }
+        try {
+            // 新增充值回调日志
+            bizLogService.save(BizLog.builder().bizType(1).bizNo(orderNo)
+                    .type(3).createTime(DateUtil.date()).createUser("第三方")
+                    .memo("充值回调").build());
+        } catch (Exception e) {
+            log.error("新增充值回调日志失败", e);
+        }
+        return ResultGenerator.genSuccessResult();
+    }
+    
+    
     @GetMapping("/detail")
-	@ApiOperation(value = "rechargeRecord获取详情",httpMethod = "GET")
+    @ApiOperation(value = "rechargeRecord获取详情", httpMethod = "GET")
     public Result<RechargeRecord> detail(@RequestParam Integer id) {
-    	if(id == null){
-    		return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
-    	}
-
-    	RechargeRecord rechargeRecord = null;
-    	try {
-    		rechargeRecord = rechargeRecordService.findById(id);
-		} catch (Exception e) {
-			log.error("查询对象操作异常e:{}",e);
-			return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
-		}
-
+        if (id == null) {
+            return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
+        }
+        
+        RechargeRecord rechargeRecord = null;
+        try {
+            rechargeRecord = rechargeRecordService.findById(id);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        
         return ResultGenerator.genSuccessResult(rechargeRecord);
     }
-
+    
     @PostMapping("/list")
-	@ApiOperation(value = "rechargeRecord获取列表",httpMethod = "POST")
-	public Result<List<RechargeRecord>> list(@RequestBody RecordParam param, HttpServletRequest request) {
-		Long userId = authService.getTokenUserId(request);
-		if (userId == null ){
-			ResultGenerator.genFailResult(ResultCode.OAUTH_INVALID_ACCESS_TOKEN);
-		}
-		PageHelper.startPage(param.getPage(), param.getSize());
-
-		Condition condition = new Condition(RechargeRecord.class);
-		Criteria criteria = condition.createCriteria();
-		criteria.andEqualTo("userId", userId);
-		if (StrUtil.isNotBlank(param.getChannel())){
-			criteria.andEqualTo("channel", param.getChannel());
-		}
-		if (StrUtil.isNotBlank(param.getUserName())){
-			criteria.andEqualTo("userName", param.getUserName());
-		}
-		if (StrUtil.isNotBlank(param.getUserPhone())){
-			criteria.andEqualTo("userPhone", param.getUserPhone());
-		}
-		if (StrUtil.isNotBlank(param.getOrderNo())){
-			criteria.andEqualTo("orderNo", param.getOrderNo());
-		}
-		if (param.getStatus() != null){
-			criteria.andEqualTo("status", param.getStatus());
-		}
-		if (param.getTimeType() != null){
-			if (param.getTimeType() ==1 ){
-				if (StrUtil.isNotBlank(param.getStartTime())){
-					criteria.andBetween("createTime", param.getStartTime(),param.getEndTime());
-				}
-			} else  if (param.getTimeType() ==2 ){
-				if (StrUtil.isNotBlank(param.getStartTime())){
-					criteria.andBetween("successTime", param.getStartTime(),param.getEndTime());
-				}
-			}
-		}
-		PageInfo pageInfo = null;
-		try {
-			condition.setOrderByClause("create_time desc");
-			List<RechargeRecord> list = rechargeRecordService.findByCondition(condition);
-			pageInfo = new PageInfo(list);
-		} catch (Exception e) {
-			log.error("查询对象操作异常e:{}",e);
-			return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
-		}
-		return ResultGenerator.genSuccessResult(pageInfo);
-	}
+    @ApiOperation(value = "rechargeRecord获取列表", httpMethod = "POST")
+    public Result<List<RechargeRecord>> list(@RequestBody RecordParam param, HttpServletRequest request) {
+        Long userId = authService.getTokenUserId(request);
+        if (userId == null) {
+            ResultGenerator.genFailResult(ResultCode.OAUTH_INVALID_ACCESS_TOKEN);
+        }
+        PageHelper.startPage(param.getPage(), param.getSize());
+        
+        Condition condition = new Condition(RechargeRecord.class);
+        Criteria criteria = condition.createCriteria();
+        criteria.andEqualTo("userId", userId);
+        if (StrUtil.isNotBlank(param.getChannel())) {
+            criteria.andEqualTo("channel", param.getChannel());
+        }
+        if (StrUtil.isNotBlank(param.getUserName())) {
+            criteria.andEqualTo("userName", param.getUserName());
+        }
+        if (StrUtil.isNotBlank(param.getUserPhone())) {
+            criteria.andEqualTo("userPhone", param.getUserPhone());
+        }
+        if (StrUtil.isNotBlank(param.getOrderNo())) {
+            criteria.andEqualTo("orderNo", param.getOrderNo());
+        }
+        if (param.getStatus() != null) {
+            criteria.andEqualTo("status", param.getStatus());
+        }
+        if (param.getTimeType() != null) {
+            if (param.getTimeType() == 1) {
+                if (StrUtil.isNotBlank(param.getStartTime())) {
+                    criteria.andBetween("createTime", param.getStartTime(), param.getEndTime());
+                }
+            } else if (param.getTimeType() == 2) {
+                if (StrUtil.isNotBlank(param.getStartTime())) {
+                    criteria.andBetween("successTime", param.getStartTime(), param.getEndTime());
+                }
+            }
+        }
+        PageInfo pageInfo = null;
+        try {
+            condition.setOrderByClause("create_time desc");
+            List<RechargeRecord> list = rechargeRecordService.findByCondition(condition);
+            pageInfo = new PageInfo(list);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return ResultGenerator.genSuccessResult(pageInfo);
+    }
 }

+ 1 - 0
cif-service/src/main/java/com/txz/cif/web/mng/GoodsController.java

@@ -98,6 +98,7 @@ public class GoodsController {
 
         Condition condition = new Condition(RechargeRecord.class);
         Criteria criteria = condition.createCriteria();
+        criteria.andEqualTo("methodId", param.getMethodId());
 		if (param.getStatus() != null){
 			criteria.andEqualTo("status", param.getStatus());
 		}

+ 0 - 152
cif-service/src/main/java/com/txz/cif/web/mng/PaymentPriceConfigController.java

@@ -1,152 +0,0 @@
-package com.txz.cif.web.mng;
-
-
-import cn.hutool.core.util.ObjectUtil;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.txz.cif.core.Result;
-import com.txz.cif.model.PaymentMethod;
-import com.txz.cif.model.PaymentPriceConfig;
-import com.txz.cif.service.PaymentMethodService;
-import com.txz.cif.service.PaymentPriceConfigService;
-import com.txz.cif.web.ro.PaymentPriceConfigRO;
-import com.txz.cif.web.vo.PaymentPriceVO;
-import lombok.RequiredArgsConstructor;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * [后台]充值金额配置
- *
- * @author: MTD®️
- * @date: 2025/8/28
- */
-@RestController
-@RequiredArgsConstructor
-@RequestMapping("paymentPriceConfig")
-public class PaymentPriceConfigController {
-    
-    private final PaymentPriceConfigService paymentPriceConfigService;
-    
-    private final PaymentMethodService paymentMethodService;
-    
-    /**
-     * 列表
-     */
-    @GetMapping("list/{paymentId:^\\d+$}")
-    public Result<PaymentPriceVO> list(@PathVariable("paymentId") Long paymentId) {
-        PaymentMethod paymentMethod = paymentMethodService.findById(paymentId);
-        return Result.success(PaymentPriceVO.builder()
-                .list(paymentPriceConfigService.list(
-                        Wrappers.<PaymentPriceConfig>lambdaQuery()
-                                .eq(PaymentPriceConfig::getPaymentId, paymentId)
-                                .eq(PaymentPriceConfig::getIsValid, 1)
-                                .orderByAsc(PaymentPriceConfig::getPriceVal)
-                ))
-                .miniPrice(paymentMethod.getMiniPrice())
-                .maxPrice(paymentMethod.getMaxPrice())
-                .build()
-        );
-    }
-    
-    /**
-     * 新增
-     */
-    @PostMapping("add/{paymentId:^\\d+$}")
-    public Result add(@PathVariable("paymentId") Long paymentId, @RequestBody @Validated({PaymentPriceConfigRO.Add.class}) PaymentPriceConfigRO ro) {
-        if (paymentPriceConfigService.count(
-                Wrappers.<PaymentPriceConfig>lambdaQuery()
-                        .eq(PaymentPriceConfig::getPaymentId, paymentId)
-                        .eq(PaymentPriceConfig::getIsValid, 1)) >= 9L
-        ) {
-            return Result.fail("最多添加9个");
-        }
-        PaymentPriceConfig exist = paymentPriceConfigService.getOne(Wrappers.<PaymentPriceConfig>lambdaQuery()
-                .eq(PaymentPriceConfig::getPriceVal, ro.getPriceVal())
-                .eq(PaymentPriceConfig::getPaymentId, paymentId)
-                .eq(PaymentPriceConfig::getIsValid, 1)
-        );
-        if (ObjectUtil.isNotEmpty(exist)) {
-            return Result.fail("该金额已存在");
-        }
-        PaymentPriceConfig addInfo = new PaymentPriceConfig();
-        addInfo.setPaymentId(paymentId);
-        addInfo.setPriceVal(ro.getPriceVal());
-        addInfo.setIsValid(1);
-        paymentPriceConfigService.save(addInfo);
-        return Result.success();
-    }
-    
-    /**
-     * 修改
-     */
-    @PatchMapping("edit/{id:^\\d+$}")
-    public Result edit(@PathVariable("id") Long id, @RequestBody @Validated({PaymentPriceConfigRO.Edit.class}) PaymentPriceConfigRO ro) {
-        PaymentPriceConfig exist = paymentPriceConfigService.getOne(Wrappers.<PaymentPriceConfig>lambdaQuery()
-                .eq(PaymentPriceConfig::getPriceVal, ro.getPriceVal())
-                .ne(PaymentPriceConfig::getId, id)
-                .eq(PaymentPriceConfig::getIsValid, 1)
-        );
-        if (ObjectUtil.isNotEmpty(exist)) {
-            return Result.fail("该金额已存在");
-        }
-        paymentPriceConfigService.update(Wrappers.<PaymentPriceConfig>lambdaUpdate()
-                .eq(PaymentPriceConfig::getId, id)
-                .set(PaymentPriceConfig::getPriceVal, ro.getPriceVal())
-        
-        );
-        return Result.success();
-    }
-    
-    /**
-     * 删除
-     */
-    @DeleteMapping("del/{id:^\\d+$}")
-    public Result del(@PathVariable("id") Long id) {
-        paymentPriceConfigService.update(Wrappers.<PaymentPriceConfig>lambdaUpdate()
-                .eq(PaymentPriceConfig::getId, id)
-                .set(PaymentPriceConfig::getIsValid, 0)
-        
-        );
-        return Result.success();
-    }
-    
-    /**
-     * 修改区间
-     */
-    @PatchMapping("editInterval/{paymentId:^\\d+$}")
-    public Result editInterval(@PathVariable("paymentId") Long paymentId, @RequestBody @Validated({PaymentPriceConfigRO.EditInterval.class}) PaymentPriceConfigRO ro) {
-        // PaymentPriceConfig mini = paymentPriceConfigService.getOne(Wrappers.<PaymentPriceConfig>lambdaQuery()
-        //         .eq(PaymentPriceConfig::getPaymentId, paymentId)
-        //         .lt(PaymentPriceConfig::getPriceVal, ro.getMiniPrice())
-        //         .eq(PaymentPriceConfig::getIsValid, 1)
-        //         .last("limit 1")
-        // );
-        // if (ObjectUtil.isNotEmpty(mini)) {
-        //     return Result.fail("最小金额不能小于已配置金额");
-        // }
-        //
-        // PaymentPriceConfig max = paymentPriceConfigService.getOne(Wrappers.<PaymentPriceConfig>lambdaQuery()
-        //         .eq(PaymentPriceConfig::getPaymentId, paymentId)
-        //         .gt(PaymentPriceConfig::getPriceVal, ro.getMaxPrice())
-        //         .eq(PaymentPriceConfig::getIsValid, 1)
-        //         .last("limit 1")
-        // );
-        // if (ObjectUtil.isNotEmpty(max)) {
-        //     return Result.fail("最大金额不能大于已配置金额");
-        // }
-        
-        if (ro.getMiniPrice() > ro.getMaxPrice()) {
-            return Result.fail("最小金额不能大于最大金额");
-        }
-        
-        PaymentMethod updateMethod = new PaymentMethod();
-        updateMethod.setId(paymentId);
-        updateMethod.setMiniPrice(ro.getMiniPrice());
-        updateMethod.setMaxPrice(ro.getMaxPrice());
-        
-        paymentMethodService.update(updateMethod);
-        
-        return Result.success();
-    }
-    
-}

+ 0 - 51
cif-service/src/main/java/com/txz/cif/web/mng/appcontroller/AppPaymentPriceConfigController.java

@@ -1,51 +0,0 @@
-package com.txz.cif.web.mng.appcontroller;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.txz.cif.core.Result;
-import com.txz.cif.model.PaymentMethod;
-import com.txz.cif.model.PaymentPriceConfig;
-import com.txz.cif.service.PaymentMethodService;
-import com.txz.cif.service.PaymentPriceConfigService;
-import com.txz.cif.web.vo.PaymentPriceVO;
-import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * app端充值金额配置
- *
- * @author: MTD®️
- * @date: 2025/8/28
- */
-@RestController
-@RequiredArgsConstructor
-@RequestMapping("app/paymentPriceConfig")
-public class AppPaymentPriceConfigController {
-    
-    private final PaymentPriceConfigService paymentPriceConfigService;
-    
-    private final PaymentMethodService paymentMethodService;
-    
-    
-    /**
-     * 获取配置
-     */
-    @GetMapping("priceInfo/{paymentId:^\\d+$}")
-    public Result<PaymentPriceVO> list(@PathVariable("paymentId") Long paymentId) {
-        PaymentMethod paymentMethod = paymentMethodService.findById(paymentId);
-        return Result.success(PaymentPriceVO.builder()
-                .list(paymentPriceConfigService.list(
-                        Wrappers.<PaymentPriceConfig>lambdaQuery()
-                                .eq(PaymentPriceConfig::getPaymentId, paymentId)
-                                .eq(PaymentPriceConfig::getIsValid, 1)
-                                .orderByAsc(PaymentPriceConfig::getPriceVal)
-                ))
-                .miniPrice(paymentMethod.getMiniPrice())
-                .maxPrice(paymentMethod.getMaxPrice())
-                .build()
-        );
-    }
-    
-}

+ 21 - 19
cif-service/src/main/java/com/txz/cif/web/para/GoodsParam.java

@@ -4,46 +4,48 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.*;
 
-import java.math.BigDecimal;
-import java.util.Date;
-import javax.persistence.*;
 @Getter
 @Setter
 @NoArgsConstructor
 @AllArgsConstructor
 @Builder
 
-@ApiModel(value="充值集合查询")
+@ApiModel(value = "充值集合查询")
 public class GoodsParam {
-
-
+    
+    
     /**
+     *
      */
-    @ApiModelProperty(value="status状态 1正常 2禁用")
+    @ApiModelProperty(value = "status状态 1正常 2禁用")
     private Integer status;
-
-
+    
+    
     /**
      * 交易时间
      */
-    @ApiModelProperty(value="开始时间")
+    @ApiModelProperty(value = "开始时间")
     private String startTime;
-
+    
     /**
      * 交易成功时间
      */
-    @ApiModelProperty(value="结束时间")
+    @ApiModelProperty(value = "结束时间")
     private String endTime;
-
-
+    
+    /**
+     * 渠道id
+     */
+    private Long methodId;
+    
     /**
      * 商品id
      */
-    @ApiModelProperty(value="page")
+    @ApiModelProperty(value = "page")
     private Integer page;
-
-    @ApiModelProperty(value="size")
+    
+    @ApiModelProperty(value = "size")
     private Integer size;
-
-
+    
+    
 }