feat:判断商户合作状态
This commit is contained in:
1 parent
cc194793ef
commit
78d2cac2aa
1 file changed
+7
+7
@@ -61,6 +61,7 @@ import com.bsd.pjcloud.wallet.api.constant.WalletBizEnum;
|
||||
import com.bsd.pjcloud.wallet.api.constant.WalletCodeBizEnum;
|
||||
import com.bsd.pjcloud.wallet.api.constant.WalletTypeEnum;
|
||||
import com.bsd.pjcloud.wallet.api.constant.mch.WalletMchRulePriceTypeEnum;
|
||||
import com.bsd.pjcloud.wallet.api.constant.mch.WalletMchSupType;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletBalanceTransactionDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletCodeUseEntity;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletManageEntity;
|
||||
@@ -497,6 +498,12 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
|
||||
public Long appCreateOrderScancode(HardAppCreateOrderDto dto) {
|
||||
MchManageVo mch = remoteMchService.getById(dto.getMerchantId()).getData();
|
||||
if (ObjectUtil.isEmpty(mch)) throw new RuntimeException("商户不存在");
|
||||
// 判断商户合作状态
|
||||
if (ObjectUtil.equals(mch.getTypes(), MerchantTypeEnum.SUPERMARKET.getType()) && ObjectUtil.equals(mch.getSupType(), WalletMchSupType.MCH.getCode())) {
|
||||
if (ObjectUtil.equals(mch.getCooperationStatus(), YesNoEnum.NO.getCode())) {
|
||||
throw new RuntimeException("改商家未合作");
|
||||
}
|
||||
}
|
||||
// 查询用户
|
||||
UserInfo userDetail = userService.getInnerByUserId(dto.getUserId()).getData();
|
||||
if (ObjectUtil.isEmpty(userDetail)) throw new RuntimeException("用户不存在不存在");
|
||||
|
||||
Reference in new issue
Block a user