Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
0316b915
提交
0316b915
authored
7月 26, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
ssh://git.mmcuav.cn:8222/iuav/pms
into develop
上级
a59ef846
bc08f9ad
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
29 行增加
和
28 行删除
+29
-28
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
CategoryController.java
...a/com/mmc/pms/controller/category/CategoryController.java
+4
-4
CategoryDao.java
src/main/java/com/mmc/pms/dao/category/CategoryDao.java
+2
-2
CategorySubDO.java
src/main/java/com/mmc/pms/entity/category/CategorySubDO.java
+3
-3
CategorySubDTO.java
...n/java/com/mmc/pms/model/category/dto/CategorySubDTO.java
+1
-1
CategorySubVO.java
...ain/java/com/mmc/pms/model/category/vo/CategorySubVO.java
+1
-1
CategoryService.java
...in/java/com/mmc/pms/service/category/CategoryService.java
+2
-2
CategoryServiceImpl.java
...om/mmc/pms/service/category/impl/CategoryServiceImpl.java
+6
-5
CategoryDao.xml
src/main/resources/mapper/category/CategoryDao.xml
+9
-9
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
0316b915
...
...
@@ -18,4 +18,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag
:
ff6a800850b7f031aecf9add2d8c012a3f2afee1
newTag
:
b69bace06bf8b901861adb9ff6cd91ab34fbd6c4
src/main/java/com/mmc/pms/controller/category/CategoryController.java
浏览文件 @
0316b915
...
...
@@ -85,15 +85,15 @@ public class CategoryController {
@ApiOperation
(
value
=
"二级分类————删除"
)
@GetMapping
(
"/deleteSubCategory"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
public
ResultBody
deleteSubCategory
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"
subId"
,
required
=
true
)
Integer
subI
d
)
{
return
categoryService
.
deleteSubCategory
(
subI
d
);
public
ResultBody
deleteSubCategory
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"
id"
,
required
=
true
)
Integer
i
d
)
{
return
categoryService
.
deleteSubCategory
(
i
d
);
}
@ApiOperation
(
value
=
"二级分类————详情"
)
@GetMapping
(
"/detailSubCategory"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
public
ResultBody
<
CategorySubDTO
>
detailSubCategory
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"
subId"
,
required
=
true
)
Integer
subI
d
)
{
return
categoryService
.
detailSubCategory
(
subI
d
);
public
ResultBody
<
CategorySubDTO
>
detailSubCategory
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"
id"
,
required
=
true
)
Integer
i
d
)
{
return
categoryService
.
detailSubCategory
(
i
d
);
}
@ApiOperation
(
value
=
"一级分类——排序交换"
)
...
...
src/main/java/com/mmc/pms/dao/category/CategoryDao.java
浏览文件 @
0316b915
...
...
@@ -35,9 +35,9 @@ public interface CategoryDao {
void
updateSubCategory
(
CategorySubDO
subDO
);
void
deleteSubCategory
(
Integer
subI
d
);
void
deleteSubCategory
(
Integer
i
d
);
CategorySubDO
detailSubCategory
(
Integer
subI
d
);
CategorySubDO
detailSubCategory
(
Integer
i
d
);
List
<
CategoryPrimaryDO
>
categoryList
(
CategoryQO
param
);
...
...
src/main/java/com/mmc/pms/entity/category/CategorySubDO.java
浏览文件 @
0316b915
...
...
@@ -33,7 +33,7 @@ public class CategorySubDO {
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
@Min
(
value
=
1
,
groups
=
{
Update
.
class
})
@TableId
(
type
=
IdType
.
AUTO
)
private
Integer
subI
d
;
private
Integer
i
d
;
@ApiModelProperty
(
value
=
"分类名称"
,
required
=
true
,
example
=
"无人机"
)
...
...
@@ -59,7 +59,7 @@ public class CategorySubDO {
private
Date
updateTime
;
public
CategorySubDO
(
CategorySubVO
subVO
)
{
this
.
subId
=
subVO
.
getSub
Id
();
this
.
id
=
subVO
.
get
Id
();
this
.
name
=
subVO
.
getName
();
this
.
description
=
subVO
.
getDescription
();
this
.
categoryPrimaryId
=
subVO
.
getCategoryPrimaryId
();
...
...
@@ -67,7 +67,7 @@ public class CategorySubDO {
public
CategorySubDTO
buildCategorySubDTO
()
{
return
CategorySubDTO
.
builder
()
.
subId
(
this
.
subI
d
)
.
id
(
this
.
i
d
)
.
name
(
this
.
name
)
.
description
(
this
.
description
)
.
categoryPrimaryId
(
this
.
categoryPrimaryId
)
...
...
src/main/java/com/mmc/pms/model/category/dto/CategorySubDTO.java
浏览文件 @
0316b915
...
...
@@ -29,7 +29,7 @@ public class CategorySubDTO {
@ApiModelProperty
(
value
=
"id"
)
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
@Min
(
value
=
1
,
groups
=
{
Update
.
class
})
private
Integer
subI
d
;
private
Integer
i
d
;
@ApiModelProperty
(
value
=
"分类名称"
,
required
=
true
,
example
=
"无人机"
)
@Size
(
max
=
15
,
message
=
"分类名称不能超过15个字"
,
groups
=
{
Update
.
class
,
Create
.
class
})
...
...
src/main/java/com/mmc/pms/model/category/vo/CategorySubVO.java
浏览文件 @
0316b915
...
...
@@ -21,7 +21,7 @@ public class CategorySubVO {
@ApiModelProperty
(
value
=
"id"
,
example
=
"1"
)
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
@Min
(
value
=
1
,
groups
=
{
Update
.
class
})
private
Integer
subI
d
;
private
Integer
i
d
;
@ApiModelProperty
(
value
=
"分类名称"
,
required
=
true
,
example
=
"无人机"
)
@Size
(
max
=
15
,
message
=
"分类名称不能超过15个字"
,
groups
=
{
Update
.
class
,
Create
.
class
})
...
...
src/main/java/com/mmc/pms/service/category/CategoryService.java
浏览文件 @
0316b915
...
...
@@ -26,9 +26,9 @@ public interface CategoryService {
ResultBody
updateSubCategory
(
CategorySubVO
subVO
);
ResultBody
deleteSubCategory
(
Integer
subI
d
);
ResultBody
deleteSubCategory
(
Integer
i
d
);
ResultBody
detailSubCategory
(
Integer
subI
d
);
ResultBody
detailSubCategory
(
Integer
i
d
);
PageResult
<
CategoryPrimaryDTO
>
categoryList
(
CategoryQO
param
);
...
...
src/main/java/com/mmc/pms/service/category/impl/CategoryServiceImpl.java
浏览文件 @
0316b915
...
...
@@ -70,7 +70,8 @@ public class CategoryServiceImpl implements CategoryService {
return
ResultBody
.
error
(
ResultEnum
.
THE_NAME_OF_THE_SECONDARY_CLASS_MUST_BE_UNIQUE
);
}
CategorySubDO
subDO
=
new
CategorySubDO
(
subVO
);
subDO
.
setSubId
(
subVO
.
getCategoryPrimaryId
()
+
1
);
int
number
=
(
int
)
(
Math
.
random
()
*
90
+
10
);
subDO
.
setId
(
subVO
.
getCategoryPrimaryId
()
+
1
+
number
);
categoryDao
.
addSubCategory
(
subDO
);
return
ResultBody
.
success
();
}
...
...
@@ -87,14 +88,14 @@ public class CategoryServiceImpl implements CategoryService {
}
@Override
public
ResultBody
deleteSubCategory
(
Integer
subI
d
)
{
categoryDao
.
deleteSubCategory
(
subI
d
);
public
ResultBody
deleteSubCategory
(
Integer
i
d
)
{
categoryDao
.
deleteSubCategory
(
i
d
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
<
CategorySubDTO
>
detailSubCategory
(
Integer
subI
d
)
{
CategorySubDO
subDO
=
categoryDao
.
detailSubCategory
(
subI
d
);
public
ResultBody
<
CategorySubDTO
>
detailSubCategory
(
Integer
i
d
)
{
CategorySubDO
subDO
=
categoryDao
.
detailSubCategory
(
i
d
);
CategorySubDTO
categorySubDTO
=
null
;
if
(
subDO
!=
null
)
{
categorySubDTO
=
subDO
.
buildCategorySubDTO
();
...
...
src/main/resources/mapper/category/CategoryDao.xml
浏览文件 @
0316b915
...
...
@@ -18,7 +18,7 @@
</resultMap>
<select
id=
"selectSubList"
resultType=
"com.mmc.pms.entity.category.CategorySubDO"
>
select id
AS subId
,
select id,
`name`,
description,
category_primary_id AS categoryPrimaryId,
...
...
@@ -124,9 +124,9 @@
<insert
id=
"addSubCategory"
useGeneratedKeys=
"true"
keyProperty=
"
subI
d"
parameterType=
"com.mmc.pms.entity.category.CategorySubDO"
>
keyProperty=
"
i
d"
parameterType=
"com.mmc.pms.entity.category.CategorySubDO"
>
insert into category_sub(id, `name`, description, create_time, update_time, category_primary_id)
values (#{
subI
d}, #{name}, #{description}, NOW(), NOW(), #{categoryPrimaryId})
values (#{
i
d}, #{name}, #{description}, NOW(), NOW(), #{categoryPrimaryId})
</insert>
<select
id=
"categorySubCount"
resultType=
"java.lang.Integer"
>
...
...
@@ -136,8 +136,8 @@
<if
test=
" name != null and name != '' "
>
and `name` = #{name}
</if>
<if
test=
"
subId != null and subI
d != '' "
>
and id != #{
subI
d}
<if
test=
"
id != null and i
d != '' "
>
and id != #{
i
d}
</if>
<if
test=
" categoryPrimaryId != null and categoryPrimaryId != '' "
>
and category_primary_id != #{categoryPrimaryId}
...
...
@@ -157,25 +157,25 @@
</if>
update_time=NOW()
</set>
where id = #{
subI
d}
where id = #{
i
d}
</update>
<delete
id=
"deleteSubCategory"
>
delete
from category_sub
where id = #{
subI
d}
where id = #{
i
d}
</delete>
<select
id=
"detailSubCategory"
resultType=
"com.mmc.pms.entity.category.CategorySubDO"
>
select id
AS subId
,
select id,
`name`,
description,
create_time AS createTime,
update_time AS updateTime,
category_primary_id AS categoryPrimaryId
from category_sub
where id = #{
subI
d}
where id = #{
i
d}
</select>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论