123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- package com.slibra.web.controller.business;
- import java.util.List;
- import javax.servlet.http.HttpServletResponse;
- import org.springframework.security.access.prepost.PreAuthorize;
- 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.slibra.common.annotation.Log;
- import com.slibra.common.core.controller.BaseController;
- import com.slibra.common.core.domain.AjaxResult;
- import com.slibra.common.enums.BusinessType;
- import com.slibra.business.domain.TXinyiAgentAssistant;
- import com.slibra.business.service.ITXinyiAgentAssistantService;
- import com.slibra.common.utils.poi.ExcelUtil;
- import com.slibra.common.core.page.TableDataInfo;
- /**
- * 信义智能体助手配置Controller
- *
- * @author slibra
- * @date 2024-05-17
- */
- @RestController
- @RequestMapping("/business/assistant")
- public class TXinyiAgentAssistantController extends BaseController
- {
- @Autowired
- private ITXinyiAgentAssistantService tXinyiAgentAssistantService;
- /**
- * 查询信义智能体助手配置列表
- */
- @PreAuthorize("@ss.hasPermi('business:assistant:list')")
- @GetMapping("/list")
- public TableDataInfo list(TXinyiAgentAssistant tXinyiAgentAssistant)
- {
- startPage();
- List<TXinyiAgentAssistant> list = tXinyiAgentAssistantService.selectTXinyiAgentAssistantList(tXinyiAgentAssistant);
- return getDataTable(list);
- }
- /**
- * 导出信义智能体助手配置列表
- */
- @PreAuthorize("@ss.hasPermi('business:assistant:export')")
- @Log(title = "信义智能体助手配置", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, TXinyiAgentAssistant tXinyiAgentAssistant)
- {
- List<TXinyiAgentAssistant> list = tXinyiAgentAssistantService.selectTXinyiAgentAssistantList(tXinyiAgentAssistant);
- ExcelUtil<TXinyiAgentAssistant> util = new ExcelUtil<TXinyiAgentAssistant>(TXinyiAgentAssistant.class);
- util.exportExcel(response, list, "信义智能体助手配置数据");
- }
- /**
- * 获取信义智能体助手配置详细信息
- */
- @PreAuthorize("@ss.hasPermi('business:assistant:query')")
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id)
- {
- return success(tXinyiAgentAssistantService.selectTXinyiAgentAssistantById(id));
- }
- /**
- * 新增信义智能体助手配置
- */
- @PreAuthorize("@ss.hasPermi('business:assistant:add')")
- @Log(title = "信义智能体助手配置", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody TXinyiAgentAssistant tXinyiAgentAssistant)
- {
- tXinyiAgentAssistant.setCreateBy(getUsername());
- return toAjax(tXinyiAgentAssistantService.insertTXinyiAgentAssistant(tXinyiAgentAssistant));
- }
- /**
- * 修改信义智能体助手配置
- */
- @PreAuthorize("@ss.hasPermi('business:assistant:edit')")
- @Log(title = "信义智能体助手配置", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody TXinyiAgentAssistant tXinyiAgentAssistant)
- {
- tXinyiAgentAssistant.setUpdateBy(getUsername());
- return toAjax(tXinyiAgentAssistantService.updateTXinyiAgentAssistant(tXinyiAgentAssistant));
- }
- /**
- * 删除信义智能体助手配置
- */
- @PreAuthorize("@ss.hasPermi('business:assistant:remove')")
- @Log(title = "信义智能体助手配置", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids)
- {
- return toAjax(tXinyiAgentAssistantService.deleteTXinyiAgentAssistantByIds(ids));
- }
- }
|