Alex 4 years ago
parent
commit
bad5a7db43

+ 8 - 6
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TbMyPublishController.java

@@ -53,7 +53,7 @@ public class TbMyPublishController extends BaseController {
      * 查询我的近况 列表
      */
     @ApiOperation("查询我的发表列表")
-    @PreAuthorize("@ss.hasPermi('app:publish:list')")
+    @PreAuthorize("@ss.hasPermi('system:publish:list')")
     @GetMapping("/list")
     public TableDataInfo list(TbMyPublish tbMyPublish) {
         startPage();
@@ -65,7 +65,7 @@ public class TbMyPublishController extends BaseController {
      * 导出我的近况 列表
      */
     @ApiOperation("导出我的近况 列表")
-    @PreAuthorize("@ss.hasPermi('app:publish:export')" )
+    @PreAuthorize("@ss.hasPermi('system:publish:export')" )
     @Log(title = "我的近况(我的发)" , businessType = BusinessType.EXPORT)
     @GetMapping("/export" )
     public AjaxResult export(TbMyPublish tbMyPublish) {
@@ -79,7 +79,7 @@ public class TbMyPublishController extends BaseController {
      * 获取我的近况详细信息
      */
     @ApiOperation("获取我的近况 详细信息")
-    @PreAuthorize("@ss.hasPermi('app:publish:query')" )
+    @PreAuthorize("@ss.hasPermi('system:publish:query')" )
     @GetMapping(value = "/{id}" )
     public AjaxResult getInfo(@PathVariable("id" ) Long id) {
         return AjaxResult.success(iTbMyPublishService.getPublish(id));
@@ -89,7 +89,7 @@ public class TbMyPublishController extends BaseController {
      * 新增我的近况
      */
     @ApiOperation("新增我的近况 ")
-    @PreAuthorize("@ss.hasPermi('app:publish:add')" )
+    @PreAuthorize("@ss.hasPermi('system:publish:add')" )
     @Log(title = "我的近况(我的发)" , businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TbMyPublish tbMyPublish) {
@@ -100,7 +100,7 @@ public class TbMyPublishController extends BaseController {
      * 修改我的近况
      */
     @ApiOperation("修改我的近况 ")
-    @PreAuthorize("@ss.hasPermi('app:publish:edit')" )
+    @PreAuthorize("@ss.hasPermi('system:publish:edit')" )
     @Log(title = "我的近况(我的发)" , businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TbMyPublish tbMyPublish) {
@@ -111,7 +111,7 @@ public class TbMyPublishController extends BaseController {
      * 逻辑删除我的近况
      */
     @ApiOperation("逻辑删除我的近况 ")
-    @PreAuthorize("@ss.hasPermi('app:publish:remove')" )
+    @PreAuthorize("@ss.hasPermi('system:publish:remove')" )
     @Log(title = "我的近况" , businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}" )
     public AjaxResult remove(@PathVariable Long[] ids) {
@@ -129,6 +129,7 @@ public class TbMyPublishController extends BaseController {
      * @return
      */
     @ApiOperation("获取我的近况 评论列表")
+    @PreAuthorize("@ss.hasPermi('system:publish:list')")
     @GetMapping(value = "/listComment/{id}" )
     public TableDataInfo listComment(@PathVariable("id" ) Long id) {
         startPage();
@@ -137,6 +138,7 @@ public class TbMyPublishController extends BaseController {
     }
 
     @ApiOperation("删除一条评论")
+    @PreAuthorize("@ss.hasPermi('system:publish:remove')" )
     @GetMapping(value = "/delComment/{id}" )
     public AjaxResult delComment(@PathVariable("id" ) Long id) {
         if (iTbMyPublishService.delComment(id)) {

+ 4 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TTemplatePageController.java

@@ -51,7 +51,10 @@ public class TTemplatePageController extends BaseController {
         startPage();
         LambdaQueryWrapper<TTemplatePage> lqw = new LambdaQueryWrapper<TTemplatePage>();
         if (StringUtils.isNotBlank(tTemplatePage.getTitle())){
-            lqw.eq(TTemplatePage::getTitle ,tTemplatePage.getTitle());
+            lqw.like(TTemplatePage::getTitle ,tTemplatePage.getTitle());
+        }
+        if (StringUtils.isNotBlank(tTemplatePage.getRemark())){
+            lqw.like(TTemplatePage::getRemark ,tTemplatePage.getRemark());
         }
         if (StringUtils.isNotBlank(tTemplatePage.getRoute())){
             lqw.eq(TTemplatePage::getRoute ,tTemplatePage.getRoute());

+ 4 - 0
ruoyi-app/src/main/java/com/ruoyi/app/controller/AppUserController.java

@@ -82,6 +82,10 @@ public class AppUserController extends AppBaseController {
         if (memberVo.getUserId() == null) {
             return AjaxResult.error("userId不能为空");
         }
+        // 昵称与姓名同步更新
+        if (StringUtils.isNotBlank(memberVo.getNickName())){
+            memberVo.setName(memberVo.getNickName());
+        }
         return toAjax(userService.saveOrUpdate(memberVo) ? 1 : 0);
     }
 }