新增会员填充加入会员时间
This commit is contained in:
@@ -4,6 +4,7 @@ import org.springframework.data.annotation.Transient;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
public class TbShopUser implements Serializable {
|
public class TbShopUser implements Serializable {
|
||||||
private String id;
|
private String id;
|
||||||
@@ -73,7 +74,7 @@ public class TbShopUser implements Serializable {
|
|||||||
@Transient
|
@Transient
|
||||||
private String isUser;
|
private String isUser;
|
||||||
|
|
||||||
|
private Timestamp joinTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -352,4 +353,12 @@ public class TbShopUser implements Serializable {
|
|||||||
public void setAddress(String address) {
|
public void setAddress(String address) {
|
||||||
this.address = address;
|
this.address = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Timestamp getJoinTime() {
|
||||||
|
return joinTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJoinTime(Timestamp joinTime) {
|
||||||
|
this.joinTime = joinTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -41,6 +41,7 @@ import org.springframework.web.client.RestTemplate;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -1119,6 +1120,7 @@ public class PayService {
|
|||||||
//修改客户资金
|
//修改客户资金
|
||||||
tbShopUser.setAmount(tbShopUser.getAmount().add(memberIn.getAmount()));
|
tbShopUser.setAmount(tbShopUser.getAmount().add(memberIn.getAmount()));
|
||||||
tbShopUser.setUpdatedAt(System.currentTimeMillis());
|
tbShopUser.setUpdatedAt(System.currentTimeMillis());
|
||||||
|
tbShopUser.setJoinTime(new Timestamp(System.currentTimeMillis()));
|
||||||
tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser);
|
tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser);
|
||||||
|
|
||||||
TbShopUserFlow flow = new TbShopUserFlow();
|
TbShopUserFlow flow = new TbShopUserFlow();
|
||||||
@@ -1217,6 +1219,7 @@ public class PayService {
|
|||||||
//修改客户资金
|
//修改客户资金
|
||||||
tbShopUser.setAmount(tbShopUser.getAmount().add(memberIn.getAmount()));
|
tbShopUser.setAmount(tbShopUser.getAmount().add(memberIn.getAmount()));
|
||||||
tbShopUser.setUpdatedAt(System.currentTimeMillis());
|
tbShopUser.setUpdatedAt(System.currentTimeMillis());
|
||||||
|
tbShopUser.setJoinTime(new Timestamp(System.currentTimeMillis()));
|
||||||
tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser);
|
tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser);
|
||||||
|
|
||||||
TbShopUserFlow flow = new TbShopUserFlow();
|
TbShopUserFlow flow = new TbShopUserFlow();
|
||||||
|
|||||||
@@ -31,12 +31,13 @@
|
|||||||
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
||||||
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
||||||
<result column="mini_open_id" jdbcType="VARCHAR" property="miniOpenId" />
|
<result column="mini_open_id" jdbcType="VARCHAR" property="miniOpenId" />
|
||||||
|
<result column="join_time" jdbcType="VARCHAR" property="joinTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, amount, credit_amount, consume_amount, consume_number, level_consume, status,
|
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,
|
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,
|
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
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@@ -74,7 +75,7 @@
|
|||||||
code, is_attention, attention_at,
|
code, is_attention, attention_at,
|
||||||
is_shareholder, level, distribute_type,
|
is_shareholder, level, distribute_type,
|
||||||
sort, created_at, updated_at,
|
sort, created_at, updated_at,
|
||||||
mini_open_id)
|
mini_open_id,join_time)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{creditAmount,jdbcType=DECIMAL},
|
values (#{id,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{creditAmount,jdbcType=DECIMAL},
|
||||||
#{consumeAmount,jdbcType=DECIMAL}, #{consumeNumber,jdbcType=INTEGER}, #{levelConsume,jdbcType=DECIMAL},
|
#{consumeAmount,jdbcType=DECIMAL}, #{consumeNumber,jdbcType=INTEGER}, #{levelConsume,jdbcType=DECIMAL},
|
||||||
#{status,jdbcType=TINYINT}, #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
|
#{status,jdbcType=TINYINT}, #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
#{code,jdbcType=VARCHAR}, #{isAttention,jdbcType=TINYINT}, #{attentionAt,jdbcType=INTEGER},
|
#{code,jdbcType=VARCHAR}, #{isAttention,jdbcType=TINYINT}, #{attentionAt,jdbcType=INTEGER},
|
||||||
#{isShareholder,jdbcType=TINYINT}, #{level,jdbcType=TINYINT}, #{distributeType,jdbcType=VARCHAR},
|
#{isShareholder,jdbcType=TINYINT}, #{level,jdbcType=TINYINT}, #{distributeType,jdbcType=VARCHAR},
|
||||||
#{sort,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
|
#{sort,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
|
||||||
#{miniOpenId,jdbcType=VARCHAR})
|
#{miniOpenId,jdbcType=VARCHAR},#{joinTime,jdbcType=TIMESTAMP})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
|
||||||
insert into tb_shop_user
|
insert into tb_shop_user
|
||||||
@@ -173,6 +174,9 @@
|
|||||||
<if test="miniOpenId != null">
|
<if test="miniOpenId != null">
|
||||||
mini_open_id,
|
mini_open_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="joinTime != null">
|
||||||
|
join_time,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
@@ -259,6 +263,9 @@
|
|||||||
<if test="miniOpenId != null">
|
<if test="miniOpenId != null">
|
||||||
#{miniOpenId,jdbcType=VARCHAR},
|
#{miniOpenId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="joinTime != null">
|
||||||
|
#{joinTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
|
||||||
@@ -354,6 +361,9 @@
|
|||||||
<if test="miniOpenId != null">
|
<if test="miniOpenId != null">
|
||||||
mini_open_id = #{miniOpenId,jdbcType=VARCHAR},
|
mini_open_id = #{miniOpenId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="joinTime != null">
|
||||||
|
join_time = #{joinTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
@@ -385,6 +395,7 @@
|
|||||||
sort = #{sort,jdbcType=INTEGER},
|
sort = #{sort,jdbcType=INTEGER},
|
||||||
created_at = #{createdAt,jdbcType=BIGINT},
|
created_at = #{createdAt,jdbcType=BIGINT},
|
||||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||||
|
join_time = #{joinTime,jdbcType=TIMESTAMP},
|
||||||
mini_open_id = #{miniOpenId,jdbcType=VARCHAR}
|
mini_open_id = #{miniOpenId,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Reference in New Issue
Block a user