记得上下班打卡 | 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
373a1585
Commit
373a1585
authored
Feb 16, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin
parents
c974eb64
da308c8e
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
934 additions
and
22 deletions
+934
-22
GoblinStoreMgtCouponActionParam.java
...ce/goblin/dto/manage/GoblinStoreMgtCouponActionParam.java
+24
-0
GoblinStoreMgtCouponAddGoods.java
...rvice/goblin/dto/manage/GoblinStoreMgtCouponAddGoods.java
+18
-0
GoblinStoreMgtCouponAddParam.java
...rvice/goblin/dto/manage/GoblinStoreMgtCouponAddParam.java
+68
-0
GoblinStoreMgtCouponAddType.java
...ervice/goblin/dto/manage/GoblinStoreMgtCouponAddType.java
+45
-0
GoblinStoreMgtCouponFilterParam.java
...ce/goblin/dto/manage/GoblinStoreMgtCouponFilterParam.java
+42
-0
GoblinStoreMgtGoodsAddParam.java
...ervice/goblin/dto/manage/GoblinStoreMgtGoodsAddParam.java
+2
-0
GoblinStoreMgtCouponInfoVo.java
...vice/goblin/dto/manage/vo/GoblinStoreMgtCouponInfoVo.java
+74
-0
GoblinStoreMgtCouponListVo.java
...vice/goblin/dto/manage/vo/GoblinStoreMgtCouponListVo.java
+40
-0
GoblinGoodsSkuInfoDetailVo.java
...net/service/goblin/dto/vo/GoblinGoodsSkuInfoDetailVo.java
+2
-0
GoblinStoreCoupon.java
...om/liquidnet/service/goblin/entity/GoblinStoreCoupon.java
+158
-0
GoblinStoreCouponRule.java
...iquidnet/service/goblin/entity/GoblinStoreCouponRule.java
+62
-0
GoblinUserCoupon.java
...com/liquidnet/service/goblin/entity/GoblinUserCoupon.java
+73
-0
GoblinStoreCouponMapper.java
...uidnet/service/goblin/mapper/GoblinStoreCouponMapper.java
+16
-0
GoblinStoreCouponRuleMapper.java
...et/service/goblin/mapper/GoblinStoreCouponRuleMapper.java
+16
-0
GoblinUserCouponMapper.java
...quidnet/service/goblin/mapper/GoblinUserCouponMapper.java
+16
-0
GoblinStoreCouponMapper.xml
...quidnet.service.goblin.mapper/GoblinStoreCouponMapper.xml
+5
-0
GoblinStoreCouponRuleMapper.xml
...net.service.goblin.mapper/GoblinStoreCouponRuleMapper.xml
+5
-0
GoblinUserCouponMapper.xml
...iquidnet.service.goblin.mapper/GoblinUserCouponMapper.xml
+5
-0
db_ln_goblin_initialdata.sql
...net-service-goblin-impl/docu/db_ln_goblin_initialdata.sql
+85
-1
GoblinStoreMgtCouponController.java
...lin/controller/manage/GoblinStoreMgtCouponController.java
+117
-0
GoblinStoreMgtGoodsController.java
...blin/controller/manage/GoblinStoreMgtGoodsController.java
+1
-1
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+54
-16
GoblinStoreMgtCertificationServiceImpl.java
...e/impl/manage/GoblinStoreMgtCertificationServiceImpl.java
+2
-0
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+4
-4
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtCouponActionParam.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Pattern
;
import
java.io.Serializable
;
import
java.util.List
;
@ApiModel
(
value
=
"GoblinStoreMgtCouponActionParam"
,
description
=
"商铺活动:优惠券操作入参"
)
@Data
public
class
GoblinStoreMgtCouponActionParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1510610282408466586L
;
@ApiModelProperty
(
position
=
10
,
required
=
true
,
value
=
"店铺ID[64]"
)
@NotBlank
(
message
=
"店铺ID不能为空"
)
private
String
storeId
;
@ApiModelProperty
(
position
=
11
,
required
=
true
,
value
=
"操作类型[ENABLED-启用|DISABLED-停用|REMOVE-删除]"
)
@Pattern
(
regexp
=
"\\b(ENABLED|DISABLED|REMOVE)\\b"
,
message
=
"操作类型无效"
)
private
String
action
;
@ApiModelProperty
(
position
=
12
,
required
=
true
,
value
=
"优惠券ID列表"
)
private
List
<
String
>
storeCouponIdList
;
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtCouponAddGoods.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.DecimalMin
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
@ApiModel
(
value
=
"GoblinStoreMgtCouponAddGoods"
,
description
=
"商铺活动:添加优惠券:选择商品入参"
)
@Data
public
class
GoblinStoreMgtCouponAddGoods
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2820329816276172903L
;
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtCouponAddParam.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.Valid
;
import
javax.validation.constraints.*
;
import
java.io.Serializable
;
import
java.util.List
;
@ApiModel
(
value
=
"GoblinStoreMgtCouponAddParam"
,
description
=
"商铺活动:添加优惠券入参"
)
@Data
public
class
GoblinStoreMgtCouponAddParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
4211658816582135860L
;
@ApiModelProperty
(
position
=
10
,
required
=
true
,
value
=
"店铺ID"
)
@NotNull
(
message
=
"店铺ID不能为空"
)
private
String
storeId
;
@ApiModelProperty
(
position
=
11
,
required
=
false
,
value
=
"优惠券ID[编辑时必传]"
)
private
String
storeCouponId
;
/**
* ---------------------------- 基本信息 ----------------------------
**/
@ApiModelProperty
(
position
=
12
,
required
=
true
,
value
=
"卡券名称[50]"
)
@NotBlank
(
message
=
"卡券名称不能为空"
)
@Size
(
max
=
50
,
message
=
"商品名称长度超限"
)
private
String
title
;
@ApiModelProperty
(
position
=
13
,
required
=
false
,
value
=
"标注[50]"
)
@Size
(
max
=
50
,
message
=
"标注长度超限"
)
private
String
label
;
@ApiModelProperty
(
position
=
14
,
required
=
false
,
value
=
"卡券描述[255]"
)
@Size
(
max
=
255
,
message
=
"卡券描述长度超限"
)
private
String
notice
;
@ApiModelProperty
(
position
=
15
,
required
=
true
,
value
=
"开始时间[yyyy-MM-dd HH:mm:ss]"
)
@NotBlank
(
message
=
"发布时间不能为空"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_FULL
,
message
=
"开始时间格式有误"
)
private
String
startDt
;
@ApiModelProperty
(
position
=
16
,
required
=
true
,
value
=
"开始时间[yyyy-MM-dd HH:mm:ss]"
)
@NotBlank
(
message
=
"发布时间不能为空"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_FULL
,
message
=
"开始时间格式有误"
)
private
String
endDt
;
@ApiModelProperty
(
position
=
17
,
required
=
true
,
value
=
"卡券类型信息LIST"
)
@NotNull
(
message
=
"卡券类型信息不能为空"
)
@Valid
private
List
<
GoblinStoreMgtCouponAddType
>
couponTypeParamList
;
@ApiModelProperty
(
position
=
18
,
required
=
true
,
value
=
"限领数量,默认:1张/人"
,
example
=
"1"
)
@Min
(
value
=
1
,
message
=
"限领数量不能小于1"
)
private
Integer
receiveLimit
;
@ApiModelProperty
(
position
=
19
,
required
=
true
,
value
=
"领取约束[0-不开放|1-开放]"
,
allowableValues
=
"0,1"
)
@Pattern
(
regexp
=
"\\b(0|1)\\b"
,
message
=
"领取约束参数无效"
)
private
Integer
receiveCurb
;
/**
* ---------------------------- 发放设置 ----------------------------
**/
@ApiModelProperty
(
position
=
20
,
required
=
true
,
value
=
"使用范围[0-全部商品|1-部分商品]"
,
allowableValues
=
"0,1"
,
example
=
"0"
)
private
String
useScope
;
@ApiModelProperty
(
position
=
21
,
required
=
false
,
value
=
"适用商品集合LIST"
)
@Valid
private
List
<
GoblinStoreMgtCouponAddGoods
>
skuParamList
;
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtCouponAddType.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.DecimalMin
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
@ApiModel
(
value
=
"GoblinStoreMgtCouponTypeParam"
,
description
=
"商铺活动:添加优惠券:卡券类型入参"
)
@Data
public
class
GoblinStoreMgtCouponAddType
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1851062573283411594L
;
@ApiModelProperty
(
position
=
10
,
required
=
true
,
value
=
"券类型[1-代金券|2-折扣券|3-满减券]"
,
allowableValues
=
"1,2,3"
)
@NotNull
(
message
=
"券类型不能为空"
)
@Pattern
(
regexp
=
"\\b(1|2|3)\\b"
,
message
=
"券类型参数无效"
)
private
String
type
;
@ApiModelProperty
(
position
=
11
,
required
=
true
,
value
=
"卡券库存,默认:0为无限"
)
@NotNull
(
message
=
"卡券库存不能为空"
)
@Min
(
value
=
0
,
message
=
"卡券库存不能小于0"
)
private
Integer
stock
;
@ApiModelProperty
(
position
=
12
,
required
=
true
,
value
=
"触发金额[8,2]"
,
example
=
"1"
)
@DecimalMin
(
value
=
"0.01"
,
message
=
"触发金额不能小于0.01"
)
private
BigDecimal
triggers
;
@ApiModelProperty
(
position
=
12
,
required
=
false
,
value
=
"面值[8,2]"
,
example
=
"5"
)
@DecimalMin
(
value
=
"0.01"
,
message
=
"面值不能小于0.01"
)
private
BigDecimal
valFace
;
@ApiModelProperty
(
position
=
12
,
required
=
false
,
value
=
"折扣[8,2]"
,
example
=
"0.8"
)
@DecimalMin
(
value
=
"0.01"
,
message
=
"折扣不能小于0.01"
)
private
BigDecimal
discount
;
@ApiModelProperty
(
position
=
12
,
required
=
false
,
value
=
"满减~满[8,2]"
,
example
=
"10"
)
@DecimalMin
(
value
=
"0.02"
,
message
=
"满减金额不能小于0.02"
)
private
BigDecimal
valOver
;
@ApiModelProperty
(
position
=
12
,
required
=
false
,
value
=
"满减~减[8,2]"
,
example
=
"5"
)
@DecimalMin
(
value
=
"0.01"
,
message
=
"满减面额不能小于0.01"
)
private
BigDecimal
valMinus
;
@ApiModelProperty
(
position
=
12
,
required
=
false
,
value
=
"抵扣上限金额[8,2]"
,
example
=
"2"
)
@DecimalMin
(
value
=
"0.01"
,
message
=
"抵扣上限金额不能小于0.01"
)
private
BigDecimal
deduction
;
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtCouponFilterParam.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.*
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
@ApiModel
(
value
=
"GoblinStoreMgtCouponFilterParam"
,
description
=
"商铺活动:优惠券列表信息"
)
@Data
public
class
GoblinStoreMgtCouponFilterParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7497421899123873674L
;
@ApiModelProperty
(
position
=
10
,
required
=
true
,
value
=
"店铺ID[64]"
)
@NotBlank
(
message
=
"店铺ID不能为空"
)
private
String
storeId
;
@ApiModelProperty
(
position
=
11
,
required
=
true
,
value
=
"当前记录起始索引"
,
example
=
"1"
)
@Min
(
value
=
1
,
message
=
"起始索引无效"
)
@NotNull
(
message
=
"起始索引无效"
)
private
Integer
pageNum
;
@ApiModelProperty
(
position
=
12
,
required
=
true
,
value
=
"每页显示记录数"
,
example
=
"20"
)
@Max
(
value
=
100
,
message
=
"显示记录数无效"
)
@NotNull
(
message
=
"显示记录数无效"
)
private
Integer
pageSize
;
@ApiModelProperty
(
position
=
13
,
required
=
false
,
value
=
"搜索关键字[50]"
)
private
String
keyword
;
@ApiModelProperty
(
position
=
14
,
required
=
false
,
value
=
"卡券编码[64]"
)
private
String
storeCouponNo
;
@ApiModelProperty
(
position
=
15
,
required
=
false
,
value
=
"卡券状态[0-等待开始|1-活动中|2-活动结束|3-停用]"
,
allowableValues
=
"0,1,2,3"
)
private
String
state
;
@ApiModelProperty
(
position
=
16
,
required
=
false
,
value
=
"开始日期[YYYY-MM-DD]"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_YMD
,
message
=
"开始日期格式有误"
)
private
String
startTime
;
@ApiModelProperty
(
position
=
17
,
required
=
false
,
value
=
"结束日期[YYYY-MM-DD]"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_YMD
,
message
=
"结束日期格式有误"
)
private
String
endTime
;
@ApiModelProperty
(
position
=
18
,
required
=
false
,
value
=
"创建日期[YYYY-MM-DD]"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_YMD
,
message
=
"创建日期格式有误"
)
private
String
createdDt
;
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtGoodsAddParam.java
View file @
373a1585
...
...
@@ -21,6 +21,7 @@ import javax.validation.Valid;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
...
...
@@ -45,6 +46,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
@ApiModelProperty
(
position
=
12
,
required
=
true
,
value
=
"商品名称[128]"
)
@NotBlank
(
message
=
"商品名称不能为空"
)
@Size
(
max
=
128
,
message
=
"商品名称长度超限"
)
private
String
name
;
@ApiModelProperty
(
position
=
13
,
required
=
false
,
value
=
"商品名称[128]"
)
private
String
subtitle
;
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/vo/GoblinStoreMgtCouponInfoVo.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.List
;
@ApiModel
(
value
=
"GoblinStoreMgtCouponInfoVo"
,
description
=
"商铺活动:优惠券详情"
)
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
GoblinStoreMgtCouponInfoVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
-
5779799640116243874L
;
@ApiModelProperty
(
position
=
10
,
value
=
"卡券ID[64]"
)
private
String
storeCouponId
;
@ApiModelProperty
(
position
=
11
,
value
=
"卡券编码"
)
private
String
storeCouponNo
;
@ApiModelProperty
(
position
=
12
,
value
=
"店铺ID"
)
private
String
storeId
;
@ApiModelProperty
(
position
=
13
,
value
=
"卡券名称"
)
private
String
title
;
@ApiModelProperty
(
position
=
14
,
value
=
"标注"
)
private
String
label
;
@ApiModelProperty
(
position
=
15
,
value
=
"卡券描述"
)
private
String
notice
;
@ApiModelProperty
(
position
=
16
,
value
=
"券类型[1-代金券|2-折扣券|3-满减券]"
)
private
Integer
type
;
@ApiModelProperty
(
position
=
17
,
value
=
"卡券库存,默认:0为无限"
)
private
Integer
stock
;
@ApiModelProperty
(
position
=
18
,
value
=
"触发金额"
)
private
BigDecimal
triggers
;
@ApiModelProperty
(
position
=
19
,
value
=
"面值"
)
private
BigDecimal
valFace
;
@ApiModelProperty
(
position
=
20
,
value
=
"折扣[8折即0.8]"
)
private
BigDecimal
discount
;
@ApiModelProperty
(
position
=
21
,
value
=
"满减~满"
)
private
BigDecimal
valOver
;
@ApiModelProperty
(
position
=
22
,
value
=
"满减~减"
)
private
BigDecimal
valMinus
;
@ApiModelProperty
(
position
=
23
,
value
=
"抵扣上限金额(最多扣除金额)"
)
private
BigDecimal
deduction
;
@ApiModelProperty
(
position
=
24
,
value
=
"限领数量,默认:1张/人"
)
private
Integer
receiveLimit
;
@ApiModelProperty
(
position
=
25
,
value
=
"领取约束[0-不开放|1-开放]"
)
private
Integer
receiveCurb
;
@ApiModelProperty
(
position
=
26
,
value
=
"使用范围[0-全部商品|1-部分商品]"
)
private
Integer
useScope
;
@ApiModelProperty
(
position
=
27
,
value
=
"卡券状态[0-等待开始|1-活动中|2-活动结束|3-停用]"
)
private
Integer
state
;
@ApiModelProperty
(
position
=
28
,
value
=
"开始时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
startTime
;
@ApiModelProperty
(
position
=
14
,
value
=
"结束时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
endTime
;
private
static
final
GoblinStoreMgtCouponInfoVo
obj
=
new
GoblinStoreMgtCouponInfoVo
();
public
static
GoblinStoreMgtCouponInfoVo
getNew
()
{
try
{
return
(
GoblinStoreMgtCouponInfoVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinStoreMgtCouponInfoVo
();
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/vo/GoblinStoreMgtCouponListVo.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
@ApiModel
(
value
=
"GoblinStoreMgtCouponListVo"
,
description
=
"商铺活动:优惠券列表信息"
)
@Data
public
class
GoblinStoreMgtCouponListVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
-
8794122053242926547L
;
@ApiModelProperty
(
position
=
10
,
value
=
"卡券ID[64]"
)
private
String
storeCouponId
;
@ApiModelProperty
(
position
=
11
,
value
=
"卡券编码[64]"
)
private
String
storeCouponNo
;
@ApiModelProperty
(
position
=
12
,
value
=
"卡券名称[50]"
)
private
String
title
;
@ApiModelProperty
(
position
=
13
,
value
=
"卡券状态[0-等待开始|1-活动中|2-活动结束|3-停用]"
)
private
String
state
;
@ApiModelProperty
(
position
=
14
,
value
=
"库存"
)
private
Integer
stock
;
@ApiModelProperty
(
position
=
15
,
value
=
"领取数量"
)
private
Integer
receiveNum
;
@ApiModelProperty
(
position
=
16
,
value
=
"使用数量"
)
private
Integer
usedNum
;
@ApiModelProperty
(
position
=
17
,
value
=
"开始时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
startTime
;
@ApiModelProperty
(
position
=
18
,
value
=
"结束时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
endTime
;
@ApiModelProperty
(
position
=
19
,
value
=
"创建时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
createdAt
;
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsSkuInfoDetailVo.java
View file @
373a1585
...
...
@@ -32,6 +32,8 @@ public class GoblinGoodsSkuInfoDetailVo implements Serializable, Cloneable {
private
String
skuAppear
;
@ApiModelProperty
(
position
=
11
,
value
=
"商品ID[64]"
)
private
String
spuId
;
@ApiModelProperty
(
position
=
12
,
value
=
"库存是否告警,true 告警,false没有告警"
)
private
boolean
stockLess
;
private
static
final
GoblinGoodsSkuInfoDetailVo
obj
=
new
GoblinGoodsSkuInfoDetailVo
();
...
...
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinStoreCoupon.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
import
java.math.BigDecimal
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 商铺营销-优惠券
* </p>
*
* @author liquidnet
* @since 2022-02-16
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinStoreCoupon
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* 卡券ID
*/
private
String
storeCouponId
;
/**
* 卡券编码
*/
private
String
storeCouponNo
;
/**
* 店铺ID
*/
private
String
storeId
;
/**
* 卡券名称
*/
private
String
title
;
/**
* 标注
*/
private
String
label
;
/**
* 卡券描述
*/
private
String
notice
;
/**
* 券类型[1-代金券|2-折扣券|3-满减券]
*/
private
Integer
type
;
/**
* 卡券库存,默认:0为无限
*/
private
Integer
stock
;
/**
* 触发金额
*/
private
BigDecimal
triggers
;
/**
* 面值
*/
private
BigDecimal
valFace
;
/**
* 折扣[8折即0.8]
*/
private
BigDecimal
discount
;
/**
* 满减~满
*/
private
BigDecimal
valOver
;
/**
* 满减~减
*/
private
BigDecimal
valMinus
;
/**
* 抵扣上限金额(最多扣除金额)
*/
private
BigDecimal
deduction
;
/**
* 叠加限制[0-限制|1-叠加]
*/
private
Integer
overlay
;
/**
* #同类别券叠加适用
*/
private
Integer
overlayLevel
;
/**
* 限领数量,默认:1张/人
*/
private
Integer
receiveLimit
;
/**
* 领取约束[0-不开放|1-开放]
*/
private
Integer
receiveCurb
;
/**
* 使用范围[0-全部商品|1-部分商品]
*/
private
Integer
useScope
;
/**
* 卡券状态[0-等待开始|1-活动中|2-活动结束|3-停用]
*/
private
Integer
state
;
/**
* 开始时间
*/
private
LocalDateTime
startTime
;
/**
* 结束时间
*/
private
LocalDateTime
endTime
;
/**
* 删除标记[0-未删除|1-删除]
*/
private
Integer
delFlg
;
private
String
createdBy
;
private
LocalDateTime
createdAt
;
private
String
updatedBy
;
private
LocalDateTime
updatedAt
;
private
String
deletedBy
;
private
LocalDateTime
deletedAt
;
private
String
comment
;
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinStoreCouponRule.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 商铺营销-优惠券规则
* </p>
*
* @author liquidnet
* @since 2022-02-16
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinStoreCouponRule
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* 卡券ID
*/
private
String
storeCouponId
;
/**
* spu_id
*/
private
String
spuId
;
/**
* sku_id
*/
private
String
skuId
;
/**
* 删除标记[0-未删除|1-删除]
*/
private
Integer
delFlg
;
private
String
createdBy
;
private
LocalDateTime
createdAt
;
private
String
updatedBy
;
private
LocalDateTime
updatedAt
;
private
String
deletedBy
;
private
LocalDateTime
deletedAt
;
private
String
comment
;
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinUserCoupon.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 商城用户券信息
* </p>
*
* @author liquidnet
* @since 2022-02-16
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinUserCoupon
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
private
String
ucouponId
;
/**
* ~goblin_store_coupon.store_coupon_id
*/
private
String
storeCouponId
;
/**
* ~adam_user.uid
*/
private
String
uid
;
/**
* 用户券状态[1-可用|2-无效|3-已过期|5-已使用]
*/
private
Integer
state
;
/**
* 激活时间
*/
private
LocalDateTime
bindAt
;
/**
* 到期时间
*/
private
LocalDateTime
duedAt
;
/**
* 使用时间
*/
private
LocalDateTime
usedAt
;
/**
* 用于记录购买的内容
*/
private
String
usedBy
;
private
String
operator
;
private
LocalDateTime
createdAt
;
private
LocalDateTime
updatedAt
;
private
String
comment
;
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinStoreCouponMapper.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.liquidnet.service.goblin.entity.GoblinStoreCoupon
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 商铺营销-优惠券 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2022-02-16
*/
public
interface
GoblinStoreCouponMapper
extends
BaseMapper
<
GoblinStoreCoupon
>
{
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinStoreCouponRuleMapper.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.liquidnet.service.goblin.entity.GoblinStoreCouponRule
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 商铺营销-优惠券规则 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2022-02-16
*/
public
interface
GoblinStoreCouponRuleMapper
extends
BaseMapper
<
GoblinStoreCouponRule
>
{
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinUserCouponMapper.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.liquidnet.service.goblin.entity.GoblinUserCoupon
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 商城用户券信息 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2022-02-16
*/
public
interface
GoblinUserCouponMapper
extends
BaseMapper
<
GoblinUserCoupon
>
{
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/resources/com.liquidnet.service.goblin.mapper/GoblinStoreCouponMapper.xml
0 → 100644
View file @
373a1585
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.goblin.mapper.GoblinStoreCouponMapper"
>
</mapper>
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/resources/com.liquidnet.service.goblin.mapper/GoblinStoreCouponRuleMapper.xml
0 → 100644
View file @
373a1585
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.goblin.mapper.GoblinStoreCouponRuleMapper"
>
</mapper>
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/resources/com.liquidnet.service.goblin.mapper/GoblinUserCouponMapper.xml
0 → 100644
View file @
373a1585
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.goblin.mapper.GoblinUserCouponMapper"
>
</mapper>
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/docu/db_ln_goblin_initialdata.sql
View file @
373a1585
...
...
@@ -955,4 +955,88 @@ alter table goblin_store_order add store_name varchar(255) default '' comment '
alter
table
goblin_store_order
add
market_type
varchar
(
255
)
default
''
comment
'活动类型[ZZ-正在下单]'
;
alter
table
goblin_store_order
add
market_id
varchar
(
255
)
default
''
comment
'活动id'
;
alter
table
goblin_back_order
add
back_price_express
decimal
(
8
,
2
)
default
0
comment
'退款快递费'
;
\ No newline at end of file
alter
table
goblin_back_order
add
back_price_express
decimal
(
8
,
2
)
default
0
comment
'退款快递费'
;
#
-- >>------------------------------------------------------------------------------------
#
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
goblin_store_coupon
;
create
table
goblin_store_coupon
(
mid
bigint
unsigned
auto_increment
primary
key
,
store_coupon_id
varchar
(
64
)
not
null
comment
'卡券ID'
,
store_coupon_no
varchar
(
64
)
not
null
comment
'卡券编码'
,
store_id
varchar
(
64
)
not
null
comment
'店铺ID'
,
title
varchar
(
50
)
not
null
comment
'卡券名称'
,
label
varchar
(
50
)
null
comment
'标注'
,
notice
varchar
(
255
)
null
comment
'卡券描述'
,
type
smallint
not
null
comment
'券类型[1-代金券|2-折扣券|3-满减券]'
,
stock
int
not
null
comment
'卡券库存,默认:0为无限'
,
triggers
decimal
(
8
,
2
)
null
comment
'触发金额'
,
val_face
decimal
(
8
,
2
)
null
comment
'面值'
,
discount
decimal
(
8
,
2
)
null
comment
'折扣[8折即0.8]'
,
val_over
decimal
(
8
,
2
)
null
comment
'满减~满'
,
val_minus
decimal
(
8
,
2
)
null
comment
'满减~减'
,
deduction
decimal
(
8
,
2
)
null
comment
'抵扣上限金额(最多扣除金额)'
,
overlay
tinyint
default
1
null
comment
'叠加限制[0-限制|1-叠加]'
,
overlay_level
tinyint
default
0
null
comment
'#同类别券叠加适用'
,
receive_limit
int
default
1
comment
'限领数量,默认:1张/人'
,
receive_curb
tinyint
null
comment
'领取约束[0-不开放|1-开放]'
,
use_scope
smallint
comment
'使用范围[0-全部商品|1-部分商品]'
,
state
tinyint
not
null
comment
'卡券状态[0-等待开始|1-活动中|2-活动结束|3-停用]'
,
start_time
datetime
(
3
)
not
null
comment
'开始时间'
,
end_time
datetime
(
3
)
not
null
comment
'结束时间'
,
del_flg
tinyint
default
0
comment
'删除标记[0-未删除|1-删除]'
,
created_by
varchar
(
64
)
not
null
,
created_at
datetime
(
3
)
not
null
,
updated_by
varchar
(
64
)
null
,
updated_at
datetime
(
3
)
null
,
deleted_by
varchar
(
64
)
null
,
deleted_at
datetime
(
3
)
null
,
comment
text
)
engine
=
InnoDB
comment
'商铺营销-优惠券'
;
create
unique
index
uidx_gsc_store_coupon_id
on
goblin_store_coupon
(
store_coupon_id
);
#
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
goblin_store_coupon_rule
;
create
table
goblin_store_coupon_rule
(
mid
bigint
unsigned
auto_increment
primary
key
,
store_coupon_id
varchar
(
64
)
not
null
comment
'卡券ID'
,
spu_id
varchar
(
64
)
not
null
comment
'spu_id'
,
sku_id
varchar
(
64
)
null
comment
'sku_id'
,
del_flg
tinyint
default
0
comment
'删除标记[0-未删除|1-删除]'
,
created_by
varchar
(
64
)
not
null
,
created_at
datetime
(
3
)
not
null
,
updated_by
varchar
(
64
)
null
,
updated_at
datetime
(
3
)
null
,
deleted_by
varchar
(
64
)
null
,
deleted_at
datetime
(
3
)
null
,
comment
text
)
engine
=
InnoDB
comment
'商铺营销-优惠券规则'
;
create
index
idx_gscr_store_coupon_id
on
goblin_store_coupon_rule
(
store_coupon_id
);
#
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
goblin_user_coupon
;
create
table
goblin_user_coupon
(
mid
bigint
unsigned
auto_increment
primary
key
,
ucoupon_id
varchar
(
64
)
not
null
,
store_coupon_id
varchar
(
64
)
not
null
comment
'~goblin_store_coupon.store_coupon_id'
,
uid
varchar
(
64
)
not
null
comment
'~adam_user.uid'
,
state
tinyint
null
comment
'用户券状态[1-可用|2-无效|3-已过期|5-已使用]'
,
bind_at
datetime
(
3
)
null
comment
'激活时间'
,
dued_at
datetime
(
3
)
null
comment
'到期时间'
,
used_at
datetime
(
3
)
null
comment
'使用时间'
,
used_by
varchar
(
255
)
null
comment
'用于记录购买的内容'
,
operator
varchar
(
64
)
null
,
created_at
datetime
(
3
)
not
null
,
updated_at
datetime
(
3
)
null
,
comment
text
)
engine
=
InnoDB
comment
'商城用户券信息'
;
create
unique
index
uidx_guc_ucoupon_id
on
goblin_user_coupon
(
ucoupon_id
);
#
-- >>------------------------------------------------------------------------------------
#
-- >>------------------------------------------------------------------------------------
#
-- >>------------------------------------------------------------------------------------
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtCouponController.java
0 → 100644
View file @
373a1585
package
com
.
liquidnet
.
service
.
goblin
.
controller
.
manage
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.base.ErrorMapping
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.*
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtCouponInfoVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtCouponListVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo
;
import
com.liquidnet.service.goblin.util.GoblinMongoUtils
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotBlank
;
@ApiSupport
(
order
=
149006
)
@Api
(
tags
=
"商铺活动:优惠券管理"
)
@Slf4j
@Validated
@RestController
@RequestMapping
(
"store/mgt/coupon"
)
public
class
GoblinStoreMgtCouponController
{
@Autowired
GoblinRedisUtils
goblinRedisUtils
;
@Autowired
GoblinMongoUtils
goblinMongoUtils
;
@ApiOperationSupport
(
order
=
1
)
@ApiOperation
(
value
=
"优惠券列表"
)
@PostMapping
(
"list"
)
public
ResponseDto
<
PagedResult
<
GoblinStoreMgtCouponListVo
>>
list
(
@Valid
@RequestBody
GoblinStoreMgtCouponFilterParam
mgtCouponFilterParam
)
{
return
ResponseDto
.
success
();
}
@ApiOperationSupport
(
order
=
2
)
@ApiOperation
(
value
=
"优惠券导出"
,
notes
=
"#以POST模拟FORM表单请求该接口"
)
@PostMapping
(
"export"
)
public
void
export
(
@Valid
GoblinStoreMgtCouponFilterParam
mgtCouponFilterParam
)
{
}
@ApiOperationSupport
(
order
=
3
)
@ApiOperation
(
value
=
"优惠券管理"
,
notes
=
"#以POST模拟FORM表单请求该接口"
)
@PostMapping
(
"action"
)
public
ResponseDto
<
Object
>
action
(
@Valid
GoblinStoreMgtCouponActionParam
mgtCouponActionParam
)
{
String
currentUid
=
CurrentUtil
.
getCurrentUid
();
if
(!
goblinRedisUtils
.
hasStoreId
(
currentUid
,
mgtCouponActionParam
.
getStoreId
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149002"
));
}
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商铺活动:优惠券管理:[GoblinStoreMgtCouponActionParam={}]"
,
JsonUtils
.
toJson
(
mgtCouponActionParam
));
}
switch
(
mgtCouponActionParam
.
getAction
())
{
case
"ONSHELVES"
:
// mgtCouponActionParam.goodsShelvesProcessing(mgtCouponActionParam, currentUid, true);
break
;
case
"UNSHELVE"
:
// mgtCouponActionParam.goodsShelvesProcessing(mgtCouponActionParam, currentUid, false);
break
;
case
"REMOVE"
:
// mgtCouponActionParam.goodsRemove(mgtCouponActionParam, currentUid);
break
;
default
:
log
.
warn
(
"商铺活动:优惠券管理:Invalid operation[UID={},storeMgtGoodsActionParam={}]"
,
currentUid
,
JsonUtils
.
toJson
(
mgtCouponActionParam
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149001"
));
}
return
ResponseDto
.
success
();
}
@ApiOperationSupport
(
order
=
4
)
@ApiOperation
(
value
=
"新增优惠券"
)
@PutMapping
(
"add"
)
public
ResponseDto
<
Object
>
add
(
@Valid
@RequestBody
GoblinStoreMgtCouponAddParam
mgtCouponAddParam
)
{
return
ResponseDto
.
success
();
}
@ApiOperationSupport
(
order
=
5
)
@ApiOperation
(
value
=
"优惠券详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"店铺ID"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"优惠券ID"
),
})
@GetMapping
(
"info"
)
public
ResponseDto
<
GoblinStoreMgtCouponInfoVo
>
info
(
@NotBlank
(
message
=
"店铺ID不能为空"
)
@RequestParam
String
storeId
,
@NotBlank
(
message
=
"优惠券ID不能为空"
)
@RequestParam
String
storeCouponId
)
{
if
(!
goblinRedisUtils
.
hasStoreId
(
CurrentUtil
.
getCurrentUid
(),
storeId
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149002"
));
}
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:SPU详情:[storeId={},spuId={}]"
,
storeId
,
storeCouponId
);
}
return
ResponseDto
.
success
();
}
@ApiOperationSupport
(
order
=
6
)
@ApiOperation
(
value
=
"优惠券编辑"
,
notes
=
"只修改基本信息,不包含发放设置修改"
)
@PostMapping
(
"edit"
)
public
ResponseDto
<
Object
>
editSpu
(
@Valid
@RequestBody
GoblinStoreMgtCouponAddParam
mgtCouponEditParam
)
{
return
ResponseDto
.
success
();
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtGoodsController.java
View file @
373a1585
...
...
@@ -138,7 +138,7 @@ public class GoblinStoreMgtGoodsController {
goblinstoreMgtGoodsService
.
goodsRemove
(
storeMgtGoodsActionParam
,
currentUid
);
break
;
default
:
log
.
warn
(
"Invalid operation[UID={},storeMgtGoodsActionParam={}]"
,
currentUid
,
JsonUtils
.
toJson
(
storeMgtGoodsActionParam
));
log
.
warn
(
"
商品管理:SPU管理:
Invalid operation[UID={},storeMgtGoodsActionParam={}]"
,
currentUid
,
JsonUtils
.
toJson
(
storeMgtGoodsActionParam
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149001"
));
}
return
ResponseDto
.
success
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
373a1585
...
...
@@ -9,6 +9,7 @@ import com.liquidnet.service.goblin.constant.GoblinRedisConst;
import
com.liquidnet.service.goblin.constant.GoblinStatusConst
;
import
com.liquidnet.service.goblin.dto.vo.*
;
import
com.liquidnet.service.goblin.entity.*
;
import
com.liquidnet.service.goblin.enums.GoblinStoreConf
;
import
com.liquidnet.service.goblin.service.GoblinFrontService
;
import
com.liquidnet.service.goblin.util.GoblinMongoUtils
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
...
...
@@ -257,6 +258,23 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
return
goblinFrontSeckillVo
;
}
//获取库存设置的报警数量
public
int
getStockCount
(
String
storeId
){
String
configVal
=
""
;
List
<
GoblinStoreConfigVo
>
listVo
=
goblinRedisUtils
.
getStoreConfigVos
(
storeId
);
//ONOFF_SOLD_OUT_SHOW ON 开启
for
(
GoblinStoreConfigVo
goblinStoreConfigVo:
listVo
){
//获取是 售罄是否开启
if
(
goblinStoreConfigVo
.
getConfigKey
().
equals
(
GoblinStoreConf
.
LIMIT_WARNING_STOCK
)){
configVal
=
goblinStoreConfigVo
.
getConfigVal
();
}
}
if
(
StringUtil
.
isNotBlank
(
configVal
)){
return
Integer
.
parseInt
(
configVal
);
}
else
{
return
-
1
;
}
}
/**
* 获得商品详情
*/
...
...
@@ -268,13 +286,23 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
goblinFrontGoodDetailVo
.
setGoblinGoodsInfoVo
(
goblinGoodsInfoDetailVo
);
//skuIdList
if
(
null
!=
goblinGoodsInfoVo
){
int
limit
=
getStockCount
(
goblinGoodsInfoVo
.
getStoreId
());
List
<
String
>
skuIdList
=
goblinGoodsInfoVo
.
getSkuIdList
();
ArrayList
<
GoblinGoodsSkuInfoDetailVo
>
list
=
ObjectUtil
.
goblinGoodsSkuInfoDetailVos
();
for
(
String
sku:
skuIdList
){
GoblinGoodsSkuInfoVo
goblinGoodsSkuInfoVo
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
sku
);
GoblinGoodsSkuInfoDetailVo
goblinGoodsSkuInfoDetailVo
=
GoblinGoodsSkuInfoDetailVo
.
getNew
();
BeanUtils
.
copyProperties
(
goblinGoodsSkuInfoVo
,
goblinGoodsSkuInfoDetailVo
);
list
.
add
(
goblinGoodsSkuInfoDetailVo
);
if
(
null
!=
goblinGoodsSkuInfoVo
){
//获取 sku 库存数量
int
stock
=
goblinRedisUtils
.
getSkuStock
(
null
,
goblinGoodsSkuInfoVo
.
getSkuId
());
GoblinGoodsSkuInfoDetailVo
goblinGoodsSkuInfoDetailVo
=
GoblinGoodsSkuInfoDetailVo
.
getNew
();
BeanUtils
.
copyProperties
(
goblinGoodsSkuInfoVo
,
goblinGoodsSkuInfoDetailVo
);
if
(
limit
>=
stock
){
goblinGoodsSkuInfoDetailVo
.
setStockLess
(
true
);
}
else
{
goblinGoodsSkuInfoDetailVo
.
setStockLess
(
false
);
}
list
.
add
(
goblinGoodsSkuInfoDetailVo
);
}
}
//goblinGoodsInfoVo
GoblinStoreInfoVo
goblinStoreInfoVo
=
this
.
getStore
(
goblinGoodsInfoVo
.
getStoreId
());
...
...
@@ -444,6 +472,15 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
return
list1
;
}
public
GoblinFrontCategoryListVo
getStoreGoodes
(
String
storeId
,
String
categoryId
,
String
name
){
String
configVal
=
""
;
List
<
GoblinStoreConfigVo
>
listVo
=
goblinRedisUtils
.
getStoreConfigVos
(
storeId
);
//ONOFF_SOLD_OUT_SHOW ON 开启
for
(
GoblinStoreConfigVo
goblinStoreConfigVo:
listVo
){
//获取是 售罄是否开启
if
(
goblinStoreConfigVo
.
getConfigKey
().
equals
(
GoblinStoreConf
.
ONOFF_SOLD_OUT_SHOW
)){
configVal
=
goblinStoreConfigVo
.
getConfigVal
();
}
}
//
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
).
and
(
"spuAppear"
).
is
(
"0"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
));
...
...
@@ -461,21 +498,22 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
query
.
with
(
Sort
.
by
(
Sort
.
Direction
.
DESC
,
"count"
));
// 查询总数
List
<
GoblinGoodsInfoVo
>
list
=
mongoTemplate
.
find
(
query
,
GoblinGoodsInfoVo
.
class
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
/*if(list.size()>0){
//找到 销量
for(GoblinGoodsInfoVo goblinGoodsInfoVo:list){
Integer counts=goblinRedisUtils.getSpuSaleCount(goblinGoodsInfoVo.getSpuId());
if(counts==null){
goblinGoodsInfoVo.setCount(0);
}else{
goblinGoodsInfoVo.setCount(counts);
// 计算库存
Iterator
<
GoblinGoodsInfoVo
>
iterator
=
list
.
iterator
();
//删掉库存没有的商品
while
(
iterator
.
hasNext
()){
GoblinGoodsInfoVo
goblinGoodsInfoVo
=
iterator
.
next
();
List
<
String
>
skuIdList
=
goblinGoodsInfoVo
.
getSkuIdList
();
int
count
=
0
;
for
(
String
skuId:
skuIdList
){
count
=
count
+
goblinRedisUtils
.
getSkuStock
(
null
,
skuId
);
}
if
(
StringUtil
.
isNotBlank
(
configVal
)&&!
configVal
.
equals
(
"ON"
)){
if
(
count
==
0
){
iterator
.
remove
();
}
}
Collections.sort(list, new Comparator<GoblinGoodsInfoVo>() {
public int compare(GoblinGoodsInfoVo arg0, GoblinGoodsInfoVo arg1) {
return -(arg0.getCount().compareTo(arg1.getCount()));
}});
}*/
}
ArrayList
<
GoblinGoodsInfoListVo
>
listVos
=
ObjectUtil
.
getGoblinGoodsInfoListVo
();
for
(
GoblinGoodsInfoVo
goblinGoodsInfoVo:
list
){
GoblinGoodsInfoListVo
goblinGoodsInfoListVo
=
GoblinGoodsInfoListVo
.
getNew
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMgtCertificationServiceImpl.java
View file @
373a1585
...
...
@@ -119,6 +119,8 @@ public class GoblinStoreMgtCertificationServiceImpl implements IGoblinStoreMgtCe
storeInfoVo
.
setUpdatedAt
(
LocalDateTime
.
now
());
storeInfoVo
.
setUpdatedBy
(
CurrentUtil
.
getCurrentUid
());
if
(
goblinMongoUtils
.
updateStoreInfoVo
(
param
.
completeStoreInfoVo
(
storeInfoVo
)))
{
goblinRedisUtils
.
setStoreInfoVo
(
storeInfoVo
);
// LinkedList<String> toMqSqls = CollectionUtil.linkedListString();
// LinkedList<Object[]> updateStoreInfoObjs = CollectionUtil.linkedListObjectArr();
// toMqSqls.add(SqlMapping.get("goblin_store_info.update_by_cert2"));
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
373a1585
...
...
@@ -260,7 +260,7 @@ public class GoblinMongoUtils {
public
boolean
delStoreInfoVo
(
String
storeId
,
String
uid
,
LocalDateTime
time
)
{
return
mongoTemplate
.
updateFirst
(
Query
.
query
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
)),
Update
.
update
(
"delFlg"
,
1
).
set
(
"updatedBy"
,
uid
).
set
(
"updatedAt"
,
time
).
set
(
"deletedBy"
,
uid
).
set
(
"deletedAt"
,
time
),
Update
.
update
(
"delFlg"
,
"1"
).
set
(
"updatedBy"
,
uid
).
set
(
"updatedAt"
,
time
).
set
(
"deletedBy"
,
uid
).
set
(
"deletedAt"
,
time
),
GoblinStoreInfoVo
.
class
.
getSimpleName
()).
getModifiedCount
()
>
0
;
}
...
...
@@ -308,7 +308,7 @@ public class GoblinMongoUtils {
public
boolean
delGoodsInfoVoBySpuIds
(
String
storeId
,
List
<
String
>
spuIdList
,
String
uid
,
LocalDateTime
time
)
{
return
mongoTemplate
.
updateMulti
(
Query
.
query
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
).
and
(
"spuId"
).
in
(
spuIdList
.
toArray
()).
and
(
"delFlg"
).
is
(
"0"
)),
Update
.
update
(
"delFlg"
,
1
).
set
(
"updatedBy"
,
uid
).
set
(
"updatedAt"
,
time
).
set
(
"deletedBy"
,
uid
).
set
(
"deletedAt"
,
time
),
Update
.
update
(
"delFlg"
,
"1"
).
set
(
"updatedBy"
,
uid
).
set
(
"updatedAt"
,
time
).
set
(
"deletedBy"
,
uid
).
set
(
"deletedAt"
,
time
),
GoblinGoodsInfoVo
.
class
.
getSimpleName
()
).
getModifiedCount
()
>
0
;
}
...
...
@@ -322,7 +322,7 @@ public class GoblinMongoUtils {
if
(!
CollectionUtils
.
isEmpty
(
storeSpus
))
{
storeSpuIdList
=
storeSpus
.
stream
().
map
(
GoblinGoodsInfoVo:
:
getSpuId
).
collect
(
Collectors
.
toList
());
UpdateResult
updateResult
=
mongoTemplate
.
updateMulti
(
Query
.
query
(
Criteria
.
where
(
"spuId"
).
in
(
storeSpuIdList
)),
Update
.
update
(
"delFlg"
,
1
).
set
(
"updatedBy"
,
uid
).
set
(
"updatedAt"
,
time
).
set
(
"deletedBy"
,
uid
).
set
(
"deletedAt"
,
time
),
Update
.
update
(
"delFlg"
,
"1"
).
set
(
"updatedBy"
,
uid
).
set
(
"updatedAt"
,
time
).
set
(
"deletedBy"
,
uid
).
set
(
"deletedAt"
,
time
),
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
if
(
updateResult
.
getModifiedCount
()
>
0
)
{
return
storeSpuIdList
;
...
...
@@ -465,7 +465,7 @@ public class GoblinMongoUtils {
if
(!
CollectionUtils
.
isEmpty
(
storeSkus
))
{
storeSkuIdList
=
storeSkus
.
stream
().
map
(
GoblinGoodsSkuInfoVo:
:
getSkuId
).
collect
(
Collectors
.
toList
());
UpdateResult
updateResult
=
mongoTemplate
.
updateMulti
(
Query
.
query
(
Criteria
.
where
(
"skuId"
).
in
(
storeSkuIdList
)),
Update
.
update
(
"delFlg"
,
1
).
set
(
"updatedBy"
,
uid
).
set
(
"updatedAt"
,
time
).
set
(
"deletedBy"
,
uid
).
set
(
"deletedAt"
,
time
),
Update
.
update
(
"delFlg"
,
"1"
).
set
(
"updatedBy"
,
uid
).
set
(
"updatedAt"
,
time
).
set
(
"deletedBy"
,
uid
).
set
(
"deletedAt"
,
time
),
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
if
(
updateResult
.
getModifiedCount
()
>
0
)
{
return
storeSkuIdList
;
...
...
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