| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | 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; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | public class ClientCardCtrl { |
| | | private final ClientCardSv clientCardSv; |
| | | |
| | | /** |
| | | * 获取指定用户名下全部水卡 |
| | | * @param clientId |
| | | * @return |
| | | */ |
| | | @Operation(summary = "获得全部水卡", description = "返回全部水卡数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据水卡编号获取操作记录及余额 |
| | | * @param cardNum 水卡编号 |
| | | * @return 水卡操作记录及余额 |
| | | */ |
| | | @Operation(summary = "获得水卡操作记录及余额", description = "返回水卡操作记录及余额") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回一页农户数据(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = BaClient.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "/getoperaterecords") |
| | | @SsoAop() |
| | | public BaseResponse<List<Map<String, Object>>> getOperateRecordsAndMoney(@RequestParam("cardNum") Long cardNum){ |
| | | try { |
| | | Map map = clientCardSv.getOperateRecordsAndMoney(cardNum); |
| | | return BaseResponseUtils.buildSuccess(map); |
| | | } catch (Exception e) { |
| | | log.error("查询操作记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | } |