From e532174124ad3de9ecd96c16990681538dfd1af7 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Wed, 25 Sep 2024 16:46:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E5=A1=AB=E5=85=85=E5=8A=A0=E5=85=A5=E4=BC=9A=E5=91=98=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cashierservice/entity/TbShopUser.java | 11 ++++++++++- .../cashierservice/service/PayService.java | 3 +++ src/main/resources/mapper/TbShopUserMapper.xml | 17 ++++++++++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java index 13243bf..e4d6a24 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbShopUser.java @@ -4,6 +4,7 @@ import org.springframework.data.annotation.Transient; import java.io.Serializable; import java.math.BigDecimal; +import java.sql.Timestamp; public class TbShopUser implements Serializable { private String id; @@ -73,7 +74,7 @@ public class TbShopUser implements Serializable { @Transient private String isUser; - + private Timestamp joinTime; @@ -352,4 +353,12 @@ public class TbShopUser implements Serializable { public void setAddress(String address) { this.address = address; } + + public Timestamp getJoinTime() { + return joinTime; + } + + public void setJoinTime(Timestamp joinTime) { + this.joinTime = joinTime; + } } \ No newline at end of file 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 3e832ae..7e4f1fc 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java @@ -41,6 +41,7 @@ import org.springframework.web.client.RestTemplate; import javax.annotation.Resource; import java.io.IOException; import java.math.BigDecimal; +import java.sql.Timestamp; import java.time.LocalDateTime; import java.util.*; @@ -1119,6 +1120,7 @@ public class PayService { //修改客户资金 tbShopUser.setAmount(tbShopUser.getAmount().add(memberIn.getAmount())); tbShopUser.setUpdatedAt(System.currentTimeMillis()); + tbShopUser.setJoinTime(new Timestamp(System.currentTimeMillis())); tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser); TbShopUserFlow flow = new TbShopUserFlow(); @@ -1217,6 +1219,7 @@ public class PayService { //修改客户资金 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/resources/mapper/TbShopUserMapper.xml b/src/main/resources/mapper/TbShopUserMapper.xml index c3cc4c9..11a4618 100644 --- a/src/main/resources/mapper/TbShopUserMapper.xml +++ b/src/main/resources/mapper/TbShopUserMapper.xml @@ -31,12 +31,13 @@ + id, amount, credit_amount, consume_amount, consume_number, level_consume, status, merchant_id, shop_id, user_id, parent_id, parent_level, name, head_img, sex, birth_day, telephone, is_vip, code, is_attention, attention_at, is_shareholder, level, distribute_type, - sort, created_at, updated_at, mini_open_id,dynamic_code + sort, created_at, updated_at, mini_open_id,dynamic_code,join_time + + + + +