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

Commit 52aeb023 authored by GaoHu's avatar GaoHu

exit

parent df3d8fee
......@@ -168,9 +168,13 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
}
@Override
public ResponseDto<Object> userAbout(String autId, String skuId, String uid, String phone, Integer state) {
public ResponseDto<Object> userAbout(String antId, String skuId, String uid, String phone, Integer state) {
//查询该用户是否预
GoblinGoodAnticipateUserVo userVo = goblinRedisUtils.getUserAboutAut(skuId, uid);
LinkedList<Object[]> antIdValue = CollectionUtil.linkedListObjectArr();
antIdValue.add(new Object[]{
antId
});
LinkedList<Object[]> sqlValue = CollectionUtil.linkedListObjectArr();
if (state.equals(GoblinGoodAnticipateUserVo.STATE_VALID) && userVo == null) {
//用户没有预约过
......@@ -185,7 +189,8 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
GoblinGoodAnticipateUserVo user = new GoblinGoodAnticipateUserVo(uid, skuId, phone, state);
//mongodb记录
goblinRedisUtils.setUserAboutSku(user);
//预约人数+1或-1
//新增
sendRedis("goblin_goods_anticipate_update_actual_add_people",antIdValue);
} else {
//mysql删除用户记录
sqlValue.add(new Object[]{
......@@ -195,10 +200,11 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
sendRedis("goblin_goods_anticipate_user_update", sqlValue);
//删除缓存 redis和mongodb
goblinRedisUtils.delUserAboutSku(skuId, uid);
sendRedis("goblin_goods_anticipate_update_actual_reduce_people",antIdValue);
}
goblinRedisUtils.setAutId(autId, state);
goblinRedisUtils.setAutId(antId, state);
return null;
return ResponseDto.success();
}
@Override
......
......@@ -135,6 +135,8 @@ goblin_user_digital_artwork.update_for_unboxing=UPDATE goblin_user_digital_artwo
#----
#---- \u9884\u7EA6
goblin_goods_anticipate=INSERT INTO goblin_goods_anticipate(ant_id,`name`,`rule`,actual_people,about_start_date,about_end_date,created_date,del_tag) VALUES(?,?,?,?,?,?,?,?)
goblin_goods_anticipate_update_actual_add_people=UPDATE goblin_goods_anticipate SET actual_people = actual_people+1 WHERE ant_id = ?
goblin_goods_anticipate_update_actual_reduce_people=UPDATE goblin_goods_anticipate SET actual_people = actual_people-1 WHERE ant_id = ?
goblin_goods_anticipate_delete=UPDATE goblin_goods_anticipate SET `del_tag` = 1,update_date = NOW() WHERE ant_id = ?
goblin_goods_anticipate_value=INSERT INTO goblin_goods_anticipate_value (ant_id,sku_name,sku_id,spu_id,about_start_date,about_end_date,created_date,del_tag) VALUES(?,?,?,?,?,?,?,?)
goblin_goods_anticipate_value_update=UPDATE goblin_goods_anticipate_value SET `about_start_date` = ?,`about_end_date`= ?,update_date = NOW() WHERE ant_id = ? AND sku_id = ? AND spu_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