|
|
|
@ -189,6 +189,32 @@ public class HighUserCardController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getHuiLianTongCardBalance", method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "查询汇联通工会卡余额") |
|
|
|
|
public ResponseData getHuiLianTongCardBalance(@RequestParam(name = "cardNo", required = true) String cardNo,HttpServletRequest request) { |
|
|
|
|
try { |
|
|
|
|
// 用户
|
|
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
|
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); |
|
|
|
|
|
|
|
|
|
HighUserCard card = highUserCardService.getDetailByUserCardNo(userInfoModel.getHighUser().getId(), cardNo); |
|
|
|
|
if (card == null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到数据"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
JSONObject cardInfo = HuiLianTongUnionCardConfig.queryBalance(cardNo); |
|
|
|
|
if (StringUtils.isBlank(cardInfo.getString("data"))) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQUEST_ERROR, ""); |
|
|
|
|
} |
|
|
|
|
return ResponseMsgUtil.success(HuiLianTongUnionCardConfig.resolveResponse(cardInfo.getString("data"))); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighUserCardController --> getHuiLianTongCardBalance() error!", e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getHuiLianTongCardConsume", method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "查询汇联通工会卡消费记录") |
|
|
|
|