|  | @@ -1,65 +1,33 @@
 | 
											
												
													
														|  |  package com.ym.mec.web.controller;
 |  |  package com.ym.mec.web.controller;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -import com.ym.mec.auth.api.entity.SysUser;
 |  | 
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.entity.SysSuggestion;
 |  |  import com.ym.mec.biz.dal.entity.SysSuggestion;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.page.SysSuggestionQueryInfo;
 |  |  import com.ym.mec.biz.dal.page.SysSuggestionQueryInfo;
 | 
											
												
													
														|  |  import com.ym.mec.biz.service.SysSuggestionService;
 |  |  import com.ym.mec.biz.service.SysSuggestionService;
 | 
											
												
													
														|  | -import com.ym.mec.biz.service.SysUserService;
 |  | 
 | 
											
												
													
														|  |  import com.ym.mec.common.controller.BaseController;
 |  |  import com.ym.mec.common.controller.BaseController;
 | 
											
												
													
														|  |  import com.ym.mec.common.entity.HttpResponseResult;
 |  |  import com.ym.mec.common.entity.HttpResponseResult;
 | 
											
												
													
														|  |  import io.swagger.annotations.Api;
 |  |  import io.swagger.annotations.Api;
 | 
											
												
													
														|  |  import io.swagger.annotations.ApiOperation;
 |  |  import io.swagger.annotations.ApiOperation;
 | 
											
												
													
														|  | -import org.apache.commons.lang3.StringUtils;
 |  | 
 | 
											
												
													
														|  |  import org.springframework.beans.factory.annotation.Autowired;
 |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
											
												
													
														|  |  import org.springframework.security.access.prepost.PreAuthorize;
 |  |  import org.springframework.security.access.prepost.PreAuthorize;
 | 
											
												
													
														|  |  import org.springframework.web.bind.annotation.*;
 |  |  import org.springframework.web.bind.annotation.*;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  @Api(tags = "意见反馈")
 |  |  @Api(tags = "意见反馈")
 | 
											
												
													
														|  |  @RestController
 |  |  @RestController
 | 
											
												
													
														|  | -@RequestMapping("${app-config.url.web:}/")
 |  | 
 | 
											
												
													
														|  | 
 |  | +@RequestMapping("${app-config.url.web:}/sysSuggestion")
 | 
											
												
													
														|  |  public class SysSuggestionController extends BaseController {
 |  |  public class SysSuggestionController extends BaseController {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
												
													
														|  |      private SysSuggestionService sysSuggestionService;
 |  |      private SysSuggestionService sysSuggestionService;
 | 
											
												
													
														|  | -    @Autowired
 |  | 
 | 
											
												
													
														|  | -    private SysUserService sysUserService;
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -    @ApiOperation(value = "新增")
 |  | 
 | 
											
												
													
														|  | -    @RequestMapping("sysSuggestion/add")
 |  | 
 | 
											
												
													
														|  | -    @PreAuthorize("@pcs.hasPermissions('sysSuggestion/add')")
 |  | 
 | 
											
												
													
														|  | -    public Object add(SysSuggestion sysSuggestion) {
 |  | 
 | 
											
												
													
														|  | -        SysUser sysUser = sysUserService.getUser();
 |  | 
 | 
											
												
													
														|  | -        sysSuggestion.setUserId(sysUser.getId().longValue());
 |  | 
 | 
											
												
													
														|  | -        sysSuggestion.setClientType("TEACHER");
 |  | 
 | 
											
												
													
														|  | -        if(StringUtils.isEmpty(sysSuggestion.getMobileNo())){
 |  | 
 | 
											
												
													
														|  | -            sysSuggestion.setMobileNo(sysUser.getPhone());
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -        sysSuggestionService.insert(sysSuggestion);
 |  | 
 | 
											
												
													
														|  | -        return succeed();
 |  | 
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -    @ApiOperation(value = "新增")
 |  | 
 | 
											
												
													
														|  | -    @RequestMapping("suggestion/add")
 |  | 
 | 
											
												
													
														|  | -    public Object suggestionAdd(SysSuggestion sysSuggestion) {
 |  | 
 | 
											
												
													
														|  | -        SysUser sysUser = sysUserService.getUser();
 |  | 
 | 
											
												
													
														|  | -        sysSuggestion.setUserId(sysUser.getId().longValue());
 |  | 
 | 
											
												
													
														|  | -        sysSuggestion.setClientType("EDUCATION");
 |  | 
 | 
											
												
													
														|  | -        if(StringUtils.isEmpty(sysSuggestion.getMobileNo())){
 |  | 
 | 
											
												
													
														|  | -            sysSuggestion.setMobileNo(sysUser.getPhone());
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -        sysSuggestionService.insert(sysSuggestion);
 |  | 
 | 
											
												
													
														|  | -        return succeed();
 |  | 
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @ApiOperation(value = "获取详情")
 |  |      @ApiOperation(value = "获取详情")
 | 
											
												
													
														|  | -    @GetMapping("sysSuggestion/detail")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    @GetMapping("/detail")
 | 
											
												
													
														|  |      @PreAuthorize("@pcs.hasPermissions('sysSuggestion/detail')")
 |  |      @PreAuthorize("@pcs.hasPermissions('sysSuggestion/detail')")
 | 
											
												
													
														|  |      public HttpResponseResult<SysSuggestion> detail(Long id) {
 |  |      public HttpResponseResult<SysSuggestion> detail(Long id) {
 | 
											
												
													
														|  |          return succeed(sysSuggestionService.getDetail(id));
 |  |          return succeed(sysSuggestionService.getDetail(id));
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @ApiOperation(value = "处理")
 |  |      @ApiOperation(value = "处理")
 | 
											
												
													
														|  | -    @PostMapping("sysSuggestion/dispose")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    @PostMapping("/dispose")
 | 
											
												
													
														|  |      @PreAuthorize("@pcs.hasPermissions('sysSuggestion/dispose')")
 |  |      @PreAuthorize("@pcs.hasPermissions('sysSuggestion/dispose')")
 | 
											
												
													
														|  |      public HttpResponseResult<Object> dispose(@RequestBody SysSuggestion sysSuggestion) {
 |  |      public HttpResponseResult<Object> dispose(@RequestBody SysSuggestion sysSuggestion) {
 | 
											
												
													
														|  |          sysSuggestionService.dispose(sysSuggestion);
 |  |          sysSuggestionService.dispose(sysSuggestion);
 | 
											
										
											
												
													
														|  | @@ -67,7 +35,7 @@ public class SysSuggestionController extends BaseController {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @ApiOperation(value = "删除")
 |  |      @ApiOperation(value = "删除")
 | 
											
												
													
														|  | -    @GetMapping("sysSuggestion/del")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    @GetMapping("/del")
 | 
											
												
													
														|  |      @PreAuthorize("@pcs.hasPermissions('sysSuggestion/del')")
 |  |      @PreAuthorize("@pcs.hasPermissions('sysSuggestion/del')")
 | 
											
												
													
														|  |      public Object del(Long id) {
 |  |      public Object del(Long id) {
 | 
											
												
													
														|  |          sysSuggestionService.delete(id);
 |  |          sysSuggestionService.delete(id);
 | 
											
										
											
												
													
														|  | @@ -75,7 +43,7 @@ public class SysSuggestionController extends BaseController {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @ApiOperation(value = "分页查询")
 |  |      @ApiOperation(value = "分页查询")
 | 
											
												
													
														|  | -    @PostMapping("sysSuggestion/queryPage")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    @PostMapping("/queryPage")
 | 
											
												
													
														|  |      @PreAuthorize("@pcs.hasPermissions('sysSuggestion/queryPage')")
 |  |      @PreAuthorize("@pcs.hasPermissions('sysSuggestion/queryPage')")
 | 
											
												
													
														|  |      public Object queryPage(@RequestBody SysSuggestionQueryInfo queryInfo) {
 |  |      public Object queryPage(@RequestBody SysSuggestionQueryInfo queryInfo) {
 | 
											
												
													
														|  |          return succeed(sysSuggestionService.queryPage(queryInfo));
 |  |          return succeed(sysSuggestionService.queryPage(queryInfo));
 |