统一代码格式
This commit is contained in:
parent
e6a9cf9a8b
commit
b6aaff68f8
|
|
@ -4,7 +4,7 @@ import com.hxkj.admin.config.aop.Log;
|
|||
import com.hxkj.admin.service.article.IArticleCateService;
|
||||
import com.hxkj.admin.validate.article.ArticleCateParam;
|
||||
import com.hxkj.admin.validate.common.PageParam;
|
||||
import com.hxkj.admin.vo.common.article.CategoryVo;
|
||||
import com.hxkj.admin.vo.common.article.ArticleCateVo;
|
||||
import com.hxkj.common.core.AjaxResult;
|
||||
import com.hxkj.common.core.PageResult;
|
||||
import com.hxkj.common.validator.annotation.IDMust;
|
||||
|
|
@ -20,7 +20,7 @@ import java.util.Map;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/article/cate")
|
||||
public class ArticleCateController {
|
||||
public class CateController {
|
||||
|
||||
@Resource
|
||||
IArticleCateService iArticleCateService;
|
||||
|
|
@ -33,7 +33,7 @@ public class ArticleCateController {
|
|||
*/
|
||||
@GetMapping("/all")
|
||||
public Object all() {
|
||||
List<CategoryVo> list = iArticleCateService.all();
|
||||
List<ArticleCateVo> list = iArticleCateService.all();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ public class ArticleCateController {
|
|||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<CategoryVo> list = iArticleCateService.list(pageParam, params);
|
||||
PageResult<ArticleCateVo> list = iArticleCateService.list(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ public class ArticleCateController {
|
|||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
CategoryVo vo = iArticleCateService.detail(id);
|
||||
ArticleCateVo vo = iArticleCateService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ import java.util.Map;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/article")
|
||||
public class ArticleTextController {
|
||||
public class TextController {
|
||||
|
||||
@Resource
|
||||
IArticleTextService iArticleTextService;
|
||||
|
|
@ -21,7 +21,7 @@ import java.util.Map;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/common/album")
|
||||
public class CommonAlbumController {
|
||||
public class AlbumController {
|
||||
|
||||
@Resource
|
||||
IAlbumService iAlbumService;
|
||||
|
|
@ -16,7 +16,7 @@ import java.util.Map;
|
|||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/common/index")
|
||||
public class CommonIndexController {
|
||||
public class IndexController {
|
||||
|
||||
@Resource
|
||||
IIndexService iIndexService;
|
||||
|
|
@ -23,7 +23,7 @@ import java.util.Map;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/common/upload")
|
||||
public class CommonUploadController {
|
||||
public class UploadController {
|
||||
|
||||
@Resource
|
||||
IAlbumService iAlbumService;
|
||||
|
|
@ -19,7 +19,7 @@ import java.util.*;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/monitor")
|
||||
public class MonitorCacheController {
|
||||
public class CacheController {
|
||||
|
||||
@Resource
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
|
|
@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/monitor")
|
||||
public class MonitorServerController {
|
||||
public class ServerController {
|
||||
/**
|
||||
* 服务器信息
|
||||
*
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.hxkj.admin.controller.setting;
|
||||
|
||||
import com.hxkj.admin.config.aop.Log;
|
||||
import com.hxkj.admin.service.setting.ISettingBasicsService;
|
||||
import com.hxkj.admin.service.setting.IBasicsService;
|
||||
import com.hxkj.common.core.AjaxResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -13,10 +13,10 @@ import java.util.Map;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/basics")
|
||||
public class SettingBasicsController {
|
||||
public class BasicsController {
|
||||
|
||||
@Resource
|
||||
ISettingBasicsService iBasicsService;
|
||||
IBasicsService iBasicsService;
|
||||
|
||||
/**
|
||||
* “获取”网站信息
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.hxkj.admin.controller.setting;
|
||||
|
||||
import com.hxkj.admin.service.setting.IDictDataService;
|
||||
import com.hxkj.admin.validate.common.PageParam;
|
||||
import com.hxkj.admin.validate.setting.SettingDictDataParam;
|
||||
import com.hxkj.common.core.AjaxResult;
|
||||
import com.hxkj.common.validator.annotation.IDMust;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/dict/data")
|
||||
public class DictDataController {
|
||||
|
||||
@Resource
|
||||
IDictDataService iSettingDictDataService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = SettingDictDataParam.create.class)
|
||||
@RequestBody SettingDictDataParam settingDictDataParam) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = SettingDictDataParam.update.class)
|
||||
@RequestBody SettingDictDataParam settingDictDataParam) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = SettingDictDataParam.delete.class)
|
||||
@RequestBody SettingDictDataParam settingDictDataParam) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,22 +1,25 @@
|
|||
package com.hxkj.admin.controller.setting;
|
||||
|
||||
import com.hxkj.admin.validate.common.PageParam;
|
||||
import com.hxkj.common.core.AjaxResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.hxkj.common.validator.annotation.IDMust;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/dict/type")
|
||||
public class SettingDictTypeController {
|
||||
public class DictTypeController {
|
||||
|
||||
@GetMapping("/list")
|
||||
public Object list() {
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
package com.hxkj.admin.controller.setting;
|
||||
|
||||
import com.hxkj.common.core.AjaxResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/dict/data")
|
||||
public class SettingDictDataController {
|
||||
|
||||
@GetMapping("/list")
|
||||
public Object list() {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
public Object add() {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
public Object edit() {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/del")
|
||||
public Object del() {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.hxkj.admin.controller.setting;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.hxkj.admin.service.setting.ISettingStorageService;
|
||||
import com.hxkj.admin.service.setting.IStorageService;
|
||||
import com.hxkj.common.core.AjaxResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -11,10 +11,10 @@ import java.util.Map;
|
|||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/storage")
|
||||
public class SettingStorageController {
|
||||
public class StorageController {
|
||||
|
||||
@Resource
|
||||
ISettingStorageService iStorageService;
|
||||
IStorageService iStorageService;
|
||||
|
||||
/**
|
||||
* 存储列表
|
||||
|
|
@ -21,7 +21,7 @@ import java.util.Map;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/admin")
|
||||
public class SystemAdminController {
|
||||
public class AdminController {
|
||||
|
||||
@Resource
|
||||
ISystemAdminService iSystemAdminService;
|
||||
|
|
@ -18,7 +18,7 @@ import java.util.Map;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/dept")
|
||||
public class SystemDeptController {
|
||||
public class DeptController {
|
||||
|
||||
@Resource
|
||||
ISystemDeptService iSystemDeptService;
|
||||
|
|
@ -20,7 +20,7 @@ import java.util.Map;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/log")
|
||||
public class SystemLogController {
|
||||
public class LogController {
|
||||
|
||||
@Resource
|
||||
ISystemLogServer iSystemLogServer;
|
||||
|
|
@ -20,7 +20,7 @@ import java.util.Map;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system")
|
||||
public class SystemLoginController {
|
||||
public class LoginController {
|
||||
|
||||
@Resource
|
||||
ISystemLoginService iSystemLoginService;
|
||||
|
|
@ -18,7 +18,7 @@ import javax.annotation.Resource;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/menu")
|
||||
public class SystemMenuController {
|
||||
public class MenuController {
|
||||
|
||||
@Resource
|
||||
ISystemMenuService iSystemMenuService;
|
||||
|
|
@ -16,7 +16,7 @@ import java.util.Map;
|
|||
|
||||
@RestController
|
||||
@RequestMapping("api/system/post")
|
||||
public class SystemPostController {
|
||||
public class PostController {
|
||||
|
||||
@Resource
|
||||
ISystemPostService iSystemPostService;
|
||||
|
|
@ -18,7 +18,7 @@ import javax.annotation.Resource;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/role")
|
||||
public class SystemRoleController {
|
||||
public class RoleController {
|
||||
|
||||
@Resource
|
||||
ISystemRoleService iSystemRoleService;
|
||||
|
|
@ -2,7 +2,7 @@ package com.hxkj.admin.service.article;
|
|||
|
||||
import com.hxkj.admin.validate.article.ArticleCateParam;
|
||||
import com.hxkj.admin.validate.common.PageParam;
|
||||
import com.hxkj.admin.vo.common.article.CategoryVo;
|
||||
import com.hxkj.admin.vo.common.article.ArticleCateVo;
|
||||
import com.hxkj.common.core.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -19,7 +19,7 @@ public interface IArticleCateService {
|
|||
* @author fzr
|
||||
* @return List<CategoryVo>
|
||||
*/
|
||||
List<CategoryVo> all();
|
||||
List<ArticleCateVo> all();
|
||||
|
||||
/**
|
||||
* 分类列表
|
||||
|
|
@ -29,7 +29,7 @@ public interface IArticleCateService {
|
|||
* @param params 搜索参数
|
||||
* @return PageResult<CategoryVo>
|
||||
*/
|
||||
PageResult<CategoryVo> list(PageParam pageParam, Map<String, String> params);
|
||||
PageResult<ArticleCateVo> list(PageParam pageParam, Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 分类详情
|
||||
|
|
@ -37,7 +37,7 @@ public interface IArticleCateService {
|
|||
* @author fzr
|
||||
* @param id 分类ID
|
||||
*/
|
||||
CategoryVo detail(Integer id);
|
||||
ArticleCateVo detail(Integer id);
|
||||
|
||||
/**
|
||||
* 分类新增
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import com.hxkj.admin.service.article.IArticleCateService;
|
||||
import com.hxkj.admin.validate.article.ArticleCateParam;
|
||||
import com.hxkj.admin.validate.common.PageParam;
|
||||
import com.hxkj.admin.vo.common.article.CategoryVo;
|
||||
import com.hxkj.admin.vo.common.article.ArticleCateVo;
|
||||
import com.hxkj.common.core.PageResult;
|
||||
import com.hxkj.common.entity.article.ArticleCategory;
|
||||
import com.hxkj.common.mapper.article.ArticleCategoryMapper;
|
||||
|
|
@ -36,16 +36,16 @@ public class ArticleCateServiceImpl implements IArticleCateService {
|
|||
* @return List<CategoryVo>
|
||||
*/
|
||||
@Override
|
||||
public List<CategoryVo> all() {
|
||||
public List<ArticleCateVo> all() {
|
||||
QueryWrapper<ArticleCategory> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select("id", "name", "sort", "is_show", "create_time", "update_time")
|
||||
.eq("is_delete", 0);
|
||||
|
||||
List<ArticleCategory> lists = articleCategoryMapper.selectList(queryWrapper);
|
||||
|
||||
List<CategoryVo> vos = new ArrayList<>();
|
||||
List<ArticleCateVo> vos = new ArrayList<>();
|
||||
for (ArticleCategory category : lists) {
|
||||
CategoryVo vo = new CategoryVo();
|
||||
ArticleCateVo vo = new ArticleCateVo();
|
||||
BeanUtils.copyProperties(category, vo);
|
||||
|
||||
vo.setCreateTime(TimeUtil.timestampToDate(vo.getCreateTime()));
|
||||
|
|
@ -64,7 +64,7 @@ public class ArticleCateServiceImpl implements IArticleCateService {
|
|||
* @return PageResult<CategoryVo>
|
||||
*/
|
||||
@Override
|
||||
public PageResult<CategoryVo> list(PageParam pageParam, Map<String, String> params) {
|
||||
public PageResult<ArticleCateVo> list(PageParam pageParam, Map<String, String> params) {
|
||||
Integer pageNo = pageParam.getPageNo();
|
||||
Integer pageSize = pageParam.getPageSize();
|
||||
|
||||
|
|
@ -79,9 +79,9 @@ public class ArticleCateServiceImpl implements IArticleCateService {
|
|||
|
||||
IPage<ArticleCategory> iPage = articleCategoryMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
List<CategoryVo> list = new ArrayList<>();
|
||||
List<ArticleCateVo> list = new ArrayList<>();
|
||||
for (ArticleCategory category : iPage.getRecords()) {
|
||||
CategoryVo vo = new CategoryVo();
|
||||
ArticleCateVo vo = new ArticleCateVo();
|
||||
BeanUtils.copyProperties(category, vo);
|
||||
|
||||
vo.setCreateTime(TimeUtil.timestampToDate(vo.getCreateTime()));
|
||||
|
|
@ -100,7 +100,7 @@ public class ArticleCateServiceImpl implements IArticleCateService {
|
|||
* @return CategoryVo
|
||||
*/
|
||||
@Override
|
||||
public CategoryVo detail(Integer id) {
|
||||
public ArticleCateVo detail(Integer id) {
|
||||
ArticleCategory model = articleCategoryMapper.selectOne(
|
||||
new QueryWrapper<ArticleCategory>()
|
||||
.select(ArticleCategory.class, info->
|
||||
|
|
@ -111,7 +111,7 @@ public class ArticleCateServiceImpl implements IArticleCateService {
|
|||
|
||||
Assert.notNull(model, "分类不存在");
|
||||
|
||||
CategoryVo vo = new CategoryVo();
|
||||
ArticleCateVo vo = new ArticleCateVo();
|
||||
BeanUtils.copyProperties(model, vo);
|
||||
vo.setCreateTime(TimeUtil.timestampToDate(model.getCreateTime()));
|
||||
vo.setUpdateTime(TimeUtil.timestampToDate(model.getUpdateTime()));
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.Map;
|
|||
/**
|
||||
* 基础配置服务接口类
|
||||
*/
|
||||
public interface ISettingBasicsService {
|
||||
public interface IBasicsService {
|
||||
|
||||
/**
|
||||
* 获取网站信息
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.hxkj.admin.service.setting;
|
||||
|
||||
import com.hxkj.admin.validate.common.PageParam;
|
||||
import com.hxkj.admin.validate.setting.SettingDictDataParam;
|
||||
import com.hxkj.common.core.PageResult;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 字典数据服务接口类
|
||||
*/
|
||||
public interface IDictDataService {
|
||||
|
||||
PageResult<Object> list(PageParam pageParam, Map<String, String> params);
|
||||
|
||||
Object detail(Integer id);
|
||||
|
||||
void add(SettingDictDataParam settingDictDataParam);
|
||||
|
||||
void edit(SettingDictDataParam settingDictDataParam);
|
||||
|
||||
void del(Integer id);
|
||||
|
||||
}
|
||||
|
|
@ -3,5 +3,5 @@ package com.hxkj.admin.service.setting;
|
|||
/**
|
||||
* 字典类型服务接口类
|
||||
*/
|
||||
public interface ISettingDictTypeService {
|
||||
public interface IDictTypeService {
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
package com.hxkj.admin.service.setting;
|
||||
|
||||
/**
|
||||
* 字典数据服务接口类
|
||||
*/
|
||||
public interface ISettingDictDataService {
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
|||
/**
|
||||
* 存储配置接口类
|
||||
*/
|
||||
public interface ISettingStorageService {
|
||||
public interface IStorageService {
|
||||
|
||||
/**
|
||||
* 存储列表
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.hxkj.admin.service.setting.impl;
|
||||
|
||||
import com.hxkj.admin.service.setting.ISettingBasicsService;
|
||||
import com.hxkj.admin.service.setting.IBasicsService;
|
||||
import com.hxkj.common.utils.ConfigUtil;
|
||||
import com.hxkj.common.utils.UrlUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -12,7 +12,7 @@ import java.util.Map;
|
|||
* 基础配置服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class SettingBasicsServiceImpl implements ISettingBasicsService {
|
||||
public class BasicsServiceImpl implements IBasicsService {
|
||||
|
||||
/**
|
||||
* 获取网站信息
|
||||
|
|
@ -6,5 +6,5 @@ import org.springframework.stereotype.Service;
|
|||
* 字典数据服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class SettingDictDataServiceImpl {
|
||||
public class DictDataServiceImpl {
|
||||
}
|
||||
|
|
@ -6,5 +6,5 @@ import org.springframework.stereotype.Service;
|
|||
* 字典类型服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class SettingDictTypeServiceImpl {
|
||||
public class DictTypeServiceImpl {
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ package com.hxkj.admin.service.setting.impl;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.hxkj.admin.service.setting.ISettingStorageService;
|
||||
import com.hxkj.admin.service.setting.IStorageService;
|
||||
import com.hxkj.common.utils.ConfigUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ import java.util.*;
|
|||
* 存储配置实现类
|
||||
*/
|
||||
@Service
|
||||
public class SettingStorageServiceImpl implements ISettingStorageService {
|
||||
public class StorageServiceImpl implements IStorageService {
|
||||
|
||||
/**
|
||||
* 存储列表
|
||||
|
|
@ -1,9 +1,14 @@
|
|||
package com.hxkj.admin.validate.setting;
|
||||
|
||||
import com.hxkj.common.validator.annotation.IDMust;
|
||||
import com.hxkj.common.validator.annotation.IntegerContains;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
|
|
@ -16,4 +21,31 @@ public class SettingDictDataParam implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public interface create{}
|
||||
public interface update{}
|
||||
public interface delete{}
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0", groups = {update.class, delete.class})
|
||||
private Integer id;
|
||||
|
||||
@IDMust(message = "typeId参数必传且需大于0", groups = {create.class, update.class})
|
||||
private Integer typeId;
|
||||
|
||||
@NotNull(message = "key参数缺失", groups = {create.class, update.class})
|
||||
private String key;
|
||||
|
||||
@NotNull(message = "value参数缺失", groups = {create.class, update.class})
|
||||
@Length(max = 100, message = "键名不能超出100个字符", groups = {create.class, update.class})
|
||||
private String value;
|
||||
|
||||
@Length(max = 200, message = "数值不能超出200个字符", groups = {create.class, update.class})
|
||||
private String remark;
|
||||
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0", groups = {create.class, update.class})
|
||||
private Integer sort;
|
||||
|
||||
@NotNull(message = "status参数缺失", groups = {create.class, update.class})
|
||||
@IntegerContains(values = {0, 1}, message = "status参数不在合法值内", groups = {create.class, update.class})
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
package com.hxkj.admin.validate.setting;
|
||||
|
||||
import com.hxkj.common.validator.annotation.IDMust;
|
||||
import com.hxkj.common.validator.annotation.IntegerContains;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
|
|
@ -16,5 +20,26 @@ public class SettingDictTypeParam implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public interface create{}
|
||||
public interface update{}
|
||||
public interface delete{}
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0", groups = {update.class, delete.class})
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "dictName参数缺失", groups = {create.class, update.class})
|
||||
@Length(max = 200, message = "名称不能超出200个字符", groups = {create.class, update.class})
|
||||
private String dictName;
|
||||
|
||||
@NotNull(message = "dictType参数缺失", groups = {create.class, update.class})
|
||||
@Length(max = 200, message = "类型不能超出200个字符", groups = {create.class, update.class})
|
||||
private String dictType;
|
||||
|
||||
@Length(max = 200, message = "备注不能超出200个字符", groups = {create.class, update.class})
|
||||
private String dictRemark;
|
||||
|
||||
@NotNull(message = "dictStatus参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "dictStatus参数不在合法值内", groups = {create.class, update.class})
|
||||
private String dictStatus;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import java.io.Serializable;
|
|||
* 文章分类Vo
|
||||
*/
|
||||
@Data
|
||||
public class CategoryVo implements Serializable {
|
||||
public class ArticleCateVo implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.hxkj.admin.vo.setting;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 字典数据Vo
|
||||
*/
|
||||
@Data
|
||||
public class DictDataVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.hxkj.admin.vo.setting;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 字典类型Vo
|
||||
*/
|
||||
@Data
|
||||
public class DictTypeVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue