diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/LoginService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/LoginService.java index 86b6a1b..009cf6a 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/LoginService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/LoginService.java @@ -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); diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java index 152f0e4..8373c14 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java @@ -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(); diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/UserService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/UserService.java index c6441e6..aac35b7 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/UserService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/UserService.java @@ -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);