会员加入时间

This commit is contained in:
2024-10-08 15:40:26 +08:00
parent f7db296035
commit 0f000cd0e0
3 changed files with 8 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.*;
@Service
@@ -483,6 +484,7 @@ public class LoginService {
TbShopUser tbShopUserSM = tbShopUserMapper.selectByUserIdAndShopId(userInfo.getId().toString(), shopId);
if (tbShopUserSM != null) {
tbShopUserSM.setIsVip(Byte.parseByte("1"));
tbShopUserSM.setJoinTime(new Timestamp(System.currentTimeMillis()));
tbShopUserSM.setTelephone(phone);
tbShopUserSM.setUpdatedAt(System.currentTimeMillis());
tbShopUserMapper.updateByPrimaryKey(tbShopUserSM);
@@ -505,6 +507,7 @@ public class LoginService {
shopUser.setTelephone(userInfo.getTelephone());
shopUser.setAmount(BigDecimal.ZERO);
shopUser.setIsVip(Byte.parseByte("1"));
shopUser.setJoinTime(new Timestamp(System.currentTimeMillis()));
shopUser.setCreditAmount(BigDecimal.ZERO);
shopUser.setConsumeAmount(BigDecimal.ZERO);
shopUser.setConsumeNumber(0);

View File

@@ -1117,12 +1117,12 @@ public class PayService {
if (!"1".equals(tbShopUser.getIsVip().toString())) {
tbShopUser.setIsVip(Byte.parseByte("1"));
tbShopUser.setJoinTime(new Timestamp(System.currentTimeMillis()));
}
//修改客户资金
tbShopUser.setAmount(tbShopUser.getAmount().add(memberIn.getAmount()));
tbShopUser.setUpdatedAt(System.currentTimeMillis());
tbShopUser.setJoinTime(new Timestamp(System.currentTimeMillis()));
tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser);
TbShopUserFlow flow = new TbShopUserFlow();
@@ -1216,12 +1216,12 @@ public class PayService {
tbShopUser.setTelephone(userInfo.getTelephone());
tbShopUser.setCode(RandomUtil.randomNumbers(8));
tbShopUser.setIsVip(Byte.parseByte("1"));
tbShopUser.setJoinTime(new Timestamp(System.currentTimeMillis()));
}
//修改客户资金
tbShopUser.setAmount(tbShopUser.getAmount().add(memberIn.getAmount()));
tbShopUser.setUpdatedAt(System.currentTimeMillis());
tbShopUser.setJoinTime(new Timestamp(System.currentTimeMillis()));
tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser);
TbShopUserFlow flow = new TbShopUserFlow();

View File

@@ -34,6 +34,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.*;
import java.util.concurrent.TimeUnit;
@@ -280,6 +281,7 @@ public class UserService {
tbShopUser.setTelephone(memberVo.getTelephone());
tbShopUser.setBirthDay(StringUtils.isNotBlank(memberVo.getBirthDay()) ? memberVo.getBirthDay() : null);
tbShopUser.setIsVip(Byte.parseByte("1"));
tbShopUser.setJoinTime(new Timestamp(System.currentTimeMillis()));
shopUserMapper.updateByPrimaryKeySelective(tbShopUser);
} else {
TbUserInfo tbUserInfo = userInfoMapper.selectByPrimaryKey(memberVo.getId());
@@ -304,6 +306,7 @@ public class UserService {
tbShopUser.setTelephone(memberVo.getTelephone());
tbShopUser.setAmount(BigDecimal.ZERO);
tbShopUser.setIsVip(Byte.parseByte("1"));
tbShopUser.setJoinTime(new Timestamp(System.currentTimeMillis()));
tbShopUser.setCreditAmount(BigDecimal.ZERO);
tbShopUser.setConsumeAmount(BigDecimal.ZERO);
tbShopUser.setConsumeNumber(0);