TRiskManagerController.java 3.58 KB
Newer Older
耿迪迪's avatar
耿迪迪 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
package com.zehong.web.controller.riskManager;

import java.util.List;
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 com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TRiskManager;
import com.zehong.system.service.ITRiskManagerService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;

/**
 * 【请填写功能名称】Controller
 * 
 * @author zehong
 * @date 2022-07-01
 */
@RestController
@RequestMapping("/system/riskManager")
public class TRiskManagerController extends BaseController
{
    @Autowired
    private ITRiskManagerService tRiskManagerService;

    /**
     * 查询【请填写功能名称】列表
     */
38
//    //@PreAuthorize("@ss.hasPermi('system:manager:list')")
耿迪迪's avatar
耿迪迪 committed
39 40 41 42 43 44 45 46 47 48 49
    @GetMapping("/list")
    public TableDataInfo list(TRiskManager tRiskManager)
    {
        startPage();
        List<TRiskManager> list = tRiskManagerService.selectTRiskManagerList(tRiskManager);
        return getDataTable(list);
    }

    /**
     * 导出【请填写功能名称】列表
     */
50
//    //@PreAuthorize("@ss.hasPermi('system:manager:export')")
耿迪迪's avatar
耿迪迪 committed
51 52 53 54 55 56 57 58 59 60 61 62
    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(TRiskManager tRiskManager)
    {
        List<TRiskManager> list = tRiskManagerService.selectTRiskManagerList(tRiskManager);
        ExcelUtil<TRiskManager> util = new ExcelUtil<TRiskManager>(TRiskManager.class);
        return util.exportExcel(list, "【请填写功能名称】数据");
    }

    /**
     * 获取【请填写功能名称】详细信息
     */
63
    // //@PreAuthorize("@ss.hasPermi('system:manager:query')")
耿迪迪's avatar
耿迪迪 committed
64 65 66 67 68 69 70 71 72
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return AjaxResult.success(tRiskManagerService.selectTRiskManagerById(id));
    }

    /**
     * 新增【请填写功能名称】
     */
73
    // //@PreAuthorize("@ss.hasPermi('system:manager:add')")
耿迪迪's avatar
耿迪迪 committed
74 75 76 77 78 79 80 81 82 83
    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody TRiskManager tRiskManager)
    {
        return toAjax(tRiskManagerService.insertTRiskManager(tRiskManager));
    }

    /**
     * 修改【请填写功能名称】
     */
84
    // //@PreAuthorize("@ss.hasPermi('system:manager:edit')")
耿迪迪's avatar
耿迪迪 committed
85 86 87 88 89 90 91 92 93 94
    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody TRiskManager tRiskManager)
    {
        return toAjax(tRiskManagerService.updateTRiskManager(tRiskManager));
    }

    /**
     * 删除【请填写功能名称】
     */
95
    // //@PreAuthorize("@ss.hasPermi('system:manager:remove')")
耿迪迪's avatar
耿迪迪 committed
96 97 98 99 100 101 102
    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(tRiskManagerService.deleteTRiskManagerByIds(ids));
    }
}