wuzeyu
2024-06-07 b8732848e6343f05c320f47a47627869e9c57176
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
@@ -13,7 +13,6 @@
import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import com.dy.pipIrrSell.result.SellResultCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -47,9 +46,10 @@
                            schema = @Schema(implementation = VoRecharge.class))}
            )
    })
    @GetMapping(path = "/getRecharges", consumes = MediaType.APPLICATION_JSON_VALUE)
    //@GetMapping(path = "/getRecharges", consumes = MediaType.APPLICATION_JSON_VALUE)
    @GetMapping(path = "/getRecharges")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoRecharge>>> get(@RequestBody @Parameter(description = "查询form表单json数据", required = true) QueryVo vo){
    public BaseResponse<QueryResultVo<List<VoRecharge>>> get(QueryVo vo){
        try {
            QueryResultVo<List<VoRecharge>> res = rechargeSv.getRecharges(vo);
            return BaseResponseUtils.buildSuccess(res);
@@ -71,7 +71,7 @@
    @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
    @Transactional(rollbackFor = Exception.class)
    @SsoAop()
    public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoRecharge po, @Parameter(hidden = true) BindingResult bindingResult){
    public BaseResponse<Boolean> add(@RequestBody @Valid DtoRecharge po, BindingResult bindingResult){
        if(bindingResult != null && bindingResult.hasErrors()){
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
@@ -99,7 +99,7 @@
         * rechargeTime     充值时间
         */
        Long cardId = 0L;
        String cardNum = po.getCardNum();
        Long cardNum = po.getCardNum();
        String clientNum = "";
        //Long clientId = po.getClientId();
        Long clientId = 0L;
@@ -131,6 +131,7 @@
         */
        SeClientCard seClientCard = new SeClientCard();
        seClientCard.setId(cardId);
        seClientCard.setMoney(afterRecharge);
        seClientCard.setRechargedt(rechargeTime);
        seClientCard.setLastoper(LastOperateENUM.RECHARGE.getCode ());
        Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0);