Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
4fbc758a
提交
4fbc758a
authored
8月 17, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除
上级
8cfdb013
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
64 行增加
和
19 行删除
+64
-19
ResultEnum.java
src/main/java/com/mmc/pms/common/ResultEnum.java
+3
-1
BrandManageController.java
...in/java/com/mmc/pms/controller/BrandManageController.java
+7
-2
BrandManageDao.java
src/main/java/com/mmc/pms/dao/BrandManageDao.java
+4
-0
ProductDao.java
src/main/java/com/mmc/pms/dao/ProductDao.java
+2
-2
ProductAttributeDao.java
...in/java/com/mmc/pms/dao/category/ProductAttributeDao.java
+1
-0
BrandManageService.java
src/main/java/com/mmc/pms/service/BrandManageService.java
+2
-0
ProductAttributeServiceImpl.java
...ms/service/category/impl/ProductAttributeServiceImpl.java
+5
-0
BrandManageServiceImpl.java
...java/com/mmc/pms/service/impl/BrandManageServiceImpl.java
+11
-2
BrandManageDao.xml
src/main/resources/mapper/BrandManageDao.xml
+12
-0
ProductDao.xml
src/main/resources/mapper/ProductDao.xml
+11
-12
ProductAttributeDao.xml
src/main/resources/mapper/category/ ProductAttributeDao.xml
+6
-0
没有找到文件。
src/main/java/com/mmc/pms/common/ResultEnum.java
浏览文件 @
4fbc758a
...
@@ -346,7 +346,9 @@ public enum ResultEnum implements BaseErrorInfoInterface {
...
@@ -346,7 +346,9 @@ public enum ResultEnum implements BaseErrorInfoInterface {
GOODS_NOT_EXIST_OR_ALREADY_DOWN_SHELF
(
"30913"
,
"商品不存在或已下架"
),
GOODS_NOT_EXIST_OR_ALREADY_DOWN_SHELF
(
"30913"
,
"商品不存在或已下架"
),
GOODS_NAME_IS_NOT_NULL
(
"30914"
,
"商品名称不能为空或名字长度不能大于60"
),
GOODS_NAME_IS_NOT_NULL
(
"30914"
,
"商品名称不能为空或名字长度不能大于60"
),
GOODS_DELETE_FAIL
(
"30915"
,
"批量删除商品失败,商品已被其他商品绑定"
),
GOODS_DELETE_FAIL
(
"30915"
,
"批量删除商品失败,商品已被其他商品绑定"
),
BRAND_DELETE_FAIL
(
"30916"
,
"删除失败,产品管理中有产品绑定该品牌名称"
),
BRAND_DELETE_FAIL
(
"30916"
,
"删除失败,有产品绑定该品牌"
),
TYPE_DELETE_FAIL
(
"30917"
,
"删除失败,有产品绑定该类型"
),
DEVICE_MODE_DELETE_FAIL
(
"30918"
,
"删除失败,有产品绑定该型号"
),
// 返祖
// 返祖
RETURN_SHARE_ORDER_ERROR
(
"40000"
,
"设备返祖订单相关信息找不到,请重新输入订单号"
),
RETURN_SHARE_ORDER_ERROR
(
"40000"
,
"设备返祖订单相关信息找不到,请重新输入订单号"
),
RETURN_SHARE_ORDER_NOT_FINISH_ERROR
(
"40001"
,
"此设备的订单未完成,请添加其他设备"
),
RETURN_SHARE_ORDER_NOT_FINISH_ERROR
(
"40001"
,
"此设备的订单未完成,请添加其他设备"
),
...
...
src/main/java/com/mmc/pms/controller/BrandManageController.java
浏览文件 @
4fbc758a
...
@@ -36,7 +36,7 @@ public class BrandManageController {
...
@@ -36,7 +36,7 @@ public class BrandManageController {
return
ResultBody
.
success
(
brandManageService
.
listBrandInfo
(
pageNo
,
pageSize
));
return
ResultBody
.
success
(
brandManageService
.
listBrandInfo
(
pageNo
,
pageSize
));
}
}
@ApiOperation
(
value
=
"删除品牌
---待与运营沟通
"
)
@ApiOperation
(
value
=
"删除品牌"
)
@GetMapping
(
"deleteBrandInfo"
)
@GetMapping
(
"deleteBrandInfo"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
public
ResultBody
deleteBrandInfo
(
Integer
id
)
{
public
ResultBody
deleteBrandInfo
(
Integer
id
)
{
...
@@ -71,5 +71,10 @@ public class BrandManageController {
...
@@ -71,5 +71,10 @@ public class BrandManageController {
return
brandManageService
.
editMode
(
param
);
return
brandManageService
.
editMode
(
param
);
}
}
@ApiOperation
(
value
=
"删除型号"
)
@GetMapping
(
"deleteMode"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
public
ResultBody
deleteMode
(
Integer
id
)
{
return
brandManageService
.
deleteMode
(
id
);
}
}
}
src/main/java/com/mmc/pms/dao/BrandManageDao.java
浏览文件 @
4fbc758a
...
@@ -77,6 +77,8 @@ public interface BrandManageDao {
...
@@ -77,6 +77,8 @@ public interface BrandManageDao {
int
countModeInfoByName
(
ModeInfoVO
param
);
int
countModeInfoByName
(
ModeInfoVO
param
);
int
countLeaseGoodsByDeviceModeId
(
Integer
id
);
void
insertModeInfo
(
DeviceModeDO
modeInfoDO
);
void
insertModeInfo
(
DeviceModeDO
modeInfoDO
);
int
countModeInfo
(
ModeInfoQO
param
);
int
countModeInfo
(
ModeInfoQO
param
);
...
@@ -86,4 +88,6 @@ public interface BrandManageDao {
...
@@ -86,4 +88,6 @@ public interface BrandManageDao {
void
updateModeInfo
(
DeviceModeDO
modeInfoDO
);
void
updateModeInfo
(
DeviceModeDO
modeInfoDO
);
List
<
DeviceModeDO
>
listDeviceModeByBrandId
(
List
<
Integer
>
ids
);
List
<
DeviceModeDO
>
listDeviceModeByBrandId
(
List
<
Integer
>
ids
);
void
removeModeInfoById
(
Integer
id
);
}
}
src/main/java/com/mmc/pms/dao/ProductDao.java
浏览文件 @
4fbc758a
...
@@ -76,8 +76,6 @@ public interface ProductDao {
...
@@ -76,8 +76,6 @@ public interface ProductDao {
void
batchUpdateMallProdSpec
(
List
<
Integer
>
delProductSpecId
);
void
batchUpdateMallProdSpec
(
List
<
Integer
>
delProductSpecId
);
int
countProductSpecByBrandId
(
Integer
id
);
void
removeProductSku
(
Integer
id
);
void
removeProductSku
(
Integer
id
);
void
removeProductSpec
(
Integer
id
);
void
removeProductSpec
(
Integer
id
);
...
@@ -123,4 +121,6 @@ public interface ProductDao {
...
@@ -123,4 +121,6 @@ public interface ProductDao {
int
countSpecByProdSkuId
(
Integer
id
);
int
countSpecByProdSkuId
(
Integer
id
);
BigDecimal
getMarketplacePrice
(
PriceAcquisition
priceAcquisition
);
BigDecimal
getMarketplacePrice
(
PriceAcquisition
priceAcquisition
);
int
countLeaseGoodsByBrandId
(
Integer
id
);
}
}
src/main/java/com/mmc/pms/dao/category/ProductAttributeDao.java
浏览文件 @
4fbc758a
...
@@ -30,4 +30,5 @@ public interface ProductAttributeDao {
...
@@ -30,4 +30,5 @@ public interface ProductAttributeDao {
int
updateProductAttribute
(
Integer
id
,
Date
createTime
);
int
updateProductAttribute
(
Integer
id
,
Date
createTime
);
int
countLeaseGoodsByTypeId
(
Integer
id
);
}
}
src/main/java/com/mmc/pms/service/BrandManageService.java
浏览文件 @
4fbc758a
...
@@ -54,4 +54,6 @@ public interface BrandManageService {
...
@@ -54,4 +54,6 @@ public interface BrandManageService {
PageResult
modeList
(
ModeInfoQO
param
);
PageResult
modeList
(
ModeInfoQO
param
);
ResultBody
editMode
(
ModeInfoVO
param
);
ResultBody
editMode
(
ModeInfoVO
param
);
ResultBody
deleteMode
(
Integer
id
);
}
}
src/main/java/com/mmc/pms/service/category/impl/ProductAttributeServiceImpl.java
浏览文件 @
4fbc758a
...
@@ -47,6 +47,11 @@ public class ProductAttributeServiceImpl implements ProductAttributeService {
...
@@ -47,6 +47,11 @@ public class ProductAttributeServiceImpl implements ProductAttributeService {
@Override
@Override
public
ResultBody
removeType
(
Integer
id
)
{
public
ResultBody
removeType
(
Integer
id
)
{
// 判断该类型是否绑定产品信息
int
count
=
productAttributeDao
.
countLeaseGoodsByTypeId
(
id
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
TYPE_DELETE_FAIL
);
}
productAttributeDao
.
removeType
(
id
);
productAttributeDao
.
removeType
(
id
);
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
...
...
src/main/java/com/mmc/pms/service/impl/BrandManageServiceImpl.java
浏览文件 @
4fbc758a
...
@@ -86,7 +86,7 @@ public class BrandManageServiceImpl implements BrandManageService {
...
@@ -86,7 +86,7 @@ public class BrandManageServiceImpl implements BrandManageService {
@Override
@Override
public
ResultBody
deleteBrandInfo
(
Integer
id
)
{
public
ResultBody
deleteBrandInfo
(
Integer
id
)
{
// 判断该品牌是否绑定产品信息
// 判断该品牌是否绑定产品信息
int
count
=
productDao
.
count
ProductSpec
ByBrandId
(
id
);
int
count
=
productDao
.
count
LeaseGoods
ByBrandId
(
id
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
BRAND_DELETE_FAIL
);
return
ResultBody
.
error
(
ResultEnum
.
BRAND_DELETE_FAIL
);
}
}
...
@@ -142,5 +142,14 @@ public class BrandManageServiceImpl implements BrandManageService {
...
@@ -142,5 +142,14 @@ public class BrandManageServiceImpl implements BrandManageService {
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
@Override
public
ResultBody
deleteMode
(
Integer
id
)
{
// 判断该品牌是否绑定产品信息
int
count
=
brandManageDao
.
countLeaseGoodsByDeviceModeId
(
id
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
DEVICE_MODE_DELETE_FAIL
);
}
brandManageDao
.
removeModeInfoById
(
id
);
return
ResultBody
.
success
();
}
}
}
src/main/resources/mapper/BrandManageDao.xml
浏览文件 @
4fbc758a
...
@@ -34,6 +34,11 @@
...
@@ -34,6 +34,11 @@
tag = #{tag}
tag = #{tag}
where id = #{id}
where id = #{id}
</update>
</update>
<delete
id=
"removeModeInfoById"
>
delete
from device_mode
where id = #{id}
</delete>
<select
id=
"countBrandInfoByName"
resultType=
"java.lang.Integer"
>
<select
id=
"countBrandInfoByName"
resultType=
"java.lang.Integer"
>
select count(*)
select count(*)
...
@@ -114,4 +119,10 @@
...
@@ -114,4 +119,10 @@
#{item}
#{item}
</foreach>
)
</foreach>
)
</select>
</select>
<select
id=
"countLeaseGoodsByDeviceModeId"
resultType=
"java.lang.Integer"
>
select count(*)
from lease_goods
where device_mode_id = #{id}
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper/ProductDao.xml
浏览文件 @
4fbc758a
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<mapper
namespace=
"com.mmc.pms.dao.ProductDao"
>
<mapper
namespace=
"com.mmc.pms.dao.ProductDao"
>
<insert
id=
"insertProductSku"
parameterType=
"com.mmc.pms.entity.ProductDO"
<insert
id=
"insertProductSku"
parameterType=
"com.mmc.pms.entity.ProductDO"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into product (product_name, model, brand_info_id, customize,`type`)
insert into product (product_name, model, brand_info_id, customize,
`type`)
values (#{productName}, #{model}, #{brandInfoId}, #{customize},#{type})
values (#{productName}, #{model}, #{brandInfoId}, #{customize},
#{type})
</insert>
</insert>
<insert
id=
"insertProductSpec"
keyProperty=
"id"
useGeneratedKeys=
"true"
<insert
id=
"insertProductSpec"
keyProperty=
"id"
useGeneratedKeys=
"true"
parameterType=
"com.mmc.pms.entity.ProductSpecDO"
>
parameterType=
"com.mmc.pms.entity.ProductSpecDO"
>
...
@@ -198,9 +198,8 @@
...
@@ -198,9 +198,8 @@
create_time createTime,
create_time createTime,
lease_term
lease_term
from product_spec_price
from product_spec_price
where
where product_spec_id = #{productSpecId}
product_spec_id = #{productSpecId}
and `type` = #{type}
and `type` =#{type}
</select>
</select>
<select
id=
"listProductSpec"
resultType=
"com.mmc.pms.entity.ProductSpecDO"
>
<select
id=
"listProductSpec"
resultType=
"com.mmc.pms.entity.ProductSpecDO"
>
select id,
select id,
...
@@ -263,12 +262,6 @@
...
@@ -263,12 +262,6 @@
#{item}
#{item}
</foreach>
</foreach>
</select>
</select>
<select
id=
"countProductSpecByBrandId"
resultType=
"java.lang.Integer"
>
select count(*)
from product
where brand_info_id = #{id}
and is_deleted = 0
</select>
<select
id=
"countSpecByproductId"
resultType=
"java.lang.Integer"
>
<select
id=
"countSpecByproductId"
resultType=
"java.lang.Integer"
>
select count(*)
select count(*)
from product_spec
from product_spec
...
@@ -532,9 +525,15 @@
...
@@ -532,9 +525,15 @@
product_spec_id = #{specsId}
product_spec_id = #{specsId}
and `type` = 1
and `type` = 1
and lease_term = #{day}
and lease_term = #{day}
<foreach
collection=
"channelLevelId"
index=
"index"
separator=
","
open=
"and cooperation_tag in("
close=
")"
item=
"d"
>
<foreach
collection=
"channelLevelId"
index=
"index"
separator=
","
open=
"and cooperation_tag in("
close=
")"
item=
"d"
>
#{d}
#{d}
</foreach>
</foreach>
</where>
</where>
</select>
</select>
<select
id=
"countLeaseGoodsByBrandId"
resultType=
"java.lang.Integer"
>
select count(*)
from lease_goods
where brand_info_id = #{id}
</select>
</mapper>
</mapper>
src/main/resources/mapper/category/ ProductAttributeDao.xml
浏览文件 @
4fbc758a
...
@@ -53,4 +53,9 @@
...
@@ -53,4 +53,9 @@
order by create_time desc
order by create_time desc
limit #{pageNo}, #{pageSize}
limit #{pageNo}, #{pageSize}
</select>
</select>
<select
id=
"countLeaseGoodsByTypeId"
resultType=
"java.lang.Integer"
>
select count(*)
from lease_goods
where product_type_id = #{id}
</select>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论