店铺会员信息修改
This commit is contained in:
@@ -2,7 +2,6 @@ package com.czg.service.account.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.DesensitizedUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.account.dto.shopuser.*;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
@@ -38,6 +37,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -147,6 +147,27 @@ public class AShopUserServiceImpl implements AShopUserService {
|
||||
ExcelExportUtil.exportToResponse(exportList, ShopUserExportDTO.class, shopInfo == null ? "店铺用户列表" : shopInfo.getShopName() + "_用户列表", response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean editVip(ShopUserVipEditDTO vipEditDTO) {
|
||||
ShopUser shopUser = getUserInfo(vipEditDTO.getId());
|
||||
if (vipEditDTO.getIsVip() != null && vipEditDTO.getIsVip() == 1) {
|
||||
shopUser.setIsVip(vipEditDTO.getIsVip());
|
||||
if (vipEditDTO.getMemberLevelId() != null) {
|
||||
shopUser.setMemberLevelId(vipEditDTO.getMemberLevelId());
|
||||
if (shopUser.getStartTime() == null) {
|
||||
shopUser.setStartTime(LocalDateTime.now());
|
||||
}
|
||||
shopUser.setEndTime(vipEditDTO.getEndTime());
|
||||
}
|
||||
} else if (vipEditDTO.getIsVip() != null && vipEditDTO.getIsVip() == 0) {
|
||||
shopUser.setIsVip(0);
|
||||
shopUser.setStartTime(null);
|
||||
shopUser.setEndTime(null);
|
||||
shopUser.setMemberLevelId(null);
|
||||
}
|
||||
return shopUserService.updateById(shopUser, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean updateInfo(Long shopId, ShopUserEditDTO shopUserEditDTO) {
|
||||
|
||||
Reference in New Issue
Block a user