liusheng
2024-07-06 4bd9498d45b4d9f4bc948c04ec8efc9bb02d937e
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseUserInfoController.java
@@ -6,14 +6,7 @@
import com.ruoyi.common.utils.StringUtils;
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;
@@ -39,8 +32,8 @@
     * 查询用户列表
     */
    @PreAuthorize("@ss.hasPermi('system:info:list')")
    @GetMapping("/list")
    public TableDataInfo list(BaseUserInfo baseUserInfo) {
   @PostMapping("/list")
    public TableDataInfo list(@RequestBody BaseUserInfo baseUserInfo) {
        startPage();
        List<BaseUserInfo> list = baseUserInfoService.selectBaseUserInfoList(baseUserInfo);
        return getDataTable(list);
@@ -72,7 +65,7 @@
     */
    @PreAuthorize("@ss.hasPermi('system:info:add')")
    @Log(title = "用户", businessType = BusinessType.INSERT)
    @PostMapping
    @PostMapping("/add")
    public AjaxResult add(@RequestBody BaseUserInfo baseUserInfo) {
        return toAjax(baseUserInfoService.insertBaseUserInfo(baseUserInfo));
    }
@@ -82,7 +75,7 @@
     */
    @PreAuthorize("@ss.hasPermi('system:info:edit')")
    @Log(title = "用户", businessType = BusinessType.UPDATE)
    @PutMapping
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody BaseUserInfo baseUserInfo) {
        return toAjax(baseUserInfoService.updateBaseUserInfo(baseUserInfo));
    }
@@ -92,7 +85,7 @@
     */
    @PreAuthorize("@ss.hasPermi('system:info:remove')")
    @Log(title = "用户", businessType = BusinessType.DELETE)
    @DeleteMapping("/{userids}")
    @GetMapping("/remove/{userids}")
    public AjaxResult remove(@PathVariable Long[] userids) {
        return toAjax(baseUserInfoService.deleteBaseUserInfoByUserids(userids));
    }
@@ -100,12 +93,12 @@
    /**
     * 获取人员的联系方式
     *
     * @param personNo  人员编号
     * @param personCode  人员编号
     * @param noticeWay 通知方式
     * @return
     */
    @RequestMapping("/reportContent")
    public AjaxResult getContact(String personCode, String noticeWay) {
    @GetMapping("/reportContent")
    public AjaxResult getContact(@RequestParam("personCode") String personCode, @RequestParam("noticeWay") String noticeWay) {
        if (StringUtils.isEmpty(personCode) || StringUtils.isEmpty(noticeWay)) {
            return error("输入有误,请检查");
        }