@@ -118,6 +118,9 @@ public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements
}
MerchantAssetDTO dto = new MerchantAssetDTO();
WalletDTO walletDTO = balanceDetailService.getMerchantAsset(merchantId);
+ if(walletDTO == null){
+ walletDTO = new WalletDTO();
+ }
LambdaQueryWrapper<Asset> wrapper = Wrappers.lambdaQuery();
wrapper.eq(Asset::getUserId, merchantId);
wrapper.eq(Asset::getType, 2);
@@ -147,7 +147,7 @@ public class MerchantRelationServiceImpl extends ServiceImpl<MerchantRelationMap
String subMerchantId = json.getString("subMerchantId");
MerchantApplyRecord record = new MerchantApplyRecord();
- record.setUserId(merchantAuth.getApplicant());
+ record.setUserId(merchant.getId());
record.setType(2);
record.setRequestId(requestId);
record.setStatus(resultStatus);
@@ -87,6 +87,7 @@ public class OderHandleServiceImpl implements OrderHandleService {
BigDecimal payAmount = omsOrder.getPayAmount();
Long userId = omsOrder.getUserId();
Long merchantId = omsOrder.getMerchantId();
+
BigDecimal userAmount = BigDecimal.ZERO;
BigDecimal merchantAmount = BigDecimal.ZERO;
BigDecimal operate = payAmount.subtract(omsOrder.getFeeAmount());
@@ -13,7 +13,7 @@
target_id = #{merchantId}
AND type = 2
AND flow_type = 0
- AND operate_type = 1
+ AND operate_type IN (0,1,2,3,5,6,7)
</select>
<select id="queryByUserId" resultType="com.chelvc.cloud.vehicle.client.dto.BalanceDetailDTO">