update订单逻辑改造工厂模式

This commit is contained in:
2023-09-01 11:36:31 +08:00
parent 5a7e130e26
commit b53aedb423
12 changed files with 181 additions and 66 deletions

View File

@@ -5,6 +5,7 @@ import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.domain.entity.SysDept;
import com.jsowell.common.core.domain.entity.SysUser;
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.DictUtils;
@@ -395,16 +396,30 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
* @param wechatAppId 微信小程序id
* @return
*/
// @Override
// public String getDelayModeByWechatAppId(String wechatAppId) {
// PileMerchantInfo merchant = getFirstLevelMerchantByAppId(wechatAppId);
// if (merchant != null) {
// String delayMode = merchant.getDelayMode();
// if (StringUtils.equals(delayMode, Constants.ONE)) {
// return Constants.ADAPAY_PAY_MODE_DELAY;
// }
// }
// return null;
// }
/**
* 通过wechatAppId查询一级运营商的延时支付模式配置
* @param wechatAppId 微信小程序id
* @return 延时分账模式0-不延时1-延时分账)
*/
@Override
public String getDelayModeByWechatAppId(String wechatAppId) {
PileMerchantInfo merchant = getFirstLevelMerchantByAppId(wechatAppId);
if (merchant != null) {
String delayMode = merchant.getDelayMode();
if (StringUtils.equals(delayMode, Constants.ONE)) {
return Constants.ADAPAY_PAY_MODE_DELAY;
}
if (merchant == null) {
throw new BusinessException(ReturnCodeEnum.CODE_GET_FIRST_LEVEL_MERCHANT_BY_APP_ID);
}
return null;
return merchant.getDelayMode();
}
@Override