Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2f2eaf7edf
|
|
@ -9,6 +9,7 @@ import com.czg.account.dto.shopuser.*;
|
||||||
import com.czg.account.entity.*;
|
import com.czg.account.entity.*;
|
||||||
import com.czg.account.service.*;
|
import com.czg.account.service.*;
|
||||||
import com.czg.config.RedisCst;
|
import com.czg.config.RedisCst;
|
||||||
|
import com.czg.enums.ShopUserFlowBizEnum;
|
||||||
import com.czg.exception.ApiNotPrintException;
|
import com.czg.exception.ApiNotPrintException;
|
||||||
import com.czg.order.entity.OrderDetail;
|
import com.czg.order.entity.OrderDetail;
|
||||||
import com.czg.order.entity.OrderInfo;
|
import com.czg.order.entity.OrderInfo;
|
||||||
|
|
@ -132,6 +133,14 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||||
userFlow.setRelationId(shopUserEditDTO.getRelationId());
|
userFlow.setRelationId(shopUserEditDTO.getRelationId());
|
||||||
userFlow.setRechargeId(shopUserEditDTO.getRechargeId());
|
userFlow.setRechargeId(shopUserEditDTO.getRechargeId());
|
||||||
shopUserFlowService.save(userFlow);
|
shopUserFlowService.save(userFlow);
|
||||||
|
//次数
|
||||||
|
if (shopUserEditDTO.getType() == 0 && shopUserEditDTO.getBizEnum().equals(ShopUserFlowBizEnum.ORDER_PAY)) {
|
||||||
|
ShopUser shopUser = new ShopUser();
|
||||||
|
shopUser.setId(userInfo.getId());
|
||||||
|
shopUser.setConsumeCount(userInfo.getConsumeCount() + 1);
|
||||||
|
shopUser.setConsumeAmount(userInfo.getConsumeAmount().add(shopUserEditDTO.getMoney()));
|
||||||
|
updateById(shopUser);
|
||||||
|
}
|
||||||
return userFlow.getId();
|
return userFlow.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -245,7 +254,6 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean join(Long shopId, Long userId, ShopUserAddDTO shopUserAddDTO) {
|
public boolean join(Long shopId, Long userId, ShopUserAddDTO shopUserAddDTO) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue