liusheng
2024-09-18 907641e56c2085aaa81f267946dc3e3e9fca73e7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseUserInfoController.java
@@ -4,16 +4,11 @@
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -29,6 +24,7 @@
 * @author ruoyi
 * @date 2023-05-25
 */
@Api(description = "标签分类")
@RestController
@RequestMapping("/system/info")
public class BaseUserInfoController extends BaseController {
@@ -38,9 +34,10 @@
    /**
     * 查询用户列表
     */
    @PreAuthorize("@ss.hasPermi('system:info:list')")
    @GetMapping("/list")
    public TableDataInfo list(BaseUserInfo baseUserInfo) {
    @ApiOperation("查询用户列表")
    //@PreAuthorize("@ss.hasPermi('system:info:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody BaseUserInfo baseUserInfo) {
        startPage();
        List<BaseUserInfo> list = baseUserInfoService.selectBaseUserInfoList(baseUserInfo);
        return getDataTable(list);
@@ -49,8 +46,9 @@
    /**
     * 导出用户列表
     */
    @PreAuthorize("@ss.hasPermi('system:info:export')")
    @Log(title = "用户", businessType = BusinessType.EXPORT)
    @ApiOperation("导出用户列表")
    //@PreAuthorize("@ss.hasPermi('system:info:export')")
    @Log(title = "用户" , businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, BaseUserInfo baseUserInfo) {
        List<BaseUserInfo> list = baseUserInfoService.selectBaseUserInfoList(baseUserInfo);
@@ -61,7 +59,8 @@
    /**
     * 获取用户详细信息
     */
    @PreAuthorize("@ss.hasPermi('system:info:query')")
    @ApiOperation("获取用户详细信息")
    //@PreAuthorize("@ss.hasPermi('system:info:query')")
    @GetMapping(value = "/{userid}")
    public AjaxResult getInfo(@PathVariable("userid") Long userid) {
        return success(baseUserInfoService.selectBaseUserInfoByUserid(userid));
@@ -70,9 +69,10 @@
    /**
     * 新增用户
     */
    @PreAuthorize("@ss.hasPermi('system:info:add')")
    @Log(title = "用户", businessType = BusinessType.INSERT)
    @PostMapping
    @ApiOperation("新增用户")
    //@PreAuthorize("@ss.hasPermi('system:info:add')")
    @Log(title = "用户" , businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody BaseUserInfo baseUserInfo) {
        return toAjax(baseUserInfoService.insertBaseUserInfo(baseUserInfo));
    }
@@ -80,9 +80,10 @@
    /**
     * 修改用户
     */
    @PreAuthorize("@ss.hasPermi('system:info:edit')")
    @Log(title = "用户", businessType = BusinessType.UPDATE)
    @PutMapping
    @ApiOperation("修改用户")
    //@PreAuthorize("@ss.hasPermi('system:info:edit')")
    @Log(title = "用户" , businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody BaseUserInfo baseUserInfo) {
        return toAjax(baseUserInfoService.updateBaseUserInfo(baseUserInfo));
    }
@@ -90,9 +91,10 @@
    /**
     * 删除用户
     */
    @PreAuthorize("@ss.hasPermi('system:info:remove')")
    @Log(title = "用户", businessType = BusinessType.DELETE)
    @DeleteMapping("/{userids}")
    @ApiOperation("删除用户")
    //@PreAuthorize("@ss.hasPermi('system:info:remove')")
    @Log(title = "用户" , businessType = BusinessType.DELETE)
    @GetMapping("/remove/{userids}")
    public AjaxResult remove(@PathVariable Long[] userids) {
        return toAjax(baseUserInfoService.deleteBaseUserInfoByUserids(userids));
    }
@@ -100,12 +102,13 @@
    /**
     * 获取人员的联系方式
     *
     * @param personNo  人员编号
     * @param noticeWay 通知方式
     * @param personCode 人员编号
     * @param noticeWay  通知方式
     * @return
     */
    @RequestMapping("/reportContent")
    public AjaxResult getContact(String personCode, String noticeWay) {
    @ApiOperation("获取人员的联系方式")
    @GetMapping("/reportContent")
    public AjaxResult getContact(@RequestParam("personCode") String personCode, @RequestParam("noticeWay") String noticeWay) {
        if (StringUtils.isEmpty(personCode) || StringUtils.isEmpty(noticeWay)) {
            return error("输入有误,请检查");
        }