记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
8aaafc1b
Commit
8aaafc1b
authored
Feb 17, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin
parents
279370f3
5e738d3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
8 deletions
+40
-8
GoblinSelfGoodsCategoryServiceImpl.java
...blin/service/impl/GoblinSelfGoodsCategoryServiceImpl.java
+15
-3
GoblinSelfGoodsTagServiceImpl.java
...ai/goblin/service/impl/GoblinSelfGoodsTagServiceImpl.java
+25
-5
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinSelfGoodsCategoryServiceImpl.java
View file @
8aaafc1b
...
...
@@ -4,7 +4,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.client.admin.common.utils.ShiroUtils
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinSelfGoodsCategoryService
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.dto.GoblinSelfGoodsCategoryDto
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSelfGoodsCategoryVo
;
import
com.liquidnet.service.goblin.entity.GoblinSelfGoodsCategory
;
...
...
@@ -38,6 +41,8 @@ public class GoblinSelfGoodsCategoryServiceImpl extends ServiceImpl<GoblinSelfGo
private
GoblinSelfGoodsCategoryMapper
goblinSelfGoodsCategoryMapper
;
@Autowired
private
MongoTemplate
mongoTemplate
;
@Autowired
private
RedisDataSourceUtil
redisDataSourceUtil
;
@Override
public
List
<
GoblinSelfGoodsCategoryDto
>
listForForMultiGrade
()
{
...
...
@@ -49,7 +54,9 @@ public class GoblinSelfGoodsCategoryServiceImpl extends ServiceImpl<GoblinSelfGo
public
boolean
addSave
(
GoblinSelfGoodsCategory
selfGoodsCategory
)
{
if
(
this
.
save
(
selfGoodsCategory
))
{
mongoTemplate
.
insert
(
GoblinSelfGoodsCategoryVo
.
getNew
().
copy
(
selfGoodsCategory
),
GoblinSelfGoodsCategoryVo
.
class
.
getSimpleName
());
// TODO: 2022/1/14 zhanggb redis
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
GoblinRedisConst
.
BASIC_SELF_GOODS_CATEGORY
);
return
true
;
}
return
false
;
...
...
@@ -82,8 +89,13 @@ public class GoblinSelfGoodsCategoryServiceImpl extends ServiceImpl<GoblinSelfGo
Update
.
update
(
"delFlg"
,
"1"
).
set
(
"updatedBy"
,
loginName
).
set
(
"updatedAt"
,
now
).
set
(
"deletedBy"
,
loginName
).
set
(
"deletedAt"
,
now
),
GoblinSelfGoodsCategoryVo
.
class
.
getSimpleName
()
);
log
.
info
(
"店铺管理:商品分类:删除[cateIdArr={},MONGO.UpdateResult={}]"
,
JsonUtils
.
toJson
(
cateIdArr
),
JsonUtils
.
toJson
(
updateResult
));
// TODO: 2022/1/14 zhanggb redis
// log.info("店铺管理:商品分类:删除[cateIdArr={},MONGO.UpdateResult={}]", JsonUtils.toJson(cateIdArr), JsonUtils.toJson(updateResult));
if
(
updateResult
.
getModifiedCount
()
<=
0
)
{
log
.
error
(
"店铺管理:商品分类:删除:MDB更新失败[cateIdArr={}]"
,
JsonUtils
.
toJson
(
cateIdArr
));
throw
new
LiquidnetServiceException
();
}
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
GoblinRedisConst
.
BASIC_SELF_GOODS_CATEGORY
);
}
return
rmvResultFlg
;
}
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinSelfGoodsTagServiceImpl.java
View file @
8aaafc1b
...
...
@@ -4,7 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinSelfTagService
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSelfTagVo
;
import
com.liquidnet.service.goblin.entity.GoblinSelfTag
;
import
com.liquidnet.service.goblin.mapper.GoblinSelfTagMapper
;
...
...
@@ -34,6 +37,8 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
@Autowired
private
MongoTemplate
mongoTemplate
;
@Autowired
private
RedisDataSourceUtil
redisDataSourceUtil
;
@Autowired
private
GoblinSelfTagMapper
goblinSelfTagMapper
;
@Transactional
...
...
@@ -41,7 +46,9 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
public
boolean
addSave
(
GoblinSelfTag
selfTag
)
{
if
(
this
.
save
(
selfTag
))
{
mongoTemplate
.
insert
(
GoblinSelfTagVo
.
getNew
().
copy
(
selfTag
),
GoblinSelfTagVo
.
class
.
getSimpleName
());
// TODO: 2022/1/14 zhanggb redis
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
return
true
;
}
return
false
;
...
...
@@ -63,8 +70,15 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
Query
.
query
(
Criteria
.
where
(
"tagId"
).
is
(
selfTag
.
getTagId
()).
and
(
"tagBelong"
).
is
(
selfTag
.
getTagBelong
()).
and
(
"delFlg"
).
is
(
"0"
)).
getQueryObject
(),
Update
.
update
(
"tagType"
,
selfTag
.
getTagType
()).
set
(
"tagName"
,
selfTag
.
getTagName
()).
set
(
"tagPic"
,
selfTag
.
getTagPic
()).
getUpdateObject
()
);
log
.
info
(
"店铺管理:标签管理:编辑[selfTag={},MONGO.UpdateResult={}]"
,
JsonUtils
.
toJson
(
selfTag
),
JsonUtils
.
toJson
(
updateResult
));
// TODO: 2022/1/14 zhanggb redis
// log.info("店铺管理:标签管理:编辑[selfTag={},MONGO.UpdateResult={}]", JsonUtils.toJson(selfTag), JsonUtils.toJson(updateResult));
if
(
updateResult
.
getModifiedCount
()
<=
0
)
{
log
.
error
(
"店铺管理:标签管理:编辑:MDB更新失败[selfTag={}]"
,
JsonUtils
.
toJson
(
selfTag
));
throw
new
LiquidnetServiceException
();
}
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
return
true
;
}
return
false
;
...
...
@@ -85,8 +99,14 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
Update
.
update
(
"delFlg"
,
"1"
),
GoblinSelfTagVo
.
class
.
getSimpleName
()
);
log
.
info
(
"店铺管理:标签管理:删除[tagIdArr={},tagBelong={},MONGO.UpdateResult={}]"
,
JsonUtils
.
toJson
(
tagIdArr
),
tagBelong
,
JsonUtils
.
toJson
(
updateResult
));
// TODO: 2022/1/14 zhanggb redis
// log.info("店铺管理:标签管理:删除[tagIdArr={},tagBelong={},MONGO.UpdateResult={}]", JsonUtils.toJson(tagIdArr), tagBelong, JsonUtils.toJson(updateResult));
if
(
updateResult
.
getModifiedCount
()
<=
0
)
{
log
.
error
(
"店铺管理:标签管理:删除:MDB更新失败[tagBelong={},tagIdArr={}]"
,
tagBelong
,
JsonUtils
.
toJson
(
tagIdArr
));
throw
new
LiquidnetServiceException
();
}
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
GoblinRedisConst
.
BASIC_SELF_EXTAG
);
}
return
rmvResultFlg
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment