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

Commit fc1cbbd3 authored by zhanggb's avatar zhanggb

~api:店铺管理:店铺ERP配置编辑入库;

parent 435523a3
...@@ -1224,6 +1224,22 @@ alter table goblin_nft_order add erp_hosting tinyint default 0 comment 'ERP托 ...@@ -1224,6 +1224,22 @@ alter table goblin_nft_order add erp_hosting tinyint default 0 comment 'ERP托
alter table goblin_nft_order add spu_erp_code varchar(64) null comment 'ERP商品编码' after erp_hosting; alter table goblin_nft_order add spu_erp_code varchar(64) null comment 'ERP商品编码' after erp_hosting;
alter table goblin_nft_order add sku_erp_code varchar(64) null comment 'ERP规格编码' after spu_erp_code; alter table goblin_nft_order add sku_erp_code varchar(64) null comment 'ERP规格编码' after spu_erp_code;
alter table goblin_nft_order add erp_warehouse_no varchar(64) null comment 'ERP仓库编号' after sku_erp_code; alter table goblin_nft_order add erp_warehouse_no varchar(64) null comment 'ERP仓库编号' after sku_erp_code;
drop table if exists goblin_store_erp_config;
create table goblin_store_erp_config
(
mid bigint auto_increment primary key,
store_id varchar(64) not null comment '店铺ID',
sid varchar(50) comment 'ERP店铺sid',
appKey varchar(255) comment 'ERP店铺名称appKey',
appSecret varchar(255) comment 'ERP店铺appSecret',
shopNo varchar(50) comment 'ERP店铺shopNo',
updated_by varchar(64) null,
updated_at datetime null,
comment varchar(500)
) engine = InnoDB comment '店铺ERP配置';
create unique index idx_gsec_store_id on goblin_store_erp_config (store_id);
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
......
...@@ -7,6 +7,7 @@ db.createCollection("GoblinSelfTagVo"); ...@@ -7,6 +7,7 @@ db.createCollection("GoblinSelfTagVo");
db.createCollection("GoblinServiceSupportVo"); db.createCollection("GoblinServiceSupportVo");
db.createCollection("GoblinStoreNoticeVo"); db.createCollection("GoblinStoreNoticeVo");
db.createCollection("GoblinStoreConfigVo"); db.createCollection("GoblinStoreConfigVo");
db.createCollection("GoblinStoreErpConfigVo");
db.createCollection("GoblinStoreInfoVo"); db.createCollection("GoblinStoreInfoVo");
db.createCollection("GoblinGoodsInfoVo"); db.createCollection("GoblinGoodsInfoVo");
db.createCollection("GoblinGoodsSkuInfoVo"); db.createCollection("GoblinGoodsSkuInfoVo");
...@@ -38,6 +39,7 @@ db.GoblinSelfTagVo.createIndex({tagBelong:"hashed"}); ...@@ -38,6 +39,7 @@ db.GoblinSelfTagVo.createIndex({tagBelong:"hashed"});
db.GoblinServiceSupportVo.createIndex({ssid:"hashed"}); db.GoblinServiceSupportVo.createIndex({ssid:"hashed"});
db.GoblinStoreNoticeVo.createIndex({storeId:"hashed"}); db.GoblinStoreNoticeVo.createIndex({storeId:"hashed"});
db.GoblinStoreConfigVo.createIndex({storeId:"hashed"}); db.GoblinStoreConfigVo.createIndex({storeId:"hashed"});
db.GoblinStoreErpConfigVo.createIndex({storeId:"hashed"});
db.GoblinStoreInfoVo.createIndex({storeId:"hashed"}); db.GoblinStoreInfoVo.createIndex({storeId:"hashed"});
db.GoblinGoodsInfoVo.createIndex({spuId:"hashed"}); db.GoblinGoodsInfoVo.createIndex({spuId:"hashed"});
db.GoblinGoodsInfoVo.createIndex({storeId:"hashed"}); db.GoblinGoodsInfoVo.createIndex({storeId:"hashed"});
...@@ -85,6 +87,7 @@ sh.shardCollection("test_ln_scene.GoblinSelfTagVo",{"tagId":"hashed"}); ...@@ -85,6 +87,7 @@ sh.shardCollection("test_ln_scene.GoblinSelfTagVo",{"tagId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinServiceSupportVo",{"ssid":"hashed"}); sh.shardCollection("test_ln_scene.GoblinServiceSupportVo",{"ssid":"hashed"});
sh.shardCollection("test_ln_scene.GoblinStoreNoticeVo",{"noticeId":"hashed"}); sh.shardCollection("test_ln_scene.GoblinStoreNoticeVo",{"noticeId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinStoreConfigVo",{"storeId":"hashed"}); sh.shardCollection("test_ln_scene.GoblinStoreConfigVo",{"storeId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinStoreErpConfigVo",{"storeId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinStoreInfoVo",{"storeId":"hashed"}); sh.shardCollection("test_ln_scene.GoblinStoreInfoVo",{"storeId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinGoodsInfoVo",{"spuId":"hashed"}); sh.shardCollection("test_ln_scene.GoblinGoodsInfoVo",{"spuId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinGoodsSkuInfoVo",{"skuId":"hashed"}); sh.shardCollection("test_ln_scene.GoblinGoodsSkuInfoVo",{"skuId":"hashed"});
......
...@@ -349,6 +349,7 @@ public class GoblinStoreMgtController { ...@@ -349,6 +349,7 @@ public class GoblinStoreMgtController {
storeErpConfigVo.setAppSecret(appSecret); storeErpConfigVo.setAppSecret(appSecret);
storeErpConfigVo.setShopNo(shopNo); storeErpConfigVo.setShopNo(shopNo);
log.info("店铺管理:店铺ERP配置:编辑[UID:{},AFT:{}]", currentUid, JsonUtils.toJson(storeErpConfigVo)); log.info("店铺管理:店铺ERP配置:编辑[UID:{},AFT:{}]", currentUid, JsonUtils.toJson(storeErpConfigVo));
return goblinStoreMgtService.updateStoreMgtErpConfig(currentUid, storeErpConfigVo) ? ResponseDto.success() : ResponseDto.failure(ErrorMapping.get("149003")); boolean resultFlg = goblinStoreMgtService.updateStoreMgtErpConfig(currentUid, storeErpConfigVo);
return resultFlg ? ResponseDto.success() : ResponseDto.failure(ErrorMapping.get("149003"));
} }
} }
...@@ -116,8 +116,13 @@ public class GoblinStoreMgtServiceImpl implements IGoblinStoreMgtService { ...@@ -116,8 +116,13 @@ public class GoblinStoreMgtServiceImpl implements IGoblinStoreMgtService {
public boolean updateStoreMgtErpConfig(String uid, GoblinStoreErpConfigVo storeErpConfigVo) { public boolean updateStoreMgtErpConfig(String uid, GoblinStoreErpConfigVo storeErpConfigVo) {
if (goblinMongoUtils.updateStoreErpConfigVo(storeErpConfigVo)) { if (goblinMongoUtils.updateStoreErpConfigVo(storeErpConfigVo)) {
goblinRedisUtils.delStoreErpConfigVo(storeErpConfigVo.getStoreId()); goblinRedisUtils.delStoreErpConfigVo(storeErpConfigVo.getStoreId());
goblinRedisUtils.delStoreErpShopNoList();
// TODO: 2023/1/6 zhanggb to Mysql queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_STORE.getKey(),
SqlMapping.get("goblin_store_erp_config.upsert",
storeErpConfigVo.getStoreId(),storeErpConfigVo.getSid(),storeErpConfigVo.getAppKey(),
storeErpConfigVo.getAppSecret(),storeErpConfigVo.getShopNo(), uid
));
return true; return true;
} }
return false; return false;
......
...@@ -12,6 +12,7 @@ goblin_store_certification.update_by_cert=UPDATE goblin_store_certification SET ...@@ -12,6 +12,7 @@ goblin_store_certification.update_by_cert=UPDATE goblin_store_certification SET
goblin_store_certification.update_by_del=UPDATE goblin_store_certification SET del_flg=1,updated_by=?,updated_at=? WHERE store_id=? goblin_store_certification.update_by_del=UPDATE goblin_store_certification SET del_flg=1,updated_by=?,updated_at=? WHERE store_id=?
#---- \u5E97\u94FA\u914D\u7F6E\u4FE1\u606F #---- \u5E97\u94FA\u914D\u7F6E\u4FE1\u606F
goblin_store_config.update=UPDATE goblin_store_config SET config_val=?,updated_by=?,updated_at=? WHERE store_id=? AND config_key=? goblin_store_config.update=UPDATE goblin_store_config SET config_val=?,updated_by=?,updated_at=? WHERE store_id=? AND config_key=?
goblin_store_erp_config.upsert=REPLACE INTO goblin_store_erp_config (store_id,sid,appKey,appSecret,shopNo,updated_by,updated_at)VALUES(?,?,?,?,?,?,sysdate())
#---- \u5E97\u94FA\u516C\u544A\u4FE1\u606F #---- \u5E97\u94FA\u516C\u544A\u4FE1\u606F
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.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.update=UPDATE goblin_store_notice SET content=?,release_time=?,long_lasting=?,cancell_time=?,status=?,updated_by=?,updated_at=? WHERE notice_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