Merge branch 'ww' into test
This commit is contained in:
commit
628ef133ff
|
|
@ -2,6 +2,7 @@ package com.chaozhanggui.system.cashierservice.entity;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class TbShopUser implements Serializable {
|
||||
private Integer id;
|
||||
|
|
@ -61,6 +62,7 @@ public class TbShopUser implements Serializable {
|
|||
private Long updatedAt;
|
||||
|
||||
private String miniOpenId;
|
||||
private Date joinTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
@ -295,4 +297,12 @@ public class TbShopUser implements Serializable {
|
|||
public void setDynamicCode(String dynamicCode) {
|
||||
this.dynamicCode = dynamicCode;
|
||||
}
|
||||
|
||||
public Date getJoinTime() {
|
||||
return joinTime;
|
||||
}
|
||||
|
||||
public void setJoinTime(Date joinTime) {
|
||||
this.joinTime = joinTime;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ public class MemberService {
|
|||
tbShopUser.setLevel(Byte.parseByte(String.valueOf(map.get("level"))));
|
||||
tbShopUser.setIsVip(Byte.parseByte("1"));
|
||||
tbShopUser.setUpdatedAt(System.currentTimeMillis());
|
||||
tbShopUser.setJoinTime(new Date());
|
||||
tbShopUserMapper.updateByPrimaryKeySelective(tbShopUser);
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
|
@ -168,6 +169,7 @@ public class MemberService {
|
|||
tbShopUser.setCode(code);
|
||||
tbShopUser.setIsVip(Byte.parseByte("1"));
|
||||
tbShopUser.setCreatedAt(System.currentTimeMillis());
|
||||
tbShopUser.setJoinTime(new Date());
|
||||
tbShopUserMapper.insert(tbShopUser);
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ public class ProductService {
|
|||
|
||||
if (product.getIsDistribute() != 1 && product.getTypeEnum().equals("sku")) {
|
||||
throw new MsgException("多规格非共享商品暂不支持修改库存");
|
||||
}else {
|
||||
} else {
|
||||
tbProductMapper.updateStock(productStockDTO.getShopId(), productStockDTO.getProductId(), productStockDTO.getStock());
|
||||
tbProductSkuMapper.updateStock(productStockDTO.getShopId(), productStockDTO.getProductId(), productStockDTO.getStock());
|
||||
|
||||
|
|
@ -213,9 +213,15 @@ public class ProductService {
|
|||
data.put("shopId", productStockDTO.getShopId());
|
||||
data.put("skuId", tbProductSkus.isEmpty() ? null : tbProductSkus.get(0).getId());
|
||||
data.put("productId", productStockDTO.getProductId());
|
||||
data.put("type", "pc收银机修改库存");
|
||||
// data.put("type", "pc收银机修改库存");
|
||||
data.put("subType", product.getStockNumber() > productStockDTO.getStock() ? -1 : 1);
|
||||
data.put("number",productStockDTO.getStock() - product.getStockNumber());
|
||||
data.put("number", productStockDTO.getStock() - product.getStockNumber());
|
||||
data.put("remark", "pc收银机修改库存");
|
||||
if (product.getStockNumber() > productStockDTO.getStock()) {
|
||||
data.put("type", "盘点出库");
|
||||
}else {
|
||||
data.put("type", "盘点入库");
|
||||
}
|
||||
producer.sendStockRecordMsg(data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,12 +32,13 @@
|
|||
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
||||
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
||||
<result column="mini_open_id" jdbcType="VARCHAR" property="miniOpenId" />
|
||||
<result column="join_time" jdbcType="VARCHAR" property="joinTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
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
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
|
|
@ -59,7 +60,7 @@
|
|||
code, is_attention, attention_at,
|
||||
is_shareholder, level, distribute_type,
|
||||
sort, created_at, updated_at,
|
||||
mini_open_id)
|
||||
mini_open_id,join_time)
|
||||
values (#{id,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{creditAmount,jdbcType=DECIMAL},
|
||||
#{consumeAmount,jdbcType=DECIMAL}, #{consumeNumber,jdbcType=INTEGER}, #{levelConsume,jdbcType=DECIMAL},
|
||||
#{status,jdbcType=TINYINT}, #{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
|
||||
|
|
@ -69,7 +70,7 @@
|
|||
#{code,jdbcType=VARCHAR}, #{isAttention,jdbcType=TINYINT}, #{attentionAt,jdbcType=INTEGER},
|
||||
#{isShareholder,jdbcType=TINYINT}, #{level,jdbcType=TINYINT}, #{distributeType,jdbcType=VARCHAR},
|
||||
#{sort,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
|
||||
#{miniOpenId,jdbcType=VARCHAR})
|
||||
#{miniOpenId,jdbcType=VARCHAR},#{joinTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
|
||||
insert into tb_shop_user
|
||||
|
|
@ -158,6 +159,9 @@
|
|||
<if test="miniOpenId != null">
|
||||
mini_open_id,
|
||||
</if>
|
||||
<if test="joinTime != null">
|
||||
join_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
|
@ -244,6 +248,9 @@
|
|||
<if test="miniOpenId != null">
|
||||
#{miniOpenId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="joinTime != null">
|
||||
#{joinTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUser">
|
||||
|
|
@ -330,6 +337,9 @@
|
|||
<if test="miniOpenId != null">
|
||||
mini_open_id = #{miniOpenId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="joinTime != null">
|
||||
join_time = #{joinTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
|
@ -361,7 +371,8 @@
|
|||
sort = #{sort,jdbcType=INTEGER},
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
mini_open_id = #{miniOpenId,jdbcType=VARCHAR}
|
||||
mini_open_id = #{miniOpenId,jdbcType=VARCHAR},
|
||||
join_time = #{joinTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue