| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | |
| | | */ |
| | | @ApiOperation("查询标签列表") |
| | | //@PreAuthorize("@ss.hasPermi('system:tag:list')") |
| | | @PostMapping("/list") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody BaseTag baseTag) { |
| | | PageUtils.startPageByPost(baseTag.getPageNum(), baseTag.getPageSize()); |
| | | List<BaseTag> list = null; |
| | | if (baseTag.getTagcategoryid() == null || baseTag.getTagcategoryid() == 0) baseTag.setTagcategoryid(null); |
| | | { |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | baseTag.setOrgid(user.getOrgid()); |
| | | list = baseTagService.selectBaseTagList(baseTag); |
| | | } |
| | | return getDataTable(list); |
| | |
| | | @ApiOperation("新增标签") |
| | | //@PreAuthorize("@ss.hasPermi('system:tag:add')") |
| | | @Log(title = "标签", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody BaseTag baseTag) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | baseTag.setOrgid(user.getOrgid()); |
| | | return toAjax(baseTagService.insertBaseTag(baseTag)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("修改标签") |
| | | //@PreAuthorize("@ss.hasPermi('system:tag:edit')") |
| | | @Log(title = "标签", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody BaseTag baseTag) { |
| | | return toAjax(baseTagService.updateBaseTag(baseTag)); |