记得上下班打卡 | 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
26f74bfa
Commit
26f74bfa
authored
Feb 24, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~API:商品管理:SKU删除同步活动商品;
~API:优惠券列表筛选时间格式问题更正;
parent
6ee55dd6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
11 deletions
+22
-11
GoblinCouponController.java
...net/service/goblin/controller/GoblinCouponController.java
+1
-1
GoblinStoreMgtCouponController.java
...lin/controller/manage/GoblinStoreMgtCouponController.java
+3
-0
GoblinStoreMgtGoodsServiceImpl.java
...n/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
+11
-2
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+6
-7
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+1
-1
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinCouponController.java
View file @
26f74bfa
...
...
@@ -57,7 +57,7 @@ public class GoblinCouponController {
}
@PostMapping
(
"receive"
)
@ApiOperation
(
"
订单状态
"
)
@ApiOperation
(
"
领取券
"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeCouponId"
,
value
=
"平台券id"
),
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtCouponController.java
View file @
26f74bfa
...
...
@@ -138,6 +138,9 @@ public class GoblinStoreMgtCouponController {
if
(
null
==
storeCouponVo
)
{
return
ResponseDto
.
failure
(
ErrorCode
.
HTTP_PARAM_ERROR
.
getCode
(),
"参数有误:优惠券不存在"
);
}
if
(
storeCouponVo
.
getState
().
equals
(
"1"
))
{
// 该优惠券活动中
return
ResponseDto
.
failure
(
ErrorCode
.
HTTP_PARAM_ERROR
.
getCode
(),
"该优惠券活动中不可停用"
);
}
if
(
storeCouponVo
.
getState
().
equals
(
"3"
))
{
// 该优惠券已停用
return
ResponseDto
.
failure
(
ErrorCode
.
HTTP_PARAM_ERROR
.
getCode
(),
"该优惠券已停用"
);
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
View file @
26f74bfa
...
...
@@ -699,8 +699,17 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
goodsSkuInfoVo
.
setUpdatedAt
(
now
);
goodsSkuInfoVo
.
setDeletedBy
(
uid
);
goodsSkuInfoVo
.
setDeletedAt
(
now
);
if
(
goblinMongoUtils
.
delGoodsSkuInfoVo
(
goodsSkuInfoVo
))
{
goblinRedisUtils
.
delGoodsSkuInfoVo
(
delSkuId
);
List
<
String
>
skuReList
=
goblinRedisUtils
.
getSkuRe
(
delSkuId
);
skuReList
=
null
==
skuReList
?
CollectionUtil
.
arrayListString
()
:
skuReList
;
skuReList
.
add
(
delSkuId
);
if
(
goblinMongoUtils
.
delGoodsSkuInfoVo
(
goodsSkuInfoVo
,
skuReList
))
{
// goblinRedisUtils.delGoodsSkuInfoVo(delSkuId);
// goblinRedisUtils.delGoodsSkuInfoVoByUnShelves(delSkuId);
skuReList
.
forEach
(
skuRe
->
{
goblinRedisUtils
.
delGoodsSkuInfoVo
(
skuRe
);
goblinRedisUtils
.
delGoodsSkuInfoVoByUnShelves
(
skuRe
);
});
BigDecimal
priceGe
=
BigDecimal
.
ZERO
,
priceLe
=
BigDecimal
.
ZERO
;
for
(
String
skuId
:
mgtGoodsInfoVo
.
getSkuIdList
())
{
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
26f74bfa
...
...
@@ -498,9 +498,9 @@ public class GoblinMongoUtils {
return
(
List
<
GoblinGoodsSkuInfoVo
>)
mongoTemplate
.
insert
(
vos
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
}
public
boolean
delGoodsSkuInfoVo
(
GoblinGoodsSkuInfoVo
vo
)
{
public
boolean
delGoodsSkuInfoVo
(
GoblinGoodsSkuInfoVo
vo
,
List
<
String
>
skuIdList
)
{
return
mongoTemplate
.
getCollection
(
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"skuId"
).
is
(
vo
.
getSkuId
()
).
and
(
"delFlg"
).
is
(
"0"
)).
getQueryObject
(),
Query
.
query
(
Criteria
.
where
(
"skuId"
).
is
(
skuIdList
).
and
(
"delFlg"
).
is
(
"0"
)).
getQueryObject
(),
Update
.
update
(
"updatedBy"
,
vo
.
getUpdatedBy
()).
set
(
"updatedAt"
,
vo
.
getUpdatedAt
())
.
set
(
"deletedBy"
,
vo
.
getDeletedBy
()).
set
(
"deletedAt"
,
vo
.
getDeletedAt
()).
getUpdateObject
()
).
getModifiedCount
()
>
0
;
...
...
@@ -1075,21 +1075,20 @@ public class GoblinMongoUtils {
criteria
.
and
(
"state"
).
is
(
filterParam
.
getState
());
}
if
(
StringUtils
.
isNotBlank
(
filterParam
.
getStartTime
()))
{
LocalDateTime
startTime
=
DateUtil
.
Formatter
.
yyyy
_MM_dd
.
parse
(
filterParam
.
getStartTime
());
LocalDateTime
startTime
=
DateUtil
.
Formatter
.
yyyy
MMddHHmmss
.
parse
(
filterParam
.
getStartTime
());
LocalDateTime
startTimeBegin
=
startTime
.
withHour
(
0
).
withMinute
(
0
).
withSecond
(
0
).
withNano
(
0
);
criteria
.
and
(
"startTime"
).
gte
(
startTimeBegin
);
}
if
(
StringUtils
.
isNotBlank
(
filterParam
.
getEndTime
()))
{
LocalDateTime
endTime
=
DateUtil
.
Formatter
.
yyyy
_MM_dd
.
parse
(
filterParam
.
getEndTime
());
LocalDateTime
endTime
=
DateUtil
.
Formatter
.
yyyy
MMddHHmmss
.
parse
(
filterParam
.
getEndTime
());
LocalDateTime
endTimeEnd
=
endTime
.
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
).
withNano
(
999
);
criteria
.
and
(
"endTime"
).
gte
(
endTimeEnd
);
}
if
(
StringUtils
.
isNotBlank
(
filterParam
.
getCreatedDt
()))
{
LocalDateTime
createDt
=
DateUtil
.
Formatter
.
yyyy_MM_dd
.
parse
(
filterParam
.
getCreatedDt
());
LocalDateTime
createdAtBegin
=
createDt
.
withHour
(
0
).
withMinute
(
0
).
withSecond
(
0
).
withNano
(
0
);
LocalDateTime
createdAtEnd
=
createDt
.
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
).
withNano
(
999
);
LocalDateTime
createdAtBegin
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
filterParam
.
getCreatedDt
()
+
" 00:00:00"
);
LocalDateTime
createdAtEnd
=
createdAtBegin
.
withHour
(
23
).
withMinute
(
59
).
withSecond
(
59
).
withNano
(
999
);
criteria
.
and
(
"createdAt"
).
gte
(
createdAtBegin
).
lte
(
createdAtEnd
);
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
26f74bfa
...
...
@@ -97,7 +97,7 @@ public class GoblinRedisUtils {
String
rk
=
GoblinRedisConst
.
SKU_RELATION
.
concat
(
skuId
);
Object
obj
=
redisUtil
.
get
(
rk
);
if
(
obj
==
null
)
{
return
new
ArrayList
();
return
CollectionUtil
.
arrayListString
();
}
else
{
return
(
List
<
String
>)
obj
;
}
...
...
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