收款、余额、账单、收银点
This commit is contained in:
parent
ff900668b2
commit
ca958158db
|
|
@ -12,7 +12,9 @@ import cn.pluss.platform.merchant.MerchantBaseInfoService;
|
|||
import cn.pluss.platform.merchantImage.MerchantImageService;
|
||||
import cn.pluss.platform.merchantStore.MerchantStoreService;
|
||||
import cn.pluss.platform.userApp.UserAppService;
|
||||
import cn.pluss.platform.util.ParametersUtil;
|
||||
import cn.pluss.platform.util.StringUtil;
|
||||
import cn.pluss.platform.vo.StoreInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
|
@ -142,4 +144,21 @@ public class MerchantStoreController {
|
|||
Map<String, Object> certInfo = merchantStoreService.getCertInfo(userApp.getUserId() + "");
|
||||
return ResultGenerator.genSuccessResult(certInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询详情
|
||||
*/
|
||||
@GetMapping("/showMerchantStoreReceipt")
|
||||
@ResponseBody
|
||||
public Result<Object> showMerchantStoreReceipt(Integer userId, Integer channel) {
|
||||
Map<String, Object> result = new HashMap<>(3);
|
||||
if (userId != null && userId != 0) {
|
||||
StoreInfoVO queryStoreInfoVO = merchantStoreService.showMerchantStoreReceipt(userId);
|
||||
String url = ParametersUtil.domain + "/wap/merchant/authPay?userAppId=" + queryStoreInfoVO.getUserId();
|
||||
result.put("url", url);
|
||||
result.put("storeName", queryStoreInfoVO.getStoreName());
|
||||
return ResultGenerator.genSuccessResult(result);
|
||||
}
|
||||
return ResultGenerator.genFailResult("获取失败");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ spring:
|
|||
driver-class-name: com.mysql.jdbc.Driver
|
||||
parameter:
|
||||
### 这个根据自己的情况配置
|
||||
domain: http://60.205.224.68
|
||||
domain: http://wxgzh.sxczgkj.cn
|
||||
|
||||
swagger:
|
||||
### 生产环境不允许访问swagger
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ spring:
|
|||
driver-class-name: com.mysql.jdbc.Driver
|
||||
|
||||
parameter:
|
||||
domain: http://60.205.224.68
|
||||
domain: http://wxgzh.sxczgkj.cn
|
||||
|
||||
swagger:
|
||||
### 生产环境不允许访问swagger
|
||||
|
|
|
|||
|
|
@ -4,18 +4,33 @@
|
|||
|
||||
<mapper namespace="cn.pluss.platform.mapper.MerchantOrderVOMapper">
|
||||
|
||||
<!-- <select id="getOnlineCouponList" resultType="java.util.Map">-->
|
||||
<!-- SELECT od.`name`, CONCAT(IFNULL(od.`fee`, '0'), '') `fee` FROM tb_pluss_merchant_order mo-->
|
||||
<!-- LEFT JOIN `syblife`.ims_tiny_wmall_order wo ON mo.orderNumber = wo.transaction_id AND mo.orderType = 10-->
|
||||
<!-- LEFT JOIN `syblife`.ims_tiny_wmall_order_discount od ON od.oid = wo.id-->
|
||||
<!-- WHERE mo.orderNumber = #{orderNumber} AND mo.`status` = '1' AND od.fee > 0-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="getOnlineCouponList" resultType="java.util.Map">
|
||||
SELECT od.`name`, CONCAT(IFNULL(od.`fee`, '0'), '') `fee` FROM tb_pluss_merchant_order mo
|
||||
LEFT JOIN `syblife`.ims_tiny_wmall_order wo ON mo.orderNumber = wo.transaction_id AND mo.orderType = 10
|
||||
LEFT JOIN `syblife`.ims_tiny_wmall_order_discount od ON od.oid = wo.id
|
||||
WHERE mo.orderNumber = #{orderNumber} AND mo.`status` = '1' AND od.fee > 0
|
||||
SELECT
|
||||
*
|
||||
FROM tb_pluss_merchant_order
|
||||
WHERE
|
||||
orderNumber = #{orderNumber}
|
||||
</select>
|
||||
|
||||
<!-- <select id="getOfflineCouponList" resultType="java.util.Map">-->
|
||||
<!-- SELECT CONCAT(IFNULL(IFNULL(no_discount_part, discount_fee), '0'), '') `fee`, IF(acr.id IS NULL, '满减优惠', '代金券') `name`-->
|
||||
<!-- FROM tb_pluss_merchant_order mo-->
|
||||
<!-- LEFT JOIN syblife.ims_tiny_wmall_paybill_order wpo ON mo.orderNumber = wpo.transaction_id-->
|
||||
<!-- LEFT JOIN syblife.ims_tiny_wmall_activity_coupon_record acr ON wpo.id = acr.order_id = #{orderNumber}-->
|
||||
<!-- WHERE mo.orderNumber = #{orderNumber} AND IFNULL(no_discount_part, discount_fee) > 0;-->
|
||||
<!-- </select>-->
|
||||
<select id="getOfflineCouponList" resultType="java.util.Map">
|
||||
SELECT CONCAT(IFNULL(IFNULL(no_discount_part, discount_fee), '0'), '') `fee`, IF(acr.id IS NULL, '满减优惠', '代金券') `name`
|
||||
FROM tb_pluss_merchant_order mo
|
||||
LEFT JOIN syblife.ims_tiny_wmall_paybill_order wpo ON mo.orderNumber = wpo.transaction_id
|
||||
LEFT JOIN syblife.ims_tiny_wmall_activity_coupon_record acr ON wpo.id = acr.order_id = #{orderNumber}
|
||||
WHERE mo.orderNumber = #{orderNumber} AND IFNULL(no_discount_part, discount_fee) > 0;
|
||||
SELECT
|
||||
*
|
||||
FROM tb_pluss_merchant_order
|
||||
WHERE
|
||||
orderNumber = #{orderNumber}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -282,7 +282,6 @@ public class AliyunServiceImpl implements AliyunService {
|
|||
throw new MsgException("银行卡认证失败");
|
||||
}
|
||||
|
||||
JSONObject jsonObject = JSON.parseObject(String.valueOf(verifyBankElementResponse.getBody()));
|
||||
if (!"200".equals(verifyBankElementResponse.getBody().getCode())) {
|
||||
if ("403".equals(verifyBankElementResponse.getBody().getCode())) {
|
||||
throw new MsgException("银行卡认证接口已欠费,请联系平台");
|
||||
|
|
@ -290,22 +289,5 @@ public class AliyunServiceImpl implements AliyunService {
|
|||
throw new MsgException("银行卡认证失败");
|
||||
}
|
||||
}
|
||||
Bank4Cache bank4Cache = new Bank4Cache();
|
||||
if (!"0".equalsIgnoreCase(jsonObject.getString("error_code"))) {
|
||||
bank4Cache.setPhone(phone);
|
||||
bank4Cache.setBankCardNo(bankCardNo);
|
||||
bank4Cache.setIdCardNo(certNo);
|
||||
bank4Cache.setName(realName);
|
||||
Calendar instance = Calendar.getInstance();
|
||||
instance.add(Calendar.DAY_OF_MONTH, -1);
|
||||
bank4Cache.setCreateTimeStart(instance.getTime());
|
||||
log.error("银行卡四要素检查:" + jsonObject.getString("reason"));
|
||||
bank4Cache.setRemark(jsonObject.getString("reason"));
|
||||
bank4Cache.setStatus(Bank4Cache.STATUS_FAIL);
|
||||
throw new MsgException("身份证、银行卡或预留手机号信息不正确");
|
||||
} else {
|
||||
bank4Cache.setStatus(Bank4Cache.STATUS_PASS);
|
||||
bank4CacheService.save(bank4Cache);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -352,11 +352,10 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||
if (accIdCard == null) {
|
||||
accIdCard = legalIdCard;
|
||||
idCardService.save(accIdCard);
|
||||
} else {
|
||||
accIdCard.setId(legalIdCard.getId());
|
||||
idCardService.updateById(accIdCard);
|
||||
}
|
||||
// else {
|
||||
// accIdCard.setId(legalIdCard.getId());
|
||||
// idCardService.updateById(accIdCard);
|
||||
// }
|
||||
account.setIdCardId(accIdCard.getId() + "");
|
||||
accountDTO.setIdcard(accIdCard);
|
||||
accountDTO.getBankCard().setBankHolder(accIdCard.getCertName());
|
||||
|
|
@ -379,13 +378,13 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||
}
|
||||
|
||||
boolean settleTypeFlag = Account.SETTLE_TYPE_CORPORATE.equals(accountDTO.getSettleType());
|
||||
|
||||
if (checkFlag && !(settleTypeFlag)) {
|
||||
// 执行银行卡四要素校验
|
||||
aliyunService.checkBankCorrectNow(accountDTO.getBankCard().getPhone(), accountDTO.getBankCard().getBankCardNo()
|
||||
, accountDTO.getIdcard().getCertNo()
|
||||
, accountDTO.getBankCard().getBankHolder(), "结算人与结算银行卡不匹配,请核对结算信息");
|
||||
}
|
||||
//TODO 测试时先注掉
|
||||
// if (checkFlag && !(settleTypeFlag)) {
|
||||
// // 执行银行卡四要素校验
|
||||
// aliyunService.checkBankCorrectNow(accountDTO.getBankCard().getPhone(), accountDTO.getBankCard().getBankCardNo()
|
||||
// , accountDTO.getIdcard().getCertNo()
|
||||
// , accountDTO.getBankCard().getBankHolder(), "结算人与结算银行卡不匹配,请核对结算信息");
|
||||
// }
|
||||
|
||||
bankCardService.save(accountDTO.getBankCard());
|
||||
account.setBankCardId(accountDTO.getBankCard().getId() + "");
|
||||
|
|
|
|||
|
|
@ -162,14 +162,15 @@ public class ApiPayServiceImpl implements ApiPayService {
|
|||
MerchantBaseInfo baseInfo = merchantBaseInfoMapper.selectOne(queryWrapper);
|
||||
Optional.ofNullable(baseInfo).orElseThrow(() -> new MsgException("当前商户暂未完成商户认证功能!"));
|
||||
// 全局电子围栏和单商户电子围栏判定
|
||||
if (!commonSwitchService.allowEcdemicPay() && !store.allowEcdemicPay()) {
|
||||
// 不允许异地支付的时候需要校验ip和商户所在城市
|
||||
try {
|
||||
merchantService.checkPayLocation(jsonObject.getString("ip"), baseInfo, jsonObject.getString("province"));
|
||||
} catch (PayRiskException e) {
|
||||
throw new MsgException(e.getMessage());
|
||||
}
|
||||
}
|
||||
//TODO 先关闭异地支付
|
||||
// if (!commonSwitchService.allowEcdemicPay() && !store.allowEcdemicPay()) {
|
||||
// // 不允许异地支付的时候需要校验ip和商户所在城市
|
||||
// try {
|
||||
// merchantService.checkPayLocation(jsonObject.getString("ip"), baseInfo, jsonObject.getString("province"));
|
||||
// } catch (PayRiskException e) {
|
||||
// throw new MsgException(e.getMessage());
|
||||
// }
|
||||
// }
|
||||
MerchantChannelStatus channel = null;
|
||||
if("trans_wap_pay".equals(jsonObject.getString("method"))){
|
||||
channel = merchantChannelStatusService.getByMerchantCode(baseInfo.getMerchantCode(),4);
|
||||
|
|
|
|||
Loading…
Reference in New Issue