| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.sangeshenbian.annotation.SysLog; |
| | | import com.panzhihua.sangeshenbian.model.entity.SystemPost; |
| | | import com.panzhihua.sangeshenbian.service.ISystemPostService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "添加职位", tags = {"三个身边后台-职位管理"}) |
| | | @OperLog(operModul = "三个身边后台",operType = 1,businessType = "添加职位") |
| | | @SysLog(operatorCategory = "添加职位",operId = 2) |
| | | public R add(@RequestBody SystemPost systemPost) { |
| | | systemPost.setCreateTime(LocalDateTime.now()); |
| | | systemPostService.save(systemPost); |
| | |
| | | |
| | | @PostMapping("/edit") |
| | | @ApiOperation(value = "编辑职位", tags = {"三个身边后台-职位管理"}) |
| | | @OperLog(operModul = "三个身边后台",operType = 2,businessType = "编辑职位") |
| | | @SysLog(operatorCategory = "编辑职位",operId = 2) |
| | | public R edit(@RequestBody SystemPost systemPost) { |
| | | systemPostService.updateById(systemPost); |
| | | return R.ok(); |
| | |
| | | |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation(value = "删除职位", tags = {"三个身边后台-职位管理"}) |
| | | @OperLog(operModul = "三个身边后台",operType = 3,businessType = "删除职位") |
| | | @SysLog(operatorCategory = "删除职位",operId = 2) |
| | | public R delete(@PathVariable("id") Integer id) { |
| | | String name = systemPostService.getById(id).getName(); |
| | | systemPostService.removeById(id); |
| | | return R.ok(); |
| | | return R.ok(name); |
| | | } |
| | | |
| | | |