|
|
|
@@ -120,7 +120,11 @@ public class WxCashOutController extends BaseController { |
|
|
|
if (!currentWxBUserIsAdmin(wxBUser,merchant)) { |
|
|
|
resultMap.put("cashOutSupport", 0); |
|
|
|
}else { |
|
|
|
resultMap.put("cashOutSupport", mall.getCashOutSupport()); |
|
|
|
if (!currentMerchantBUserIsAdmin(buser,merchant)) { |
|
|
|
resultMap.put("cashOutSupport", 0); |
|
|
|
}else { |
|
|
|
resultMap.put("cashOutSupport", mall.getCashOutSupport()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
resultMap.put("cashOutLimit", mall.getCashOutLimit()); |
|
|
|
@@ -146,6 +150,15 @@ public class WxCashOutController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private boolean currentMerchantBUserIsAdmin(WxMerchantBUser wxBUser,WxMerchant merchant) { |
|
|
|
if ((!StringUtils.isBlank(wxBUser.getPhone())) && wxBUser.getPhone().equals(merchant.getLinkPhone()) ) { |
|
|
|
return true; |
|
|
|
}else { |
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("微信B端提现") |
|
|
|
@PostMapping("cashout") |
|
|
|
public ResultData cashout(@RequestBody WxCashOut wxCashOut) { |
|
|
|
@@ -155,7 +168,9 @@ public class WxCashOutController extends BaseController { |
|
|
|
if (!currentWxBUserIsAdmin(wxBUser,merchant)) { |
|
|
|
return new ResultData(Result.ERROR,"当前微信绑定的手机号["+wxBUser.getPhone()+"]非商户的联系手机号"); |
|
|
|
} |
|
|
|
|
|
|
|
if (!currentMerchantBUserIsAdmin(buser,merchant)) { |
|
|
|
return new ResultData(Result.ERROR,"当前登陆账号["+buser.getPhone()+"]非商户的联系手机号"); |
|
|
|
} |
|
|
|
//当前管理员的账户必须在c端授权了 |
|
|
|
try { |
|
|
|
WxCUser mUser = getCurrentCUser(buser); |
|
|
|
|