TenantCovenantInfoController.java 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.zhongzheng.controller.covenant;
  2. import com.zhongzheng.common.annotation.Log;
  3. import com.zhongzheng.common.core.controller.BaseController;
  4. import com.zhongzheng.common.core.domain.AjaxResult;
  5. import com.zhongzheng.common.core.page.TableDataInfo;
  6. import com.zhongzheng.common.enums.BusinessType;
  7. import com.zhongzheng.common.utils.poi.ExcelUtil;
  8. import com.zhongzheng.modules.bs.covenant.bo.TenantCovenantInfoAddBo;
  9. import com.zhongzheng.modules.bs.covenant.bo.TenantCovenantInfoEditBo;
  10. import com.zhongzheng.modules.bs.covenant.bo.TenantCovenantInfoQueryBo;
  11. import com.zhongzheng.modules.bs.covenant.service.ITenantCovenantInfoService;
  12. import com.zhongzheng.modules.bs.covenant.vo.TenantCovenantInfoVo;
  13. import io.swagger.annotations.Api;
  14. import io.swagger.annotations.ApiOperation;
  15. import lombok.RequiredArgsConstructor;
  16. import org.springframework.beans.factory.annotation.Autowired;
  17. import org.springframework.security.access.prepost.PreAuthorize;
  18. import org.springframework.web.bind.annotation.*;
  19. import java.util.Arrays;
  20. import java.util.List;
  21. /**
  22. * 乙方协议收件信息Controller
  23. *
  24. * @author ruoyi
  25. * @date 2024-05-30
  26. */
  27. @Api(value = "乙方信息控制器", tags = {"乙方信息控制器"})
  28. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  29. @RestController
  30. @RequestMapping("/system/tenantInfo")
  31. public class TenantCovenantInfoController extends BaseController {
  32. private final ITenantCovenantInfoService iTenantCovenantInfoService;
  33. /**
  34. * 新增、修改乙方协议收件信息
  35. */
  36. @ApiOperation("新增、修改乙方协议信息")
  37. @PreAuthorize("@ss.hasPermi('system:tenantInfo:add')")
  38. @Log(title = "乙方协议收件信息", businessType = BusinessType.INSERT)
  39. @PostMapping("/insertOrUpdate")
  40. public AjaxResult<Void> add(@RequestBody TenantCovenantInfoAddBo bo) {
  41. return toAjax(iTenantCovenantInfoService.insertByAddBo(bo) ? 1 : 0);
  42. }
  43. }