调整治理字典解析功能
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
package com.njcn.system.controller;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.system.pojo.param.CsWaveParam;
|
||||
import com.njcn.system.service.IEleWaveParmService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件拓展表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-07-31
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/eleWaveParm")
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "波形字典录入")
|
||||
@Validated
|
||||
public class EleWaveParmController extends BaseController {
|
||||
|
||||
private final IEleWaveParmService waveParamService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("新增波形拓展数据")
|
||||
@ApiImplicitParam(name = "waveParam", value = "字典数据", required = true)
|
||||
public HttpResult<String> add(@RequestBody @Validated CsWaveParam waveParam){
|
||||
log.info("录入字典数据");
|
||||
String methodDescribe = getMethodDescribe("add");
|
||||
LogUtil.njcnDebug(log, "{},模板当前解析字典数据为:", methodDescribe);
|
||||
waveParamService.add(waveParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.system.pojo.po.CsWaveParm;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件拓展表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-07-31
|
||||
*/
|
||||
public interface EleWaveParmMapper extends BaseMapper<CsWaveParm> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.system.pojo.param.CsWaveParam;
|
||||
import com.njcn.system.pojo.po.CsWaveParm;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件拓展表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-07-31
|
||||
*/
|
||||
public interface IEleWaveParmService extends IService<CsWaveParm> {
|
||||
|
||||
void add(CsWaveParam waveParam);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.system.mapper.EleWaveParmMapper;
|
||||
import com.njcn.system.pojo.param.CsWaveParam;
|
||||
import com.njcn.system.pojo.po.CsWaveParm;
|
||||
import com.njcn.system.service.IEleWaveParmService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件拓展表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-07-31
|
||||
*/
|
||||
@Service
|
||||
public class EleWaveParmServiceImpl extends ServiceImpl<EleWaveParmMapper, CsWaveParm> implements IEleWaveParmService {
|
||||
|
||||
@Override
|
||||
public void add(CsWaveParam waveParam) {
|
||||
CsWaveParm csWaveParm = new CsWaveParm();
|
||||
BeanUtils.copyProperties(waveParam,csWaveParm);
|
||||
this.save(csWaveParm);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user