Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
f603ca62
Commit
f603ca62
authored
Apr 26, 2018
by
zhh
Browse files
注释信息完善
parent
a41633a9
Changes
112
Hide whitespace changes
Inline
Side-by-side
mall-admin/src/main/java/com/macro/mall/dto/CommonResult.java
View file @
f603ca62
...
...
@@ -10,6 +10,7 @@ import java.util.Map;
/**
* 通用返回对象
* Created by macro on 2018/4/26.
*/
public
class
CommonResult
{
//操作成功
...
...
mall-admin/src/main/java/com/macro/mall/dto/PmsBrandParam.java
View file @
f603ca62
...
...
@@ -10,6 +10,7 @@ import javax.validation.constraints.NotNull;
/**
* 品牌传递参数
* Created by macro on 2018/4/26.
*/
public
class
PmsBrandParam
{
@ApiModelProperty
(
value
=
"品牌名称"
,
required
=
true
)
...
...
mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeParam.java
View file @
f603ca62
...
...
@@ -6,6 +6,7 @@ import org.hibernate.validator.constraints.NotEmpty;
/**
* 商品属性参数
* Created by macro on 2018/4/26.
*/
public
class
PmsProductAttributeParam
{
@ApiModelProperty
(
"属性分类ID"
)
...
...
mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryParam.java
View file @
f603ca62
...
...
@@ -8,6 +8,7 @@ import javax.validation.constraints.Min;
/**
* 添加更新产品分类的参数
* Created by macro on 2018/4/26.
*/
public
class
PmsProductCategoryParam
{
@ApiModelProperty
(
"父分类的编号"
)
...
...
mall-admin/src/main/java/com/macro/mall/dto/PmsProductParam.java
View file @
f603ca62
...
...
@@ -8,6 +8,7 @@ import java.util.List;
/**
* 创建和修改商品时使用的参数
* Created by macro on 2018/4/26.
*/
public
class
PmsProductParam
{
@ApiModelProperty
(
"商品信息"
)
...
...
mall-admin/src/main/java/com/macro/mall/dto/UmsAdminLoginParam.java
View file @
f603ca62
...
...
@@ -5,6 +5,7 @@ import org.hibernate.validator.constraints.NotEmpty;
/**
* 用户登录参数
* Created by macro on 2018/4/26.
*/
public
class
UmsAdminLoginParam
{
@ApiModelProperty
(
value
=
"用户名"
,
required
=
true
)
...
...
mall-admin/src/main/java/com/macro/mall/dto/UmsAdminParam.java
View file @
f603ca62
...
...
@@ -6,6 +6,7 @@ import org.hibernate.validator.constraints.NotEmpty;
/**
* 用户登录参数
* Created by macro on 2018/4/26.
*/
public
class
UmsAdminParam
{
@ApiModelProperty
(
value
=
"用户名"
,
required
=
true
)
...
...
mall-admin/src/main/java/com/macro/mall/service/PmsBrandService.java
View file @
f603ca62
...
...
@@ -7,6 +7,7 @@ import java.util.List;
/**
* 商品品牌Service
* Created by macro on 2018/4/26.
*/
public
interface
PmsBrandService
{
List
<
PmsBrand
>
listAllBrand
();
...
...
mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeCategoryService.java
View file @
f603ca62
...
...
@@ -6,6 +6,7 @@ import java.util.List;
/**
* 商品属性分类Service
* Created by macro on 2018/4/26.
*/
public
interface
PmsProductAttributeCategoryService
{
int
create
(
String
name
);
...
...
mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeService.java
View file @
f603ca62
...
...
@@ -7,6 +7,7 @@ import java.util.List;
/**
* 商品属性Service
* Created by macro on 2018/4/26.
*/
public
interface
PmsProductAttributeService
{
/**
...
...
mall-admin/src/main/java/com/macro/mall/service/PmsProductCategoryService.java
View file @
f603ca62
...
...
@@ -7,6 +7,7 @@ import java.util.List;
/**
* 产品分类Service
* Created by macro on 2018/4/26.
*/
public
interface
PmsProductCategoryService
{
int
create
(
PmsProductCategoryParam
pmsProductCategoryParam
);
...
...
mall-admin/src/main/java/com/macro/mall/service/PmsProductService.java
View file @
f603ca62
...
...
@@ -4,6 +4,7 @@ import com.macro.mall.dto.PmsProductParam;
/**
* 商品管理Service
* Created by macro on 2018/4/26.
*/
public
interface
PmsProductService
{
/**
...
...
mall-admin/src/main/java/com/macro/mall/service/UmsAdminService.java
View file @
f603ca62
...
...
@@ -5,6 +5,7 @@ import com.macro.mall.model.UmsAdmin;
/**
* 后台管理员Service
* Created by macro on 2018/4/26.
*/
public
interface
UmsAdminService
{
/**
...
...
mall-admin/src/main/java/com/macro/mall/service/UmsMemberLevelService.java
View file @
f603ca62
...
...
@@ -6,6 +6,7 @@ import java.util.List;
/**
* 会员等级管理Service
* Created by macro on 2018/4/26.
*/
public
interface
UmsMemberLevelService
{
/**
...
...
mall-admin/src/main/java/com/macro/mall/service/impl/PmsBrandServiceImpl.java
View file @
f603ca62
...
...
@@ -15,6 +15,7 @@ import java.util.List;
/**
* 商品品牌Service实现类
* Created by macro on 2018/4/26.
*/
@Service
public
class
PmsBrandServiceImpl
implements
PmsBrandService
{
...
...
mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeCategoryServiceImpl.java
View file @
f603ca62
...
...
@@ -12,6 +12,7 @@ import java.util.List;
/**
* PmsProductAttributeCategoryService实现类
* Created by macro on 2018/4/26.
*/
@Service
public
class
PmsProductAttributeCategoryServiceImpl
implements
PmsProductAttributeCategoryService
{
...
...
mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeServiceImpl.java
View file @
f603ca62
...
...
@@ -14,6 +14,7 @@ import java.util.List;
/**
* 商品属性Service实现类
* Created by macro on 2018/4/26.
*/
@Service
public
class
PmsProductAttributeServiceImpl
implements
PmsProductAttributeService
{
...
...
mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductCategoryServiceImpl.java
View file @
f603ca62
...
...
@@ -14,6 +14,7 @@ import java.util.List;
/**
* PmsProductCategoryService实现类
* Created by macro on 2018/4/26.
*/
@Service
public
class
PmsProductCategoryServiceImpl
implements
PmsProductCategoryService
{
...
...
mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductServiceImpl.java
View file @
f603ca62
...
...
@@ -20,7 +20,7 @@ import java.util.List;
* 商品管理Service实现类
*/
@Service
public
class
PmsProductServiceImpl
implements
PmsProductService
{
public
class
PmsProductServiceImpl
implements
PmsProductService
{
@Autowired
private
PmsProductMapper
productMapper
;
@Autowired
...
...
@@ -29,6 +29,7 @@ public class PmsProductServiceImpl implements PmsProductService{
private
PmsProductLadderDao
productLadderDao
;
@Autowired
private
PmsProductFullReductionDao
productFullReductionDao
;
@Override
public
int
create
(
PmsProductParam
productParam
)
{
int
count
;
...
...
@@ -38,43 +39,39 @@ public class PmsProductServiceImpl implements PmsProductService{
productMapper
.
insertSelective
(
product
);
//根据促销类型设置价格:、阶梯价格、满减价格
Long
productId
=
product
.
getId
();
if
(
product
.
getPromotionType
()==
2
){
//会员价格
List
<
PmsMemberPrice
>
memberPriceList
=
productParam
.
getPmsMemberPriceList
();
if
(!
CollectionUtils
.
isEmpty
(
memberPriceList
)){
for
(
PmsMemberPrice
pmsMemberPrice:
memberPriceList
){
pmsMemberPrice
.
setId
(
null
);
pmsMemberPrice
.
setProductId
(
productId
);
}
memberPriceDao
.
insertList
(
memberPriceList
);
//会员价格
List
<
PmsMemberPrice
>
memberPriceList
=
productParam
.
getPmsMemberPriceList
();
if
(!
CollectionUtils
.
isEmpty
(
memberPriceList
))
{
for
(
PmsMemberPrice
pmsMemberPrice
:
memberPriceList
)
{
pmsMemberPrice
.
setId
(
null
);
pmsMemberPrice
.
setProductId
(
productId
);
}
}
else
if
(
product
.
getPromotionType
()==
3
){
//阶梯价格
List
<
PmsProductLadder
>
productLadderList
=
productParam
.
getProductLadderList
();
if
(!
CollectionUtils
.
isEmpty
(
productLadderList
)){
for
(
PmsProductLadder
productLadder:
productLadderList
){
productLadder
.
setId
(
null
);
productLadder
.
setProductId
(
productId
);
}
productLadderDao
.
insertList
(
productLadderList
);
memberPriceDao
.
insertList
(
memberPriceList
);
}
//阶梯价格
List
<
PmsProductLadder
>
productLadderList
=
productParam
.
getProductLadderList
();
if
(!
CollectionUtils
.
isEmpty
(
productLadderList
))
{
for
(
PmsProductLadder
productLadder
:
productLadderList
)
{
productLadder
.
setId
(
null
);
productLadder
.
setProductId
(
productId
);
}
}
else
if
(
product
.
getPromotionType
()==
4
){
//满减价格
List
<
PmsProductFullReduction
>
productFullReductionList
=
productParam
.
getPmsProductFullReductionList
();
if
(!
CollectionUtils
.
isEmpty
(
productFullReductionList
)){
for
(
PmsProductFullReduction
productFullReduction:
productFullReductionList
)
{
productFullReduction
.
setId
(
null
);
productFullReduction
.
setProductId
(
productId
);
}
productFullReductionDao
.
insertList
(
productFullReductionList
);
productLadderDao
.
insertList
(
productLadderList
);
}
//满减价格
List
<
PmsProductFullReduction
>
productFullReductionList
=
productParam
.
getPmsProductFullReductionList
();
if
(!
CollectionUtils
.
isEmpty
(
productFullReductionList
))
{
for
(
PmsProductFullReduction
productFullReduction
:
productFullReductionList
)
{
productFullReduction
.
setId
(
null
);
productFullReduction
.
setProductId
(
productId
);
}
productFullReductionDao
.
insertList
(
productFullReductionList
);
}
//添加sku库存信息
//添加商品参数
//添加自定义商品规格
//关联专题
//关联优选
count
=
1
;
count
=
1
;
return
count
;
}
}
mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java
View file @
f603ca62
...
...
@@ -25,6 +25,7 @@ import java.util.List;
/**
* UmsAdminService实现类
* Created by macro on 2018/4/26.
*/
@Service
public
class
UmsAdminServiceImpl
implements
UmsAdminService
{
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Supports
Markdown
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