liusheng
3 天以前 c80135e5c3f7bfab96ba558a910a06f1e587c53c
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLocallibraryController.java
@@ -1,5 +1,6 @@
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;
@@ -23,8 +24,7 @@
 */
@RestController
@RequestMapping("/smartor/helibrary")
public class HeLocallibraryController extends BaseController
{
public class HeLocallibraryController extends BaseController {
    @Autowired
    private IHeLocallibraryService heLocallibraryService;
@@ -32,9 +32,9 @@
     * 查询宣教库列表
     */
    //@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);
@@ -46,8 +46,7 @@
    //@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, "宣教库数据");
@@ -58,8 +57,7 @@
     */
    //@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));
    }
@@ -68,11 +66,9 @@
     */
    //@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));
    }
@@ -81,9 +77,9 @@
     */
    //@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));
    }
@@ -92,9 +88,8 @@
     */
    //@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));
    }
}