Commit acafeafb authored by xiwei's avatar xiwei

修改部分代码

parent ee026c38
......@@ -114,6 +114,12 @@
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
......@@ -183,25 +189,25 @@
<!-- 结合(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-->
<!-- 打包war包时,注释掉此插件-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>build-package</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}</finalName>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<!-- <plugin>-->
<!-- <artifactId>maven-assembly-plugin</artifactId>-->
<!-- <version>3.1.1</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>build-package</id>-->
<!-- <phase>package</phase>-->
<!-- <goals>-->
<!-- <goal>single</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <finalName>${project.artifactId}</finalName>-->
<!-- <descriptors>-->
<!-- <descriptor>assembly.xml</descriptor>-->
<!-- </descriptors>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
</plugins>
......
......@@ -7,10 +7,10 @@
* 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,
* subject to the following conditions:
* <p>
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
......@@ -37,16 +37,17 @@ import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
/**
* 分类管理控制层
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
*/
@Api(tags={"前端-内容模块接口"})
@Api(tags = {"前端-内容模块接口"})
@Controller("WebcmsCategoryAction")
@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{
*/
@ApiOperation(value = "查询分类列表接口")
@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
public ResultData list(@ModelAttribute @ApiIgnore CategoryEntity category) {
BasicUtil.startPage();
category.setSqlWhere("");
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{
* @param category 分类实体
*/
@ApiOperation(value = "获取分类列表接口")
@ApiImplicitParam(name = "id", value = "编号", required =true,paramType="query")
@ApiImplicitParam(name = "id", value = "编号", required = true, paramType = "query")
@GetMapping("/get")
@ResponseBody
public ResultData get(@ModelAttribute @ApiIgnore CategoryEntity category){
if(category.getId()==null) {
public ResultData get(@ModelAttribute @ApiIgnore CategoryEntity category) {
if (category.getId() == null) {
return ResultData.build().error();
}
category.setSqlWhere("");
CategoryEntity _category = (CategoryEntity)categoryBiz.getById(category.getId());
CategoryEntity _category = (CategoryEntity) categoryBiz.getById(category.getId());
return ResultData.build().success(_category);
}
......
......@@ -23,6 +23,7 @@
package net.mingsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.experimental.FieldNameConstants;
import net.mingsoft.base.entity.BaseEntity;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.config.MSProperties;
......@@ -38,6 +39,7 @@ import java.io.File;
* 历史修订:<br/>
*/
@TableName("cms_category")
@FieldNameConstants
public class CategoryEntity extends BaseEntity {
private static final long serialVersionUID = 1574925152750L;
......
spring:
datasource:
url: jdbc:mysql://localhost:3306/mcms?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
password: root
password: Orz2me
filters: wall,mergeStat
type: com.alibaba.druid.pool.DruidDataSource
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment