| | |
| | | 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; |
| | |
| | | * 查询用户列表 |
| | | */ |
| | | @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); |
| | |
| | | */ |
| | | @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)); |
| | | } |
| | |
| | | */ |
| | | @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)); |
| | | } |
| | |
| | | */ |
| | | @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)); |
| | | } |
| | |
| | | /** |
| | | * 获取人员的联系方式 |
| | | * |
| | | * @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("输入有误,请检查"); |
| | | } |