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

Commit 9e211b5c authored by 张国柄's avatar 张国柄

~API:店铺管理:店铺设置:编辑:去除停业逻辑;

~API:店铺管理:店铺信息:修改:缓存数据清楚;
~API:服务支持列表:+MYSQL存储;
parent e0bd4641
......@@ -159,9 +159,10 @@ public class GoblinStoreMgtController {
param.getConfMap().forEach((ck, cv) -> {
switch (ck) {
case "BUSINESS_STATUS":
if (Arrays.asList("4", "5").contains(cv)) {
updateConfMap.put(ck, cv);
}
// TODO: 2022/2/23 ==zhanggb 暂不启用停业功能
// if (Arrays.asList("4", "5").contains(cv)) {
// updateConfMap.put(ck, cv);
// }
break;
case "ONOFF_CUSTOMER_SEV":
case "ONOFF_SOLD_OUT_SHOW":
......
......@@ -43,19 +43,7 @@ public class GoblinStoreMgtExtraController {
@ApiOperation(value = "平台商品分类")
@GetMapping("sg_categorys")
public ResponseDto<List<GoblinSelfGoodsCategoryVo>> selfGoodsCategoryList() {
// ArrayList<GoblinSelfGoodsCategoryVo> selfGoodsCategoryVos = ObjectUtil.getGoblinSelfGoodsCategoryVoArrayList();
// selfGoodsCategoryVos.add(
// GoblinSelfGoodsCategoryVo.getNew().setCateId("10000").setName("1级").setSort(1).setGrade("1").setNeIsbn("0").setCatePid(null)
// );
// selfGoodsCategoryVos.add(
// GoblinSelfGoodsCategoryVo.getNew().setCateId("10100").setName("2级").setSort(1).setGrade("2").setNeIsbn("0").setCatePid("10000")
// );
// selfGoodsCategoryVos.add(
// GoblinSelfGoodsCategoryVo.getNew().setCateId("10101").setName("3级").setSort(1).setGrade("3").setNeIsbn("1").setCatePid("10100")
// );
// TODO: 2022/1/11 redis+mongo.get
List<GoblinSelfGoodsCategoryVo> selfGoodsCategoryVos = goblinStoreMgtExtraService.listCategoryVo();
return ResponseDto.success(selfGoodsCategoryVos);
return ResponseDto.success(goblinStoreMgtExtraService.listCategoryVo());
}
@ApiOperationSupport(order = 2)
......
package com.liquidnet.service.goblin.service.impl.manage;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfGoodsCategoryVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfTagVo;
import com.liquidnet.service.goblin.dto.vo.GoblinServiceSupportVo;
import com.liquidnet.service.goblin.service.manage.IGoblinStoreMgtExtraService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
import com.liquidnet.service.goblin.util.QueueUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.LinkedList;
import java.util.List;
@Service
public class GoblinStoreMgtExtraServiceImpl implements IGoblinStoreMgtExtraService {
@Autowired
private QueueUtils queueUtils;
@Autowired
private GoblinRedisUtils goblinRedisUtils;
@Autowired
......@@ -37,8 +44,13 @@ public class GoblinStoreMgtExtraServiceImpl implements IGoblinStoreMgtExtraServi
serviceSupportVos.add(GoblinServiceSupportVo.getNew().setName("极速发货").setDesc("24小时内发送货物").setSsid("102"));
serviceSupportVos.add(GoblinServiceSupportVo.getNew().setName("无忧退货").setDesc("支持7天无理由退款").setSsid("103"));
List<GoblinServiceSupportVo> serviceSupportVoList = goblinMongoUtils.insertMgtServiceSupportVos(serviceSupportVos);
// TODO: 2022/1/4 zhanggb + queue.sql
goblinMongoUtils.insertMgtServiceSupportVos(serviceSupportVos);
LinkedList<Object[]> upsertServiceSupportObjs = CollectionUtil.linkedListObjectArr();
serviceSupportVos.forEach(vo -> upsertServiceSupportObjs.add(new Object[]{vo.getSsid(), vo.getName(), vo.getDesc(), vo.getUrl()}));
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_STORE.getKey(),
SqlMapping.get("goblin_service_support.insert_by_replace", upsertServiceSupportObjs));
}
return serviceSupportVos;
}
......
......@@ -35,7 +35,7 @@ public class GoblinStoreMgtServiceImpl implements IGoblinStoreMgtService {
@Override
public boolean updateStoreMgtInfo(GoblinStoreInfoVo storeInfoVo) {
if (goblinMongoUtils.updateStoreInfoVo(storeInfoVo)) {
// goblinRedisUtils.setStoreInfoVo(storeInfoVo);// TODO: 2022/1/17 zhanggb==
goblinRedisUtils.delStoreInfoVo(storeInfoVo.getStoreId());
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_STORE.getKey(),
SqlMapping.get("goblin_store_info.update_by_edit",
......@@ -66,7 +66,7 @@ public class GoblinStoreMgtServiceImpl implements IGoblinStoreMgtService {
}
}
if (!CollectionUtils.isEmpty(updateStoreConfigVoList) && goblinMongoUtils.updateStoreConfigVos(updateStoreConfigVoList)) {
// goblinRedisUtils.setStoreConfigVos(storeId, storeConfigVos);// TODO: 2022/1/17 zhanggb==redis
goblinRedisUtils.delStoreConfigVos(storeId);
LinkedList<Object[]> updateStoreInfoObjs = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> updateGoodsInfoObjs = CollectionUtil.linkedListObjectArr();
......@@ -78,7 +78,7 @@ public class GoblinStoreMgtServiceImpl implements IGoblinStoreMgtService {
updateStoreInfoVo.setUpdatedBy(uid);
updateStoreInfoVo.setUpdatedAt(now);
goblinMongoUtils.updateStoreInfoVo(updateStoreInfoVo);
// goblinRedisUtils.setStoreInfoVo(updateStoreInfoVo);// TODO: 2022/1/17 zhanggb==redis
goblinRedisUtils.delStoreInfoVo(storeId);
goblinMongoUtils.updateGoodsInfoVoAppear(storeId, status.equals("4") ? "1" : "0", now, uid);
......@@ -88,7 +88,7 @@ public class GoblinStoreMgtServiceImpl implements IGoblinStoreMgtService {
spuIdList.forEach(spuId -> goblinRedisUtils.delGoodsInfoVo(spuId));
updateStoreInfoObjs.add(new Object[]{updateStoreInfoVo.getStatus(), uid, now, storeId});
updateGoodsInfoObjs.add(new Object[]{status, uid, now, storeId});
updateGoodsInfoObjs.add(new Object[]{status.equals("4") ? "1" : "0", uid, now, storeId});
}
LinkedList<String> toMqSqls = CollectionUtil.linkedListString();
......
#---- 服务支持信息
goblin_service_support.insert_by_replace=REPLACE INTO goblin_service_support (ssid,name,`desc`,url,created_by,created_at)VALUES(?,?,?,?,'-',sysdate())
#---- 店铺信息
goblin_store_info.insert_by_cert=INSERT INTO goblin_store_info (store_id,uid,status,store_type,cert_type,created_by,created_at)VALUES(?,?,?,?,?,?,?)
goblin_store_info.update_by_cert1=UPDATE goblin_store_info SET store_type=?,cert_type=?,updated_by=?,updated_at=? WHERE store_id=?
......@@ -14,7 +16,7 @@ goblin_store_config.update=UPDATE goblin_store_config SET config_val=?,updated_b
goblin_store_notice.insert=INSERT INTO goblin_store_notice (notice_id,store_id,content,release_time,long_lasting,cancell_time,status,created_by,created_at)VALUES(?,?,?,?,?,?,?,?,?)
goblin_store_notice.update=UPDATE goblin_store_notice SET content=?,release_time=?,long_lasting=?,cancell_time=?,status=?,updated_by=?,updated_at=? WHERE notice_id=?
goblin_store_notice.release=UPDATE goblin_store_notice SET release_time=?,status='1',updated_by=?,updated_at=? WHERE store_id=? AND notice_id=?
goblin_store_notice.remove=UPDATE goblin_store_notice SET del_flg='1',updated_by=?,updated_at=? WHERE store_id=? AND notice_id=?
goblin_store_notice.remove=UPDATE goblin_store_notice SET del_flg='1',updated_by=?,updated_at=? WHERE store_id=? AND notice_id=?
#---- 店铺商品分类信息
goblin_store_goods_category.insert=INSERT INTO goblin_store_goods_category (store_id,cate_id,name,sort,grade,cate_pid,ne_isbn,created_by,created_at)VALUES(?,?,?,?,?,?,?,?,?)
goblin_store_goods_category.update=UPDATE goblin_store_goods_category SET name=?,sort=?,updated_by=?,updated_at=? WHERE store_id=? AND cate_id=?
......@@ -32,7 +34,6 @@ goblin_goods_spu_spec_value.update_by_del_sku1=UPDATE goblin_goods_spu_spec_valu
goblin_goods_spu_spec_value.update_by_del_sku2=UPDATE goblin_goods_spu_spec_value SET sort=? WHERE spu_id=? AND spec_name=? AND spec_vname=?
goblin_goods_sku_spec_value.insert_by_ignore=INSERT IGNORE INTO goblin_goods_sku_spec_value (spu_id,sku_id,spec_name,spec_vname)VALUES(?,?,?,?)
goblin_goods_sku_spec_value.update_by_edit=UPDATE goblin_goods_sku_spec_value SET spec_vname=? WHERE sku_id=? AND spec_name=? AND del_flg='0'
goblin_goods_sku_spec_value.update_by_del=UPDATE goblin_goods_sku_spec_value SET del_flg='1' WHERE sku_id=? AND del_flg='0'
#---- 商品信息
goblin_goods.insert=INSERT INTO goblin_goods (spu_id,spu_no,name,subtitle,sell_price, price_ge,price_le,intro,details,cover_pic, video,spec_mode,store_id,cate_fid,cate_sid, cate_tid,store_cate_fid,store_cate_sid,store_cate_tid,brand_id, shelves_handle,shelves_time,spu_validity,virtual_flg,status, shelves_status,spu_appear,shelves_at,created_by,created_at, logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods.update_by_edit=UPDATE goblin_goods SET spu_no=?,name=?,subtitle=?,sell_price=?,intro=?,details=?,cover_pic=?,video=?,spec_mode=?,cate_fid=?,cate_sid=?,cate_tid=?,shelves_handle=?,shelves_time=?,spu_validity=?,virtual_flg=?,logistics_template=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
......
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