Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
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
西魏
cms_sys
Commits
acafeafb
Commit
acafeafb
authored
Jan 04, 2023
by
xiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分代码
parent
ee026c38
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
32 deletions
+41
-32
pom.xml
pom.xml
+25
-19
CategoryAction.java
...main/java/net/mingsoft/cms/action/web/CategoryAction.java
+12
-11
CategoryEntity.java
src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
+2
-0
application-dev.yml
src/main/resources/application-dev.yml
+2
-2
No files found.
pom.xml
View file @
acafeafb
...
@@ -114,6 +114,12 @@
...
@@ -114,6 +114,12 @@
<artifactId>
log4j-api
</artifactId>
<artifactId>
log4j-api
</artifactId>
<version>
${log4j.version}
</version>
<version>
${log4j.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.18.24
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
@@ -183,25 +189,25 @@
...
@@ -183,25 +189,25 @@
<!-- 结合(resources》resource》excludes的配置使用 -->
<!-- 结合(resources》resource》excludes的配置使用 -->
<!-- 打包出的结构 http://doc.mingsoft.net/server/huan-jing-pei-zhi/jarbu-shu.html#%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84-->
<!-- 打包出的结构 http://doc.mingsoft.net/server/huan-jing-pei-zhi/jarbu-shu.html#%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84-->
<!-- 打包war包时,注释掉此插件-->
<!-- 打包war包时,注释掉此插件-->
<plugin
>
<!-- <plugin>--
>
<artifactId>
maven-assembly-plugin
</artifactId
>
<!-- <artifactId>maven-assembly-plugin</artifactId>--
>
<version>
3.1.1
</version
>
<!-- <version>3.1.1</version>--
>
<executions
>
<!-- <executions>--
>
<execution
>
<!-- <execution>--
>
<id>
build-package
</id
>
<!-- <id>build-package</id>--
>
<phase>
package
</phase
>
<!-- <phase>package</phase>--
>
<goals
>
<!-- <goals>--
>
<goal>
single
</goal
>
<!-- <goal>single</goal>--
>
</goals
>
<!-- </goals>--
>
<configuration
>
<!-- <configuration>--
>
<finalName>
${project.artifactId}
</finalName
>
<!-- <finalName>${project.artifactId}</finalName>--
>
<descriptors
>
<!-- <descriptors>--
>
<descriptor>
assembly.xml
</descriptor
>
<!-- <descriptor>assembly.xml</descriptor>--
>
</descriptors
>
<!-- </descriptors>--
>
</configuration
>
<!-- </configuration>--
>
</execution
>
<!-- </execution>--
>
</executions
>
<!-- </executions>--
>
</plugin
>
<!-- </plugin>--
>
</plugins>
</plugins>
...
...
src/main/java/net/mingsoft/cms/action/web/CategoryAction.java
View file @
acafeafb
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* subject to the following conditions:
* <p>
* The above copyright notice and this permission notice shall be included in all
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
...
@@ -37,16 +37,17 @@ import org.springframework.web.bind.annotation.*;
...
@@ -37,16 +37,17 @@ import org.springframework.web.bind.annotation.*;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 分类管理控制层
* 分类管理控制层
* @author 铭飞开发团队
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
* 历史修订:<br/>
*/
*/
@Api
(
tags
=
{
"前端-内容模块接口"
})
@Api
(
tags
=
{
"前端-内容模块接口"
})
@Controller
(
"WebcmsCategoryAction"
)
@Controller
(
"WebcmsCategoryAction"
)
@RequestMapping
(
"/cms/category"
)
@RequestMapping
(
"/cms/category"
)
public
class
CategoryAction
extends
net
.
mingsoft
.
cms
.
action
.
BaseAction
{
public
class
CategoryAction
extends
net
.
mingsoft
.
cms
.
action
.
BaseAction
{
/**
/**
...
@@ -61,15 +62,15 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{
...
@@ -61,15 +62,15 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{
*/
*/
@ApiOperation
(
value
=
"查询分类列表接口"
)
@ApiOperation
(
value
=
"查询分类列表接口"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"categoryTitle"
,
value
=
"栏目管理名称"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
CategoryEntity
.
Fields
.
categoryTitle
,
value
=
"栏目管理名称"
,
required
=
false
,
paramType
=
"query"
),
})
})
@PostMapping
(
value
=
"/list"
)
@PostMapping
(
value
=
"/list"
)
@ResponseBody
@ResponseBody
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
)
{
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
)
{
BasicUtil
.
startPage
();
BasicUtil
.
startPage
();
category
.
setSqlWhere
(
""
);
category
.
setSqlWhere
(
""
);
List
categoryList
=
categoryBiz
.
query
(
category
);
List
categoryList
=
categoryBiz
.
query
(
category
);
return
ResultData
.
build
().
success
(
new
EUListBean
(
categoryList
,(
int
)
BasicUtil
.
endPage
(
categoryList
).
getTotal
()));
return
ResultData
.
build
().
success
(
new
EUListBean
(
categoryList
,
(
int
)
BasicUtil
.
endPage
(
categoryList
).
getTotal
()));
}
}
...
@@ -78,15 +79,15 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{
...
@@ -78,15 +79,15 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{
* @param category 分类实体
* @param category 分类实体
*/
*/
@ApiOperation
(
value
=
"获取分类列表接口"
)
@ApiOperation
(
value
=
"获取分类列表接口"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
paramType
=
"query"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
paramType
=
"query"
)
@GetMapping
(
"/get"
)
@GetMapping
(
"/get"
)
@ResponseBody
@ResponseBody
public
ResultData
get
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
)
{
public
ResultData
get
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
)
{
if
(
category
.
getId
()==
null
)
{
if
(
category
.
getId
()
==
null
)
{
return
ResultData
.
build
().
error
();
return
ResultData
.
build
().
error
();
}
}
category
.
setSqlWhere
(
""
);
category
.
setSqlWhere
(
""
);
CategoryEntity
_category
=
(
CategoryEntity
)
categoryBiz
.
getById
(
category
.
getId
());
CategoryEntity
_category
=
(
CategoryEntity
)
categoryBiz
.
getById
(
category
.
getId
());
return
ResultData
.
build
().
success
(
_category
);
return
ResultData
.
build
().
success
(
_category
);
}
}
...
...
src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
View file @
acafeafb
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
package
net
.
mingsoft
.
cms
.
entity
;
package
net
.
mingsoft
.
cms
.
entity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.experimental.FieldNameConstants
;
import
net.mingsoft.base.entity.BaseEntity
;
import
net.mingsoft.base.entity.BaseEntity
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.config.MSProperties
;
import
net.mingsoft.config.MSProperties
;
...
@@ -38,6 +39,7 @@ import java.io.File;
...
@@ -38,6 +39,7 @@ import java.io.File;
* 历史修订:<br/>
* 历史修订:<br/>
*/
*/
@TableName
(
"cms_category"
)
@TableName
(
"cms_category"
)
@FieldNameConstants
public
class
CategoryEntity
extends
BaseEntity
{
public
class
CategoryEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1574925152750L
;
private
static
final
long
serialVersionUID
=
1574925152750L
;
...
...
src/main/resources/application-dev.yml
View file @
acafeafb
spring
:
spring
:
datasource
:
datasource
:
url
:
jdbc:mysql://
localhost:3306/m
cms?useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
url
:
jdbc:mysql://
192.168.5.1:3306/
cms?useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
username
:
root
username
:
root
password
:
root
password
:
Orz2me
filters
:
wall,mergeStat
filters
:
wall,mergeStat
type
:
com.alibaba.druid.pool.DruidDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
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