| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/helibrary") |
| | | public class HeLocallibraryController extends BaseController |
| | | { |
| | | public class HeLocallibraryController extends BaseController { |
| | | @Autowired |
| | | private IHeLocallibraryService heLocallibraryService; |
| | | |
| | |
| | | * 查询宣教库列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:helibrary:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody HeLocallibrary heLocallibrary) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody HeLocallibrary heLocallibrary) { |
| | | startPage(); |
| | | List<HeLocallibrary> list = heLocallibraryService.selectHeLocallibraryList(heLocallibrary); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:helibrary:export')") |
| | | @Log(title = "宣教库", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, HeLocallibrary heLocallibrary) |
| | | { |
| | | public void export(HttpServletResponse response, HeLocallibrary heLocallibrary) { |
| | | List<HeLocallibrary> list = heLocallibraryService.selectHeLocallibraryList(heLocallibrary); |
| | | ExcelUtil<HeLocallibrary> util = new ExcelUtil<HeLocallibrary>(HeLocallibrary.class); |
| | | util.exportExcel(response, list, "宣教库数据"); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:helibrary:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(heLocallibraryService.selectHeLocallibraryById(id)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:helibrary:add')") |
| | | @Log(title = "宣教库", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("add") |
| | | public AjaxResult add(@RequestBody HeLocallibrary heLocallibrary) |
| | | { |
| | | SysUser user = getLoginUser().getUser(); |
| | | heLocallibrary.setOrgid(user.getOrgid()); |
| | | public AjaxResult add(@RequestBody HeLocallibrary heLocallibrary) { |
| | | return toAjax(heLocallibraryService.insertHeLocallibrary(heLocallibrary)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:helibrary:edit')") |
| | | @Log(title = "宣教库", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody HeLocallibrary heLocallibrary) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody HeLocallibrary heLocallibrary) { |
| | | return toAjax(heLocallibraryService.updateHeLocallibrary(heLocallibrary)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:helibrary:remove')") |
| | | @Log(title = "宣教库", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(heLocallibraryService.deleteHeLocallibraryByIds(ids)); |
| | | } |
| | | } |