| | |
| | | import com.dy.pipIrrSell.recharge.RechargeCtrl; |
| | | 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; |
| | |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | |
| | | private final ClientCardSv clientCardSv; |
| | | private final RechargeCtrl rechargeCtrl; |
| | | |
| | | @Value("${projectCode.ym}") |
| | | private Integer projectCode; |
| | | |
| | | /** |
| | | * 获取开卡记录 |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | @Operation(summary = "获得一页开卡记录", description = "返回一页开卡数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | |
| | | schema = @Schema(implementation = VoActiveCard.class))} |
| | | ) |
| | | }) |
| | | //@GetMapping(path = "/getActiveCards", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @GetMapping(path = "/getActiveCards") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoActiveCard>>> getActiveCards(QueryVo vo){ |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 开卡操作 |
| | | * @param po |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | | @Operation(summary = "开卡", description = "新开农户卡") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | |
| | | @PostMapping(path = "add_active", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> add_active(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> add_active(@RequestBody @Valid DtoActiveCard po, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | seClientCard.setCardnum(cardNum); |
| | | //seClientCard.setClientnum(clientNum); |
| | | seClientCard.setClientid(clientId); |
| | | seClientCard.setMoney(0.0); |
| | | seClientCard.setMoney(0f); |
| | | seClientCard.setState(CardStateENUM.NORMAL.getCode()); |
| | | seClientCard.setCreatedt(createTime); |
| | | seClientCard.setLastoper(LastOperateENUM.ACTIVE.getCode()); |
| | |
| | | } |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(cardNum) ; |
| | | Map map = new HashMap(); |
| | | map.put("projectCode", projectCode); |
| | | map.put("cardNum", cardNum); |
| | | return BaseResponseUtils.buildSuccess(map) ; |
| | | } |
| | | |
| | | @Operation(summary = "补卡", description = "补卡") |
| | |
| | | @PostMapping(path = "add_reissue", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> add_reissue(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> add_reissue(@RequestBody @Valid DtoActiveCard po, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |