记得上下班打卡 | 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
3ab04b87
Commit
3ab04b87
authored
Jan 05, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~API:商品编辑(SKU、SPU);
parent
97af040b
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
200 additions
and
63 deletions
+200
-63
GoblinStoreMgtGoodsAddParam.java
...ervice/goblin/dto/manage/GoblinStoreMgtGoodsAddParam.java
+36
-2
GoblinStoreMgtGoodsEditSkuParam.java
...ce/goblin/dto/manage/GoblinStoreMgtGoodsEditSkuParam.java
+31
-8
GoblinStoreCertificationVo.java
...vice/goblin/dto/manage/vo/GoblinStoreCertificationVo.java
+2
-0
GoblinStoreMgtGoodsInfoVo.java
...rvice/goblin/dto/manage/vo/GoblinStoreMgtGoodsInfoVo.java
+2
-0
GoblinStoreMgtThumbVo.java
...t/service/goblin/dto/manage/vo/GoblinStoreMgtThumbVo.java
+0
-1
GoblinGoodsInfoVo.java
...om/liquidnet/service/goblin/dto/vo/GoblinGoodsInfoVo.java
+2
-0
GoblinGoodsSkuInfoVo.java
...liquidnet/service/goblin/dto/vo/GoblinGoodsSkuInfoVo.java
+2
-0
GoblinServiceSupportVo.java
...quidnet/service/goblin/dto/vo/GoblinServiceSupportVo.java
+2
-0
IGoblinstoreMgtGoodsService.java
...ce/goblin/service/manage/IGoblinstoreMgtGoodsService.java
+4
-2
GoblinStoreMgtGoodsController.java
...blin/controller/manage/GoblinStoreMgtGoodsController.java
+93
-45
GoblinStoreMgtGoodsServiceImpl.java
...n/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
+17
-5
ObjectUtil.java
...in/java/com/liquidnet/service/goblin/util/ObjectUtil.java
+6
-0
errors.properties
...-service-goblin-impl/src/main/resources/errors.properties
+3
-0
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtGoodsAddParam.java
View file @
3ab04b87
...
@@ -124,7 +124,11 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
...
@@ -124,7 +124,11 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
}
else
{
}
else
{
vo
.
setSpuId
(
this
.
getSpuId
());
vo
.
setSpuId
(
this
.
getSpuId
());
}
}
if
(
StringUtils
.
isBlank
(
this
.
getSpuNo
()))
{
vo
.
setSpuNo
(
IDGenerator
.
nextTimeId2
());
vo
.
setSpuNo
(
IDGenerator
.
nextTimeId2
());
}
else
{
vo
.
setSpuNo
(
this
.
getSpuNo
());
}
vo
.
setName
(
this
.
getName
());
vo
.
setName
(
this
.
getName
());
vo
.
setSubtitle
(
this
.
getSubtitle
());
vo
.
setSubtitle
(
this
.
getSubtitle
());
vo
.
setSellPrice
(
this
.
getSellPrice
());
vo
.
setSellPrice
(
this
.
getSellPrice
());
...
@@ -164,6 +168,36 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
...
@@ -164,6 +168,36 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
return
vo
;
return
vo
;
}
}
/**
* 编辑SPU参数整理
*
* @return GoblinGoodsInfoVo
*/
public
GoblinGoodsInfoVo
initEditGoodsSkuInfoVo
()
{
GoblinGoodsInfoVo
vo
=
GoblinGoodsInfoVo
.
getNew
();
vo
.
setStoreId
(
this
.
getStoreId
());
vo
.
setSpuId
(
this
.
getSpuId
());
vo
.
setSpuNo
(
this
.
getSpuNo
());
vo
.
setName
(
this
.
getName
());
vo
.
setSubtitle
(
this
.
getSubtitle
());
vo
.
setSellPrice
(
this
.
getSellPrice
());
vo
.
setIntro
(
this
.
getIntro
());
vo
.
setDetails
(
this
.
getDetails
());
vo
.
setCoverPic
(
this
.
getCoverPic
());
vo
.
setVideo
(
this
.
getVideo
());
vo
.
setSpecMode
(
this
.
getSpecMode
());
vo
.
setCateFid
(
this
.
getCateFid
());
vo
.
setCateSid
(
this
.
getCateSid
());
vo
.
setCateTid
(
this
.
getCateTid
());
vo
.
setShelvesHandle
(
this
.
getShelvesHandle
());
vo
.
setShelvesTime
(
this
.
getShelvesTime
());
vo
.
setSpuValidity
(
this
.
getSpuValidity
());
vo
.
setVirtualFlg
(
this
.
getVirtualFlg
());
vo
.
setImageList
(
this
.
getImageList
());
vo
.
setLogisticsTemplate
(
this
.
getLogisticsTemplate
());
return
vo
;
}
/**
/**
* 生成SKU列表以及SPU规格等信息
* 生成SKU列表以及SPU规格等信息
*
*
...
@@ -189,7 +223,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
...
@@ -189,7 +223,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
vo
.
setSkuId
(
skuId
);
vo
.
setSkuId
(
skuId
);
}
}
vo
.
setSpuId
(
goodsInfoVo
.
getSpuId
());
vo
.
setSpuId
(
goodsInfoVo
.
getSpuId
());
vo
.
setSkuNo
(
goodsInfoVo
.
getSpuNo
().
concat
(
"-"
).
concat
(
String
.
valueOf
(
i
)));
//
vo.setSkuNo(goodsInfoVo.getSpuNo().concat("-").concat(String.valueOf(i)));
vo
.
setName
(
goodsInfoVo
.
getName
());
vo
.
setName
(
goodsInfoVo
.
getName
());
vo
.
setSubtitle
(
goodsInfoVo
.
getSubtitle
());
vo
.
setSubtitle
(
goodsInfoVo
.
getSubtitle
());
vo
.
setSkuPic
(
addSkuParam
.
getSkuPic
());
vo
.
setSkuPic
(
addSkuParam
.
getSkuPic
());
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtGoodsEditSkuParam.java
View file @
3ab04b87
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto
;
import
com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -33,23 +35,44 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
...
@@ -33,23 +35,44 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
private
BigDecimal
weight
;
private
BigDecimal
weight
;
@ApiModelProperty
(
position
=
18
,
required
=
true
,
value
=
"总库存"
)
@ApiModelProperty
(
position
=
18
,
required
=
true
,
value
=
"总库存"
)
private
Integer
stock
;
private
Integer
stock
;
@ApiModelProperty
(
position
=
19
,
required
=
false
,
value
=
"预警库存"
)
@ApiModelProperty
(
position
=
19
,
required
=
true
,
value
=
"SKU库存"
)
private
Integer
skuStock
;
@ApiModelProperty
(
position
=
20
,
required
=
false
,
value
=
"预警库存"
)
private
Integer
warningStock
;
private
Integer
warningStock
;
@ApiModelProperty
(
position
=
2
0
,
value
=
"自定义展示[0-默认展示|1-隐藏不可购买]"
)
@ApiModelProperty
(
position
=
2
1
,
value
=
"自定义展示[0-默认展示|1-隐藏不可购买]"
)
private
String
skuAppear
;
private
String
skuAppear
;
@ApiModelProperty
(
position
=
2
1
,
required
=
false
,
value
=
"ISBN,针对CD/图书等[100]"
)
@ApiModelProperty
(
position
=
2
2
,
required
=
false
,
value
=
"ISBN,针对CD/图书等[100]"
)
private
String
skuIsbn
;
private
String
skuIsbn
;
@ApiModelProperty
(
position
=
2
2
,
required
=
true
,
value
=
"购买限制[0-全部用户|1-仅会员|2-指定用户]"
)
@ApiModelProperty
(
position
=
2
3
,
required
=
true
,
value
=
"购买限制[0-全部用户|1-仅会员|2-指定用户]"
)
private
String
buyFactor
;
private
String
buyFactor
;
@ApiModelProperty
(
position
=
2
3
,
required
=
false
,
value
=
"购买限制人员名单[购买限制为2-指定用户时必填]"
)
@ApiModelProperty
(
position
=
2
4
,
required
=
false
,
value
=
"购买限制人员名单[购买限制为2-指定用户时必填]"
)
private
String
buyRoster
;
private
String
buyRoster
;
@ApiModelProperty
(
position
=
2
4
,
required
=
false
,
value
=
"限量[0-无限制|X:限购数量]"
)
@ApiModelProperty
(
position
=
2
5
,
required
=
false
,
value
=
"限量[0-无限制|X:限购数量]"
)
private
Integer
buyLimit
;
private
Integer
buyLimit
;
@ApiModelProperty
(
position
=
2
5
,
required
=
false
,
value
=
"单品有效期[yyyy-MM-dd HH:mm:ss]"
)
@ApiModelProperty
(
position
=
2
6
,
required
=
false
,
value
=
"单品有效期[yyyy-MM-dd HH:mm:ss]"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_FULL
,
message
=
"单品有效期格式有误"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_FULL
,
message
=
"单品有效期格式有误"
)
private
String
skuValidity
;
private
String
skuValidity
;
@ApiModelProperty
(
position
=
2
6
,
required
=
false
,
value
=
"加减库存"
)
@ApiModelProperty
(
position
=
2
7
,
required
=
false
,
value
=
"加减库存"
)
private
Integer
operStock
;
private
Integer
operStock
;
public
GoblinGoodsSkuInfoVo
initEditGoodsSkuInfoVo
()
{
GoblinGoodsSkuInfoVo
vo
=
GoblinGoodsSkuInfoVo
.
getNew
();
vo
.
setSkuId
(
this
.
getSkuId
());
vo
.
setSkuPic
(
this
.
getSkuPic
());
vo
.
setSkuSpecList
(
this
.
getSkuSpecList
());
vo
.
setSellPrice
(
this
.
getSellPrice
());
vo
.
setPrice
(
this
.
getPrice
());
vo
.
setPriceMember
(
this
.
getPriceMember
());
vo
.
setWeight
(
this
.
getWeight
());
vo
.
setWarningStock
(
this
.
getWarningStock
());
vo
.
setSkuAppear
(
this
.
getSkuAppear
());
vo
.
setSkuIsbn
(
this
.
getSkuIsbn
());
vo
.
setBuyFactor
(
this
.
getBuyFactor
());
vo
.
setBuyRoster
(
this
.
getBuyRoster
());
vo
.
setBuyLimit
(
this
.
getBuyLimit
());
vo
.
setSkuValidity
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
this
.
getSkuValidity
()));
return
vo
;
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/vo/GoblinStoreCertificationVo.java
View file @
3ab04b87
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
.
vo
;
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -11,6 +12,7 @@ import java.time.LocalDateTime;
...
@@ -11,6 +12,7 @@ import java.time.LocalDateTime;
@ApiModel
(
value
=
"GoblinStoreCertificationVo"
,
description
=
"店铺认证信息"
)
@ApiModel
(
value
=
"GoblinStoreCertificationVo"
,
description
=
"店铺认证信息"
)
@Data
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
GoblinStoreCertificationVo
implements
Serializable
,
Cloneable
{
public
class
GoblinStoreCertificationVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
-
7125674300755279796L
;
private
static
final
long
serialVersionUID
=
-
7125674300755279796L
;
@ApiModelProperty
(
position
=
11
,
value
=
"证件类型[1-二代居民身份证]"
)
@ApiModelProperty
(
position
=
11
,
value
=
"证件类型[1-二代居民身份证]"
)
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/vo/GoblinStoreMgtGoodsInfoVo.java
View file @
3ab04b87
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
.
vo
;
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -11,6 +12,7 @@ import java.util.List;
...
@@ -11,6 +12,7 @@ import java.util.List;
@ApiModel
(
value
=
"GoblinStoreMgtGoodsInfoVo"
,
description
=
"商品管理:商品详情信息"
)
@ApiModel
(
value
=
"GoblinStoreMgtGoodsInfoVo"
,
description
=
"商品管理:商品详情信息"
)
@Data
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
GoblinStoreMgtGoodsInfoVo
implements
Serializable
,
Cloneable
{
public
class
GoblinStoreMgtGoodsInfoVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
4864134079879227233L
;
private
static
final
long
serialVersionUID
=
4864134079879227233L
;
@ApiModelProperty
(
position
=
11
,
value
=
"商品SPU详情"
)
@ApiModelProperty
(
position
=
11
,
value
=
"商品SPU详情"
)
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/vo/GoblinStoreMgtThumbVo.java
View file @
3ab04b87
...
@@ -8,7 +8,6 @@ import lombok.Data;
...
@@ -8,7 +8,6 @@ import lombok.Data;
@ApiModel
(
value
=
"GoblinStoreMgtThumbVo"
,
description
=
"店铺简易信息列表"
)
@ApiModel
(
value
=
"GoblinStoreMgtThumbVo"
,
description
=
"店铺简易信息列表"
)
@Data
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
GoblinStoreMgtThumbVo
implements
java
.
io
.
Serializable
,
Cloneable
{
public
class
GoblinStoreMgtThumbVo
implements
java
.
io
.
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
-
7808265282707179941L
;
private
static
final
long
serialVersionUID
=
-
7808265282707179941L
;
@ApiModelProperty
(
position
=
10
,
value
=
"店铺ID[64]"
)
@ApiModelProperty
(
position
=
10
,
value
=
"店铺ID[64]"
)
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsInfoVo.java
View file @
3ab04b87
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -13,6 +14,7 @@ import java.util.List;
...
@@ -13,6 +14,7 @@ import java.util.List;
@ApiModel
(
value
=
"GoblinGoodsInfoVo"
,
description
=
"商品SPU详情[不包含具体SKU,SKU详情参见'GoblinGoobsSkuInfoVo']"
)
@ApiModel
(
value
=
"GoblinGoodsInfoVo"
,
description
=
"商品SPU详情[不包含具体SKU,SKU详情参见'GoblinGoobsSkuInfoVo']"
)
@Data
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
GoblinGoodsInfoVo
implements
Serializable
,
Cloneable
{
public
class
GoblinGoodsInfoVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
-
4712015317981742851L
;
private
static
final
long
serialVersionUID
=
-
4712015317981742851L
;
@ApiModelProperty
(
position
=
10
,
value
=
"店铺ID"
)
@ApiModelProperty
(
position
=
10
,
value
=
"店铺ID"
)
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsSkuInfoVo.java
View file @
3ab04b87
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.goblin.dto.vo;
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.goblin.dto.vo;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto
;
import
com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -15,6 +16,7 @@ import java.util.List;
...
@@ -15,6 +16,7 @@ import java.util.List;
@ApiModel
(
value
=
"GoblinGoodsSkuInfoVo"
,
description
=
"商品SKU信息"
)
@ApiModel
(
value
=
"GoblinGoodsSkuInfoVo"
,
description
=
"商品SKU信息"
)
@Data
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
GoblinGoodsSkuInfoVo
implements
Serializable
,
Cloneable
{
public
class
GoblinGoodsSkuInfoVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
7139250447538358198L
;
private
static
final
long
serialVersionUID
=
7139250447538358198L
;
@ApiModelProperty
(
position
=
10
,
value
=
"商品单品ID"
)
@ApiModelProperty
(
position
=
10
,
value
=
"商品单品ID"
)
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinServiceSupportVo.java
View file @
3ab04b87
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -8,6 +9,7 @@ import java.io.Serializable;
...
@@ -8,6 +9,7 @@ import java.io.Serializable;
@ApiModel
(
value
=
"GoblinServiceSupportVo"
,
description
=
"服务保障信息"
)
@ApiModel
(
value
=
"GoblinServiceSupportVo"
,
description
=
"服务保障信息"
)
@Data
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
GoblinServiceSupportVo
implements
Serializable
,
Cloneable
{
public
class
GoblinServiceSupportVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
-
6408263563025607959L
;
private
static
final
long
serialVersionUID
=
-
6408263563025607959L
;
@ApiModelProperty
(
position
=
10
,
value
=
"服务支持ID[30]"
)
@ApiModelProperty
(
position
=
10
,
value
=
"服务支持ID[30]"
)
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinstoreMgtGoodsService.java
View file @
3ab04b87
...
@@ -33,15 +33,17 @@ public interface IGoblinstoreMgtGoodsService {
...
@@ -33,15 +33,17 @@ public interface IGoblinstoreMgtGoodsService {
* 商品管理:商品编辑:SPU编辑
* 商品管理:商品编辑:SPU编辑
*
*
* @param storeMgtGoodsAddParam GoblinStoreMgtGoodsAddParam
* @param storeMgtGoodsAddParam GoblinStoreMgtGoodsAddParam
* @return boolean
*/
*/
void
goodsEditSpu
(
GoblinStoreMgtGoodsAddParam
storeMgtGoodsAddParam
);
boolean
goodsEditSpu
(
GoblinStoreMgtGoodsAddParam
storeMgtGoodsAddParam
);
/**
/**
* 商品管理:商品编辑:SKU编辑
* 商品管理:商品编辑:SKU编辑
*
*
* @param storeMgtGoodsEditSkuParam GoblinStoreMgtGoodsEditSkuParam
* @param storeMgtGoodsEditSkuParam GoblinStoreMgtGoodsEditSkuParam
* @return boolean
*/
*/
void
goodsEditSku
(
GoblinStoreMgtGoodsEditSkuParam
storeMgtGoodsEditSkuParam
);
boolean
goodsEditSku
(
GoblinStoreMgtGoodsEditSkuParam
storeMgtGoodsEditSkuParam
);
/**
/**
* 商品管理:商品编辑:SKU添加
* 商品管理:商品编辑:SKU添加
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtGoodsController.java
View file @
3ab04b87
...
@@ -12,12 +12,16 @@ import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsEditSkuParam;
...
@@ -12,12 +12,16 @@ import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsEditSkuParam;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsFilterParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsFilterParam
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
import
com.liquidnet.service.goblin.service.manage.IGoblinstoreMgtGoodsService
;
import
com.liquidnet.service.goblin.service.manage.IGoblinstoreMgtGoodsService
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -34,6 +38,8 @@ import javax.validation.constraints.NotBlank;
...
@@ -34,6 +38,8 @@ import javax.validation.constraints.NotBlank;
public
class
GoblinStoreMgtGoodsController
{
public
class
GoblinStoreMgtGoodsController
{
@Autowired
@Autowired
IGoblinstoreMgtGoodsService
goblinstoreMgtGoodsService
;
IGoblinstoreMgtGoodsService
goblinstoreMgtGoodsService
;
@Autowired
GoblinRedisUtils
goblinRedisUtils
;
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
1
)
@ApiOperation
(
value
=
"SPU列表"
)
@ApiOperation
(
value
=
"SPU列表"
)
...
@@ -45,7 +51,7 @@ public class GoblinStoreMgtGoodsController {
...
@@ -45,7 +51,7 @@ public class GoblinStoreMgtGoodsController {
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsList
(
storeMgtGoodsFilterParam
));
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsList
(
storeMgtGoodsFilterParam
));
}
}
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
2
)
@ApiOperation
(
value
=
"SPU导出"
)
@ApiOperation
(
value
=
"SPU导出"
)
@PostMapping
(
"export"
)
@PostMapping
(
"export"
)
public
void
export
(
@Valid
@RequestBody
GoblinStoreMgtGoodsFilterParam
storeMgtGoodsFilterParam
)
{
public
void
export
(
@Valid
@RequestBody
GoblinStoreMgtGoodsFilterParam
storeMgtGoodsFilterParam
)
{
...
@@ -56,9 +62,35 @@ public class GoblinStoreMgtGoodsController {
...
@@ -56,9 +62,35 @@ public class GoblinStoreMgtGoodsController {
// TODO: 2021/12/28 zhanggb
// TODO: 2021/12/28 zhanggb
}
}
@ApiOperationSupport
(
order
=
2
)
@ApiOperationSupport
(
order
=
3
)
@ApiOperation
(
value
=
"SPU管理"
)
@PostMapping
(
"operate"
)
public
ResponseDto
<
Object
>
action
(
@Valid
@RequestBody
GoblinStoreMgtGoodsActionParam
storeMgtGoodsActionParam
)
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:管理SPU:[GoblinStoreMgtGoodsActionParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsActionParam
));
}
// TODO: 2021/12/28 zhanggb 逻辑校验
switch
(
storeMgtGoodsActionParam
.
getAction
())
{
case
"ONSHELVES"
:
goblinstoreMgtGoodsService
.
goodsOnshelves
(
storeMgtGoodsActionParam
);
break
;
case
"UNSHELVE"
:
goblinstoreMgtGoodsService
.
goodsUnshelves
(
storeMgtGoodsActionParam
);
break
;
case
"REMOVE"
:
goblinstoreMgtGoodsService
.
goodsRemove
(
storeMgtGoodsActionParam
);
break
;
default
:
log
.
warn
(
"Invalid operation[action={}]"
,
storeMgtGoodsActionParam
.
getAction
());
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149001"
));
}
return
ResponseDto
.
success
();
}
@ApiOperationSupport
(
order
=
4
)
@ApiOperation
(
value
=
"SPU添加"
)
@ApiOperation
(
value
=
"SPU添加"
)
@P
os
tMapping
(
"add"
)
@P
u
tMapping
(
"add"
)
public
ResponseDto
<
Object
>
add
(
@Valid
@RequestBody
GoblinStoreMgtGoodsAddParam
storeMgtGoodsAddParam
)
{
public
ResponseDto
<
Object
>
add
(
@Valid
@RequestBody
GoblinStoreMgtGoodsAddParam
storeMgtGoodsAddParam
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:添加SPU:[GoblinStoreMgtGoodsAddParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsAddParam
));
log
.
debug
(
"商品管理:添加SPU:[GoblinStoreMgtGoodsAddParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsAddParam
));
...
@@ -67,7 +99,7 @@ public class GoblinStoreMgtGoodsController {
...
@@ -67,7 +99,7 @@ public class GoblinStoreMgtGoodsController {
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
}
@ApiOperationSupport
(
order
=
3
)
@ApiOperationSupport
(
order
=
5
)
@ApiOperation
(
value
=
"SPU详情"
)
@ApiOperation
(
value
=
"SPU详情"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"商品ID"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"商品ID"
),
...
@@ -77,37 +109,79 @@ public class GoblinStoreMgtGoodsController {
...
@@ -77,37 +109,79 @@ public class GoblinStoreMgtGoodsController {
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:SPU详情:[spuId={}]"
,
spuId
);
log
.
debug
(
"商品管理:SPU详情:[spuId={}]"
,
spuId
);
}
}
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsInfo
(
spuId
));
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsInfo
(
spuId
));
}
}
@ApiOperationSupport
(
order
=
4
)
@ApiOperationSupport
(
order
=
6
)
@ApiOperation
(
value
=
"商品编辑:SPU编辑"
)
@ApiOperation
(
value
=
"商品编辑:SPU编辑"
,
notes
=
"只修改商品信息,不包含规格相关信息"
)
@PostMapping
(
"edit_spu"
)
@PostMapping
(
"edit_spu"
)
public
ResponseDto
<
Object
>
editSpu
(
@Valid
@RequestBody
GoblinStoreMgtGoodsAddParam
storeMgtGoodsAddParam
)
{
public
ResponseDto
<
Object
>
editSpu
(
@Valid
@RequestBody
GoblinStoreMgtGoodsAddParam
storeMgtGoodsAddParam
)
{
if
(
StringUtils
.
isBlank
(
storeMgtGoodsAddParam
.
getStoreId
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149002"
));
}
if
(
StringUtils
.
isBlank
(
storeMgtGoodsAddParam
.
getSpuId
())
||
null
==
goblinRedisUtils
.
getGoodsInfoVo
(
storeMgtGoodsAddParam
.
getSpuId
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149010"
));
}
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:商品编辑:编辑SPU:[GoblinStoreMgtGoodsAddParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsAddParam
));
log
.
debug
(
"商品管理:商品编辑:编辑SPU:[GoblinStoreMgtGoodsAddParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsAddParam
));
}
}
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsEditSpu
(
storeMgtGoodsAddParam
));
goblinstoreMgtGoodsService
.
goodsEditSpu
(
storeMgtGoodsAddParam
);
return
ResponseDto
.
success
();
}
}
@ApiOperationSupport
(
order
=
5
)
@ApiOperationSupport
(
order
=
7
)
@ApiOperation
(
value
=
"商品编辑:SKU编辑"
)
@ApiOperation
(
value
=
"商品编辑:SKU编辑"
,
notes
=
"只修改单品信息,不包含商品信息"
)
@PostMapping
(
"edit_sku"
)
@PostMapping
(
"edit_sku"
)
public
ResponseDto
<
Object
>
editSku
(
@Valid
@RequestBody
GoblinStoreMgtGoodsEditSkuParam
storeMgtGoodsEditSkuParam
)
{
public
ResponseDto
<
Object
>
editSku
(
@Valid
@RequestBody
GoblinStoreMgtGoodsEditSkuParam
storeMgtGoodsEditSkuParam
)
{
if
(
StringUtils
.
isBlank
(
storeMgtGoodsEditSkuParam
.
getStoreId
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149002"
));
}
GoblinGoodsSkuInfoVo
goodsSkuInfoVo
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
storeMgtGoodsEditSkuParam
.
getSkuId
());
if
(
StringUtils
.
isBlank
(
storeMgtGoodsEditSkuParam
.
getSkuId
())
||
null
==
goodsSkuInfoVo
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149011"
));
}
GoblinGoodsInfoVo
goodsInfoVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
goodsSkuInfoVo
.
getSpuId
());
// TODO: 2022/1/5 zhanggb +分类-ISBN校验
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:商品编辑:编辑SKU:[GoblinStoreMgtGoodsEditSkuParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsEditSkuParam
));
log
.
debug
(
"商品管理:商品编辑:编辑SKU:[GoblinStoreMgtGoodsEditSkuParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsEditSkuParam
));
}
}
String
skuId
=
storeMgtGoodsEditSkuParam
.
getSkuId
();
Integer
operStock
=
storeMgtGoodsEditSkuParam
.
getOperStock
();
if
(
null
!=
operStock
&&
operStock
!=
0
)
{
// 处理库存
int
operStockVal
=
Math
.
abs
(
operStock
);
Integer
skuStock
=
goodsSkuInfoVo
.
getSkuStock
();
// SKU总库存
goblinstoreMgtGoodsService
.
goodsEditSku
(
storeMgtGoodsEditSkuParam
);
int
rtSkuStock
=
goblinRedisUtils
.
getSkuStock
(
null
,
skuId
);
// 当前剩余库存
return
ResponseDto
.
success
();
if
(
operStock
<
0
&&
rtSkuStock
>=
operStockVal
)
{
// SKU实时库存充足时允许扣减
if
(
goblinRedisUtils
.
decrSkuStock
(
null
,
skuId
,
operStockVal
)
<
0
)
{
// 过程中库存不足时,回滚库存,编辑无效
goblinRedisUtils
.
incrSkuStock
(
null
,
skuId
,
operStockVal
);
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149012"
));
}
else
{
storeMgtGoodsEditSkuParam
.
setSkuStock
(
skuStock
-
operStockVal
);
}
}
else
if
(
operStock
>
0
)
{
// 增加
goblinRedisUtils
.
incrSkuStock
(
null
,
skuId
,
operStockVal
);
storeMgtGoodsEditSkuParam
.
setSkuStock
(
skuStock
+
operStockVal
);
}
}
if
(
goblinstoreMgtGoodsService
.
goodsEditSku
(
storeMgtGoodsEditSkuParam
))
{
return
ResponseDto
.
success
(
goblinRedisUtils
.
getGoodsSkuInfoVo
(
storeMgtGoodsEditSkuParam
.
getSkuId
()));
}
else
{
if
(
null
!=
operStock
&&
operStock
!=
0
)
{
// 处理库存:回滚
int
operStockVal
=
Math
.
abs
(
operStock
);
if
(
operStock
>
0
)
{
// 增加的减回去
goblinRedisUtils
.
decrSkuStock
(
null
,
skuId
,
operStockVal
);
}
else
{
// 扣减的加回去
goblinRedisUtils
.
incrSkuStock
(
null
,
skuId
,
operStockVal
);
}
}
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149013"
));
}
}
}
@ApiOperationSupport
(
order
=
6
)
@ApiOperationSupport
(
order
=
8
)
@ApiOperation
(
value
=
"商品编辑:SKU添加"
)
@ApiOperation
(
value
=
"商品编辑:SKU添加"
)
@P
os
tMapping
(
"edit_sku/add"
)
@P
u
tMapping
(
"edit_sku/add"
)
public
ResponseDto
<
Object
>
editSkuAdd
(
@Valid
@RequestBody
GoblinStoreMgtGoodsEditSkuParam
storeMgtGoodsEditSkuParam
)
{
public
ResponseDto
<
Object
>
editSkuAdd
(
@Valid
@RequestBody
GoblinStoreMgtGoodsEditSkuParam
storeMgtGoodsEditSkuParam
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:商品编辑:编辑SKU:[GoblinStoreMgtGoodsEditSkuParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsEditSkuParam
));
log
.
debug
(
"商品管理:商品编辑:编辑SKU:[GoblinStoreMgtGoodsEditSkuParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsEditSkuParam
));
...
@@ -117,7 +191,7 @@ public class GoblinStoreMgtGoodsController {
...
@@ -117,7 +191,7 @@ public class GoblinStoreMgtGoodsController {
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
}
@ApiOperationSupport
(
order
=
8
)
@ApiOperationSupport
(
order
=
9
)
@ApiOperation
(
value
=
"商品编辑:SKU删除"
)
@ApiOperation
(
value
=
"商品编辑:SKU删除"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"店铺ID"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"店铺ID"
),
...
@@ -129,7 +203,7 @@ public class GoblinStoreMgtGoodsController {
...
@@ -129,7 +203,7 @@ public class GoblinStoreMgtGoodsController {
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsEditSkuDel
(
skuId
));
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsEditSkuDel
(
skuId
));
}
}
@ApiOperationSupport
(
order
=
9
)
@ApiOperationSupport
(
order
=
10
)
@ApiOperation
(
value
=
"商品编辑:SKU批改"
)
@ApiOperation
(
value
=
"商品编辑:SKU批改"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"店铺ID"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"店铺ID"
),
...
@@ -144,30 +218,4 @@ public class GoblinStoreMgtGoodsController {
...
@@ -144,30 +218,4 @@ public class GoblinStoreMgtGoodsController {
@NotBlank
(
message
=
"批量修改属性值不能为空"
)
String
batFieldVal
)
{
@NotBlank
(
message
=
"批量修改属性值不能为空"
)
String
batFieldVal
)
{
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsEditSkuBat
(
spuId
,
batField
,
batFieldVal
));
return
ResponseDto
.
success
(
goblinstoreMgtGoodsService
.
goodsEditSkuBat
(
spuId
,
batField
,
batFieldVal
));
}
}
@ApiOperationSupport
(
order
=
10
)
@ApiOperation
(
value
=
"SPU管理"
)
@PostMapping
(
"operate"
)
public
ResponseDto
<
Object
>
action
(
@Valid
@RequestBody
GoblinStoreMgtGoodsActionParam
storeMgtGoodsActionParam
)
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"商品管理:管理SPU:[GoblinStoreMgtGoodsActionParam={}]"
,
JsonUtils
.
toJson
(
storeMgtGoodsActionParam
));
}
// TODO: 2021/12/28 zhanggb 逻辑校验
switch
(
storeMgtGoodsActionParam
.
getAction
())
{
case
"ONSHELVES"
:
goblinstoreMgtGoodsService
.
goodsOnshelves
(
storeMgtGoodsActionParam
);
break
;
case
"UNSHELVE"
:
goblinstoreMgtGoodsService
.
goodsUnshelves
(
storeMgtGoodsActionParam
);
break
;
case
"REMOVE"
:
goblinstoreMgtGoodsService
.
goodsRemove
(
storeMgtGoodsActionParam
);
break
;
default
:
log
.
warn
(
"Invalid operation[action={}]"
,
storeMgtGoodsActionParam
.
getAction
());
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/manage/GoblinStoreMgtGoodsServiceImpl.java
View file @
3ab04b87
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.goblin.service.impl.manage;
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.goblin.service.impl.manage;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsActionParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsActionParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsAddParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsAddParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsEditSkuParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsEditSkuParam
;
...
@@ -73,7 +74,6 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -73,7 +74,6 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
}
}
vo
.
setTagVoList
(
goodsTagVoList
);
vo
.
setTagVoList
(
goodsTagVoList
);
}
}
if
(!
goodsExtagIsEmpty
)
{
if
(!
goodsExtagIsEmpty
)
{
List
<
GoblinGoodsExtagVo
>
goodsExtagVoList
=
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
();
List
<
GoblinGoodsExtagVo
>
goodsExtagVoList
=
ObjectUtil
.
getGoblinGoodsExtagVoArrayList
();
for
(
int
i
=
0
;
i
<
tagIdList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
tagIdList
.
size
();
i
++)
{
...
@@ -113,13 +113,25 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -113,13 +113,25 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
}
}
@Override
@Override
public
void
goodsEditSpu
(
GoblinStoreMgtGoodsAddParam
storeMgtGoodsAddParam
)
{
public
boolean
goodsEditSpu
(
GoblinStoreMgtGoodsAddParam
storeMgtGoodsAddParam
)
{
// TODO: 2021/12/28 zhanggb
GoblinGoodsInfoVo
editGoodsSkuInfoVo
=
storeMgtGoodsAddParam
.
initEditGoodsSkuInfoVo
();
if
(
goblinMongoUtils
.
updateGoodsInfoVo
(
editGoodsSkuInfoVo
))
{
// TODO: 2022/1/5 zhanggb redis+sql
return
true
;
}
return
false
;
}
}
@Override
@Override
public
void
goodsEditSku
(
GoblinStoreMgtGoodsEditSkuParam
storeMgtGoodsEditSkuParam
)
{
public
boolean
goodsEditSku
(
GoblinStoreMgtGoodsEditSkuParam
storeMgtGoodsEditSkuParam
)
{
// TODO: 2022/1/5 zhanggb
GoblinGoodsSkuInfoVo
editGoodsSkuInfoVo
=
storeMgtGoodsEditSkuParam
.
initEditGoodsSkuInfoVo
();
if
(
goblinMongoUtils
.
updateGoodsSkuInfoVo
(
editGoodsSkuInfoVo
))
{
// TODO: 2022/1/5 zhanggb redis+sql
return
true
;
}
return
false
;
}
}
@Override
@Override
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/ObjectUtil.java
View file @
3ab04b87
package
com
.
liquidnet
.
service
.
goblin
.
util
;
package
com
.
liquidnet
.
service
.
goblin
.
util
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.base.PagedResult
;
import
com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtThumbVo
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtThumbVo
;
import
com.liquidnet.service.goblin.dto.vo.*
;
import
com.liquidnet.service.goblin.dto.vo.*
;
...
@@ -23,6 +24,7 @@ public class ObjectUtil {
...
@@ -23,6 +24,7 @@ public class ObjectUtil {
private
static
final
ArrayList
<
GoblinSelfTagVo
>
goblinSelfTagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinSelfTagVo
>
goblinSelfTagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsTagVo
>
goblinGoodsTagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsTagVo
>
goblinGoodsTagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsExtagVo
>
goblinGoodsExtagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsExtagVo
>
goblinGoodsExtagVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinGoodsSpecDto
>
goblinGoodsSpecDtoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMarketSpuListVo
>
goblinMarketSpuListVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinMarketSpuListVo
>
goblinMarketSpuListVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinStorePurchaseSkuVo
>
goblinStorePurchaseSkuVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinStorePurchaseSkuVo
>
goblinStorePurchaseSkuVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinSelfZhengzaiSkuVo
>
goblinSelfZhengzaiSkuVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
GoblinSelfZhengzaiSkuVo
>
goblinSelfZhengzaiSkuVoArrayList
=
new
ArrayList
<>();
...
@@ -83,6 +85,10 @@ public class ObjectUtil {
...
@@ -83,6 +85,10 @@ public class ObjectUtil {
return
(
ArrayList
<
GoblinGoodsExtagVo
>)
goblinGoodsExtagVoArrayList
.
clone
();
return
(
ArrayList
<
GoblinGoodsExtagVo
>)
goblinGoodsExtagVoArrayList
.
clone
();
}
}
public
static
ArrayList
<
GoblinGoodsSpecDto
>
getGoblinGoodsSpecDtoArrayList
()
{
return
(
ArrayList
<
GoblinGoodsSpecDto
>)
goblinGoodsSpecDtoArrayList
.
clone
();
}
public
static
ArrayList
<
GoblinMarketSpuListVo
>
getGoblinMarketSpuListVoArrayList
()
{
public
static
ArrayList
<
GoblinMarketSpuListVo
>
getGoblinMarketSpuListVoArrayList
()
{
return
(
ArrayList
<
GoblinMarketSpuListVo
>)
goblinMarketSpuListVoArrayList
.
clone
();
return
(
ArrayList
<
GoblinMarketSpuListVo
>)
goblinMarketSpuListVoArrayList
.
clone
();
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/resources/errors.properties
View file @
3ab04b87
...
@@ -25,6 +25,9 @@
...
@@ -25,6 +25,9 @@
149008
=
149008
=
149009
=
149009
=
149010
=
商品不存在,请核实
149010
=
商品不存在,请核实
149011
=
SKU不存在,请核实
149012
=
SKU库存不足,请核实
149013
=
SKU编辑失败
...
...
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