Merge branch 'feature/community-center' into preview
commit
1a56de7de0
|
@ -17,6 +17,8 @@ import com.mcwl.pay.domain.OrderTradeDto;
|
||||||
import com.mcwl.pay.domain.vo.PayVo;
|
import com.mcwl.pay.domain.vo.PayVo;
|
||||||
import com.mcwl.pay.service.AliPayService;
|
import com.mcwl.pay.service.AliPayService;
|
||||||
import com.mcwl.pay.service.OrderTradeService;
|
import com.mcwl.pay.service.OrderTradeService;
|
||||||
|
import com.mcwl.system.domain.SysUserPayAccount;
|
||||||
|
import com.mcwl.system.service.ISysUserPayAccountService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -57,6 +59,9 @@ public class AliPayController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrderTradeService orderTradeService;
|
private OrderTradeService orderTradeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysUserPayAccountService sysUserPayAccountService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AliPayService aliPayService;
|
private AliPayService aliPayService;
|
||||||
|
|
||||||
|
@ -175,6 +180,17 @@ public class AliPayController extends BaseController {
|
||||||
@NotNull(message = "提现金额不能为空")
|
@NotNull(message = "提现金额不能为空")
|
||||||
@Pattern(regexp = "^(0|(?!0\\d)[1-9]\\d*)(\\.\\d{2})?$", message = "金额格式错误(必须保留两位小数)")
|
@Pattern(regexp = "^(0|(?!0\\d)[1-9]\\d*)(\\.\\d{2})?$", message = "金额格式错误(必须保留两位小数)")
|
||||||
String amount) throws Exception {
|
String amount) throws Exception {
|
||||||
|
|
||||||
|
SysUserPayAccount sysUserPayAccount = sysUserPayAccountService.lambdaQuery()
|
||||||
|
.eq(SysUserPayAccount::getUserId, SecurityUtils.getUserId())
|
||||||
|
.eq(SysUserPayAccount::getType, 0)
|
||||||
|
.one();
|
||||||
|
|
||||||
|
if (Objects.isNull(sysUserPayAccount)) {
|
||||||
|
return R.fail("请先绑定支付宝");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Double.parseDouble(amount) < 0.1) {
|
if (Double.parseDouble(amount) < 0.1) {
|
||||||
return R.fail("提现金额最小为0.1");
|
return R.fail("提现金额最小为0.1");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue