You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
3.4 KiB
Java
90 lines
3.4 KiB
Java
1 year ago
|
package com.chenxuan.controller;
|
||
|
|
||
|
|
||
|
import io.swagger.annotations.Api;
|
||
|
import io.swagger.annotations.ApiOperation;
|
||
|
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
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.RequestParam;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||
|
import com.chenxuan.base.controller.BaseController;
|
||
|
import com.chenxuan.base.entity.AjaxResult;
|
||
|
import com.chenxuan.base.entity.Query;
|
||
|
import com.chenxuan.bean.annotation.LogAnnotation;
|
||
|
import com.chenxuan.constants.BusiUrlConstants;
|
||
|
import com.chenxuan.entity.model.BusiFrequencyConf;
|
||
|
import com.chenxuan.enums.OperateType;
|
||
|
import com.chenxuan.service.BusiFrequencyConfService;
|
||
|
|
||
|
@Api(tags = "振动装置-频率配置")
|
||
|
@RestController
|
||
|
@RequestMapping(value = BusiUrlConstants.BUSI_FREQUENCY_CONF)
|
||
|
public class BusiFrequencyConfController extends BaseController {
|
||
|
|
||
|
@Autowired
|
||
|
private BusiFrequencyConfService busiFrequencyConfService;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @Description: 获取振动装置频率配置信息列表
|
||
|
* @Param:
|
||
|
* @Return: TableDataInfo
|
||
|
**/
|
||
|
@ApiOperation(value = "分页查询振动装置频率配置列表")
|
||
|
@GetMapping(value = "/page")
|
||
|
public AjaxResult page(Query queryParam) {
|
||
|
Page<BusiFrequencyConf> page = busiFrequencyConfService.page( queryParam );
|
||
|
return AjaxResult.success( page );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 新增振动装置频率配置信息
|
||
|
*/
|
||
|
@ApiOperation(value = "新增振动装置频率配置信息")
|
||
|
@LogAnnotation(module = "振动装置频率配置", operateType = OperateType.INSERT)
|
||
|
@PostMapping(value = "/add")
|
||
|
public AjaxResult add(@RequestBody BusiFrequencyConf busiFrequencyConf) {
|
||
|
return returnAjax( busiFrequencyConfService.insertFrequencyConf( busiFrequencyConf ) );
|
||
|
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 修改振动装置频率配置信息
|
||
|
*/
|
||
|
@ApiOperation(value = "修改振动装置频率配置信息")
|
||
|
@LogAnnotation(module = "振动装置频率配置", operateType = OperateType.UPDATE)
|
||
|
@PutMapping(value = "/update")
|
||
|
public AjaxResult update(@RequestBody BusiFrequencyConf busiFrequencyConf) {
|
||
|
return returnAjax( busiFrequencyConfService.updateFrequencyConf( busiFrequencyConf ) );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 根据id加载振动装置频率配置信息
|
||
|
*/
|
||
|
@ApiOperation(value = "根据id加载振动装置频率配置信息")
|
||
|
@GetMapping(value = "/getMainDeviceById/{id}")
|
||
|
public AjaxResult getMainDeviceByMainId(@PathVariable("id") String id) {
|
||
|
return AjaxResult.success( busiFrequencyConfService.selectFrequencyConfById( id ) );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 删除振动装置频率配置信息
|
||
|
*/
|
||
|
@ApiOperation(value = "删除振动装置频率配置信息")
|
||
|
@LogAnnotation(module = "振动装置频率配置", operateType = OperateType.DELETE)
|
||
|
@DeleteMapping(value = "/delete")
|
||
|
public AjaxResult remove(@RequestParam("id") String id) {
|
||
|
return returnAjax( busiFrequencyConfService.deleteFrequencyConfById( id ) );
|
||
|
}
|
||
|
|
||
|
}
|