From 0f000cd0e0e051d33d85df8380ce5ad3ee25f844 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Tue, 8 Oct 2024 15:40:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E5=8A=A0=E5=85=A5=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/service/LoginService.java | 3 +++ .../system/cashierservice/service/PayService.java | 4 ++-- .../system/cashierservice/service/UserService.java | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) 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);