Newer
Older
newfiber-termite / newfiber-termites-business / newfiber-termites-biz / src / main / java / com / newfiber / termite / controller / JingchuProjectConfigController.java
@xiongkai xiongkai 14 hours ago 4 KB OTA升级
package com.newfiber.termite.controller;

import com.newfiber.common.core.web.controller.BaseController;
import com.newfiber.common.core.web.domain.Result;
import com.newfiber.common.core.web.page.PageResult;
import com.newfiber.common.log.annotation.Log;
import com.newfiber.common.log.enums.BusinessType;
import com.newfiber.termite.domain.jingchu.JingchuProjectConfig;
import com.newfiber.termite.domain.request.jingchuProjectConfig.JingchuProjectConfigQueryRequest;
import com.newfiber.termite.domain.request.jingchuProjectConfig.JingchuProjectConfigSaveRequest;
import com.newfiber.termite.domain.request.jingchuProjectConfig.JingchuProjectConfigUpdateRequest;
import com.newfiber.termite.service.jingchu.IJingchuProjectConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 三方对接-荆楚平台项目信息Controller
 *
 * @author X.K
 * @date 2025-01-14
 */
@RestController
@RequestMapping("/jingchuProjectConfig")
@Api(value = "三方对接-荆楚平台项目信息", tags = "三方对接-荆楚平台项目信息")
public class JingchuProjectConfigController extends BaseController {

    @Resource
    private IJingchuProjectConfigService jingchuProjectConfigService;

    /**
     * 新增三方对接-荆楚平台项目信息
     */
    @PostMapping("add")
    @ApiOperation(value = "新增三方对接-荆楚平台项目信息", position = 10)
    @Log(title = "三方对接-荆楚平台项目信息", businessType = BusinessType.INSERT)
    public Result<Long> add(@Valid @RequestBody JingchuProjectConfigSaveRequest request) {
        return success(jingchuProjectConfigService.insert(request));
    }

    /**
     * 修改三方对接-荆楚平台项目信息
     */
    @PutMapping("edit")
    @ApiOperation(value = "修改三方对接-荆楚平台项目信息", position = 20)
    @Log(title = "三方对接-荆楚平台项目信息", businessType = BusinessType.UPDATE)
    public Result<Object> edit(@Valid @RequestBody JingchuProjectConfigUpdateRequest request) {
        return success(jingchuProjectConfigService.update(request));
    }

    /**
     * 删除三方对接-荆楚平台项目信息
     */
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "删除三方对接-荆楚平台项目信息", notes = "传入ids(,隔开)", position = 30)
    @Log(title = "三方对接-荆楚平台项目信息", businessType = BusinessType.DELETE)
    public Result<Object> remove(@PathVariable String ids) {
        return success(jingchuProjectConfigService.delete(ids));
    }

    /**
     * 详细查询三方对接-荆楚平台项目信息
     */
    @GetMapping(value = "/{id}")
    @ApiOperation(value = "详细查询三方对接-荆楚平台项目信息", position = 40)
    public Result<JingchuProjectConfig> detail(@PathVariable("id") Long id) {
        return success(jingchuProjectConfigService.selectDetail(id));
    }

    /**
     * 分页查询三方对接-荆楚平台项目信息
     */
    @GetMapping("/page")
    @ApiOperation(value = "分页查询三方对接-荆楚平台项目信息", position = 50)
    public PageResult<List<JingchuProjectConfig>> page(JingchuProjectConfigQueryRequest request) {
        startPage();
        List<JingchuProjectConfig> list = jingchuProjectConfigService.selectPage(request);
        return pageResult(list);
    }

    /**
     * 列表查询三方对接-荆楚平台项目信息
     */
    @GetMapping("/list")
    @ApiOperation(value = "列表查询三方对接-荆楚平台项目信息", position = 60)
    public Result<List<JingchuProjectConfig>> list(JingchuProjectConfigQueryRequest request) {
        List<JingchuProjectConfig> list = jingchuProjectConfigService.selectList(request);
        return success(list);
    }

}