| @@ -31,7 +31,7 @@ public class PosController extends BaseController { | |||||
| return posService.checkAvaiable(); | return posService.checkAvaiable(); | ||||
| } | } | ||||
| @ApiOperation(value = "商户POS用户/B端用户登录检查") | |||||
| @ApiOperation(value = "商户POS用户/B端用户登录检查", notes = "{\"phone\":\"string\", \"password\":\"string(单位:分)\"}") | |||||
| @PostMapping("checkUserPassword") | @PostMapping("checkUserPassword") | ||||
| public ResultData checkUserPassword(@RequestBody Map<String, String> params) { | public ResultData checkUserPassword(@RequestBody Map<String, String> params) { | ||||
| WxMerchantBUser user = getUser(); | WxMerchantBUser user = getUser(); | ||||
| @@ -59,6 +59,35 @@ public class PosController extends BaseController { | |||||
| return posService.getQrCode(getTenantId()); | return posService.getQrCode(getTenantId()); | ||||
| } | } | ||||
| @ApiOperation(value = "券独立核销检查", notes = "{\"couponOrderId\":\"string\"}") | |||||
| @PostMapping("checkCouponOrderForIndepentVerify") | |||||
| public ResultData checkCouponOrderForIndepentVerify(@RequestBody Map<String, String> params) { | |||||
| WxMerchantBUser user = getUser(); | |||||
| String couponOrderIdStr = params.get(WxPayConstant.COUPON_ORDER_ID); // 券包ID | |||||
| if (StringUtils.isBlank(couponOrderIdStr)) { | |||||
| String errMessage = "request params[coupon_order_id] error."; | |||||
| logger.error(errMessage); | |||||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), errMessage); | |||||
| } | |||||
| String verifyType = WxPayConstant.VERIFY_TYPE_INDEPENT; | |||||
| return posService.checkCouponOrderForIndepentVerify(user, verifyType, couponOrderIdStr); | |||||
| } | |||||
| @ApiOperation(value = "券独立核销", notes = "{\"couponOrderId\":\"string\", \"payment\":\"string(单位:分)\"}") | |||||
| @PostMapping("posVerifyIndepent") | |||||
| public ResultData posVerifyIndepent(@RequestBody Map<String, String> params) { | |||||
| WxMerchantBUser user = getUser(); | |||||
| String couponOrderId = params.get("coupon_order_id"); | |||||
| String payment = params.get("payment"); | |||||
| if (StringUtils.isBlank(couponOrderId)) { | |||||
| String errMessage = "券ID为空"; | |||||
| logger.error(errMessage); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), errMessage); | |||||
| } | |||||
| return posService.posVerifyIndepent(user, couponOrderId, payment); | |||||
| } | |||||
| @ApiOperation(value = "会员识别", notes = "{\"mem_id\":\"string(可选)\",\"mem_phone\":\"string(可选)\",\"pos_order_id\":\"string(必填)\",\"pos_amount\":\"string(单位:分)(必填)\"}") | @ApiOperation(value = "会员识别", notes = "{\"mem_id\":\"string(可选)\",\"mem_phone\":\"string(可选)\",\"pos_order_id\":\"string(必填)\",\"pos_amount\":\"string(单位:分)(必填)\"}") | ||||
| @PostMapping("checkMem") | @PostMapping("checkMem") | ||||
| public ResultData checkMem(@RequestBody Map<String, String> params) { | public ResultData checkMem(@RequestBody Map<String, String> params) { | ||||
| @@ -87,21 +116,6 @@ public class PosController extends BaseController { | |||||
| return posService.checkMem(user, memIdStr, memPhoneStr, posOrderIdStr, posAmountStr); | return posService.checkMem(user, memIdStr, memPhoneStr, posOrderIdStr, posAmountStr); | ||||
| } | } | ||||
| @ApiOperation(value = "券独立核销检查") | |||||
| @PostMapping("checkCouponOrderForIndepentVerify") | |||||
| public ResultData checkCouponOrderForIndepentVerify(@RequestBody Map<String, String> params) { | |||||
| WxMerchantBUser user = getUser(); | |||||
| String couponOrderIdStr = params.get(WxPayConstant.COUPON_ORDER_ID); // 券包ID | |||||
| if (StringUtils.isBlank(couponOrderIdStr)) { | |||||
| String errMessage = "request params[coupon_order_id] error."; | |||||
| logger.error(errMessage); | |||||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), errMessage); | |||||
| } | |||||
| String verifyType = WxPayConstant.VERIFY_TYPE_INDEPENT; | |||||
| return posService.checkCouponOrderForIndepentVerify(user, verifyType, couponOrderIdStr); | |||||
| } | |||||
| @ApiOperation(value = "券交易核销检查", notes = "{\"coupon_order_id\":\"string(必填)\",\"pos_order_id\":\"string(必填)\",\"pos_amount\":\"string(必填)\"}") | @ApiOperation(value = "券交易核销检查", notes = "{\"coupon_order_id\":\"string(必填)\",\"pos_order_id\":\"string(必填)\",\"pos_amount\":\"string(必填)\"}") | ||||
| @PostMapping("checkCouponOrderForPayVerify") | @PostMapping("checkCouponOrderForPayVerify") | ||||
| public ResultData checkCouponOrderForPayVerify(@RequestBody Map<String, String> params) { | public ResultData checkCouponOrderForPayVerify(@RequestBody Map<String, String> params) { | ||||
| @@ -129,7 +143,7 @@ public class PosController extends BaseController { | |||||
| return posService.checkCouponOrderForPayVerify(user, verifyType, couponOrderIdStr, posOrderIdStr, posAmountStr); | return posService.checkCouponOrderForPayVerify(user, verifyType, couponOrderIdStr, posOrderIdStr, posAmountStr); | ||||
| } | } | ||||
| @ApiOperation(value = "券预核销") | |||||
| @ApiOperation(value = "券预核销", notes = "{\"coupon_order_id\":\"string(必填)\",\"pos_order_id\":\"string(必填)\",\"pos_amount\":\"string(必填)\"}") | |||||
| @PostMapping("couponOrderPreVerify") | @PostMapping("couponOrderPreVerify") | ||||
| public ResultData couponOrderPreVerify(@RequestBody Map<String, String> params) { | public ResultData couponOrderPreVerify(@RequestBody Map<String, String> params) { | ||||
| WxMerchantBUser user = getUser(); | WxMerchantBUser user = getUser(); | ||||
| @@ -155,7 +169,7 @@ public class PosController extends BaseController { | |||||
| return posService.couponOrderPreVerify(user, couponOrderIdStr, posOrderIdStr, posAmountStr); | return posService.couponOrderPreVerify(user, couponOrderIdStr, posOrderIdStr, posAmountStr); | ||||
| } | } | ||||
| @ApiOperation(value = "券预核销取消") | |||||
| @ApiOperation(value = "券预核销取消", notes = "{\"coupon_order_id\":\"string(必填)\",\"pos_order_id\":\"string(必填)\",\"pos_amount\":\"string(必填)\"}") | |||||
| @PostMapping("couponOrderPreVerifyCancel") | @PostMapping("couponOrderPreVerifyCancel") | ||||
| public ResultData couponOrderPreVerifyCancel(@RequestBody Map<String, String> params) { | public ResultData couponOrderPreVerifyCancel(@RequestBody Map<String, String> params) { | ||||
| WxMerchantBUser user = getUser(); | WxMerchantBUser user = getUser(); | ||||
| @@ -181,20 +195,6 @@ public class PosController extends BaseController { | |||||
| return posService.couponOrderPreVerifyCancel(user, couponOrderIdStr, posOrderIdStr, posAmountStr); | return posService.couponOrderPreVerifyCancel(user, couponOrderIdStr, posOrderIdStr, posAmountStr); | ||||
| } | } | ||||
| @ApiOperation(value = "券独立核销", notes = "{\"couponOrderId\":\"string\", \"payment\":\"string(单位:分)\"}") | |||||
| @PostMapping("posVerifyIndepent") | |||||
| public ResultData posVerifyIndepent(@RequestBody Map<String, String> params) { | |||||
| WxMerchantBUser user = getUser(); | |||||
| String couponOrderId = params.get("coupon_order_id"); | |||||
| String payment = params.get("payment"); | |||||
| if (StringUtils.isBlank(couponOrderId)) { | |||||
| String errMessage = "券ID为空"; | |||||
| logger.error(errMessage); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), errMessage); | |||||
| } | |||||
| return posService.posVerifyIndepent(user, couponOrderId, payment); | |||||
| } | |||||
| @ApiOperation(value = "核销接口", notes = "{\"couponOrderId\":\"string\"}") | @ApiOperation(value = "核销接口", notes = "{\"couponOrderId\":\"string\"}") | ||||
| @PostMapping("verifyForPos") | @PostMapping("verifyForPos") | ||||
| public ResultData verifyForPos(@RequestBody Map<String, String> paramMap) { | public ResultData verifyForPos(@RequestBody Map<String, String> paramMap) { | ||||