mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-07 23:57:20 +08:00
优化: 后台增加Swagger实体类的注解
This commit is contained in:
@@ -13,120 +13,79 @@ import com.mdd.admin.validate.commons.PageValidate;
|
||||
import com.mdd.admin.vo.album.AlbumVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 相册管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/albums")
|
||||
@Api(tags = "相册数据管理")
|
||||
public class AlbumsController {
|
||||
|
||||
@Resource
|
||||
IAlbumsService iAlbumsService;
|
||||
|
||||
/**
|
||||
* 相册文件列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<PageResult<AlbumVo>>
|
||||
*/
|
||||
@GetMapping("/albumList")
|
||||
@ApiOperation(value="相册文件列表")
|
||||
public AjaxResult<PageResult<AlbumVo>> albumList(@Validated PageValidate pageValidate,
|
||||
@Validated AlbumSearchValidate searchValidate) {
|
||||
PageResult<AlbumVo> voPageResult = iAlbumsService.albumList(pageValidate, searchValidate);
|
||||
return AjaxResult.success(voPageResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 相册文件重命名
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "相册文件重命名")
|
||||
@PostMapping("/albumRename")
|
||||
@ApiOperation(value="相册文件重命名")
|
||||
public AjaxResult<Object> albumRename(@Validated @RequestBody AlbumRenameValidate renameValidate) {
|
||||
iAlbumsService.albumRename(renameValidate.getId(), renameValidate.getName());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 相册文件移动
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "相册文件移动")
|
||||
@PostMapping("/albumMove")
|
||||
@ApiOperation(value="相册文件移动")
|
||||
public AjaxResult<Object> albumMove(@Validated @RequestBody AlbumMoveValidate moveValidate) {
|
||||
iAlbumsService.albumMove(moveValidate.getIds(), moveValidate.getCid());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 相册文件删除
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "相册文件删除")
|
||||
@PostMapping("/albumDel")
|
||||
@ApiOperation(value="相册文件删除")
|
||||
public AjaxResult<Object> albumDel(@Validated @RequestBody IdsValidate idsValidate) {
|
||||
iAlbumsService.albumDel(idsValidate.getIds());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 相册分类列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param searchValidate 搜索参数
|
||||
* @return AjaxResult<JSONArray>
|
||||
*/
|
||||
@GetMapping("/cateList")
|
||||
@ApiOperation(value="相册分类列表")
|
||||
public AjaxResult<JSONArray> cateList(@Validated AlbumSearchValidate searchValidate) {
|
||||
JSONArray jsonArray = iAlbumsService.cateList(searchValidate);
|
||||
return AjaxResult.success(jsonArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* 相册分类新增
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "相册分类新增")
|
||||
@PostMapping("/cateAdd")
|
||||
@ApiOperation(value="相册分类新增")
|
||||
public AjaxResult<Object> cateAdd(@Validated @RequestBody AlbumCateValidate cateValidate) {
|
||||
iAlbumsService.cateAdd(cateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 相册分类重命名
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "相册分类重命名")
|
||||
@PostMapping("/cateRename")
|
||||
@ApiOperation(value="相册分类重命名")
|
||||
public AjaxResult<Object> cateRename(@Validated @RequestBody AlbumRenameValidate renameValidate) {
|
||||
iAlbumsService.cateRename(renameValidate.getId(), renameValidate.getName());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 相册分类删除
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "相册分类删除")
|
||||
@PostMapping("/cateDel")
|
||||
@ApiOperation(value="相册分类删除")
|
||||
public AjaxResult<Object> cateDel(@Validated @RequestBody IdValidate idValidate) {
|
||||
iAlbumsService.cateDel(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -12,114 +12,72 @@ import com.mdd.admin.vo.article.ArticleCateVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章分类管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/article/cate")
|
||||
@Api(tags = "文章分类管理")
|
||||
public class ArtCateController {
|
||||
|
||||
@Resource
|
||||
IArtCateService iArtCateService;
|
||||
|
||||
/**
|
||||
* 分类所有
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<List<ArticleCateVo>>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/all")
|
||||
@ApiOperation(value="所有分类")
|
||||
public AjaxResult<List<ArticleCateVo>> all() {
|
||||
List<ArticleCateVo> list = iArtCateService.all();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return AjaxResult<PageResult<ArticleCateVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="分类列表")
|
||||
public AjaxResult<PageResult<ArticleCateVo>> list(@Validated PageValidate pageValidate,
|
||||
@Validated ArtCateSearchValidate searchValidate) {
|
||||
PageResult<ArticleCateVo> list = iArtCateService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<ArticleCateVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="分类详情")
|
||||
public AjaxResult<ArticleCateVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ArticleCateVo vo = iArtCateService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "文章分类新增")
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="分类新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody ArtCateCreateValidate createValidate) {
|
||||
iArtCateService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 编辑
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "文章分类编辑")
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="分类编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody ArtCateUpdateValidate updateValidate) {
|
||||
iArtCateService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "文章分类删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="分类删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iArtCateService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "文章分类状态")
|
||||
@PostMapping("/change")
|
||||
@ApiOperation(value="分类状态")
|
||||
public AjaxResult<Object> change(@Validated @RequestBody IdValidate idValidate) {
|
||||
iArtCateService.change(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -13,100 +13,63 @@ import com.mdd.admin.vo.article.ArticleListedVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 文章管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/article")
|
||||
@Api(tags = "文章数据管理")
|
||||
public class ArticleController {
|
||||
|
||||
@Resource
|
||||
IArticleService iArticleService;
|
||||
|
||||
/**
|
||||
* 文章列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return AjaxResult<PageResult<ArticleListVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="文章列表")
|
||||
public AjaxResult<PageResult<ArticleListedVo>> list(@Validated PageValidate pageValidate,
|
||||
@Validated ArticleSearchValidate searchValidate) {
|
||||
PageResult<ArticleListedVo> vos = iArticleService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(vos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 文章ID
|
||||
* @return AjaxResult<ArticleDetailVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="文章详情")
|
||||
public AjaxResult<ArticleDetailVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ArticleDetailVo vo = iArticleService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "文章新增")
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="文章新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody ArticleCreateValidate createValidate) {
|
||||
iArticleService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "文章编辑")
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="文章编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody ArticleUpdateValidate updateValidate) {
|
||||
iArticleService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "文章删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="文章删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iArticleService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "文章状态")
|
||||
@PostMapping("/change")
|
||||
@ApiOperation(value="文章状态")
|
||||
public AjaxResult<Object> change(@Validated @RequestBody IdValidate idValidate) {
|
||||
iArticleService.change(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.mdd.admin.vo.CrontabListedVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.quartz.SchedulerException;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -18,71 +20,42 @@ import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/crontab")
|
||||
@Api(tags = "计划任务管理")
|
||||
public class CrontabController {
|
||||
|
||||
@Resource
|
||||
ICrontabService iCrontabService;
|
||||
|
||||
/**
|
||||
* 计划任务列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @return AjaxResult< PageResult<CrontabListedVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="计划任务列表")
|
||||
public AjaxResult< PageResult<CrontabListedVo>> list(@Validated PageValidate pageValidate) {
|
||||
PageResult<CrontabListedVo> list = iCrontabService.list(pageValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计划任务详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="计划任务详情")
|
||||
public AjaxResult<Object> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
CrontabDetailVo vo = iCrontabService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计划任务新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="计划任务新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody CrontabCreateValidate createValidate) throws SchedulerException {
|
||||
iCrontabService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 计划任务编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="计划任务编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody CrontabUpdateValidate updateValidate) throws SchedulerException {
|
||||
iCrontabService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 计划任务删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="计划任务删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) throws SchedulerException {
|
||||
iCrontabService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mdd.admin.controller;
|
||||
import com.mdd.common.aop.NotLogin;
|
||||
import com.mdd.admin.service.IIndexService;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -11,37 +13,25 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 主页管理
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/index")
|
||||
@Api(tags = "主页数据管理")
|
||||
public class IndexController {
|
||||
|
||||
@Resource
|
||||
IIndexService iIndexService;
|
||||
|
||||
/**
|
||||
* 控制台
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Map<String, Object>>
|
||||
*/
|
||||
@GetMapping("/console")
|
||||
@ApiOperation(value="控制台")
|
||||
public AjaxResult<Map<String, Object>> console() {
|
||||
Map<String, Object> map = iIndexService.console();
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公共配置
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Map<String, Object>
|
||||
*/
|
||||
@NotLogin
|
||||
@GetMapping("/config")
|
||||
@ApiOperation(value="公共配置")
|
||||
public AjaxResult<Map<String, Object>> config() {
|
||||
Map<String, Object> map = iIndexService.config();
|
||||
return AjaxResult.success(map);
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.mdd.common.exception.OperateException;
|
||||
import com.mdd.common.plugin.storage.StorageDriver;
|
||||
import com.mdd.common.plugin.storage.UploadFilesVo;
|
||||
import com.mdd.common.util.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -21,25 +23,17 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 上传管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/upload")
|
||||
@Api(tags = "上传文件管理")
|
||||
public class UploadController {
|
||||
|
||||
@Resource
|
||||
IAlbumsService iAlbumsService;
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
*
|
||||
* @author fzr
|
||||
* @param request 请求对象
|
||||
* @return AjaxResult<UploadFilesVo>
|
||||
*/
|
||||
@Log(title = "上传图片", requestType = RequestType.File)
|
||||
@PostMapping("/image")
|
||||
@ApiOperation(value="上传图片")
|
||||
public AjaxResult<UploadFilesVo> image(HttpServletRequest request) {
|
||||
MultipartFile multipartFile;
|
||||
try {
|
||||
@@ -70,15 +64,9 @@ public class UploadController {
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传视频
|
||||
*
|
||||
* @author fzr
|
||||
* @param request 请求对象
|
||||
* @return AjaxResult<UploadFilesVo>
|
||||
*/
|
||||
@Log(title = "上传视频", requestType = RequestType.File)
|
||||
@PostMapping("/video")
|
||||
@ApiOperation(value="上传视频")
|
||||
public AjaxResult<UploadFilesVo> video(HttpServletRequest request) {
|
||||
MultipartFile multipartFile;
|
||||
try {
|
||||
|
||||
@@ -8,57 +8,38 @@ import com.mdd.admin.vo.user.UserVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 用户管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/user")
|
||||
@Api(tags = "用户数据管理")
|
||||
public class UsersController {
|
||||
|
||||
@Resource
|
||||
IUsersService iUsersService;
|
||||
|
||||
/**
|
||||
* 用户列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return AjaxResult<PageResult<UserVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="用户列表")
|
||||
public AjaxResult<PageResult<UserVo>> list(@Validated PageValidate pageValidate,
|
||||
@Validated UsersSearchValidate searchValidate) {
|
||||
PageResult<UserVo> list = iUsersService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<UserVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="用户详情")
|
||||
public AjaxResult<UserVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
UserVo vo = iUsersService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="用户编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody UsersUpdateValidate updateValidate) {
|
||||
iUsersService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -5,42 +5,31 @@ import com.mdd.admin.service.IChannelH5ConfigService;
|
||||
import com.mdd.admin.validate.channel.ChannelH5Validate;
|
||||
import com.mdd.admin.vo.channel.ChannelH5Vo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* H5渠道设置
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/h5")
|
||||
@Api(tags = "移动渠道设置")
|
||||
public class ChannelH5Controller {
|
||||
|
||||
@Resource
|
||||
IChannelH5ConfigService iChannelH5ConfigService;
|
||||
|
||||
/**
|
||||
* H5渠道设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<ChannelH5Vo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="H5渠道设置详情")
|
||||
public AjaxResult<ChannelH5Vo> detail() {
|
||||
ChannelH5Vo vo = iChannelH5ConfigService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* H5渠道设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelH5Validate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "H5渠道设置保存")
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="H5渠道设置保存")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody ChannelH5Validate channelH5Validate) {
|
||||
iChannelH5ConfigService.save(channelH5Validate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -5,42 +5,31 @@ import com.mdd.admin.service.IChannelMpConfigService;
|
||||
import com.mdd.admin.validate.channel.ChannelMpValidate;
|
||||
import com.mdd.admin.vo.channel.ChannelMpVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 微信小程序渠道设置
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/mp")
|
||||
@Api(tags = "微信程序渠道")
|
||||
public class ChannelMpController {
|
||||
|
||||
@Resource
|
||||
IChannelMpConfigService iChannelMpConfigService;
|
||||
|
||||
/**
|
||||
* 微信小程序渠道设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<ChannelMpVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="微信程序渠道设置详情")
|
||||
public AjaxResult<ChannelMpVo> detail() {
|
||||
ChannelMpVo vo = iChannelMpConfigService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信小程序渠道设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelMpValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "微信小程序渠道设置保存")
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="微信程序渠道设置保存")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody ChannelMpValidate channelMpValidate) {
|
||||
iChannelMpConfigService.save(channelMpValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -5,42 +5,31 @@ import com.mdd.admin.service.IChannelOaConfigService;
|
||||
import com.mdd.admin.validate.channel.ChannelOaValidate;
|
||||
import com.mdd.admin.vo.channel.ChannelOaVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 微信公众号渠道设置
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oa")
|
||||
@Api(tags = "公众号渠道设置")
|
||||
public class ChannelOaController {
|
||||
|
||||
@Resource
|
||||
IChannelOaConfigService iChannelOaConfigService;
|
||||
|
||||
/**
|
||||
* 公众号渠道设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<ChannelOaVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="公众号渠道设置详情")
|
||||
public AjaxResult<ChannelOaVo> detail() {
|
||||
ChannelOaVo vo = iChannelOaConfigService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公众号渠道设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "公众号渠道设置保存")
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="公众号渠道设置保存")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody ChannelOaValidate channelOaValidate) {
|
||||
iChannelOaConfigService.save(channelOaValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -3,54 +3,37 @@ package com.mdd.admin.controller.channel;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.mdd.admin.service.IChannelOaMenusService;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公众号菜单管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaMenu")
|
||||
@Api(tags = "公众号菜单管理")
|
||||
public class ChannelOaMenuController {
|
||||
|
||||
@Resource
|
||||
IChannelOaMenusService iChannelOaMenusService;
|
||||
|
||||
/**
|
||||
* 菜单详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<JSONArray>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="菜单详情")
|
||||
public AjaxResult<JSONArray> detail() {
|
||||
JSONArray detail = iChannelOaMenusService.detail();
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 仅是保存菜单
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="仅是保存菜单")
|
||||
public AjaxResult<Object> save(@RequestBody List<Object> params) {
|
||||
iChannelOaMenusService.save(params, false);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存并发布菜单
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/publish")
|
||||
@ApiOperation(value="保存并发布菜单")
|
||||
public AjaxResult<Object> publish(@RequestBody List<Object> params) {
|
||||
iChannelOaMenusService.save(params, true);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -8,94 +8,58 @@ import com.mdd.admin.vo.channel.ChannelRpDefaultVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 公众号默认回复管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaReplyDefault")
|
||||
@Api(tags = "公众号默认回复")
|
||||
public class ChannelOaReplyDefaultController {
|
||||
|
||||
@Resource
|
||||
IChannelOaReplyDefaultService iChannelOaReplyDefaultService;
|
||||
|
||||
/**
|
||||
* 默认回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @return AjaxResult<PageResult<ChannelRpDefaultVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="默认回复列表")
|
||||
public AjaxResult<PageResult<ChannelRpDefaultVo>> list(@Validated PageValidate pageValidate) {
|
||||
PageResult<ChannelRpDefaultVo> list = iChannelOaReplyDefaultService.list(pageValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<ChannelRpDefaultVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="默认回复详情")
|
||||
public AjaxResult<ChannelRpDefaultVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ChannelRpDefaultVo vo = iChannelOaReplyDefaultService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param defaultValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="默认回复新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody ChannelRpDefaultValidate defaultValidate) {
|
||||
iChannelOaReplyDefaultService.add(defaultValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param defaultValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="默认回复编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody ChannelRpDefaultValidate defaultValidate) {
|
||||
iChannelOaReplyDefaultService.edit(defaultValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="默认回复删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iChannelOaReplyDefaultService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
@ApiOperation(value="默认回复状态")
|
||||
public AjaxResult<Object> status(@Validated @RequestBody IdValidate idValidate) {
|
||||
iChannelOaReplyDefaultService.status(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -8,94 +8,58 @@ import com.mdd.admin.vo.channel.ChannelRpFollowsVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 公众号关注回复管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaReplyFollow")
|
||||
@Api(tags = "公众号关注回复")
|
||||
public class ChannelOaReplyFollowController {
|
||||
|
||||
@Resource
|
||||
IChannelOaReplyFollowService iChannelOaReplyFollowService;
|
||||
|
||||
/**
|
||||
* 关注回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @return AjaxResult<PageResult<ChannelRpFollowsVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="关注回复列表")
|
||||
public AjaxResult<PageResult<ChannelRpFollowsVo>> list(@Validated PageValidate pageValidate) {
|
||||
PageResult<ChannelRpFollowsVo> list = iChannelOaReplyFollowService.list(pageValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 参数
|
||||
* @return AjaxResult<ChannelRpFollowsVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="关注回复详情")
|
||||
public AjaxResult<ChannelRpFollowsVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ChannelRpFollowsVo vo = iChannelOaReplyFollowService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param followsValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="关注回复新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody ChannelRpFollowsValidate followsValidate) {
|
||||
iChannelOaReplyFollowService.add(followsValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param followsValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="关注回复编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody ChannelRpFollowsValidate followsValidate) {
|
||||
iChannelOaReplyFollowService.edit(followsValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="关注回复删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iChannelOaReplyFollowService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
@ApiOperation(value="关注回复状态")
|
||||
public AjaxResult<Object> status(@Validated @RequestBody IdValidate idValidate) {
|
||||
iChannelOaReplyFollowService.status(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -8,97 +8,61 @@ import com.mdd.admin.vo.channel.ChannelRpKeywordVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 公众号关键词回复管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaReplyKeyword")
|
||||
@Api(tags = "公众号关键回复")
|
||||
public class ChannelOaReplyKeywordController {
|
||||
|
||||
@Resource
|
||||
IChannelOaReplyKeywordService iChannelOaReplyKeywordService;
|
||||
|
||||
/**
|
||||
* 关键词回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<PageResult<ChannelRpKeywordVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="关键词回复列表")
|
||||
public AjaxResult<PageResult<ChannelRpKeywordVo>> list(@Validated PageValidate pageValidate) {
|
||||
PageResult<ChannelRpKeywordVo> list = iChannelOaReplyKeywordService.list(pageValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<ChannelRpKeywordVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="关键词回复详情")
|
||||
public AjaxResult<ChannelRpKeywordVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ChannelRpKeywordVo vo = iChannelOaReplyKeywordService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param keywordValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="关键词回复新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody ChannelRpKeywordValidate keywordValidate) {
|
||||
iChannelOaReplyKeywordService.add(keywordValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param keywordValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="关键词回复编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody ChannelRpKeywordValidate keywordValidate) {
|
||||
iChannelOaReplyKeywordService.edit(keywordValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="关键词回复删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iChannelOaReplyKeywordService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
@ApiOperation(value="关键词回复状态")
|
||||
public AjaxResult<Object> status(@Validated @RequestBody IdValidate idValidate) {
|
||||
iChannelOaReplyKeywordService.status(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,41 +4,30 @@ import com.mdd.admin.service.IChannelOpService;
|
||||
import com.mdd.admin.validate.channel.ChannelOpValidate;
|
||||
import com.mdd.admin.vo.channel.ChannelOpVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 微信开发平台渠道设置
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/op")
|
||||
@Api(tags = "微信开放渠道")
|
||||
public class ChannelOpController {
|
||||
|
||||
@Resource
|
||||
IChannelOpService iChannelOpService;
|
||||
|
||||
/**
|
||||
* 开放平台设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="开放平台设置详情")
|
||||
public AjaxResult<Object> detail() {
|
||||
ChannelOpVo vo = iChannelOpService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开放平台设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param opValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="开放平台设置保存")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody ChannelOpValidate opValidate) {
|
||||
iChannelOpService.save(opValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.mdd.common.aop.NotPower;
|
||||
import com.mdd.admin.service.IDecorateDataService;
|
||||
import com.mdd.admin.vo.decorate.DecorateDataArticleVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@@ -12,25 +14,17 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 装修数据管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/decorate/data")
|
||||
@Api(tags = "装修数据管理")
|
||||
public class DecorateDataController {
|
||||
|
||||
@Resource
|
||||
IDecorateDataService iDecorateDataService;
|
||||
|
||||
/**
|
||||
* 获取文章数据
|
||||
*
|
||||
* @author fzr
|
||||
* @param limit 条数
|
||||
* @return AjaxResult<List<DecorateDataArticleVo>>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/article")
|
||||
@ApiOperation(value="获取文章数据")
|
||||
public AjaxResult<List<DecorateDataArticleVo>> article(@RequestParam(defaultValue = "10") Integer limit) {
|
||||
List<DecorateDataArticleVo> list = iDecorateDataService.article(limit);
|
||||
return AjaxResult.success(list);
|
||||
|
||||
@@ -6,16 +6,16 @@ import com.mdd.admin.validate.DecoratePageValidate;
|
||||
import com.mdd.admin.vo.decorate.DecoratePageVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 页面装修管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/decorate/pages")
|
||||
@Api(tags = "装修页面管理")
|
||||
public class DecoratePagesController {
|
||||
|
||||
@Resource
|
||||
@@ -29,6 +29,7 @@ public class DecoratePagesController {
|
||||
* @return AjaxResult<DecoratePageVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="页面装修详情")
|
||||
public AjaxResult<DecoratePageVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
DecoratePageVo vo = iDecoratePageService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
@@ -43,6 +44,7 @@ public class DecoratePagesController {
|
||||
*/
|
||||
@Log(title = "页面装修保存")
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="页面装修保存")
|
||||
public AjaxResult<Object> save(@RequestBody DecoratePageValidate decoratePageValidate) {
|
||||
iDecoratePageService.save(decoratePageValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -4,16 +4,16 @@ import com.mdd.admin.service.IDecorateTabbarService;
|
||||
import com.mdd.admin.validate.DecorateTabsValidate;
|
||||
import com.mdd.admin.vo.decorate.DecorateTabbarVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 装修底部导航管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/decorate/tabbar")
|
||||
@Api(tags = "装修导航管理")
|
||||
public class DecorateTabbarController {
|
||||
|
||||
@Resource
|
||||
@@ -26,6 +26,7 @@ public class DecorateTabbarController {
|
||||
* @return AjaxResult<DecorateTabbarVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="底部导航详情")
|
||||
public AjaxResult<DecorateTabbarVo> detail() {
|
||||
DecorateTabbarVo vo = iDecorateTabbarService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
@@ -39,6 +40,7 @@ public class DecorateTabbarController {
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="底部导航保存")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody DecorateTabsValidate tabsValidate) {
|
||||
iDecorateTabbarService.save(tabsValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -4,6 +4,8 @@ package com.mdd.admin.controller.monitor;
|
||||
import com.mdd.admin.aop.Log;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.util.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.data.redis.connection.RedisServerCommands;
|
||||
import org.springframework.data.redis.core.RedisCallback;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
@@ -14,11 +16,9 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 缓存监控管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/monitor")
|
||||
@Api(tags = "监控缓存管理")
|
||||
public class MonitorCacheController {
|
||||
|
||||
@Resource
|
||||
@@ -32,6 +32,7 @@ public class MonitorCacheController {
|
||||
*/
|
||||
@Log(title = "缓存监控")
|
||||
@GetMapping("/cache")
|
||||
@ApiOperation(value="缓存监控")
|
||||
public AjaxResult<Object> info() {
|
||||
Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) RedisServerCommands::info);
|
||||
Properties commandStats = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info("commandstats"));
|
||||
|
||||
@@ -3,17 +3,17 @@ package com.mdd.admin.controller.monitor;
|
||||
import com.mdd.admin.aop.Log;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.ServerResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 服务监控管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/monitor")
|
||||
@Api(tags = "监控服务管理")
|
||||
public class MonitorServerController {
|
||||
|
||||
/**
|
||||
@@ -24,6 +24,7 @@ public class MonitorServerController {
|
||||
*/
|
||||
@Log(title = "服务监控")
|
||||
@GetMapping("/server")
|
||||
@ApiOperation(value="服务监控")
|
||||
public AjaxResult<Map<String, Object>> info() {
|
||||
ServerResult server = new ServerResult();
|
||||
return AjaxResult.success(server.copyTo());
|
||||
|
||||
@@ -4,42 +4,31 @@ import com.mdd.admin.service.ISettingCopyrightService;
|
||||
import com.mdd.admin.validate.setting.SettingCopyrightValidate;
|
||||
import com.mdd.admin.vo.setting.SettingCopyrightVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站版权配置管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/copyright")
|
||||
@Api(tags = "配置网站版权")
|
||||
public class SettingCopyrightController {
|
||||
|
||||
@Resource
|
||||
ISettingCopyrightService iSettingCopyrightService;
|
||||
|
||||
/**
|
||||
* 获取网站版权信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<List<SettingCopyrightVo>>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="获取网站版权信息")
|
||||
public AjaxResult<List<SettingCopyrightVo>> detail() {
|
||||
List<SettingCopyrightVo> list = iSettingCopyrightService.detail();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存网站版本信息
|
||||
*
|
||||
* @author fzr
|
||||
* @param copyrightValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="保存网站版本信息")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody SettingCopyrightValidate copyrightValidate) {
|
||||
iSettingCopyrightService.save(copyrightValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -12,6 +12,8 @@ import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.util.StringUtils;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -19,40 +21,25 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 字典数据配置管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/dict/data")
|
||||
@Api(tags = "配置字典数据")
|
||||
public class SettingDictDataController {
|
||||
|
||||
@Resource
|
||||
ISettingDictDataService iSettingDictDataService;
|
||||
|
||||
/**
|
||||
* 字典数据所有
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return jaxResult<List<SettingDictDataVo>>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/all")
|
||||
@ApiOperation(value="字典数据所有")
|
||||
public AjaxResult<List<SettingDictDataVo>> all(@RequestParam Map<String, String> params) {
|
||||
Assert.isFalse(StringUtils.isEmpty(params.get("dictType")), "dictType缺失");
|
||||
List<SettingDictDataVo> list = iSettingDictDataService.all(params);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典数据列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return PageResult<SettingDictDataVo>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="字典数据列表")
|
||||
public AjaxResult<PageResult<SettingDictDataVo>> list(@Validated PageValidate pageValidate,
|
||||
@RequestParam Map<String, String> params) {
|
||||
Assert.isFalse(StringUtils.isEmpty(params.get("dictType")), "dictType缺失");
|
||||
@@ -60,53 +47,29 @@ public class SettingDictDataController {
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典数据详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<SettingDictDataVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="字典数据详情")
|
||||
public AjaxResult<SettingDictDataVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SettingDictDataVo vo = iSettingDictDataService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典数据新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="字典数据新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody DictDataCreateValidate createValidate) {
|
||||
iSettingDictDataService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典数据编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="字典数据编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody DictDataUpdateValidate updateValidate) {
|
||||
iSettingDictDataService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典数据删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idsValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="字典数据删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdsValidate idsValidate) {
|
||||
iSettingDictDataService.del(idsValidate.getIds());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.mdd.admin.vo.setting.SettingDictTypeVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -17,91 +19,53 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 字典类型配置管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/dict/type")
|
||||
@Api(tags = "配置字典类型")
|
||||
public class SettingDictTypeController {
|
||||
|
||||
@Resource
|
||||
ISettingDictTypeService iSettingDictTypeService;
|
||||
|
||||
/**
|
||||
* 字典类型所有
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<List<SettingDictTypeVo>>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/all")
|
||||
@ApiOperation(value="字典类型所有")
|
||||
public AjaxResult<List<SettingDictTypeVo>> all() {
|
||||
List<SettingDictTypeVo> list = iSettingDictTypeService.all();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典类型列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return AjaxResult<PageResult<SettingDictTypeVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="字典类型列表")
|
||||
public AjaxResult<PageResult<SettingDictTypeVo>> list(@Validated PageValidate pageValidate,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<SettingDictTypeVo> list = iSettingDictTypeService.list(pageValidate, params);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典类型详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<SettingDictTypeVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="字典类型详情")
|
||||
public AjaxResult<SettingDictTypeVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SettingDictTypeVo vo = iSettingDictTypeService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典类型新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="字典类型新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody DictTypeCreateValidate createValidate) {
|
||||
iSettingDictTypeService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典类型编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="字典类型编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody DictTypeUpdateValidate updateValidate) {
|
||||
iSettingDictTypeService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典类型删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idsValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="字典类型删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdsValidate idsValidate) {
|
||||
iSettingDictTypeService.del(idsValidate.getIds());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.mdd.admin.service.ISettingLoginService;
|
||||
import com.mdd.admin.validate.setting.SettingLoginValidate;
|
||||
import com.mdd.admin.vo.setting.SettingLoginVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -12,31 +14,21 @@ import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/login")
|
||||
@Api(tags = "配置用户登录")
|
||||
public class SettingLoginController {
|
||||
|
||||
@Resource
|
||||
ISettingLoginService iSettingLoginService;
|
||||
|
||||
/**
|
||||
* 登录设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<SettingLoginVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="登录设置详情")
|
||||
public AjaxResult<SettingLoginVo> detail() {
|
||||
SettingLoginVo vo = iSettingLoginService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param loginValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="登录设置保存")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody SettingLoginValidate loginValidate) {
|
||||
iSettingLoginService.save(loginValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.mdd.admin.vo.setting.SettingNoticeDetailVo;
|
||||
import com.mdd.admin.vo.setting.SettingNoticeListedVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -17,45 +19,28 @@ import java.util.Map;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/notice")
|
||||
@Api(tags = "配置消息通知")
|
||||
public class SettingNoticeController {
|
||||
|
||||
@Resource
|
||||
ISettingNoticeService iSettingNoticeService;
|
||||
|
||||
/**
|
||||
* 通知设置列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param recipient 类型: 1=用户, 2=平台
|
||||
* @return AjaxResult<List<SettingNoticeListVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="通知设置列表")
|
||||
public AjaxResult<List<SettingNoticeListedVo>> list(@RequestParam Integer recipient) {
|
||||
List<SettingNoticeListedVo> list = iSettingNoticeService.list(recipient);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通知设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<SettingNoticeDetailVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="通知设置详情")
|
||||
public AjaxResult<SettingNoticeDetailVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SettingNoticeDetailVo vo = iSettingNoticeService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通知设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="通知设置保存")
|
||||
public AjaxResult<Object> save(@RequestBody Map<String, Object> params) {
|
||||
iSettingNoticeService.save(params);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -4,41 +4,30 @@ import com.mdd.admin.service.ISettingProtocolService;
|
||||
import com.mdd.admin.validate.setting.SettingProtocolValidate;
|
||||
import com.mdd.admin.vo.setting.SettingProtocolDetailVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 政策协议配置管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/protocol")
|
||||
@Api(tags = "配置政策协议")
|
||||
public class SettingProtocolController {
|
||||
|
||||
@Resource
|
||||
ISettingProtocolService iSettingProtocolService;
|
||||
|
||||
/**
|
||||
* 获取政策协议信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<SettingProtocolDetailVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="获取政策协议信息")
|
||||
public AjaxResult<SettingProtocolDetailVo> detail() {
|
||||
SettingProtocolDetailVo detail = iSettingProtocolService.detail();
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存政策协议信息
|
||||
*
|
||||
* @author fzr
|
||||
* @param protocolValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="保存政策协议信息")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody SettingProtocolValidate protocolValidate) {
|
||||
iSettingProtocolService.save(protocolValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -4,42 +4,31 @@ import com.mdd.admin.service.ISettingSearchService;
|
||||
import com.mdd.admin.validate.setting.SettingSearchValidate;
|
||||
import com.mdd.admin.vo.setting.SettingSearchDetailVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 热搜设置
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/search")
|
||||
@Api(tags = "配置热门搜索")
|
||||
public class SettingSearchController {
|
||||
|
||||
@Resource
|
||||
ISettingSearchService iSettingSearchService;
|
||||
|
||||
/**
|
||||
* 热门搜索详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<SettingSearchDetailVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="热门搜索详情")
|
||||
public AjaxResult<SettingSearchDetailVo> detail() {
|
||||
SettingSearchDetailVo vo = iSettingSearchService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 热门搜索保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param searchValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="热门搜索保存")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody SettingSearchValidate searchValidate) {
|
||||
iSettingSearchService.save(searchValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mdd.admin.controller.setting;
|
||||
import com.mdd.admin.aop.Log;
|
||||
import com.mdd.admin.service.ISettingSmsService;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -14,45 +16,29 @@ import java.util.Map;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/sms")
|
||||
@Api(tags = "配置短信引擎")
|
||||
public class SettingSmsController {
|
||||
|
||||
@Resource
|
||||
ISettingSmsService iSettingSmsService;
|
||||
|
||||
/**
|
||||
* 短信引擎列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<List<Map<String, Object>>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="短信引擎列表")
|
||||
public AjaxResult<List<Map<String, Object>>> list() {
|
||||
List<Map<String, Object>> list = iSettingSmsService.list();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 短信引擎详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param alias 别名
|
||||
* @return AjaxResult<Map<String, Object>>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="短信引擎详情")
|
||||
public AjaxResult<Map<String, Object>> detail(String alias) {
|
||||
Map<String, Object> map = iSettingSmsService.detail(alias);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 短信引擎保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "短信引擎保存")
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="短信引擎保存")
|
||||
public AjaxResult<Object> save(@RequestBody Map<String, String> params) {
|
||||
iSettingSmsService.save(params);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -3,67 +3,45 @@ package com.mdd.admin.controller.setting;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.mdd.admin.service.ISettingStorageService;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 存储方式配置管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/storage")
|
||||
@Api(tags = "配置存储方式")
|
||||
public class SettingStorageController {
|
||||
|
||||
@Resource
|
||||
ISettingStorageService iSettingStorageService;
|
||||
|
||||
/**
|
||||
* 存储列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<List<Map<String, Object>>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="存储列表")
|
||||
public AjaxResult<List<Map<String, Object>>> list() {
|
||||
List<Map<String, Object>> list = iSettingStorageService.list();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储详情
|
||||
*
|
||||
* @param alias 引擎别名
|
||||
* @return AjaxResult<Map<String, Object>>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="存储详情")
|
||||
public AjaxResult<Map<String, Object>> detail(String alias) {
|
||||
Map<String, Object> map = iSettingStorageService.detail(alias);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="存储编辑")
|
||||
public AjaxResult<Object> edit(@RequestBody Map<String, String> params) {
|
||||
iSettingStorageService.edit(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储切换
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/change")
|
||||
@ApiOperation(value="存储切换")
|
||||
public AjaxResult<Object> change(@RequestBody Map<String, String> params) {
|
||||
Assert.notNull(params.get("alias"), "alias参数缺失");
|
||||
Assert.notNull(params.get("status"), "status参数缺失");
|
||||
|
||||
@@ -4,41 +4,30 @@ import com.mdd.admin.service.ISettingUserService;
|
||||
import com.mdd.admin.validate.setting.SettingUserValidate;
|
||||
import com.mdd.admin.vo.setting.SettingUserVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 用户设置管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/user")
|
||||
@Api(tags = "配置用户参数")
|
||||
public class SettingUserController {
|
||||
|
||||
@Resource
|
||||
ISettingUserService iSettingUserService;
|
||||
|
||||
/**
|
||||
* 用户设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<SettingUserVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="用户设置详情")
|
||||
public AjaxResult<SettingUserVo> detail() {
|
||||
SettingUserVo vo = iSettingUserService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param userValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="用户设置保存")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody SettingUserValidate userValidate) {
|
||||
iSettingUserService.save(userValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -4,42 +4,31 @@ import com.mdd.admin.service.ISettingWebsiteService;
|
||||
import com.mdd.admin.validate.setting.SettingWebsiteValidate;
|
||||
import com.mdd.admin.vo.setting.SettingWebsiteVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 网站信息配置管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/setting/website")
|
||||
@Api(tags = "配置网站信息")
|
||||
public class SettingWebsiteController {
|
||||
|
||||
@Resource
|
||||
ISettingWebsiteService iSettingWebsiteService;
|
||||
|
||||
/**
|
||||
* 获取网站配置信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<SettingWebsiteVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="获取网站配置信息")
|
||||
public AjaxResult<SettingWebsiteVo> detail() {
|
||||
SettingWebsiteVo detail = iSettingWebsiteService.detail();
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存网站配置信息
|
||||
*
|
||||
* @author fzr
|
||||
* @param websiteValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value="保存网站配置信息")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody SettingWebsiteValidate websiteValidate) {
|
||||
iSettingWebsiteService.save(websiteValidate);
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -16,129 +16,84 @@ import com.mdd.admin.vo.system.SystemAuthAdminSelvesVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 系统管理员管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/admin")
|
||||
@Api(tags = "系统用户管理")
|
||||
public class SystemAuthAdminController {
|
||||
|
||||
@Resource
|
||||
ISystemAuthAdminService iSystemAuthAdminService;
|
||||
|
||||
/**
|
||||
* 管理员列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return AjaxResult<PageResult<SystemAuthAdminListedVo>>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="管理员列表")
|
||||
public AjaxResult<PageResult<SystemAuthAdminListedVo>> list(@Validated PageValidate pageValidate,
|
||||
@Validated SystemAdminSearchValidate searchValidate) {
|
||||
PageResult<SystemAuthAdminListedVo> list = iSystemAuthAdminService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<SystemAuthSelfVo>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/self")
|
||||
@ApiOperation(value="管理员信息")
|
||||
public AjaxResult<SystemAuthAdminSelvesVo> self() {
|
||||
Integer adminId = LikeAdminThreadLocal.getAdminId();
|
||||
SystemAuthAdminSelvesVo vo = iSystemAuthAdminService.self(adminId);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<SystemAuthAdminDetailVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="管理员详情")
|
||||
public AjaxResult<SystemAuthAdminDetailVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SystemAuthAdminDetailVo vo = iSystemAuthAdminService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "管理员新增")
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="管理员新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody SystemAdminCreateValidate createValidate) {
|
||||
iSystemAuthAdminService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "管理员编辑")
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="管理员编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody SystemAdminUpdateValidate updateValidate) {
|
||||
Integer adminId = LikeAdminThreadLocal.getAdminId();
|
||||
iSystemAuthAdminService.edit(updateValidate, adminId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前管理员更新
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@NotPower
|
||||
@Log(title = "管理员更新")
|
||||
@PostMapping("/upInfo")
|
||||
@ApiOperation(value="当前管理员更新")
|
||||
public AjaxResult<Object> upInfo(@Validated @RequestBody SystemAdminUpInfoValidate upInfoValidate) {
|
||||
Integer adminId = LikeAdminThreadLocal.getAdminId();
|
||||
iSystemAuthAdminService.upInfo(upInfoValidate, adminId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员删除
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "管理员删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="管理员删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
Integer adminId = LikeAdminThreadLocal.getAdminId();
|
||||
iSystemAuthAdminService.del(idValidate.getId(), adminId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员状态切换
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "管理员状态")
|
||||
@PostMapping("/disable")
|
||||
@ApiOperation(value="管理员状态切换")
|
||||
public AjaxResult<Object> disable(@Validated @RequestBody IdValidate idValidate) {
|
||||
Integer adminId = LikeAdminThreadLocal.getAdminId();
|
||||
iSystemAuthAdminService.disable(idValidate.getId(), adminId);
|
||||
|
||||
@@ -10,95 +10,60 @@ import com.mdd.admin.validate.system.SystemDeptUpdateValidate;
|
||||
import com.mdd.admin.vo.system.SystemAuthDeptVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统部门管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/dept")
|
||||
@Api(tags = "系统部门管理")
|
||||
public class SystemAuthDeptController {
|
||||
|
||||
@Resource
|
||||
ISystemAuthDeptService iSystemAuthDeptService;
|
||||
|
||||
/**
|
||||
* 部门所有
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<List<SystemAuthDeptVo>>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/all")
|
||||
@ApiOperation(value="部门所有")
|
||||
public AjaxResult<List<SystemAuthDeptVo>> all() {
|
||||
List<SystemAuthDeptVo> list = iSystemAuthDeptService.all();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param searchValidate 搜索参数
|
||||
* @return AjaxResult<JSONArray>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="部门列表")
|
||||
public AjaxResult<JSONArray> list(@Validated SystemDeptSearchValidate searchValidate) {
|
||||
JSONArray list = iSystemAuthDeptService.list(searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<SystemAuthDeptVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="部门详情")
|
||||
public AjaxResult<SystemAuthDeptVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SystemAuthDeptVo vo = iSystemAuthDeptService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="部门新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody SystemDeptCreateValidate createValidate) {
|
||||
iSystemAuthDeptService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="部门编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody SystemDeptUpdateValidate updateValidate) {
|
||||
iSystemAuthDeptService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="部门删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iSystemAuthDeptService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -11,99 +11,65 @@ import com.mdd.admin.validate.system.SystemMenuUpdateValidate;
|
||||
import com.mdd.admin.vo.system.SystemAuthMenuVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统菜单管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/menu")
|
||||
@Api(tags = "系统菜单管理")
|
||||
public class SystemAuthMenuController {
|
||||
|
||||
@Resource
|
||||
ISystemAuthMenuService iSystemAuthMenuService;
|
||||
|
||||
/**
|
||||
* 获取菜单路由
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<JSONArray>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/route")
|
||||
@ApiOperation(value="获取菜单路由")
|
||||
public AjaxResult<JSONArray> route() {
|
||||
List<Integer> roleIds = LikeAdminThreadLocal.getRoleIds();
|
||||
JSONArray lists = iSystemAuthMenuService.selectMenuByRoleId(roleIds);
|
||||
return AjaxResult.success(lists);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<JSONArray>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="获取菜单列表")
|
||||
public AjaxResult<JSONArray> list() {
|
||||
JSONArray lists = iSystemAuthMenuService.list();
|
||||
return AjaxResult.success(lists);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<SystemAuthMenuVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="获取菜单详情")
|
||||
public AjaxResult<SystemAuthMenuVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SystemAuthMenuVo vo = iSystemAuthMenuService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增菜单
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "菜单新增")
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="新增菜单")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody SystemMenuCreateValidate createValidate) {
|
||||
iSystemAuthMenuService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新菜单
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "菜单编辑")
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="菜单编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody SystemMenuUpdateValidate updateValidate) {
|
||||
iSystemAuthMenuService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜单
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "菜单删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="菜单删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iSystemAuthMenuService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -11,95 +11,61 @@ import com.mdd.admin.vo.system.SystemAuthPostVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统岗位管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/post")
|
||||
@Api(tags = "系统岗位管理")
|
||||
public class SystemAuthPostController {
|
||||
|
||||
@Resource
|
||||
ISystemAuthPostService iSystemAuthPostService;
|
||||
|
||||
/**
|
||||
* 岗位所有
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<List<SystemAuthPostVo>>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/all")
|
||||
@ApiOperation(value="所有岗位")
|
||||
public AjaxResult<List<SystemAuthPostVo>> all() {
|
||||
List<SystemAuthPostVo> list = iSystemAuthPostService.all();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 岗位列表
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return PageResult<SystemAuthPostVo>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="岗位列表")
|
||||
public AjaxResult<PageResult<SystemAuthPostVo>> list(@Validated PageValidate pageValidate,
|
||||
@Validated SystemPostSearchValidate searchValidate) {
|
||||
PageResult<SystemAuthPostVo> list = iSystemAuthPostService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 岗位详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<SystemAuthPostVo>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="岗位详情")
|
||||
public AjaxResult<SystemAuthPostVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SystemAuthPostVo vo = iSystemAuthPostService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 岗位新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="岗位新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody SystemPostCreateValidate createValidate) {
|
||||
iSystemAuthPostService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 岗位编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="岗位编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody SystemPostUpdateValidate updateValidate) {
|
||||
iSystemAuthPostService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 岗位删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="岗位删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iSystemAuthPostService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -11,100 +11,65 @@ import com.mdd.admin.vo.system.SystemAuthRoleVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统角色管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/role")
|
||||
@Api(tags = "系统角色管理")
|
||||
public class SystemAuthRoleController {
|
||||
|
||||
@Resource
|
||||
ISystemAuthRoleService iSystemAuthRoleService;
|
||||
|
||||
/**
|
||||
* 角色所有
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<List<SystemAuthRoleVo>>
|
||||
*/
|
||||
@NotPower
|
||||
@GetMapping("/all")
|
||||
@ApiOperation(value="所有角色")
|
||||
public AjaxResult<List<SystemAuthRoleVo>> all() {
|
||||
List<SystemAuthRoleVo> list = iSystemAuthRoleService.all();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageValidate 分页参数
|
||||
* @return PageResult<SystemAuthRoleVo>
|
||||
*/
|
||||
@Log(title = "角色列表")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="角色列表")
|
||||
public AjaxResult<PageResult<SystemAuthRoleVo>> list(@Validated PageValidate pageValidate) {
|
||||
PageResult<SystemAuthRoleVo> list = iSystemAuthRoleService.list(pageValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult<SystemAuthRoleVo>
|
||||
*/
|
||||
@Log(title = "角色详情")
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="角色详情")
|
||||
public AjaxResult<SystemAuthRoleVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SystemAuthRoleVo vo = iSystemAuthRoleService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增角色
|
||||
*
|
||||
* @author fzr
|
||||
* @param createValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "角色新增")
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="角色新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody SystemRoleCreateValidate createValidate) {
|
||||
iSystemAuthRoleService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑角色
|
||||
*
|
||||
* @author fzr
|
||||
* @param updateValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "角色编辑")
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="角色编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody SystemRoleUpdateValidate updateValidate) {
|
||||
iSystemAuthRoleService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除角色
|
||||
*
|
||||
* @author fzr
|
||||
* @param idValidate 参数
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@Log(title = "角色删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="角色删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iSystemAuthRoleService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -7,58 +7,41 @@ import com.mdd.admin.validate.system.SystemAdminLoginsValidate;
|
||||
import com.mdd.admin.vo.system.SystemCaptchaVo;
|
||||
import com.mdd.admin.vo.system.SystemLoginVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 系统登录管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system")
|
||||
@Api(tags = "系统登录管理")
|
||||
public class SystemLoginController {
|
||||
|
||||
@Resource
|
||||
ISystemLoginService iSystemLoginService;
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult<SystemCaptchaVo>
|
||||
*/
|
||||
@NotLogin
|
||||
@GetMapping("/captcha")
|
||||
@ApiOperation(value="取验证码")
|
||||
public AjaxResult<SystemCaptchaVo> captcha() {
|
||||
SystemCaptchaVo vo = iSystemLoginService.captcha();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录系统
|
||||
*
|
||||
* @author fzr
|
||||
* @param loginsValidate 登录参数
|
||||
* @return AjaxResult<SystemLoginVo>
|
||||
*/
|
||||
@NotLogin
|
||||
@PostMapping("/login")
|
||||
@ApiOperation(value="登录系统")
|
||||
public AjaxResult<SystemLoginVo> login(@Validated() @RequestBody SystemAdminLoginsValidate loginsValidate) {
|
||||
SystemLoginVo vo = iSystemLoginService.login(loginsValidate);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
*
|
||||
* @author fzr
|
||||
* @param request 请求接口
|
||||
* @return AjaxResult<Object>
|
||||
*/
|
||||
@NotPower
|
||||
@PostMapping("/logout")
|
||||
@ApiOperation(value="退出登录")
|
||||
public AjaxResult<Object> logout(HttpServletRequest request) {
|
||||
iSystemLoginService.logout(request.getHeader("token"));
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.mdd.admin.vo.system.SystemLogLoginVo;
|
||||
import com.mdd.admin.vo.system.SystemLogOperateVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -15,38 +17,24 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 系统日志管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/system/log")
|
||||
@Api(tags = "系统日志管理")
|
||||
public class SystemLogsController {
|
||||
|
||||
@Resource
|
||||
ISystemLogsServer iSystemLogsServer;
|
||||
|
||||
/**
|
||||
* 系统操作日志
|
||||
*
|
||||
* @author fzr
|
||||
* @param searchValidate 搜索参数
|
||||
* @return AjaxResult<PageResult<LogOperateVo>>
|
||||
*/
|
||||
@GetMapping("/operate")
|
||||
@ApiOperation(value="系统操作日志")
|
||||
public AjaxResult<PageResult<SystemLogOperateVo>> operate(@Validated PageValidate pageValidate,
|
||||
@Validated SystemSearchOperateValidate searchValidate) {
|
||||
PageResult<SystemLogOperateVo> list = iSystemLogsServer.operate(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统登录日志
|
||||
*
|
||||
* @author fzr
|
||||
* @param searchValidate 搜索参数
|
||||
* @return AjaxResult<PageResult<LogLoginVo>>
|
||||
*/
|
||||
@GetMapping("/login")
|
||||
@ApiOperation(value="系统登录日志")
|
||||
public AjaxResult<PageResult<SystemLogLoginVo>> login(@Validated PageValidate pageValidate,
|
||||
@Validated SystemSearchLoginsValidate searchValidate) {
|
||||
PageResult<SystemLogLoginVo> list = iSystemLogsServer.login(pageValidate, searchValidate);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -9,24 +11,25 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 附件分类参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("附件分类参数")
|
||||
public class AlbumCateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "缺少pid参数")
|
||||
@Min(value = 0, message = "pid参数必须为数字")
|
||||
@ApiModelProperty(value = "上级ID", required = true)
|
||||
private Integer pid;
|
||||
|
||||
@NotNull(message = "缺少type参数")
|
||||
@IntegerContains(values = {10, 20, 30}, message = "type不在合法值内")
|
||||
@ApiModelProperty(value = "附件类型", required = true)
|
||||
private Integer type;
|
||||
|
||||
@NotEmpty(message = "名称不能为空")
|
||||
@Length(min = 1, max = 30, message = "名称不能大于30个字符")
|
||||
@ApiModelProperty(value = "附件名称", required = true)
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 附件移动参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("附件移动参数")
|
||||
public class AlbumMoveValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "ids参数缺失")
|
||||
@ApiModelProperty(value = "附件ID", required = true)
|
||||
private List<Integer> ids;
|
||||
|
||||
@NotNull(message = "cid参数缺失")
|
||||
@ApiModelProperty(value = "类目ID", required = true)
|
||||
private Integer cid;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 附件重命名参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("附件重命名参数")
|
||||
public class AlbumRenameValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "附件ID", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotEmpty(message = "名称不能为空")
|
||||
@Length(min = 1, max = 30, message = "名称不能大于30个字符")
|
||||
@ApiModelProperty(value = "附件名称", required = true)
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 附件搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("附件搜索参数")
|
||||
public class AlbumSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "分类ID")
|
||||
private Integer cid;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private String keyword;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -9,24 +11,25 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章分类创建参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章分类创建参数")
|
||||
public class ArtCateCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotEmpty(message = "分类名称不能为空")
|
||||
@Length(min = 1, max = 60, message = "分类名称不能大于60个字符")
|
||||
@ApiModelProperty(value = "分类名称", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort;
|
||||
|
||||
@NotNull(message = "缺少isShow参数")
|
||||
@IntegerContains(values = {0, 1}, message = "isShow不是合法值")
|
||||
@ApiModelProperty(value = "是否显示", required = true)
|
||||
private Integer isShow;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章分类搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章分类搜索参数")
|
||||
public class ArtCateSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "分类名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "是否显示")
|
||||
private Integer isShow;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -10,27 +12,29 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章分类更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章分类更新参数")
|
||||
public class ArtCateUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotEmpty(message = "分类名称不能为空")
|
||||
@Length(min = 1, max = 60, message = "分类名称不能大于60个字符")
|
||||
@ApiModelProperty(value = "分类名称", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort;
|
||||
|
||||
@NotNull(message = "缺少isShow参数")
|
||||
@IntegerContains(values = {0, 1}, message = "isShow不是合法值")
|
||||
@ApiModelProperty(value = "是否显示", required = true)
|
||||
private Integer isShow;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -10,43 +12,51 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章创建参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章创建参数")
|
||||
public class ArticleCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "cid参数必传且需大于0")
|
||||
@ApiModelProperty(value = "分类ID", required = true)
|
||||
private Integer cid;
|
||||
|
||||
@NotEmpty(message = "文章标题不能为空")
|
||||
@Length(min = 1, max = 200, message = "文章标题不能大于200个字符")
|
||||
@ApiModelProperty(value = "文章标题", required = true)
|
||||
private String title;
|
||||
|
||||
@Length(max = 200, message = "简介不能超出200个字符")
|
||||
@ApiModelProperty(value = "文章简介")
|
||||
private String intro = "";
|
||||
|
||||
@Length(max = 200, message = "图片链接过长不能超200个字符")
|
||||
@ApiModelProperty(value = "封面图片")
|
||||
private String image = "";
|
||||
|
||||
@Length(max = 32, message = "作者名称不能超32个字符")
|
||||
@ApiModelProperty(value = "作者姓名")
|
||||
private String author = "";
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort;
|
||||
|
||||
@NotNull(message = "缺少isShow参数")
|
||||
@IntegerContains(values = {0, 1}, message = "isShow不是合法值")
|
||||
@ApiModelProperty(value = "是否显示", required = true)
|
||||
private Integer isShow;
|
||||
|
||||
@ApiModelProperty(value = "文章内容")
|
||||
private String content = "";
|
||||
|
||||
@ApiModelProperty(value = "文章描述")
|
||||
private String summary = "";
|
||||
|
||||
@DecimalMin(value = "0", message = "初始浏览量不能少于0")
|
||||
@ApiModelProperty(value = "浏览数量")
|
||||
private Integer visit = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,25 +1,30 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章搜索参数")
|
||||
public class ArticleSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "文章标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "文章分类")
|
||||
private Integer cid;
|
||||
|
||||
@ApiModelProperty(value = "是否显示")
|
||||
private Integer isShow;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -10,46 +12,55 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章更新参数")
|
||||
public class ArticleUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@IDMust(message = "cid参数必传且需大于0")
|
||||
@ApiModelProperty(value = "分类ID", required = true)
|
||||
private Integer cid;
|
||||
|
||||
@NotEmpty(message = "文章标题不能为空")
|
||||
@Length(min = 1, max = 200, message = "文章标题不能大于200个字符")
|
||||
@ApiModelProperty(value = "文章标题", required = true)
|
||||
private String title;
|
||||
|
||||
@Length(max = 200, message = "简介不能超出200个字符")
|
||||
@ApiModelProperty(value = "文章简介")
|
||||
private String intro = "";
|
||||
|
||||
@Length(max = 200, message = "图片链接过长不能超200个字符")
|
||||
@ApiModelProperty(value = "封面图片")
|
||||
private String image = "";
|
||||
|
||||
@Length(max = 32, message = "作者名称不能超32个字符")
|
||||
@ApiModelProperty(value = "作者姓名")
|
||||
private String author = "";
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort;
|
||||
|
||||
@NotNull(message = "缺少isShow参数")
|
||||
@IntegerContains(values = {0, 1}, message = "isShow不是合法值")
|
||||
@ApiModelProperty(value = "是否显示", required = true)
|
||||
private Integer isShow;
|
||||
|
||||
@ApiModelProperty(value = "文章内容")
|
||||
private String content = "";
|
||||
|
||||
@ApiModelProperty(value = "文章描述")
|
||||
private String summary = "";
|
||||
|
||||
@DecimalMin(value = "0", message = "初始浏览量不能少于0")
|
||||
@ApiModelProperty(value = "浏览数量")
|
||||
private Integer visit = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -8,35 +10,44 @@ import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("计划任务创建参数")
|
||||
public class CrontabCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@ApiModelProperty(value = "任务名称", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "groups参数缺失")
|
||||
@ApiModelProperty(value = "任务分组", required = true)
|
||||
private String groups;
|
||||
|
||||
@NotNull(message = "command参数缺失")
|
||||
@ApiModelProperty(value = "执行指令", required = true)
|
||||
private String command;
|
||||
|
||||
@NotNull(message = "rules参数缺失")
|
||||
@ApiModelProperty(value = "执行规则", required = true)
|
||||
private String rules;
|
||||
|
||||
@Length(max = 200, message = "remark参数不能超出200个字符")
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@NotNull(message = "status参数缺失")
|
||||
@IntegerContains(values = {1, 2, 3}, message = "status参数取值异常")
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
@NotNull(message = "strategy参数缺失")
|
||||
@IntegerContains(values = {1, 2, 3}, message = "strategy参数取值异常")
|
||||
@ApiModelProperty(value = "strategy", required = true)
|
||||
private Integer strategy;
|
||||
|
||||
@NotNull(message = "concurrent参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "concurrent参数取值异常")
|
||||
@ApiModelProperty(value = "concurrent", required = true)
|
||||
private Integer concurrent;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -9,38 +11,48 @@ import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("计划任务更新参数")
|
||||
public class CrontabUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "groups参数缺失")
|
||||
@ApiModelProperty(value = "任务分组", required = true)
|
||||
private String groups;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@ApiModelProperty(value = "任务名称", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "command参数缺失")
|
||||
@ApiModelProperty(value = "执行指令", required = true)
|
||||
private String command;
|
||||
|
||||
@NotNull(message = "rules参数缺失")
|
||||
@ApiModelProperty(value = "执行规则", required = true)
|
||||
private String rules;
|
||||
|
||||
@Length(max = 200, message = "remark参数不能超出200个字符")
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@NotNull(message = "status参数缺失")
|
||||
@IntegerContains(values = {1, 2, 3}, message = "status参数取值异常")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private Integer status;
|
||||
|
||||
@NotNull(message = "strategy参数缺失")
|
||||
@IntegerContains(values = {1, 2, 3}, message = "strategy参数取值异常")
|
||||
@ApiModelProperty(value = "strategy", required = true)
|
||||
private Integer strategy;
|
||||
|
||||
@NotNull(message = "concurrent参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "concurrent参数取值异常")
|
||||
@ApiModelProperty(value = "concurrent", required = true)
|
||||
private Integer concurrent;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 页面装修参数类
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("页面装修参数")
|
||||
public class DecoratePageValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "pageData参数缺失")
|
||||
@ApiModelProperty(value = "装修数据", required = true)
|
||||
private String pageData;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
|
||||
import com.mdd.admin.vo.decorate.DecorateTabsListsVo;
|
||||
import com.mdd.admin.vo.decorate.DecorateTabsStyleVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -12,12 +13,15 @@ import java.util.List;
|
||||
* 底部导航装修参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("底部装修参数")
|
||||
public class DecorateTabsValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "样式")
|
||||
private DecorateTabsStyleVo style;
|
||||
|
||||
@ApiModelProperty(value = "列表")
|
||||
private List<DecorateTabsListsVo> list;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户搜索参数")
|
||||
public class UsersSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "渠道")
|
||||
private Integer channel;
|
||||
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户更新参数")
|
||||
public class UsersUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "字段")
|
||||
private String field;
|
||||
|
||||
@ApiModelProperty(value = "值")
|
||||
private String value;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,29 +1,32 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* H5渠道参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("H5渠道参数")
|
||||
public class ChannelH5Validate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "status参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "status不是合法值")
|
||||
@ApiModelProperty(value = "渠道状态", required = true)
|
||||
private Integer status;
|
||||
|
||||
@NotNull(message = "close参数确实")
|
||||
@IntegerContains(values = {0, 1}, message = "close不是合法值")
|
||||
@ApiModelProperty(value = "渠道开关", required = true)
|
||||
private Integer close;
|
||||
|
||||
@Length(max = 500, message = "url不能超500个字符")
|
||||
@ApiModelProperty(value = "关闭链接")
|
||||
private String url;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 小程序渠道参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("小程序渠道参数")
|
||||
public class ChannelMpValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 公众号渠道参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("公众号渠道参数")
|
||||
public class ChannelOaValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 开发平台渠道参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("开发平台渠道参数")
|
||||
public class ChannelOpValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "appId")
|
||||
private String appId;
|
||||
|
||||
@ApiModelProperty(value = "appSecret")
|
||||
private String appSecret;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 公众号默认回复
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("公众号默认回复参数")
|
||||
public class ChannelRpDefaultValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -19,21 +19,26 @@ public class ChannelRpDefaultValidate implements Serializable {
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@NotEmpty(message = "规则名称不能为空")
|
||||
@ApiModelProperty(value = "名称", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "content参数缺失")
|
||||
@NotEmpty(message = "回复内容不能为空")
|
||||
@ApiModelProperty(value = "回复内容", required = true)
|
||||
private String content;
|
||||
|
||||
@NotNull(message = "contentType参数缺失")
|
||||
@IntegerContains(values = {1, 2}, message = "contentType值不符合规范")
|
||||
@ApiModelProperty(value = "内容类型", required = true)
|
||||
private Integer contentType;
|
||||
|
||||
@NotNull(message = "status参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "状态选择异常")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private Integer status;
|
||||
|
||||
@NotNull(message = "sort参数缺失")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 公众号关注回复
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("公众号关注回复参数")
|
||||
public class ChannelRpFollowsValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -19,21 +19,26 @@ public class ChannelRpFollowsValidate implements Serializable {
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@NotEmpty(message = "规则名称不能为空")
|
||||
@ApiModelProperty(value = "名称", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "content参数缺失")
|
||||
@NotEmpty(message = "回复内容不能为空")
|
||||
@ApiModelProperty(value = "回复内容", required = true)
|
||||
private String content;
|
||||
|
||||
@NotNull(message = "contentType参数缺失")
|
||||
@IntegerContains(values = {1, 2}, message = "contentType值不符合规范")
|
||||
@ApiModelProperty(value = "内容类型", required = true)
|
||||
private Integer contentType;
|
||||
|
||||
@NotNull(message = "status参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "状态选择异常")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private Integer status;
|
||||
|
||||
@NotNull(message = "sort参数缺失")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 公众号关键词回复
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("公众号关键词回复参数")
|
||||
public class ChannelRpKeywordValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -19,29 +19,36 @@ public class ChannelRpKeywordValidate implements Serializable {
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@NotEmpty(message = "规则名称不能为空")
|
||||
@ApiModelProperty(value = "名称", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "content参数缺失")
|
||||
@NotEmpty(message = "回复内容不能为空")
|
||||
@ApiModelProperty(value = "回复内容", required = true)
|
||||
private String content;
|
||||
|
||||
@NotNull(message = "contentType参数缺失")
|
||||
@IntegerContains(values = {1, 2})
|
||||
@ApiModelProperty(value = "内容类型", required = true)
|
||||
private Integer contentType;
|
||||
|
||||
@NotNull(message = "status参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "状态选择异常")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private Integer status;
|
||||
|
||||
@NotNull(message = "keyword参数缺失")
|
||||
@NotEmpty(message = "关键词不能为空")
|
||||
@ApiModelProperty(value = "关键词", required = true)
|
||||
private String keyword;
|
||||
|
||||
@NotNull(message = "matchingType参数缺失")
|
||||
@IntegerContains(values = {1, 2})
|
||||
@ApiModelProperty(value = "模式", required = true)
|
||||
private Integer matchingType;
|
||||
|
||||
@NotNull(message = "sort参数缺失")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
package com.mdd.admin.validate.commons;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* ID参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("ID参数")
|
||||
public class IdValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "ID", required = true)
|
||||
private Integer id;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
package com.mdd.admin.validate.commons;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* IDS参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("IDS参数")
|
||||
public class IdsValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "ids参数缺失")
|
||||
@ApiModelProperty(value = "ID数组", required = true)
|
||||
private List<Integer> ids;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package com.mdd.admin.validate.commons;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.DecimalMax;
|
||||
import javax.validation.constraints.DecimalMin;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 分页参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("分页参数")
|
||||
public class PageValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate.setting;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -9,32 +11,36 @@ import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 字典数据创建参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("字典数据创建参数")
|
||||
public class DictDataCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "typeId参数必传且需大于0")
|
||||
@ApiModelProperty(value = "类型ID", required = true)
|
||||
private Integer typeId;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@ApiModelProperty(value = "键", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "value参数缺失")
|
||||
@Length(max = 100, message = "键名不能超出100个字符")
|
||||
@ApiModelProperty(value = "值", required = true)
|
||||
private String value;
|
||||
|
||||
@Length(max = 200, message = "数值不能超出200个字符")
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@NotNull(message = "status参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "status参数不在合法值内")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate.setting;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -9,35 +11,40 @@ import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 字典数据更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("字典数据更新参数")
|
||||
public class DictDataUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "ID", required = true)
|
||||
private Integer id;
|
||||
|
||||
@IDMust(message = "typeId参数必传且需大于0")
|
||||
@ApiModelProperty(value = "类型ID", required = true)
|
||||
private Integer typeId;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@ApiModelProperty(value = "键", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "value参数缺失")
|
||||
@Length(max = 100, message = "键名不能超出100个字符")
|
||||
@ApiModelProperty(value = "值", required = true)
|
||||
private String value;
|
||||
|
||||
@Length(max = 200, message = "数值不能超出200个字符")
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@NotNull(message = "status参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "status参数不在合法值内")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,37 @@
|
||||
package com.mdd.admin.validate.setting;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 字典类型创建参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("字典类型创建参数")
|
||||
public class DictTypeCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "dictName参数缺失")
|
||||
@Length(max = 200, message = "名称不能超出200个字符")
|
||||
@ApiModelProperty(value = "名称", required = true)
|
||||
private String dictName;
|
||||
|
||||
@NotNull(message = "dictType参数缺失")
|
||||
@Length(max = 200, message = "类型不能超出200个字符")
|
||||
@ApiModelProperty(value = "类型", required = true)
|
||||
private String dictType;
|
||||
|
||||
@Length(max = 200, message = "备注不能超出200个字符")
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String dictRemark;
|
||||
|
||||
@NotNull(message = "dictStatus参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "dictStatus参数不在合法值内")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private Integer dictStatus;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,36 +2,41 @@ package com.mdd.admin.validate.setting;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 字典类型更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("字典类型更新参数")
|
||||
public class DictTypeUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "ID", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "dictName参数缺失")
|
||||
@Length(max = 200, message = "名称不能超出200个字符")
|
||||
@ApiModelProperty(value = "名称", required = true)
|
||||
private String dictName;
|
||||
|
||||
@NotNull(message = "dictType参数缺失")
|
||||
@Length(max = 200, message = "类型不能超出200个字符")
|
||||
@ApiModelProperty(value = "类型", required = true)
|
||||
private String dictType;
|
||||
|
||||
@Length(max = 200, message = "备注不能超出200个字符")
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String dictRemark;
|
||||
|
||||
@NotNull(message = "dictStatus参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "dictStatus参数不在合法值内")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private Integer dictStatus;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
package com.mdd.admin.validate.setting;
|
||||
|
||||
import com.mdd.admin.vo.setting.SettingCopyrightVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 版权信息设置参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("版权信息设置参数")
|
||||
public class SettingCopyrightValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "版权列表")
|
||||
private List<SettingCopyrightVo> list;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package com.mdd.admin.validate.setting;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 登录信息设置参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("登录信息设置参数")
|
||||
public class SettingLoginValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
package com.mdd.admin.validate.setting;
|
||||
|
||||
import com.mdd.admin.vo.setting.SettingProtocolObjectVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 政策协议设置参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("政策协议设置参数")
|
||||
public class SettingProtocolValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "服务协议")
|
||||
private SettingProtocolObjectVo service;
|
||||
|
||||
@ApiModelProperty(value = "隐私协议")
|
||||
private SettingProtocolObjectVo privacy;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
package com.mdd.admin.validate.setting;
|
||||
|
||||
import com.mdd.admin.vo.setting.SettingSearchObjectVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 热门搜索设置参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("热门搜索设置参数")
|
||||
public class SettingSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "是否开启热门搜索")
|
||||
private Integer isHotSearch;
|
||||
|
||||
@ApiModelProperty(value = "关键词列表")
|
||||
private List<SettingSearchObjectVo> list;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.mdd.admin.validate.setting;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户设置参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户设置参数")
|
||||
public class SettingUserValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.mdd.admin.validate.setting;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 基础设置参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("基础设置参数")
|
||||
public class SettingWebsiteValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -11,46 +13,54 @@ import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统管理员创建参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统管理员创建参数")
|
||||
public class SystemAdminCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotEmpty(message = "账号不能为空")
|
||||
@Length(min = 2, max = 20, message = "账号必须在2~20个字符内")
|
||||
@ApiModelProperty(value = "登录账号", required = true)
|
||||
private String username;
|
||||
|
||||
@NotEmpty(message = "昵称不能为空")
|
||||
@Length(min = 2, max = 30, message = "昵称必须在2~30个字符内")
|
||||
@ApiModelProperty(value = "用户昵称", required = true)
|
||||
private String nickname;
|
||||
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
@Length(min = 6, max = 32, message = "密码必须在6~32个字符内")
|
||||
@ApiModelProperty(value = "登录密码", required = true)
|
||||
private String password;
|
||||
|
||||
@NotNull(message = "请选择是否禁用")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "是否禁用", required = true)
|
||||
private Integer isDisable;
|
||||
|
||||
@NotNull(message = "请选择是否支持多端登录")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "支持多端", required = true)
|
||||
private Integer isMultipoint;
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort = 0;
|
||||
|
||||
@Length(max = 200, message = "头像不能超出200个字符")
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String avatar = "";
|
||||
|
||||
@NotNull(message = "请选择角色")
|
||||
@ApiModelProperty(value = "角色ID", required = true)
|
||||
private List<Integer> roleIds;
|
||||
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
private List<Integer> deptIds;
|
||||
|
||||
@ApiModelProperty(value = "岗位ID")
|
||||
private List<Integer> postIds;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,29 +1,33 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统登录参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统登录参数")
|
||||
public class SystemAdminLoginsValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotEmpty(message = "账号不能为空")
|
||||
@Length(min = 2, max = 20, message = "账号或密码错误")
|
||||
@ApiModelProperty(value = "登录账号", required = true)
|
||||
private String username;
|
||||
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
@Length(min = 6, max = 18, message = "账号或密码错误")
|
||||
@ApiModelProperty(value = "登录密码", required = true)
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "验证码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "标识码")
|
||||
private String uuid;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统管理员搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统管理员搜索参数")
|
||||
public class SystemAdminSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "登录账号")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
private Integer role;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统管理员自更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统管理员自更新参数")
|
||||
public class SystemAdminUpInfoValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotEmpty(message = "昵称不能为空")
|
||||
@Length(min = 2, max = 30, message = "昵称必须在2~30个字符内")
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
@Length(max = 32, message = "密码必须在6~32个字符内")
|
||||
|
||||
@@ -2,58 +2,67 @@ package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统管理员更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统管理员更新参数")
|
||||
public class SystemAdminUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "ID", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotEmpty(message = "账号不能为空")
|
||||
@Length(min = 2, max = 20, message = "账号必须在2~20个字符内")
|
||||
@ApiModelProperty(value = "登录账号", required = true)
|
||||
private String username;
|
||||
|
||||
@NotEmpty(message = "昵称不能为空")
|
||||
@Length(min = 2, max = 30, message = "昵称必须在2~30个字符内")
|
||||
@ApiModelProperty(value = "用户昵称", required = true)
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "登录密码")
|
||||
private String password;
|
||||
|
||||
@NotNull(message = "请选择是否禁用")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "是否禁用", required = true)
|
||||
private Integer isDisable;
|
||||
|
||||
@NotNull(message = "请选择是否支持多端登录")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "支持多端", required = true)
|
||||
private Integer isMultipoint;
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort = 0;
|
||||
|
||||
@Length(max = 200, message = "头像不能超出200个字符")
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String avatar = "";
|
||||
|
||||
@NotNull(message = "请选择角色")
|
||||
|
||||
@ApiModelProperty(value = "角色ID")
|
||||
private List<Integer> roleIds;
|
||||
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
private List<Integer> deptIds;
|
||||
|
||||
@ApiModelProperty(value = "岗位ID")
|
||||
private List<Integer> postIds;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -10,20 +12,20 @@ import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统部门创建参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统部门创建参数")
|
||||
public class SystemDeptCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "pid参数缺失")
|
||||
@DecimalMin(value = "0", message = "上级值不能少于0")
|
||||
@ApiModelProperty(value = "上级ID", required = true)
|
||||
private Integer pid;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@Length(min = 1, max = 100, message = "部门名称必须在1~100个字符内")
|
||||
@ApiModelProperty(value = "部门名称", required = true)
|
||||
private String name;
|
||||
|
||||
@Length(min = 1, max = 30, message = "负责人名称必须在1~30个字符内")
|
||||
@@ -31,15 +33,18 @@ public class SystemDeptCreateValidate implements Serializable {
|
||||
|
||||
@Length(min = 11, max = 11, message = "手机号只能为11位")
|
||||
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String mobile;
|
||||
|
||||
@NotNull(message = "请选择状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private Integer isStop;
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@DecimalMax(value = "9999", message = "排序号值不能大于9999")
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统部门搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统部门搜索参数")
|
||||
public class SystemDeptSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "是否停用")
|
||||
private Integer isStop;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -11,23 +13,24 @@ import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统部门更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统部门更新参数")
|
||||
public class SystemDeptUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "pid参数缺失")
|
||||
@DecimalMin(value = "0", message = "上级值不能少于0")
|
||||
@ApiModelProperty(value = "上级ID", required = true)
|
||||
private Integer pid;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@Length(min = 1, max = 100, message = "部门名称必须在1~100个字符内")
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String name;
|
||||
|
||||
@Length(min = 1, max = 30, message = "负责人名称必须在1~30个字符内")
|
||||
@@ -35,14 +38,17 @@ public class SystemDeptUpdateValidate implements Serializable {
|
||||
|
||||
@Length(min = 11, max = 11, message = "手机号只能为11位")
|
||||
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String mobile;
|
||||
|
||||
@NotNull(message = "请选择状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer isStop;
|
||||
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@DecimalMax(value = "9999", message = "排序号值不能大于9999")
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import com.mdd.common.validator.annotation.StringContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -9,58 +11,69 @@ import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统菜单创建参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统菜单创建参数")
|
||||
public class SystemMenuCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "上级菜单不能为空")
|
||||
@DecimalMin(value = "0", message = "上级菜单值不能少于0")
|
||||
@ApiModelProperty(value = "上级ID", required = true)
|
||||
private Integer pid;
|
||||
|
||||
@NotNull(message = "menuType参数缺失")
|
||||
@StringContains(values = {"M", "C", "A"}, message = "菜单类型不是合法值(M,C,A)")
|
||||
@ApiModelProperty(value = "菜单类型", required = true)
|
||||
private String menuType;
|
||||
|
||||
@NotNull(message = "缺少参数menuName")
|
||||
@Length(min = 1, max = 30, message = "菜单名称必须在1~30个字符内")
|
||||
@ApiModelProperty(value = "菜单名称", required = true)
|
||||
private String menuName;
|
||||
|
||||
@Length(max = 100, message = "图标名称不能超过100个字符")
|
||||
@ApiModelProperty(value = "菜单图标")
|
||||
private String menuIcon;
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "菜单排序")
|
||||
private Integer menuSort;
|
||||
|
||||
@Length(max = 100, message = "权限字符不能超过100个字符")
|
||||
@ApiModelProperty(value = "权限字符")
|
||||
private String perms;
|
||||
|
||||
@Length(max = 200, message = "路由地址不能超过200个字符")
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
private String paths;
|
||||
|
||||
@Length(max = 200, message = "前端组件不能超过200个字符")
|
||||
@ApiModelProperty(value = "前端组件")
|
||||
private String component;
|
||||
|
||||
@Length(max = 200, message = "选中菜单路径不能超过200个字符")
|
||||
@ApiModelProperty(value = "选中菜单")
|
||||
private String selected;
|
||||
|
||||
@Length(max = 200, message = "路由参数不能超过200个字符")
|
||||
@ApiModelProperty(value = "路由参数")
|
||||
private String params;
|
||||
|
||||
@NotNull(message = "请选择缓存状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "缓存状态", required = true)
|
||||
private Integer isCache;
|
||||
|
||||
@NotNull(message = "请选择显示状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "显示状态", required = true)
|
||||
private Integer isShow;
|
||||
|
||||
@NotNull(message = "请选择菜单状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "菜单状态", required = true)
|
||||
private Integer isDisable;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mdd.admin.validate.system;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import com.mdd.common.validator.annotation.StringContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -10,61 +12,73 @@ import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统菜单更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统菜单更新参数")
|
||||
public class SystemMenuUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "上级菜单不能为空")
|
||||
@DecimalMin(value = "0", message = "上级菜单值不能少于0")
|
||||
@ApiModelProperty(value = "上级ID", required = true)
|
||||
private Integer pid;
|
||||
|
||||
@NotNull(message = "menuType参数缺失")
|
||||
@StringContains(values = {"M", "C", "A"}, message = "菜单类型不是合法值(M,C,A)")
|
||||
@ApiModelProperty(value = "菜单类型", required = true)
|
||||
private String menuType;
|
||||
|
||||
@NotNull(message = "缺少参数menuName")
|
||||
@Length(min = 1, max = 30, message = "菜单名称必须在1~30个字符内")
|
||||
@ApiModelProperty(value = "菜单名称", required = true)
|
||||
private String menuName;
|
||||
|
||||
@Length(max = 100, message = "图标名称不能超过100个字符")
|
||||
@ApiModelProperty(value = "菜单图标")
|
||||
private String menuIcon;
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "菜单排序")
|
||||
private Integer menuSort;
|
||||
|
||||
@Length(max = 100, message = "权限字符不能超过100个字符")
|
||||
@ApiModelProperty(value = "权限字符")
|
||||
private String perms;
|
||||
|
||||
@Length(max = 200, message = "路由地址不能超过200个字符")
|
||||
@ApiModelProperty(value = "路由地址")
|
||||
private String paths;
|
||||
|
||||
@Length(max = 200, message = "前端组件不能超过200个字符")
|
||||
@ApiModelProperty(value = "前端组件")
|
||||
private String component;
|
||||
|
||||
@Length(max = 200, message = "选中菜单路径不能超过200个字符")
|
||||
@ApiModelProperty(value = "菜单路径")
|
||||
private String selected;
|
||||
|
||||
@Length(max = 200, message = "路由参数不能超过200个字符")
|
||||
@ApiModelProperty(value = "路由参数")
|
||||
private String params;
|
||||
|
||||
@NotNull(message = "请选择缓存状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "缓存状态", required = true)
|
||||
private Integer isCache;
|
||||
|
||||
@NotNull(message = "请选择显示状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "显示状态", required = true)
|
||||
private Integer isShow;
|
||||
|
||||
@NotNull(message = "请选择菜单状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "菜单状态", required = true)
|
||||
private Integer isDisable;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -8,31 +10,34 @@ import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统岗位创建参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统岗位创建参数")
|
||||
public class SystemPostCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "code参数缺失")
|
||||
@Length(min = 1, max = 30, message = "岗位编码必须在1~30个字符内")
|
||||
@ApiModelProperty(value = "编码", required = true)
|
||||
private String code;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@Length(min = 1, max = 30, message = "岗位名称必须在1~30个字符内")
|
||||
@ApiModelProperty(value = "岗位名称", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "请选择状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "是否停用", required = true)
|
||||
private Integer isStop = 0;
|
||||
|
||||
@Length( max = 250, message = "岗位备注不能大于250个字符内")
|
||||
@ApiModelProperty(value = "备注信息")
|
||||
private String remarks = "";
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统岗位搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统岗位搜索参数")
|
||||
public class SystemPostSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "编码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "岗位名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "是否停用")
|
||||
private Integer isStop;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -9,34 +11,38 @@ import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统岗位更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统岗位更新参数")
|
||||
public class SystemPostUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "code参数缺失")
|
||||
@Length(min = 1, max = 30, message = "岗位编码必须在1~30个字符内")
|
||||
@ApiModelProperty(value = "岗位编码", required = true)
|
||||
private String code;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@Length(min = 1, max = 30, message = "岗位名称必须在1~30个字符内")
|
||||
@ApiModelProperty(value = "岗位名称", required = true)
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "请选择状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
private Integer isStop = 0;
|
||||
@ApiModelProperty(value = "是否停用", required = true)
|
||||
private Integer isStop;
|
||||
|
||||
@Length( max = 250, message = "岗位备注不能大于250个字符内")
|
||||
private String remarks = "";
|
||||
@ApiModelProperty(value = "岗位备注")
|
||||
private String remarks;
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
private Integer sort = 0;
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -8,29 +10,31 @@ import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统角色创建参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统角色创建参数")
|
||||
public class SystemRoleCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "缺少参数name")
|
||||
@Length(min = 1, max = 30, message = "角色名称必须在1~30个字符内")
|
||||
@ApiModelProperty(value = "角色名称", required = true)
|
||||
private String name;
|
||||
|
||||
@Length(max = 200, message = "备注信息不能超过200个字符")
|
||||
@ApiModelProperty(value = "备注", required = true)
|
||||
private String remark;
|
||||
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort = 0;
|
||||
|
||||
@NotNull(message = "请选择状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "是否禁用", required = true)
|
||||
private Integer isDisable;
|
||||
|
||||
@ApiModelProperty(value = "菜单权限")
|
||||
private String menuIds = "";
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
@@ -10,31 +12,35 @@ import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统角色更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统角色更新参数")
|
||||
public class SystemRoleUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "缺少参数name")
|
||||
@Length(min = 1, max = 30, message = "角色名称必须在1~30个字符内")
|
||||
@ApiModelProperty(value = "角色名称", required = true)
|
||||
private String name;
|
||||
|
||||
@Length(max = 200, message = "备注信息不能超过200个字符")
|
||||
@ApiModelProperty(value = "备注", required = true)
|
||||
private String remark;
|
||||
|
||||
@DecimalMin(value = "0", message = "排序号值不能少于0")
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort = 0;
|
||||
|
||||
@NotNull(message = "请选择状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "是否禁用", required = true)
|
||||
private Integer isDisable;
|
||||
|
||||
@ApiModelProperty(value = "菜单权限")
|
||||
private String menuIds = "";
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统登录日志搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统登录日志搜索参数")
|
||||
public class SystemSearchLoginsValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "账号")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,31 +1,39 @@
|
||||
package com.mdd.admin.validate.system;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统操作日志搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("系统操作日志搜索参数")
|
||||
public class SystemSearchOperateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "账号")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "IP")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "路由")
|
||||
private String url;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,26 +1,45 @@
|
||||
package com.mdd.admin.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 计划任务详情Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("计划任务详情Vo")
|
||||
public class CrontabDetailVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; // 任务主键
|
||||
private String groups; // 任务分组
|
||||
private String name; // 任务名称
|
||||
private String command; // 执行命令
|
||||
private String rules; // 执行规则
|
||||
private String remark; // 备注信息
|
||||
private String error; // 错误信息
|
||||
private Integer status; // 执行状态: 1=正在运行, 2=任务停止, 3=发生错误
|
||||
private Integer strategy; // 执行策略: 1=立即执行, 2=执行一次, 3=放弃执行
|
||||
private Integer concurrent; // 并发执行: 0=否, 1=是
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "任务分组")
|
||||
private String groups;
|
||||
|
||||
@ApiModelProperty(value = "任务名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "执行命令")
|
||||
private String command;
|
||||
|
||||
@ApiModelProperty(value = "执行规则")
|
||||
private String rules;
|
||||
|
||||
@ApiModelProperty(value = "备注信息")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "错误信息")
|
||||
private String error;
|
||||
|
||||
@ApiModelProperty(value = "执行状态: 1=正在运行, 2=任务停止, 3=发生错误")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "执行策略: 1=立即执行, 2=执行一次, 3=放弃执行")
|
||||
private Integer strategy;
|
||||
|
||||
@ApiModelProperty(value = "并发执行: 0=否, 1=是")
|
||||
private Integer concurrent;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,51 @@
|
||||
package com.mdd.admin.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 计划任务列表Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("计划任务列表Vo")
|
||||
public class CrontabListedVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Integer id; // 执行ID
|
||||
private String groups; // 执行分组
|
||||
private String name; // 执行名称
|
||||
private String command; // 执行命令
|
||||
private String rules; // 执行规则
|
||||
private String error; // 错误信息
|
||||
private Integer status; // 执行状态: 1=正在运行, 2=任务停止, 3=发生错误
|
||||
private Integer strategy; // 执行策略: 1=立即执行, 2=执行一次, 3=放弃执行
|
||||
private Integer concurrent; // 并发执行: 0=否, 1=是
|
||||
private String startTime; // 开始时间
|
||||
private String endTime; // 结束时间
|
||||
private Long taskTime; // 执行耗时
|
||||
|
||||
@ApiModelProperty(value = "任务分组")
|
||||
private String groups;
|
||||
|
||||
@ApiModelProperty(value = "任务名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "执行命令")
|
||||
private String command;
|
||||
|
||||
@ApiModelProperty(value = "执行规则")
|
||||
private String rules;
|
||||
|
||||
@ApiModelProperty(value = "错误信息")
|
||||
private String error;
|
||||
|
||||
@ApiModelProperty(value = "执行状态: [1=正在运行, 2=任务停止, 3=发生错误]")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "执行策略: [1=立即执行, 2=执行一次, 3=放弃执行]")
|
||||
private Integer strategy;
|
||||
|
||||
@ApiModelProperty(value = "并发执行: [0=否, 1=是]")
|
||||
private Integer concurrent;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "执行耗时")
|
||||
private Long taskTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,30 @@
|
||||
package com.mdd.admin.vo.album;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 相册分类Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("相册分类Vo")
|
||||
public class AlbumCateVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; // 主键
|
||||
private Integer pid; // 类目父级
|
||||
private String name; // 类目名称
|
||||
private String createTime; // 创建时间
|
||||
private String updateTime; // 更新时间
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "类目父级")
|
||||
private Integer pid;
|
||||
|
||||
@ApiModelProperty(value = "类目名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,25 +1,42 @@
|
||||
package com.mdd.admin.vo.album;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 相册Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("相册Vo")
|
||||
public class AlbumVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; // 主键
|
||||
private Integer cid; // 所属类目
|
||||
private String name; // 文件名称
|
||||
private String path; // 相对路径
|
||||
private String uri; // 文件路径
|
||||
private String ext; // 文件扩展
|
||||
private String size; // 文件大小
|
||||
private String createTime; // 创建时间
|
||||
private String updateTime; // 更新时间
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "所属类目")
|
||||
private Integer cid;
|
||||
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "相对路径")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "文件路径")
|
||||
private String uri;
|
||||
|
||||
@ApiModelProperty(value = "文件扩展")
|
||||
private String ext;
|
||||
|
||||
@ApiModelProperty(value = "文件大小")
|
||||
private String size;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +1,36 @@
|
||||
package com.mdd.admin.vo.article;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章分类Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章分类Vo")
|
||||
public class ArticleCateVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; // 主键
|
||||
private String name; // 分类名称
|
||||
private Long number; // 文章数量
|
||||
private Integer sort; // 排序编号
|
||||
private Integer isShow; // 是否显示
|
||||
private String createTime; // 创建时间
|
||||
private String updateTime; // 更新时间
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "分类名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "文章数量")
|
||||
private Long number;
|
||||
|
||||
@ApiModelProperty(value = "排序编号")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "是否显示")
|
||||
private Integer isShow;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,29 +1,54 @@
|
||||
package com.mdd.admin.vo.article;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章详情Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章详情Vo")
|
||||
public class ArticleDetailVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; // 主键
|
||||
private Integer cid; // 分类
|
||||
private String title; // 标题
|
||||
private String image; // 图片
|
||||
private String intro; // 简介
|
||||
private String summary; // 摘要
|
||||
private String content; // 内容
|
||||
private String author; // 作者
|
||||
private Integer visit; // 访问
|
||||
private Integer sort; // 排序
|
||||
private Integer isShow; // 是否显示: [0=否, 1=是]
|
||||
private String createTime; // 创建时间
|
||||
private String updateTime; // 更新时间
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "分类")
|
||||
private Integer cid;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "简介")
|
||||
private String intro;
|
||||
|
||||
@ApiModelProperty(value = "摘要")
|
||||
private String summary;
|
||||
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "作者")
|
||||
private String author;
|
||||
|
||||
@ApiModelProperty(value = "访问")
|
||||
private Integer visit;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "是否显示")
|
||||
private Integer isShow;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,26 +1,45 @@
|
||||
package com.mdd.admin.vo.article;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章列表Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章列表Vo")
|
||||
public class ArticleListedVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; // 主键
|
||||
private String category; // 分类
|
||||
private String title; // 标题
|
||||
private String image; // 图片
|
||||
private String author; // 作者
|
||||
private Integer visit; // 访问
|
||||
private Integer sort; // 排序
|
||||
private Integer isShow; // 是否显示: [0=否, 1=是]
|
||||
private String createTime; // 创建时间
|
||||
private String updateTime; // 更新时间
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "分类")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "作者")
|
||||
private String author;
|
||||
|
||||
@ApiModelProperty(value = "访问")
|
||||
private Integer visit;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "是否显示")
|
||||
private Integer isShow;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
package com.mdd.admin.vo.channel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* H5渠道Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("H5渠道Vo")
|
||||
public class ChannelH5Vo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer status; // 是否关闭
|
||||
private Integer close; // 关闭类型
|
||||
private String url; // 关闭访问
|
||||
@ApiModelProperty(value = "是否关闭")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "关闭类型")
|
||||
private Integer close;
|
||||
|
||||
@ApiModelProperty(value = "关闭访问")
|
||||
private String url;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,29 +1,41 @@
|
||||
package com.mdd.admin.vo.channel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 小程序渠道Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("小程序渠道Vo")
|
||||
public class ChannelMpVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "小程序名称")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "原始ID")
|
||||
private String primaryId;
|
||||
@ApiModelProperty(value = "appId")
|
||||
private String appId;
|
||||
@ApiModelProperty(value = "appSecret")
|
||||
private String appSecret;
|
||||
@ApiModelProperty(value = "二维码")
|
||||
private String qrCode;
|
||||
|
||||
@ApiModelProperty(value = "request合法域名")
|
||||
private String requestDomain;
|
||||
@ApiModelProperty(value = "socket合法域名")
|
||||
private String socketDomain;
|
||||
@ApiModelProperty(value = "uploadFile合法域名")
|
||||
private String uploadFileDomain;
|
||||
@ApiModelProperty(value = "downloadFile合法域名")
|
||||
private String downloadFileDomain;
|
||||
@ApiModelProperty(value = "udp合法域名")
|
||||
private String udpDomain;
|
||||
@ApiModelProperty(value = "tcp合法域名")
|
||||
private String tcpDomain;
|
||||
@ApiModelProperty(value = "业务域名")
|
||||
private String businessDomain;
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user