This commit is contained in:
牛叉闪闪
2024-08-29 17:31:20 +08:00
parent 84e4a21064
commit 203332e232

View File

@@ -742,7 +742,6 @@ public class MemberService {
}
TbShopUser user = tbShopUserMapper.selectByPrimaryKey(flow.getShopUserId());
if (ObjectUtil.isEmpty(user) || ObjectUtil.isNull(user)) {
@@ -754,18 +753,12 @@ public class MemberService {
}
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(user.getShopId()));
if (ObjectUtil.isEmpty(shopInfo) || ObjectUtil.isNull(shopInfo)) {
return Result.fail(CodeEnum.MERCHANTEIXST);
}
if ("scanMemberIn".equals(flow.getBizCode())) {
TbMerchantThirdApply thirdApply = tbMerchantThirdApplyMapper.selectByPrimaryKey(Integer.valueOf(shopInfo.getMerchantId()));
if (ObjectUtil.isEmpty(thirdApply) || ObjectUtil.isNull(thirdApply)) {
@@ -800,6 +793,19 @@ public class MemberService {
tbShopUserFlowMapper.updateByPrimaryKey(flow);
TbShopUserFlow userFlow = new TbShopUserFlow();
userFlow.setShopUserId(user.getId());
userFlow.setBizCode("memberReturn");
userFlow.setBizName("会员退款");
userFlow.setType("-");
userFlow.setAmount(new BigDecimal(amount));
userFlow.setBalance(user.getAmount());
userFlow.setCreateTime(new Date());
userFlow.setIsReturn("1");
userFlow.setRemark(flowId);
tbShopUserFlowMapper.insert(userFlow);
JSONObject baObj = new JSONObject();
baObj.put("userId", user.getUserId());
baObj.put("shopId", user.getId());