记得上下班打卡 | git大法好,push需谨慎

Commit 15c63889 authored by GaoHu's avatar GaoHu

新增用户预约时间字段

parent 3fc0a7cb
......@@ -6,6 +6,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @Author: GH
......@@ -34,4 +35,7 @@ public class GoblinGoodAnticipateUserVo implements Serializable {
@ApiModelProperty(value = "用户状态")
private Integer state;
@ApiModelProperty(value = "用户预约时间")
private LocalDateTime createdDate;
}
......@@ -17,6 +17,7 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.LinkedList;
/**
......@@ -64,6 +65,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
String mobile = StringUtils.defaultString(((String) CurrentUtil.getTokenClaims().get(CurrentUtil.TOKEN_MOBILE)), "");
user.setPhone(mobile);
user.setState(0);
user.setCreatedDate(LocalDateTime.now());
//mongodb记录
goblinRedisUtils.setUserAboutSku(user);
//用户没有预约过
......@@ -72,7 +74,8 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
user.getUid(),
skuId,
user.getPhone(),
0
0,
user.getCreatedDate()
});
sendRedis("goblin_goods_anticipate_user", sqlValue);
goblinRedisUtils.setSkuIdPeople(skuId);
......
......@@ -139,6 +139,6 @@ goblin_goods_anticipate=INSERT INTO goblin_goods_anticipate(ant_id,`rule`,create
goblin_goods_anticipate_value=INSERT INTO goblin_goods_anticipate_value (uid,ant_id,sku_name,sku_id,spu_id,about_people,actual_people,rule,about_start_date,about_end_date,created_date,del_tag) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods_anticipate_value_update_proper=UPDATE goblin_goods_anticipate_value SET about_people = ?,update_date = NOW() WHERE sku_id = ?
goblin_goods_anticipate_value_delete=UPDATE goblin_goods_anticipate_value SET `del_tag` = 1,update_date = NOW() WHERE sku_id = ?
goblin_goods_anticipate_user=INSERT INTO goblin_goods_anticipate_user(uid,sku_id,phone,state) VALUES(?,?,?,?)
goblin_goods_anticipate_user=INSERT INTO goblin_goods_anticipate_user(uid,sku_id,phone,state,created_date) VALUES(?,?,?,?,?)
goblin_goods_anticipate_user_update=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE uid = ? AND sku_id = ?
goblin_goods_anticipate_user_update_sku=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE sku_id = ?
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment