记得上下班打卡 | 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
b842a542
Commit
b842a542
authored
Mar 04, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~API:完善逻辑校验;
parent
806f4d06
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
19 deletions
+31
-19
IGoblinstoreMgtGoodsService.java
...ce/goblin/service/manage/IGoblinstoreMgtGoodsService.java
+4
-2
GoblinStoreMgtCertificationController.java
...troller/manage/GoblinStoreMgtCertificationController.java
+4
-2
GoblinStoreMgtController.java
...ce/goblin/controller/manage/GoblinStoreMgtController.java
+5
-2
GoblinStoreMgtCouponController.java
...lin/controller/manage/GoblinStoreMgtCouponController.java
+1
-1
GoblinStoreMgtGoodsController.java
...blin/controller/manage/GoblinStoreMgtGoodsController.java
+11
-7
GoblinStoreMgtCertificationServiceImpl.java
...e/impl/manage/GoblinStoreMgtCertificationServiceImpl.java
+0
-2
GoblinStoreMgtGoodsServiceImpl.java
...n/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
+6
-3
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinstoreMgtGoodsService.java
View file @
b842a542
...
...
@@ -95,8 +95,9 @@ public interface IGoblinstoreMgtGoodsService {
* @param uid UID
* @param shelvesFlg true:上架|false:下架
* @param spuNoList 操作SPUID对应SPUNO列表
* @return boolean
*/
void
goodsShelvesProcessing
(
GoblinStoreMgtGoodsActionParam
mgtGoodsActionParam
,
String
uid
,
boolean
shelvesFlg
,
List
<
String
>
spuNoList
);
boolean
goodsShelvesProcessing
(
GoblinStoreMgtGoodsActionParam
mgtGoodsActionParam
,
String
uid
,
boolean
shelvesFlg
,
List
<
String
>
spuNoList
);
/**
* 商品管理:删除商品
...
...
@@ -104,6 +105,7 @@ public interface IGoblinstoreMgtGoodsService {
* @param mgtGoodsActionParam GoblinStoreMgtGoodsActionParam
* @param uid UID
* @param spuNoList 操作SPUID对应SPUNO列表
* @return boolean
*/
void
goodsRemove
(
GoblinStoreMgtGoodsActionParam
mgtGoodsActionParam
,
String
uid
,
List
<
String
>
spuNoList
);
boolean
goodsRemove
(
GoblinStoreMgtGoodsActionParam
mgtGoodsActionParam
,
String
uid
,
List
<
String
>
spuNoList
);
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtCertificationController.java
View file @
b842a542
...
...
@@ -88,7 +88,8 @@ public class GoblinStoreMgtCertificationController {
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"店铺认证[UID={},GoblinStoreMgtCompleteParam:{}]"
,
currentUid
,
JsonUtils
.
toJson
(
completeParam
));
}
return
ResponseDto
.
success
(
goblinStoreMgtCertificationService
.
certificationCompleteProcessing
(
completeParam
,
storeInfoVo
));
boolean
resultFlg
=
goblinStoreMgtCertificationService
.
certificationCompleteProcessing
(
completeParam
,
storeInfoVo
);
return
resultFlg
?
ResponseDto
.
success
()
:
ResponseDto
.
failure
();
}
@ApiOperationSupport
(
order
=
3
)
...
...
@@ -122,6 +123,7 @@ public class GoblinStoreMgtCertificationController {
return
ResponseDto
.
success
();
// 店铺认证通过后不允许删除
}
log
.
info
(
"删除店铺[UID={},storeId={}]"
,
currentUid
,
storeId
);
return
ResponseDto
.
success
(
goblinStoreMgtCertificationService
.
certificationCancelProcessing
(
storeId
,
currentUid
));
boolean
resultFlg
=
goblinStoreMgtCertificationService
.
certificationCancelProcessing
(
storeId
,
currentUid
);
return
resultFlg
?
ResponseDto
.
success
()
:
ResponseDto
.
failure
();
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtController.java
View file @
b842a542
...
...
@@ -186,7 +186,8 @@ public class GoblinStoreMgtController {
log
.
warn
(
"店铺管理:店铺设置:编辑[UID={},param={}],无效操作:无效配置"
,
currentUid
,
JsonUtils
.
toJson
(
param
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149001"
));
}
return
ResponseDto
.
success
(
goblinStoreMgtService
.
updateStoreMgtConfig
(
currentUid
,
storeId
,
updateConfMap
));
boolean
resultFlg
=
goblinStoreMgtService
.
updateStoreMgtConfig
(
currentUid
,
storeId
,
updateConfMap
);
return
resultFlg
?
ResponseDto
.
success
()
:
ResponseDto
.
failure
();
}
@ApiOperationSupport
(
order
=
7
)
...
...
@@ -275,7 +276,9 @@ public class GoblinStoreMgtController {
updateStoreNoticeVo
.
setStatus
(
updateStoreNoticeVo
.
getReleaseTime
().
compareTo
(
now
)
>
0
?
"0"
:
"1"
);
updateStoreNoticeVo
.
setUpdatedBy
(
currentUid
);
updateStoreNoticeVo
.
setUpdatedAt
(
now
);
return
ResponseDto
.
success
(
goblinStoreMgtNoticeService
.
editSave
(
updateStoreNoticeVo
));
boolean
resultFlg
=
goblinStoreMgtNoticeService
.
editSave
(
updateStoreNoticeVo
);
return
resultFlg
?
ResponseDto
.
success
()
:
ResponseDto
.
failure
();
}
@ApiOperationSupport
(
order
=
10
)
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtCouponController.java
View file @
b842a542
...
...
@@ -113,7 +113,7 @@ public class GoblinStoreMgtCouponController {
if
(
null
!=
servletOutputStream
)
{
try
{
servletOutputStream
.
close
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
ignored
)
{
}
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtGoodsController.java
View file @
b842a542
...
...
@@ -70,6 +70,7 @@ public class GoblinStoreMgtGoodsController {
public
ResponseDto
<
PagedResult
<
GoblinStoreMgtGoodsListVo
>>
list
(
@Valid
@RequestBody
GoblinStoreMgtGoodsFilterParam
storeMgtGoodsFilterParam
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
if
(!
goblinRedisUtils
.
hasStoreId
(
currentUid
,
storeMgtGoodsFilterParam
.
getStoreId
()))
{
log
.
warn
(
"商品管理:SPU列表:无权操作该店铺,请核实[UID={},GoblinStoreMgtGoodsFilterParam={}]"
,
currentUid
,
JsonUtils
.
toJson
(
storeMgtGoodsFilterParam
));
return
ResponseDto
.
success
();
}
if
(
log
.
isDebugEnabled
())
{
...
...
@@ -112,7 +113,7 @@ public class GoblinStoreMgtGoodsController {
if
(
null
!=
servletOutputStream
)
{
try
{
servletOutputStream
.
close
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
ignored
)
{
}
}
}
...
...
@@ -133,6 +134,7 @@ public class GoblinStoreMgtGoodsController {
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:SPU管理:[UID={},GoblinStoreMgtGoodsActionParam={}]"
,
currentUid
,
JsonUtils
.
toJson
(
mgtGoodsActionParam
));
}
boolean
resultFlg
;
List
<
String
>
spuNoList
=
CollectionUtil
.
arrayListString
();
switch
(
mgtGoodsActionParam
.
getAction
())
{
case
"ONSHELVES"
:
...
...
@@ -152,7 +154,7 @@ public class GoblinStoreMgtGoodsController {
}
spuNoList
.
add
(
goodsInfoVo
.
getSpuNo
());
}
goblinstoreMgtGoodsService
.
goodsShelvesProcessing
(
mgtGoodsActionParam
,
currentUid
,
true
,
spuNoList
);
resultFlg
=
goblinstoreMgtGoodsService
.
goodsShelvesProcessing
(
mgtGoodsActionParam
,
currentUid
,
true
,
spuNoList
);
break
;
case
"UNSHELVE"
:
for
(
String
spuId
:
spuIdList
)
{
...
...
@@ -171,7 +173,7 @@ public class GoblinStoreMgtGoodsController {
}
spuNoList
.
add
(
goodsInfoVo
.
getSpuNo
());
}
goblinstoreMgtGoodsService
.
goodsShelvesProcessing
(
mgtGoodsActionParam
,
currentUid
,
false
,
spuNoList
);
resultFlg
=
goblinstoreMgtGoodsService
.
goodsShelvesProcessing
(
mgtGoodsActionParam
,
currentUid
,
false
,
spuNoList
);
break
;
case
"REMOVE"
:
for
(
String
spuId
:
spuIdList
)
{
...
...
@@ -190,13 +192,13 @@ public class GoblinStoreMgtGoodsController {
}
spuNoList
.
add
(
goodsInfoVo
.
getSpuNo
());
}
goblinstoreMgtGoodsService
.
goodsRemove
(
mgtGoodsActionParam
,
currentUid
,
spuNoList
);
resultFlg
=
goblinstoreMgtGoodsService
.
goodsRemove
(
mgtGoodsActionParam
,
currentUid
,
spuNoList
);
break
;
default
:
log
.
warn
(
"商品管理:SPU管理:Invalid operation[UID={},mgtGoodsActionParam={}]"
,
currentUid
,
JsonUtils
.
toJson
(
mgtGoodsActionParam
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149001"
));
}
return
ResponseDto
.
success
();
return
resultFlg
?
ResponseDto
.
success
()
:
ResponseDto
.
failure
();
}
@ApiOperationSupport
(
order
=
4
)
...
...
@@ -412,7 +414,8 @@ public class GoblinStoreMgtGoodsController {
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:商品编辑:SPU编辑:[GoblinStoreMgtGoodsAddParam={}]"
,
JsonUtils
.
toJson
(
mgtGoodsAddParam
));
}
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsEditSpu
(
currentUid
,
mgtGoodsAddParam
,
mgtGoodsInfoVo
));
boolean
resultFlg
=
goblinstoreMgtGoodsService
.
goodsEditSpu
(
currentUid
,
mgtGoodsAddParam
,
mgtGoodsInfoVo
);
return
resultFlg
?
ResponseDto
.
success
()
:
ResponseDto
.
failure
();
}
@ApiOperationSupport
(
order
=
7
)
...
...
@@ -745,6 +748,7 @@ public class GoblinStoreMgtGoodsController {
// if (!goblinRedisUtils.hasStoreId(CurrentUtil.getCurrentUid(), storeId)) {
// return ResponseDto.failure(ErrorMapping.get("149002"));
// }
// return ResponseDto.success(goblinstoreMgtGoodsService.goodsEditSkuBat(spuId, batField, batFieldVal));
// goblinstoreMgtGoodsService.goodsEditSkuBat(spuId, batField, batFieldVal)
// return ResponseDto.success();
// }
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMgtCertificationServiceImpl.java
View file @
b842a542
...
...
@@ -76,7 +76,6 @@ public class GoblinStoreMgtCertificationServiceImpl implements IGoblinStoreMgtCe
});
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_STORE
.
getKey
(),
SqlMapping
.
gets
(
toMqSqls
,
initStoreInfoObjs
,
initStoreCertificationObjs
));
return
storeInfoVo
;
}
else
{
storeInfoVo
.
setStatus
(
"0"
);
storeInfoVo
.
setStoreType
(
"0"
);
...
...
@@ -108,7 +107,6 @@ public class GoblinStoreMgtCertificationServiceImpl implements IGoblinStoreMgtCe
});
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_STORE
.
getKey
(),
SqlMapping
.
gets
(
toMqSqls
,
updateStoreInfoObjs
,
updateStoreCertificationObjs
));
return
storeInfoVo
;
}
}
return
storeInfoVo
;
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
View file @
b842a542
...
...
@@ -875,7 +875,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
// }
@Override
public
void
goodsShelvesProcessing
(
GoblinStoreMgtGoodsActionParam
mgtGoodsActionParam
,
String
uid
,
boolean
shelvesFlg
,
List
<
String
>
spuNoList
)
{
public
boolean
goodsShelvesProcessing
(
GoblinStoreMgtGoodsActionParam
mgtGoodsActionParam
,
String
uid
,
boolean
shelvesFlg
,
List
<
String
>
spuNoList
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
String
storeId
=
mgtGoodsActionParam
.
getStoreId
();
List
<
String
>
spuIdList
=
mgtGoodsActionParam
.
getSpuIdList
();
...
...
@@ -889,7 +889,6 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
spuIdList
.
addAll
(
goblinMongoUtils
.
getMgtSpuIdsForMarketBySpuNos
(
spuNoList
,
"3"
));
}
if
(
goblinMongoUtils
.
updateGoodsInfoVoByShelves
(
storeId
,
spuIdList
,
shelvesFlg
,
uid
,
now
))
{
if
(
goblinMongoUtils
.
updateGoodsSkuInfoVoByShelves
(
storeId
,
spuIdList
,
shelvesFlg
,
uid
,
now
))
{
goblinRedisUtils
.
deleteKeyForSelectGoods
();
// 精选商品:商品上架、下架、删除 调用的方法
...
...
@@ -915,14 +914,16 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_GOODS
.
getKey
(),
SqlMapping
.
gets
(
toMqSqls
,
updateGoodsObjs
,
updateGoodsSkuObjs
));
return
true
;
}
else
{
goblinMongoUtils
.
updateGoodsInfoVoByShelves
(
storeId
,
spuIdList
,
!
shelvesFlg
,
uid
,
now
);
}
}
return
false
;
}
@Override
public
void
goodsRemove
(
GoblinStoreMgtGoodsActionParam
mgtGoodsActionParam
,
String
uid
,
List
<
String
>
spuNoList
)
{
public
boolean
goodsRemove
(
GoblinStoreMgtGoodsActionParam
mgtGoodsActionParam
,
String
uid
,
List
<
String
>
spuNoList
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
String
storeId
=
mgtGoodsActionParam
.
getStoreId
();
List
<
String
>
spuIdList
=
mgtGoodsActionParam
.
getSpuIdList
();
...
...
@@ -953,6 +954,8 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_GOODS
.
getKey
(),
SqlMapping
.
gets
(
toMqSqls
,
updateGoodsObjs
,
updateGoodsSkuObjs
));
return
true
;
}
return
false
;
}
}
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