优化代码
This commit is contained in:
parent
5e9db85f86
commit
6cb4ad95a7
|
|
@ -31,10 +31,10 @@ public class ArticleController {
|
|||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
public AjaxResult list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<ArticleListVo> vos = iArticleArchivesService.list(pageParam, params);
|
||||
return AjaxResult.success(vos);
|
||||
|
|
@ -45,10 +45,10 @@ public class ArticleController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param id 文章ID
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ArticleDetailVo vo = iArticleArchivesService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ public class ArticleController {
|
|||
*/
|
||||
@Log(title = "文章新增")
|
||||
@PostMapping("/add")
|
||||
public Object add(
|
||||
public AjaxResult add(
|
||||
@Validated(value = ArticleParam.create.class)
|
||||
@RequestBody ArticleParam articleParam) {
|
||||
iArticleArchivesService.add(articleParam);
|
||||
|
|
@ -74,11 +74,11 @@ public class ArticleController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param articleParam 文章参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "文章编辑")
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = ArticleParam.update.class)
|
||||
public AjaxResult edit(@Validated(value = ArticleParam.update.class)
|
||||
@RequestBody ArticleParam articleParam) {
|
||||
iArticleArchivesService.edit(articleParam);
|
||||
return AjaxResult.success();
|
||||
|
|
@ -89,7 +89,7 @@ public class ArticleController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param articleParam 文章参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "文章删除")
|
||||
@PostMapping("/del")
|
||||
|
|
@ -104,11 +104,11 @@ public class ArticleController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param articleParam 文章参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "文章状态")
|
||||
@PostMapping("/change")
|
||||
public Object change(@Validated(value = ArticleParam.change.class)
|
||||
public AjaxResult change(@Validated(value = ArticleParam.change.class)
|
||||
@RequestBody ArticleParam articleParam) {
|
||||
iArticleArchivesService.change(articleParam.getId());
|
||||
return AjaxResult.success();
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ public class CategoryController {
|
|||
* 分类所有
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public Object all() {
|
||||
public AjaxResult all() {
|
||||
List<ArticleCateVo> list = iArticleCategoryService.all();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ public class CategoryController {
|
|||
* @return Object
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
public AjaxResult list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<ArticleCateVo> list = iArticleCategoryService.list(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
|
|
@ -57,10 +57,10 @@ public class CategoryController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ArticleCateVo vo = iArticleCategoryService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -70,11 +70,11 @@ public class CategoryController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param categoryParam 分类参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "文章分类新增")
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = CategoryParam.create.class)
|
||||
public AjaxResult add(@Validated(value = CategoryParam.create.class)
|
||||
@RequestBody CategoryParam categoryParam) {
|
||||
iArticleCategoryService.add(categoryParam);
|
||||
return AjaxResult.success();
|
||||
|
|
@ -85,11 +85,11 @@ public class CategoryController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param categoryParam 分类编辑
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "文章分类编辑")
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = CategoryParam.update.class)
|
||||
public AjaxResult edit(@Validated(value = CategoryParam.update.class)
|
||||
@RequestBody CategoryParam categoryParam) {
|
||||
iArticleCategoryService.edit(categoryParam);
|
||||
return AjaxResult.success();
|
||||
|
|
@ -100,11 +100,11 @@ public class CategoryController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param categoryParam 分类删除
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "文章分类删除")
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = CategoryParam.delete.class)
|
||||
public AjaxResult del(@Validated(value = CategoryParam.delete.class)
|
||||
@RequestBody CategoryParam categoryParam) {
|
||||
iArticleCategoryService.del(categoryParam.getId());
|
||||
return AjaxResult.success();
|
||||
|
|
@ -115,11 +115,11 @@ public class CategoryController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param categoryParam 分类参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "文章分类状态")
|
||||
@PostMapping("/change")
|
||||
public Object change(@Validated(value = CategoryParam.change.class)
|
||||
public AjaxResult change(@Validated(value = CategoryParam.change.class)
|
||||
@RequestBody CategoryParam categoryParam) {
|
||||
iArticleCategoryService.change(categoryParam.getId());
|
||||
return AjaxResult.success();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class OaReplyDefaultController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 回复详情
|
||||
* 默认回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 公众号关注回复管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaReplyFollow")
|
||||
public class OaReplyFollowController {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 公众号关键词回复管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaReplyKeyword")
|
||||
public class OaReplyKeywordController {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
package com.mdd.admin.controller.channel;
|
||||
|
||||
import com.mdd.admin.config.aop.Log;
|
||||
import com.mdd.admin.service.channel.IChannelH5Service;
|
||||
import com.mdd.admin.service.channel.IChannelWxService;
|
||||
import com.mdd.admin.validate.channel.ChannelWxParam;
|
||||
import com.mdd.admin.vo.channel.ChannelWxVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 微信开发平台渠道设置
|
||||
|
|
@ -23,25 +24,25 @@ public class WxController {
|
|||
* 开放平台渠道设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
Map<String, Object> map = iChannelWxService.detail();
|
||||
return AjaxResult.success(map);
|
||||
public AjaxResult detail() {
|
||||
ChannelWxVo vo = iChannelWxService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开放平台渠道设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param param 参数
|
||||
* @return Object
|
||||
* @param channelWxParam 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "开放平台渠道设置保存")
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, String> param) {
|
||||
iChannelWxService.save(param);
|
||||
public AjaxResult save(@Validated @RequestBody ChannelWxParam channelWxParam) {
|
||||
iChannelWxService.save(channelWxParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ public class AlbumController {
|
|||
* 相册文件列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/albumList")
|
||||
public Object albumList(@Validated PageParam pageParam,
|
||||
public AjaxResult albumList(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<AlbumVo> voPageResult = iAlbumService.albumList(pageParam, params);
|
||||
return AjaxResult.success(voPageResult);
|
||||
|
|
@ -43,11 +43,11 @@ public class AlbumController {
|
|||
* 相册文件重命名
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "相册文件重命名")
|
||||
@PostMapping("/albumRename")
|
||||
public Object albumRename(@Validated(value = AlbumParam.rename.class) @RequestBody AlbumParam albumParam) {
|
||||
public AjaxResult albumRename(@Validated(value = AlbumParam.rename.class) @RequestBody AlbumParam albumParam) {
|
||||
iAlbumService.albumRename(albumParam.getId(), albumParam.getName());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ public class AlbumController {
|
|||
*/
|
||||
@Log(title = "相册文件移动")
|
||||
@PostMapping("/albumMove")
|
||||
public Object albumMove(@RequestBody Map<String, Object> params) {
|
||||
public AjaxResult albumMove(@RequestBody Map<String, Object> params) {
|
||||
if (params.get("ids") == null) {
|
||||
return AjaxResult.failed("缺少ids参数");
|
||||
}
|
||||
|
|
@ -82,11 +82,11 @@ public class AlbumController {
|
|||
* 相册文件删除
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "相册文件删除")
|
||||
@PostMapping("/albumDel")
|
||||
public Object albumDel(@RequestBody Map<String, List<Integer>> params) {
|
||||
public AjaxResult albumDel(@RequestBody Map<String, List<Integer>> params) {
|
||||
if (params.get("ids") == null) {
|
||||
return AjaxResult.failed("缺少ids参数");
|
||||
}
|
||||
|
|
@ -99,10 +99,10 @@ public class AlbumController {
|
|||
* 相册分类列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/cateList")
|
||||
public Object cateList(@RequestParam Map<String, String> params) {
|
||||
public AjaxResult cateList(@RequestParam Map<String, String> params) {
|
||||
JSONArray jsonArray = iAlbumService.cateList(params);
|
||||
return AjaxResult.success(jsonArray);
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ public class AlbumController {
|
|||
*/
|
||||
@Log(title = "相册分类新增")
|
||||
@PostMapping("/cateAdd")
|
||||
public Object cateAdd(@Validated(value = AlbumParam.cateAdd.class) @RequestBody AlbumParam albumParam) {
|
||||
public AjaxResult cateAdd(@Validated(value = AlbumParam.cateAdd.class) @RequestBody AlbumParam albumParam) {
|
||||
iAlbumService.cateAdd(albumParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -124,11 +124,11 @@ public class AlbumController {
|
|||
* 相册分类重命名
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "相册分类重命名")
|
||||
@PostMapping("/cateRename")
|
||||
public Object cateRename(@Validated(value = AlbumParam.rename.class) @RequestBody AlbumParam albumParam) {
|
||||
public AjaxResult cateRename(@Validated(value = AlbumParam.rename.class) @RequestBody AlbumParam albumParam) {
|
||||
iAlbumService.cateRename(albumParam.getId(), albumParam.getName());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -141,7 +141,7 @@ public class AlbumController {
|
|||
*/
|
||||
@Log(title = "相册分类删除")
|
||||
@PostMapping("/cateDel")
|
||||
public Object cateDel(@Validated(value = AlbumParam.delete.class) @RequestBody AlbumParam albumParam) {
|
||||
public AjaxResult cateDel(@Validated(value = AlbumParam.delete.class) @RequestBody AlbumParam albumParam) {
|
||||
iAlbumService.cateDel(albumParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ public class IndexController {
|
|||
* 控制台
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/console")
|
||||
public Object console() {
|
||||
public AjaxResult console() {
|
||||
Map<String, Object> map = iIndexService.console();
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
|
@ -37,10 +37,10 @@ public class IndexController {
|
|||
* 公共配置
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/config")
|
||||
public Object config() {
|
||||
public AjaxResult config() {
|
||||
Map<String, Object> map = iIndexService.config();
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,11 +35,11 @@ public class UploadController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param request 请求对象
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "上传图片", requestType = RequestType.File)
|
||||
@PostMapping("/image")
|
||||
public Object image(HttpServletRequest request) {
|
||||
public AjaxResult image(HttpServletRequest request) {
|
||||
MultipartFile multipartFile;
|
||||
try {
|
||||
multipartFile = ((MultipartRequest) request).getFile("file");
|
||||
|
|
@ -79,11 +79,11 @@ public class UploadController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param request 请求对象
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "上传视频", requestType = RequestType.File)
|
||||
@PostMapping("/video")
|
||||
public Object video(HttpServletRequest request) {
|
||||
public AjaxResult video(HttpServletRequest request) {
|
||||
MultipartFile multipartFile;
|
||||
try {
|
||||
multipartFile = ((MultipartRequest) request).getFile("file");
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ public class DataController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param limit 条数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/article")
|
||||
public Object article(@RequestParam(defaultValue = "10") Integer limit) {
|
||||
public AjaxResult article(@RequestParam(defaultValue = "10") Integer limit) {
|
||||
List<Map<String, Object>> list = iDecorateDataService.article(limit);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ public class PagesController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
Map<String, Object> map = iDecoratePageService.detail(id);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
|
@ -39,11 +39,11 @@ public class PagesController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param decoratePageParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "页面装修保存")
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody DecoratePageParam decoratePageParam) {
|
||||
public AjaxResult save(@RequestBody DecoratePageParam decoratePageParam) {
|
||||
iDecoratePageService.save(decoratePageParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ public class TabbarController {
|
|||
* 底部导航详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
public AjaxResult detail() {
|
||||
Map<String, Object> detail = iDecorateTabbarService.detail();
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
|
@ -36,10 +36,10 @@ public class TabbarController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, Object> params) {
|
||||
public AjaxResult save(@RequestBody Map<String, Object> params) {
|
||||
iDecorateTabbarService.save(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ public class CacheController {
|
|||
* 缓存监控
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "缓存监控")
|
||||
@GetMapping("/cache")
|
||||
public Object info() {
|
||||
public AjaxResult info() {
|
||||
Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) RedisServerCommands::info);
|
||||
Properties commandStats = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info("commandstats"));
|
||||
Object dbSize = redisTemplate.execute((RedisCallback<Object>) RedisServerCommands::dbSize);
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ public class ServerController {
|
|||
* 服务器信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "服务监控")
|
||||
@GetMapping("/server")
|
||||
public Object info() {
|
||||
public AjaxResult info() {
|
||||
ServerResult server = new ServerResult();
|
||||
return AjaxResult.success(server.copyTo());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ public class CopyrightController {
|
|||
* 获取网站版权信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
public AjaxResult detail() {
|
||||
List<Map<String, String>> list = iSettingCopyrightService.detail();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -34,10 +34,10 @@ public class CopyrightController {
|
|||
* 保存网站版本信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody List<Map<String, String>> params) {
|
||||
public AjaxResult save(@RequestBody List<Map<String, String>> params) {
|
||||
iSettingCopyrightService.save(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class DictDataController {
|
|||
* @return Object
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public Object all(@RequestParam Map<String, String> params) {
|
||||
public AjaxResult all(@RequestParam Map<String, String> params) {
|
||||
Assert.isFalse(StringUtil.isEmpty(params.get("dictType")), "dictType缺失");
|
||||
List<DictDataVo> list = iSettingDictDataService.all(params);
|
||||
return AjaxResult.success(list);
|
||||
|
|
@ -45,10 +45,10 @@ public class DictDataController {
|
|||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
public AjaxResult list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
Assert.isFalse(StringUtil.isEmpty(params.get("dictType")), "dictType缺失");
|
||||
PageResult<DictDataVo> list = iSettingDictDataService.list(pageParam, params);
|
||||
|
|
@ -63,7 +63,7 @@ public class DictDataController {
|
|||
* @return Object
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
DictDataVo vo = iSettingDictDataService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -73,10 +73,10 @@ public class DictDataController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param dictDataParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = DictDataParam.create.class) @RequestBody DictDataParam dictDataParam) {
|
||||
public AjaxResult add(@Validated(value = DictDataParam.create.class) @RequestBody DictDataParam dictDataParam) {
|
||||
iSettingDictDataService.add(dictDataParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ public class DictDataController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param dictDataParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = DictDataParam.update.class) @RequestBody DictDataParam dictDataParam) {
|
||||
|
|
@ -99,10 +99,10 @@ public class DictDataController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param dictDataParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = DictDataParam.delete.class) @RequestBody DictDataParam dictDataParam) {
|
||||
public AjaxResult del(@Validated(value = DictDataParam.delete.class) @RequestBody DictDataParam dictDataParam) {
|
||||
iSettingDictDataService.del(dictDataParam.getIds());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class DictTypeController {
|
|||
* @return Object
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public Object all() {
|
||||
public AjaxResult all() {
|
||||
List<DictTypeVo> list = iSettingDictTypeService.all();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ public class DictTypeController {
|
|||
* @return Object
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
public AjaxResult list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<DictTypeVo> list = iSettingDictTypeService.list(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
|
|
@ -59,7 +59,7 @@ public class DictTypeController {
|
|||
* @return Object
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
DictTypeVo vo = iSettingDictTypeService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ public class DictTypeController {
|
|||
* @return Object
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = DictTypeParam.create.class) @RequestBody DictTypeParam dictTypeParam) {
|
||||
public AjaxResult add(@Validated(value = DictTypeParam.create.class) @RequestBody DictTypeParam dictTypeParam) {
|
||||
iSettingDictTypeService.add(dictTypeParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ public class DictTypeController {
|
|||
* @return Object
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = DictTypeParam.update.class) @RequestBody DictTypeParam dictTypeParam) {
|
||||
public AjaxResult edit(@Validated(value = DictTypeParam.update.class) @RequestBody DictTypeParam dictTypeParam) {
|
||||
iSettingDictTypeService.edit(dictTypeParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ public class DictTypeController {
|
|||
* @return Object
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = DictTypeParam.delete.class) @RequestBody DictTypeParam dictTypeParam) {
|
||||
public AjaxResult del(@Validated(value = DictTypeParam.delete.class) @RequestBody DictTypeParam dictTypeParam) {
|
||||
iSettingDictTypeService.del(dictTypeParam.getIds());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ public class LoginController {
|
|||
* 登录设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
public AjaxResult detail() {
|
||||
Map<String, Object> map = iSettingLoginService.detail();
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ public class LoginController {
|
|||
* @return Object
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, String> params) {
|
||||
public AjaxResult save(@RequestBody Map<String, String> params) {
|
||||
iSettingLoginService.save(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ public class NoticeController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param recipient 类型: 1=用户, 2=平台
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@RequestParam Integer recipient) {
|
||||
public AjaxResult list(@RequestParam Integer recipient) {
|
||||
List<NoticeListVo> list = iSettingNoticeService.list(recipient);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -40,10 +40,10 @@ public class NoticeController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
NoticeDetailVo vo = iSettingNoticeService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ public class NoticeController {
|
|||
* @return Object
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, Object> params) {
|
||||
public AjaxResult save(@RequestBody Map<String, Object> params) {
|
||||
iSettingNoticeService.save(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ public class ProtocolController {
|
|||
* 获取网站版权信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
public AjaxResult detail() {
|
||||
Map<String, Map<String, String>> detail = iSettingProtocolService.detail();
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ public class ProtocolController {
|
|||
* @return Object
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, Object> params) {
|
||||
public AjaxResult save(@RequestBody Map<String, Object> params) {
|
||||
iSettingProtocolService.save(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ public class SearchController {
|
|||
* 热门搜索详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
public AjaxResult detail() {
|
||||
Map<String, Object> map = iSettingSearchService.detail();
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
|
@ -34,10 +34,10 @@ public class SearchController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, Object> params) {
|
||||
public AjaxResult save(@RequestBody Map<String, Object> params) {
|
||||
iSettingSearchService.save(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ public class SmsController {
|
|||
* 短信引擎列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list() {
|
||||
public AjaxResult list() {
|
||||
List<Map<String, Object>> list = iSettingSmsService.list();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -36,10 +36,10 @@ public class SmsController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param alias 别名
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(String alias) {
|
||||
public AjaxResult detail(String alias) {
|
||||
Map<String, Object> map = iSettingSmsService.detail(alias);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
|
@ -49,11 +49,11 @@ public class SmsController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "短信引擎保存")
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, String> params) {
|
||||
public AjaxResult save(@RequestBody Map<String, String> params) {
|
||||
iSettingSmsService.save(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ public class StorageController {
|
|||
* 存储列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list() {
|
||||
public AjaxResult list() {
|
||||
List<Map<String, Object>> list = iSettingStorageService.list();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -35,10 +35,10 @@ public class StorageController {
|
|||
* 存储详情
|
||||
*
|
||||
* @param alias 引擎别名
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(String alias) {
|
||||
public AjaxResult detail(String alias) {
|
||||
Map<String, Object> map = iSettingStorageService.detail(alias);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
|
@ -48,10 +48,10 @@ public class StorageController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@RequestBody Map<String, String> params) {
|
||||
public AjaxResult edit(@RequestBody Map<String, String> params) {
|
||||
iSettingStorageService.edit(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -61,10 +61,10 @@ public class StorageController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/change")
|
||||
public Object change(@RequestBody Map<String, String> params) {
|
||||
public AjaxResult change(@RequestBody Map<String, String> params) {
|
||||
Assert.notNull(params.get("alias"), "alias参数缺失");
|
||||
Assert.notNull(params.get("status"), "status参数缺失");
|
||||
String alias = params.get("alias");
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class UserController {
|
|||
* 用户设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
|
|
@ -34,10 +34,10 @@ public class UserController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, String> params) {
|
||||
public AjaxResult save(@RequestBody Map<String, String> params) {
|
||||
iSettingUserService.save(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ public class WebsiteController {
|
|||
* 获取网站配置信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
public AjaxResult detail() {
|
||||
Map<String, String> detail = iSettingWebsiteService.detail();
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ public class WebsiteController {
|
|||
* @return Object
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, String> params) {
|
||||
public AjaxResult save(@RequestBody Map<String, String> params) {
|
||||
iSettingWebsiteService.save(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ public class AuthAdminController {
|
|||
* 管理员列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
public AjaxResult list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<SystemAuthAdminVo> list = iSystemAuthAdminService.list(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
|
|
@ -43,10 +43,10 @@ public class AuthAdminController {
|
|||
* 管理员信息
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/self")
|
||||
public Object self() {
|
||||
public AjaxResult self() {
|
||||
Integer adminId = LikeAdminThreadLocal.getAdminId();
|
||||
SystemAuthSelfVo vo = iSystemAuthAdminService.self(adminId);
|
||||
return AjaxResult.success(vo);
|
||||
|
|
@ -57,10 +57,10 @@ public class AuthAdminController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param id 主键ID
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SystemAuthAdminVo vo = iSystemAuthAdminService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -70,11 +70,11 @@ public class AuthAdminController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthAdminParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "管理员新增")
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = SystemAuthAdminParam.create.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
public AjaxResult add(@Validated(value = SystemAuthAdminParam.create.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
iSystemAuthAdminService.add(systemAuthAdminParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -84,11 +84,11 @@ public class AuthAdminController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthAdminParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "管理员编辑")
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = SystemAuthAdminParam.update.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
public AjaxResult edit(@Validated(value = SystemAuthAdminParam.update.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
iSystemAuthAdminService.edit(systemAuthAdminParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -97,11 +97,11 @@ public class AuthAdminController {
|
|||
* 当前管理员更新
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "管理员更新")
|
||||
@PostMapping("/upInfo")
|
||||
public Object upInfo(@Validated(value = SystemAuthAdminParam.upInfo.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
public AjaxResult upInfo(@Validated(value = SystemAuthAdminParam.upInfo.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
Integer adminId = LikeAdminThreadLocal.getAdminId();
|
||||
iSystemAuthAdminService.upInfo(systemAuthAdminParam, adminId);
|
||||
return AjaxResult.success();
|
||||
|
|
@ -111,11 +111,11 @@ public class AuthAdminController {
|
|||
* 管理员删除
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "管理员删除")
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = SystemAuthAdminParam.delete.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
public AjaxResult del(@Validated(value = SystemAuthAdminParam.delete.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
iSystemAuthAdminService.del(systemAuthAdminParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -124,11 +124,11 @@ public class AuthAdminController {
|
|||
* 管理员状态切换
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "管理员状态切换")
|
||||
@PostMapping("/disable")
|
||||
public Object disable(@Validated(value = SystemAuthAdminParam.delete.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
public AjaxResult disable(@Validated(value = SystemAuthAdminParam.delete.class) @RequestBody SystemAuthAdminParam systemAuthAdminParam) {
|
||||
iSystemAuthAdminService.disable(systemAuthAdminParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ public class AuthDeptController {
|
|||
* 部门所有
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public Object all() {
|
||||
public AjaxResult all() {
|
||||
List<SystemAuthDeptVo> vos = iSystemAuthDeptService.all();
|
||||
return AjaxResult.success(vos);
|
||||
}
|
||||
|
|
@ -39,10 +39,10 @@ public class AuthDeptController {
|
|||
* 部门列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@RequestParam Map<String, String> params) {
|
||||
public AjaxResult list(@RequestParam Map<String, String> params) {
|
||||
JSONArray list = iSystemAuthDeptService.list(params);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -52,10 +52,10 @@ public class AuthDeptController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SystemAuthDeptVo vo = iSystemAuthDeptService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -65,10 +65,10 @@ public class AuthDeptController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthDeptParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = SystemAuthDeptParam.create.class) @RequestBody SystemAuthDeptParam systemAuthDeptParam) {
|
||||
public AjaxResult add(@Validated(value = SystemAuthDeptParam.create.class) @RequestBody SystemAuthDeptParam systemAuthDeptParam) {
|
||||
iSystemAuthDeptService.add(systemAuthDeptParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -78,10 +78,10 @@ public class AuthDeptController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthDeptParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = SystemAuthDeptParam.update.class) @RequestBody SystemAuthDeptParam systemAuthDeptParam) {
|
||||
public AjaxResult edit(@Validated(value = SystemAuthDeptParam.update.class) @RequestBody SystemAuthDeptParam systemAuthDeptParam) {
|
||||
iSystemAuthDeptService.edit(systemAuthDeptParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -91,10 +91,10 @@ public class AuthDeptController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthDeptParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = SystemAuthDeptParam.delete.class) @RequestBody SystemAuthDeptParam systemAuthDeptParam) {
|
||||
public AjaxResult del(@Validated(value = SystemAuthDeptParam.delete.class) @RequestBody SystemAuthDeptParam systemAuthDeptParam) {
|
||||
iSystemAuthDeptService.del(systemAuthDeptParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class AuthMenuController {
|
|||
* 获取菜单路由
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/route")
|
||||
public Object route() {
|
||||
|
|
@ -40,7 +40,7 @@ public class AuthMenuController {
|
|||
* 获取菜单列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list() {
|
||||
|
|
@ -52,7 +52,7 @@ public class AuthMenuController {
|
|||
* 获取菜单详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
|
|
@ -64,7 +64,7 @@ public class AuthMenuController {
|
|||
* 新增菜单
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "菜单新增")
|
||||
@PostMapping("/add")
|
||||
|
|
@ -77,11 +77,11 @@ public class AuthMenuController {
|
|||
* 更新菜单
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "菜单编辑")
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = SystemAuthMenuParam.update.class) @RequestBody SystemAuthMenuParam systemAuthMenuParam) {
|
||||
public AjaxResult edit(@Validated(value = SystemAuthMenuParam.update.class) @RequestBody SystemAuthMenuParam systemAuthMenuParam) {
|
||||
iSystemAuthMenuService.edit(systemAuthMenuParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -90,11 +90,11 @@ public class AuthMenuController {
|
|||
* 删除菜单
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "菜单删除")
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = SystemAuthMenuParam.delete.class) @RequestBody SystemAuthMenuParam systemAuthMenuParam) {
|
||||
public AjaxResult del(@Validated(value = SystemAuthMenuParam.delete.class) @RequestBody SystemAuthMenuParam systemAuthMenuParam) {
|
||||
iSystemAuthMenuService.del(systemAuthMenuParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ public class AuthPostController {
|
|||
* 岗位所有
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public Object all() {
|
||||
public AjaxResult all() {
|
||||
List<SystemAuthPostVo> vos = iSystemAuthPostService.all();
|
||||
return AjaxResult.success(vos);
|
||||
}
|
||||
|
|
@ -43,14 +43,21 @@ public class AuthPostController {
|
|||
* @return Object
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
public AjaxResult list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<SystemAuthPostVo> list = iSystemAuthPostService.list(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 岗位详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SystemAuthPostVo vo = iSystemAuthPostService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -60,10 +67,10 @@ public class AuthPostController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthPostParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = SystemAuthPostParam.create.class) @RequestBody SystemAuthPostParam systemAuthPostParam) {
|
||||
public AjaxResult add(@Validated(value = SystemAuthPostParam.create.class) @RequestBody SystemAuthPostParam systemAuthPostParam) {
|
||||
iSystemAuthPostService.add(systemAuthPostParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -73,10 +80,10 @@ public class AuthPostController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthPostParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = SystemAuthPostParam.update.class) @RequestBody SystemAuthPostParam systemAuthPostParam) {
|
||||
public AjaxResult edit(@Validated(value = SystemAuthPostParam.update.class) @RequestBody SystemAuthPostParam systemAuthPostParam) {
|
||||
iSystemAuthPostService.edit(systemAuthPostParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -86,10 +93,10 @@ public class AuthPostController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthPostParam 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = SystemAuthPostParam.delete.class) @RequestBody SystemAuthPostParam systemAuthPostParam) {
|
||||
public AjaxResult del(@Validated(value = SystemAuthPostParam.delete.class) @RequestBody SystemAuthPostParam systemAuthPostParam) {
|
||||
iSystemAuthPostService.del(systemAuthPostParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ public class AuthRoleController {
|
|||
* 角色所有
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public Object all() {
|
||||
public AjaxResult all() {
|
||||
List<Map<String, Object>> list = iSystemAuthRoleService.all();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -42,11 +42,11 @@ public class AuthRoleController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "角色列表")
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam) {
|
||||
public AjaxResult list(@Validated PageParam pageParam) {
|
||||
PageResult<SystemAuthRoleVo> lists = iSystemAuthRoleService.list(pageParam);
|
||||
return AjaxResult.success(lists);
|
||||
}
|
||||
|
|
@ -55,11 +55,11 @@ public class AuthRoleController {
|
|||
* 角色详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "角色详情")
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
SystemAuthRoleVo vo = iSystemAuthRoleService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -69,11 +69,11 @@ public class AuthRoleController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthRoleParam 角色参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "角色新增")
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = SystemAuthRoleParam.create.class) @RequestBody SystemAuthRoleParam systemAuthRoleParam) {
|
||||
public AjaxResult add(@Validated(value = SystemAuthRoleParam.create.class) @RequestBody SystemAuthRoleParam systemAuthRoleParam) {
|
||||
iSystemAuthRoleService.add(systemAuthRoleParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -83,11 +83,11 @@ public class AuthRoleController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthRoleParam 角色参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "角色编辑")
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = SystemAuthRoleParam.create.class) @RequestBody SystemAuthRoleParam systemAuthRoleParam) {
|
||||
public AjaxResult edit(@Validated(value = SystemAuthRoleParam.create.class) @RequestBody SystemAuthRoleParam systemAuthRoleParam) {
|
||||
iSystemAuthRoleService.edit(systemAuthRoleParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
@ -97,11 +97,11 @@ public class AuthRoleController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemAuthRoleParam 角色参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "角色删除")
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = SystemAuthRoleParam.delete.class) @RequestBody SystemAuthRoleParam systemAuthRoleParam) {
|
||||
public AjaxResult del(@Validated(value = SystemAuthRoleParam.delete.class) @RequestBody SystemAuthRoleParam systemAuthRoleParam) {
|
||||
iSystemAuthRoleService.del(systemAuthRoleParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ public class LoginController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param systemLoginParam 登录参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
public Object login(@Validated() @RequestBody SystemLoginParam systemLoginParam) {
|
||||
public AjaxResult login(@Validated() @RequestBody SystemLoginParam systemLoginParam) {
|
||||
try {
|
||||
Map<String, Object> map = iSystemLoginService.login(systemLoginParam);
|
||||
return AjaxResult.success(map);
|
||||
|
|
@ -49,10 +49,10 @@ public class LoginController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param request 请求接口
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/logout")
|
||||
public Object logout(HttpServletRequest request) {
|
||||
public AjaxResult logout(HttpServletRequest request) {
|
||||
try {
|
||||
iSystemLoginService.logout(request.getHeader("token"));
|
||||
return AjaxResult.success();
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ public class LogsController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param params 搜索参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/operate")
|
||||
public Object operate(@Validated PageParam pageParam, @RequestParam Map<String, String> params) {
|
||||
public AjaxResult operate(@Validated PageParam pageParam, @RequestParam Map<String, String> params) {
|
||||
PageResult<LogOperateVo> list = iSystemLogsServer.operate(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
@ -43,10 +43,10 @@ public class LogsController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param params 搜索参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/login")
|
||||
public Object login(@Validated PageParam pageParam, @RequestParam Map<String, String> params) {
|
||||
public AjaxResult login(@Validated PageParam pageParam, @RequestParam Map<String, String> params) {
|
||||
PageResult<LogLoginVo> list = iSystemLogsServer.login(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ public class UserController {
|
|||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
public AjaxResult list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<UserVo> list = iUserService.list(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
|
|
@ -43,10 +43,10 @@ public class UserController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
UserVo vo = iUserService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
|
@ -56,10 +56,10 @@ public class UserController {
|
|||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@RequestBody Map<String, String> params) {
|
||||
public AjaxResult edit(@RequestBody Map<String, String> params) {
|
||||
Assert.notNull(params.get("id"), "id参数缺失");
|
||||
Assert.notNull(params.get("field"), "field参数缺失");
|
||||
Assert.notNull(params.get("value"), "value参数缺失");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.mdd.admin.service.channel;
|
||||
|
||||
import com.mdd.admin.validate.channel.ChannelWxParam;
|
||||
import com.mdd.admin.vo.channel.ChannelWxVo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -11,15 +14,16 @@ public interface IChannelWxService {
|
|||
* 微信开放平台设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Map<String, String>
|
||||
* @return ChannelWxVo
|
||||
*/
|
||||
Map<String, Object> detail();
|
||||
ChannelWxVo detail();
|
||||
|
||||
/**
|
||||
* 微信开放平台设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelWxParam 参数
|
||||
*/
|
||||
void save(Map<String, String> param);
|
||||
void save(ChannelWxParam channelWxParam);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.mdd.admin.service.channel.impl;
|
||||
|
||||
import com.mdd.admin.service.channel.IChannelWxService;
|
||||
import com.mdd.admin.validate.channel.ChannelWxParam;
|
||||
import com.mdd.admin.vo.channel.ChannelWxVo;
|
||||
import com.mdd.common.utils.ConfigUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -17,27 +19,28 @@ public class ChannelWxServiceImpl implements IChannelWxService {
|
|||
* 微信开放平台设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Map<String, Object>
|
||||
* @return ChannelWxVo
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> detail() {
|
||||
public ChannelWxVo detail() {
|
||||
Map<String, String> config = ConfigUtil.get("wx_channel");
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("appId", config.getOrDefault("appId", "0"));
|
||||
map.put("appSecret", config.getOrDefault("appSecret", "0"));
|
||||
return map;
|
||||
ChannelWxVo vo = new ChannelWxVo();
|
||||
|
||||
vo.setAppId(config.getOrDefault("appId", ""));
|
||||
vo.setAppSecret(config.getOrDefault("appSecret", ""));
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信开放平台设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param param 参数
|
||||
* @param channelWxParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void save(Map<String, String> param) {
|
||||
ConfigUtil.set("wx_channel", "appId", param.getOrDefault("appId", ""));
|
||||
ConfigUtil.set("wx_channel", "appSecret", param.getOrDefault("appSecret", ""));
|
||||
public void save(ChannelWxParam channelWxParam) {
|
||||
ConfigUtil.set("wx_channel", "appId", channelWxParam.getAppId());
|
||||
ConfigUtil.set("wx_channel", "appSecret", channelWxParam.getAppSecret());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.admin.validate.BaseParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
/**
|
||||
* 开放平台渠道参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class ChannelWxParam extends BaseParam {
|
||||
|
||||
@Length(max = 100, message = "appId不能超100个字符")
|
||||
private String appId = "";
|
||||
|
||||
@Length(max = 200, message = "appSecret不能超100个字符")
|
||||
private String appSecret = "";
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.mdd.admin.vo.channel;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 开放平台渠道Vo
|
||||
*/
|
||||
@Data
|
||||
public class ChannelWxVo {
|
||||
|
||||
private String appId;
|
||||
private String appSecret;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue