|
@@ -2,6 +2,8 @@ package com.ruoyi.web.work.controller;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
+
|
|
|
+import com.ruoyi.common.annotation.Anonymous;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -23,13 +25,15 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
* @author lsw
|
|
|
* @date 2024-07-19
|
|
|
*/
|
|
|
+@Anonymous
|
|
|
@RestController
|
|
|
@RequestMapping("/work/user")
|
|
|
public class UserController extends BaseController {
|
|
|
@Autowired
|
|
|
private IUserService userService;
|
|
|
|
|
|
- @PreAuthorize("@ss.hasPermi('work:user:list')")
|
|
|
+ @Anonymous
|
|
|
+ //@PreAuthorize("@ss.hasPermi('work:user:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(User user){
|
|
|
startPage();
|
|
@@ -37,27 +41,31 @@ public class UserController extends BaseController {
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
- @PreAuthorize("@ss.hasPermi('work:user:query')")
|
|
|
+ @Anonymous
|
|
|
+ //@PreAuthorize("@ss.hasPermi('work:user:query')")
|
|
|
@GetMapping(value = "/detail/{id}")
|
|
|
public AjaxResult detail(@PathVariable("id") Long id){
|
|
|
return AjaxResult.success(userService.getById(id));
|
|
|
}
|
|
|
|
|
|
- @PreAuthorize("@ss.hasPermi('work:user:add')")
|
|
|
+ @Anonymous
|
|
|
+ //@PreAuthorize("@ss.hasPermi('work:user:add')")
|
|
|
@Log(title = "小程序用户", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/add")
|
|
|
public AjaxResult add(@RequestBody User user){
|
|
|
return toAjax(userService.save(user));
|
|
|
}
|
|
|
|
|
|
- @PreAuthorize("@ss.hasPermi('work:user:edit')")
|
|
|
+ @Anonymous
|
|
|
+ //@PreAuthorize("@ss.hasPermi('work:user:edit')")
|
|
|
@Log(title = "小程序用户", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/edit")
|
|
|
public AjaxResult edit(@RequestBody User user){
|
|
|
return toAjax(userService.updateById(user));
|
|
|
}
|
|
|
|
|
|
- @PreAuthorize("@ss.hasPermi('work:user:remove')")
|
|
|
+ @Anonymous
|
|
|
+ //@PreAuthorize("@ss.hasPermi('work:user:remove')")
|
|
|
@Log(title = "小程序用户", businessType = BusinessType.DELETE)
|
|
|
@GetMapping("/remove/{ids}")
|
|
|
public AjaxResult remove(@PathVariable Long[] ids){
|