|
|
@ -807,18 +807,16 @@ public class PayAction extends BaseAction { |
|
|
|
* [在线问诊]支付 |
|
|
|
* [在线问诊]支付 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Action("createOLOrder") |
|
|
|
@Action("createOLOrder") |
|
|
|
public Result createOLOrder(String payCode, String outTradeNo, String openid, String patientId, BigDecimal totalFee, String deptCode, String deptName, String doctName, String doctCode) { |
|
|
|
public Result createOLOrder(String payCode, String openid, String patientId, BigDecimal totalFee, String deptCode, String deptName, String doctName, String doctCode) { |
|
|
|
if ( totalFee == null || ObjectUtils.isEmpty(openid) || ObjectUtils.isEmpty(patientId) || ObjectUtils.isEmpty(deptName) || ObjectUtils.isEmpty(doctName)) { |
|
|
|
if ( totalFee == null || ObjectUtils.isEmpty(openid) || ObjectUtils.isEmpty(patientId) || ObjectUtils.isEmpty(deptName) || ObjectUtils.isEmpty(doctName)) { |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
} |
|
|
|
} |
|
|
|
if (totalFee.compareTo(BigDecimal.ZERO) == 0) { // 0 元处理
|
|
|
|
if (totalFee.compareTo(BigDecimal.ZERO) == 0) { // 0 元处理
|
|
|
|
return Result.error(ResultEnum.PAY_MONEY_IS_ZERO); |
|
|
|
return Result.error(ResultEnum.PAY_MONEY_IS_ZERO); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ObjectUtils.isEmpty(outTradeNo) || outTradeNo.length() > 32) { |
|
|
|
|
|
|
|
return Result.error(ResultEnum.PARAM_IS_INVALID); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MerchantEnum merchantEnum = MerchantEnum.getMerchantEnumByCode(payCode); |
|
|
|
MerchantEnum merchantEnum = MerchantEnum.getMerchantEnumByCode(payCode); |
|
|
|
|
|
|
|
String outTradeNo = CodeHelper.getOutTradeNo(merchantEnum); |
|
|
|
|
|
|
|
|
|
|
|
if (merchantEnum == null) { |
|
|
|
if (merchantEnum == null) { |
|
|
|
return Result.error(ResultEnum.PAY_TYPE_NOT_SUPPORT); |
|
|
|
return Result.error(ResultEnum.PAY_TYPE_NOT_SUPPORT); |
|
|
|
} |
|
|
|
} |
|
|
|