记得上下班打卡 | 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
ebb7d79a
Commit
ebb7d79a
authored
Dec 29, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 代码
parent
12853a35
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
28 deletions
+67
-28
GoblinStatusConst.java
.../liquidnet/service/goblin/constant/GoblinStatusConst.java
+21
-1
GoblinStorePurchaseParam.java
...t/service/goblin/dto/manage/GoblinStorePurchaseParam.java
+2
-2
GoblinStoreMarketVo.java
.../liquidnet/service/goblin/dto/vo/GoblinStoreMarketVo.java
+4
-4
GoblinZhengzaiMarketServiceImpl.java
.../goblin/service/impl/GoblinZhengzaiMarketServiceImpl.java
+14
-10
RedisUtil.java
...java/com.liquidnet.common.cache/redis/util/RedisUtil.java
+2
-1
GoblinStorePurchasingController.java
...in/controller/manage/GoblinStorePurchasingController.java
+18
-10
GoblinStorePurchasingServiceImpl.java
...service/impl/manage/GoblinStorePurchasingServiceImpl.java
+6
-0
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/constant/GoblinStatusConst.java
View file @
ebb7d79a
...
...
@@ -8,7 +8,6 @@ public class GoblinStatusConst {
COMMON_TYPE_MEMBER
(
1
,
"购买条件-会员用户"
),
COMMON_TYPE_CAN
(
2
,
"购买条件-指定用户"
),
;
private
final
int
value
;
private
final
String
desc
;
...
...
@@ -75,6 +74,27 @@ public class GoblinStatusConst {
}
}
public
enum
MarketPreStatus
{
MARKET_PRE_ZHENGZAI
(
"ZZ"
,
"正在下单前缀"
),
MARKET_PRE_PURCHASE
(
"PC"
,
"限时秒杀前缀"
),
;
private
final
String
value
;
private
final
String
desc
;
MarketPreStatus
(
String
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
String
getValue
()
{
return
value
;
}
public
String
getDesc
()
{
return
desc
;
}
}
/* ----------------------------------------------------------------- */
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStorePurchaseParam.java
View file @
ebb7d79a
...
...
@@ -12,7 +12,7 @@ public class GoblinStorePurchaseParam {
@ApiModelProperty
(
required
=
false
,
value
=
"活动id[添加操作不需要]"
,
example
=
"1"
)
private
String
marketId
;
@ApiModelProperty
(
required
=
true
,
value
=
"商铺id"
,
example
=
"
活动名称
"
)
@ApiModelProperty
(
required
=
true
,
value
=
"商铺id"
,
example
=
"
1
"
)
private
String
storeId
;
@ApiModelProperty
(
required
=
true
,
value
=
"活动名称"
,
example
=
"活动名称"
)
...
...
@@ -24,7 +24,7 @@ public class GoblinStorePurchaseParam {
@ApiModelProperty
(
required
=
true
,
value
=
"活动结束时间"
,
example
=
"2021-12-12 12:00:00"
)
private
String
endTime
;
@ApiModelProperty
(
required
=
tru
e
,
value
=
"是否预热"
,
example
=
"0"
)
@ApiModelProperty
(
required
=
fals
e
,
value
=
"是否预热"
,
example
=
"0"
)
private
Integer
isPre
;
@ApiModelProperty
(
required
=
false
,
value
=
"预热时间(不能早于开始时间7天)[开启预热必填]"
,
example
=
"2021-12-10 12:00:00"
)
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinStoreMarketVo.java
View file @
ebb7d79a
...
...
@@ -22,15 +22,15 @@ public class GoblinStoreMarketVo implements Cloneable {
@ApiModelProperty
(
value
=
" 营销描述"
)
private
String
desc
;
@ApiModelProperty
(
value
=
" 营销开始时间"
)
private
LocalDateTime
startTime
;
private
String
startTime
;
@ApiModelProperty
(
value
=
" 营销结束时间营销为定金预售的时候,该时间也是第二阶段付款的时间营销为全款预售的时候,该时间也是发货时间"
)
private
LocalDateTime
endTime
;
private
String
endTime
;
@ApiModelProperty
(
value
=
"活动是否预热[0-否|1-是]"
)
private
Integer
isPre
;
@ApiModelProperty
(
value
=
" 活动预热时间"
)
private
LocalDateTime
preTime
;
private
String
preTime
;
@ApiModelProperty
(
value
=
" 创建时间"
)
private
LocalDateTime
createdAt
;
private
String
createdAt
;
private
static
final
GoblinStoreMarketVo
obj
=
new
GoblinStoreMarketVo
();
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinZhengzaiMarketServiceImpl.java
View file @
ebb7d79a
...
...
@@ -14,7 +14,6 @@ import com.liquidnet.service.goblin.dto.GoblinZhengzaiStoreListDto;
import
com.liquidnet.service.goblin.dto.vo.GoblinMarketingZhengzaiRelationVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiStoreListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiVo
;
import
com.liquidnet.service.goblin.entity.GoblinMarketingZhengzaiRelation
;
import
com.liquidnet.service.goblin.entity.GoblinSelfMarketing
;
import
com.liquidnet.service.goblin.mapper.GoblinMarketingZhengzaiRelationMapper
;
...
...
@@ -132,18 +131,23 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
}
@Override
public
ResponseDto
<
GoblinZhengzaiVo
>
zhengzaiDetails
(
String
marketId
)
{
GoblinSelfMarketing
data
=
goblinSelfMarketingMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
GoblinSelfMarketing
.
getNew
()).
eq
(
GoblinSelfMarketing:
:
getSelfMarketId
,
marketId
));
GoblinZhengzaiVo
vo
=
GoblinZhengzaiVo
.
getNew
();
vo
.
setMarketId
(
data
.
getSelfMarketId
());
vo
.
setName
(
data
.
getName
());
vo
.
setStartTime
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
data
.
getStartTime
()));
vo
.
setEndTime
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
data
.
getEndTime
()));
vo
.
setStatus
(
data
.
getStatus
());
vo
.
setCreatedAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
data
.
getCreatedAt
()));
public
ResponseDto
<
GoblinSelfMarketingVo
>
zhengzaiDetails
(
String
marketId
)
{
return
null
;
}
// @Override
// public ResponseDto<GoblinZhengzaiVo> zhengzaiDetails(String marketId) {
// GoblinSelfMarketing data = goblinSelfMarketingMapper.selectOne(Wrappers.lambdaQuery(GoblinSelfMarketing.getNew()).eq(GoblinSelfMarketing::getSelfMarketId, marketId));
// GoblinZhengzaiVo vo = GoblinZhengzaiVo.getNew();
// vo.setMarketId(data.getSelfMarketId());
// vo.setName(data.getName());
// vo.setStartTime(DateUtil.Formatter.yyyyMMddHHmmss.format(data.getStartTime()));
// vo.setEndTime(DateUtil.Formatter.yyyyMMddHHmmss.format(data.getEndTime()));
// vo.setStatus(data.getStatus());
// vo.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(data.getCreatedAt()));
// return null;
// }
@Override
public
ResponseDto
<
List
<
GoblinZhengzaiStoreListVo
>>
zhengzaiStoreList
(
String
marketId
)
{
List
<
GoblinZhengzaiStoreListDto
>
dtoList
=
goblinSelfMarketingMapper
.
getZhengzaiStoreList
(
marketId
);
...
...
liquidnet-bus-common/liquidnet-common-cache/liquidnet-common-cache-redis/src/main/java/com.liquidnet.common.cache/redis/util/RedisUtil.java
View file @
ebb7d79a
...
...
@@ -34,7 +34,8 @@ public final class RedisUtil extends AbstractRedisUtil{
public
static
void
main
(
String
[]
args
)
{
String
[]
keys
=
{
"chime:per:openNum:Allow510093798172016641784538"
"stone:user:773650"
,
"stone:item:logs:list:773650"
};
for
(
String
key
:
keys
)
{
long
value
=
key
.
hashCode
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStorePurchasingController.java
View file @
ebb7d79a
...
...
@@ -42,7 +42,7 @@ public class GoblinStorePurchasingController {
})
public
ResponseDto
<
PageInfo
<
GoblinStoreMarketVo
>>
purchasingList
(
@RequestParam
(
value
=
"page"
,
required
=
false
)
@Valid
Integer
page
,
@RequestParam
(
value
=
"purchaseName"
,
required
=
false
)
String
purchaseName
,
@RequestParam
(
value
=
"status"
,
required
=
fals
e
)
Integer
status
,
@RequestParam
(
value
=
"status"
,
required
=
tru
e
)
Integer
status
,
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
String
st
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
et
,
@RequestParam
(
value
=
"createdAt"
,
required
=
false
)
String
ct
)
{
...
...
@@ -60,22 +60,20 @@ public class GoblinStorePurchasingController {
public
ResponseDto
<
Boolean
>
purchasingStatus
(
@RequestParam
(
value
=
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
value
=
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
value
=
"status"
)
@Valid
Integer
status
)
{
return
goblinStorePurchasingService
.
purchasingStatus
(
marketId
,
storeId
,
status
);
return
goblinStorePurchasingService
.
purchasingStatus
(
marketId
,
storeId
,
status
);
}
@PostMapping
(
"purchasing"
)
@ApiOperation
(
"创建活动-限时秒杀"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ResponseBody
public
ResponseDto
<
Boolean
>
purchasingInsert
(
GoblinStorePurchaseParam
goblinStorePurchaseParam
)
{
public
ResponseDto
<
Boolean
>
purchasingInsert
(
@RequestBody
GoblinStorePurchaseParam
goblinStorePurchaseParam
)
{
return
goblinStorePurchasingService
.
purchasingInsert
(
goblinStorePurchaseParam
.
getName
(),
goblinStorePurchaseParam
.
getStoreId
(),
goblinStorePurchaseParam
.
getStartTime
(),
goblinStorePurchaseParam
.
getEndTime
(),
goblinStorePurchaseParam
.
getIsPre
(),
goblinStorePurchaseParam
.
getPreTime
());
}
@PutMapping
(
"purchasing"
)
@ApiOperation
(
"修改活动-限时秒杀"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ResponseBody
public
ResponseDto
<
String
>
purchasingUpdate
(
GoblinStorePurchaseParam
goblinStorePurchaseParam
)
{
public
ResponseDto
<
String
>
purchasingUpdate
(
@RequestBody
GoblinStorePurchaseParam
goblinStorePurchaseParam
)
{
goblinStorePurchasingService
.
purchasingUpdate
(
goblinStorePurchaseParam
.
getMarketId
(),
goblinStorePurchaseParam
.
getName
(),
goblinStorePurchaseParam
.
getStoreId
(),
goblinStorePurchaseParam
.
getStartTime
(),
goblinStorePurchaseParam
.
getEndTime
(),
goblinStorePurchaseParam
.
getIsPre
(),
goblinStorePurchaseParam
.
getPreTime
());
return
ResponseDto
.
success
();
}
...
...
@@ -107,11 +105,19 @@ public class GoblinStorePurchasingController {
}
@PostMapping
(
"purchasing/sku"
)
@ApiOperation
(
"活动详情-限时秒杀-sku配置"
)
@ApiOperation
(
"活动详情-限时秒杀-sku新增"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ResponseBody
public
ResponseDto
<
Boolean
>
purchasingSkuInsert
(
List
<
GoblinStorePurchaseItemParam
>
params
)
{
return
goblinStorePurchasingService
.
purchasingSkuInsert
(
params
);
}
@PutMapping
(
"purchasing/sku"
)
@ApiOperation
(
"活动详情-限时秒杀-sku修改"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ResponseBody
public
ResponseDto
<
Boolean
>
purchasingSku
Operation
(
List
<
GoblinStorePurchaseItemParam
>
params
)
{
return
goblinStorePurchasingService
.
purchasingSku
Operation
(
params
);
public
ResponseDto
<
Boolean
>
purchasingSku
Update
(
List
<
GoblinStorePurchaseItemParam
>
params
)
{
return
goblinStorePurchasingService
.
purchasingSku
Update
(
params
);
}
@DeleteMapping
(
"purchasing/sku"
)
...
...
@@ -120,12 +126,14 @@ public class GoblinStorePurchasingController {
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"marketId"
,
value
=
"活动id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"商铺id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"spuId"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"skuId"
,
value
=
"skuId"
,
example
=
"1"
),
})
public
ResponseDto
<
Boolean
>
purchasingSkuDel
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"spuId"
)
@Valid
String
spuId
,
@RequestParam
(
"skuId"
)
@Valid
String
skuId
)
{
return
goblinStorePurchasingService
.
purchasingSkuDel
(
marketId
,
storeId
,
skuId
);
return
goblinStorePurchasingService
.
purchasingSkuDel
(
marketId
,
storeId
,
s
puId
,
s
kuId
);
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStorePurchasingServiceImpl.java
View file @
ebb7d79a
package
com
.
liquidnet
.
service
.
goblin
.
service
.
impl
.
manage
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam
;
...
...
@@ -10,6 +11,7 @@ import com.liquidnet.service.goblin.entity.GoblinStoreMarketing;
import
com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService
;
import
com.liquidnet.service.goblin.util.GoblinMongoUtils
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
me.chanjar.weixin.common.util.DataUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -85,6 +87,10 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
GoblinStoreMarketVo
vo
=
GoblinStoreMarketVo
.
getNew
();
BeanUtils
.
copyProperties
(
bean
,
vo
);
vo
.
setStartTime
(
st
);
vo
.
setEndTime
(
et
);
vo
.
setCreatedAt
(
DateUtil
.
getNowTime
());
vo
.
setPreTime
(
preTime
);
//mongo
goblinMongoUtils
.
insertStoreMarket
(
vo
);
//redis
...
...
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