治理指标字典功能调整
This commit is contained in:
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xuyang
|
* @author xuyang
|
||||||
@@ -19,7 +20,9 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
public interface EleEvtFeignClient {
|
public interface EleEvtFeignClient {
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation("新增事件拓展数据")
|
|
||||||
HttpResult<EleEpdPqd> add(@RequestBody EleEvtParam evtParam);
|
HttpResult<EleEpdPqd> add(@RequestBody EleEvtParam evtParam);
|
||||||
|
|
||||||
|
@PostMapping("/delete")
|
||||||
|
HttpResult<EleEpdPqd> delete(@RequestParam("id") String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xuyang
|
* @author xuyang
|
||||||
@@ -18,7 +19,10 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
public interface EleWaveFeignClient {
|
public interface EleWaveFeignClient {
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation("新增波形拓展数据")
|
|
||||||
HttpResult<String> add(@RequestBody CsWaveParam waveParam);
|
HttpResult<String> add(@RequestBody CsWaveParam waveParam);
|
||||||
|
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@ApiOperation("删除波形拓展数据")
|
||||||
|
HttpResult<String> delete(@RequestParam("id") String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ public class EleEvtFeignClientFallbackFactory implements FallbackFactory<EleEvtF
|
|||||||
log.error("{}异常,降级处理,异常为:{}","新增事件拓展数据",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","新增事件拓展数据",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<EleEpdPqd> delete(String id) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","删除事件拓展数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ public class EleWaveFeignClientFallbackFactory implements FallbackFactory<EleWav
|
|||||||
log.error("{}异常,降级处理,异常为:{}","新增波形拓展数据",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","新增波形拓展数据",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> delete(String id) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","删除波形拓展数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,4 +20,6 @@ public class CsWaveParam {
|
|||||||
|
|
||||||
private String data;
|
private String data;
|
||||||
|
|
||||||
|
private String showName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,4 +22,6 @@ public class EleEvtParam {
|
|||||||
|
|
||||||
private String data;
|
private String data;
|
||||||
|
|
||||||
|
private String showName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,6 @@ public class CsWaveParm {
|
|||||||
|
|
||||||
private String data;
|
private String data;
|
||||||
|
|
||||||
|
private String showName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,4 +34,6 @@ public class EleEvtParm {
|
|||||||
|
|
||||||
private String data;
|
private String data;
|
||||||
|
|
||||||
|
private String showName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,11 +17,8 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,5 +51,18 @@ public class EleEvtParmController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("删除事件拓展数据")
|
||||||
|
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||||
|
public HttpResult<EleEpdPqd> delete(@RequestParam String id){
|
||||||
|
String methodDescribe = getMethodDescribe("delete");
|
||||||
|
LogUtil.njcnDebug(log, "{},传递的id为:{}", methodDescribe,id);
|
||||||
|
eleEvtParmService.delete(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
import com.njcn.system.pojo.param.CsWaveParam;
|
import com.njcn.system.pojo.param.CsWaveParam;
|
||||||
|
import com.njcn.system.pojo.po.EleEpdPqd;
|
||||||
import com.njcn.system.service.IEleWaveParmService;
|
import com.njcn.system.service.IEleWaveParmService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -16,10 +17,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -51,5 +49,16 @@ public class EleWaveParmController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("删除波形拓展数据")
|
||||||
|
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||||
|
public HttpResult<EleEpdPqd> delete(@RequestParam String id){
|
||||||
|
String methodDescribe = getMethodDescribe("delete");
|
||||||
|
LogUtil.njcnDebug(log, "{},传递的id为:{}", methodDescribe,id);
|
||||||
|
waveParamService.delete(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,4 +16,6 @@ public interface IEleEvtParmService extends IService<EleEvtParm> {
|
|||||||
|
|
||||||
void add(EleEvtParam eleEvtParam);
|
void add(EleEvtParam eleEvtParam);
|
||||||
|
|
||||||
|
void delete(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,4 +16,6 @@ public interface IEleWaveParmService extends IService<CsWaveParm> {
|
|||||||
|
|
||||||
void add(CsWaveParam waveParam);
|
void add(CsWaveParam waveParam);
|
||||||
|
|
||||||
|
void delete(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.system.service.impl;
|
package com.njcn.system.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.system.mapper.EleEvtParmMapper;
|
import com.njcn.system.mapper.EleEvtParmMapper;
|
||||||
import com.njcn.system.pojo.param.EleEvtParam;
|
import com.njcn.system.pojo.param.EleEvtParam;
|
||||||
@@ -25,4 +26,11 @@ public class EleEvtParmServiceImpl extends ServiceImpl<EleEvtParmMapper, EleEvtP
|
|||||||
BeanUtils.copyProperties(eleEvtParam,eleEvtParm);
|
BeanUtils.copyProperties(eleEvtParam,eleEvtParm);
|
||||||
this.save(eleEvtParm);
|
this.save(eleEvtParm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(String id) {
|
||||||
|
LambdaQueryWrapper<EleEvtParm> deleteWrapper = new LambdaQueryWrapper<>();
|
||||||
|
deleteWrapper.eq(EleEvtParm::getPid,id);
|
||||||
|
this.baseMapper.delete(deleteWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package com.njcn.system.service.impl;
|
package com.njcn.system.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.system.mapper.EleWaveParmMapper;
|
import com.njcn.system.mapper.EleWaveParmMapper;
|
||||||
import com.njcn.system.pojo.param.CsWaveParam;
|
import com.njcn.system.pojo.param.CsWaveParam;
|
||||||
import com.njcn.system.pojo.po.CsWaveParm;
|
import com.njcn.system.pojo.po.CsWaveParm;
|
||||||
|
import com.njcn.system.pojo.po.EleEvtParm;
|
||||||
import com.njcn.system.service.IEleWaveParmService;
|
import com.njcn.system.service.IEleWaveParmService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -25,4 +27,11 @@ public class EleWaveParmServiceImpl extends ServiceImpl<EleWaveParmMapper, CsWav
|
|||||||
BeanUtils.copyProperties(waveParam,csWaveParm);
|
BeanUtils.copyProperties(waveParam,csWaveParm);
|
||||||
this.save(csWaveParm);
|
this.save(csWaveParm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(String id) {
|
||||||
|
LambdaQueryWrapper<CsWaveParm> deleteWrapper = new LambdaQueryWrapper<>();
|
||||||
|
deleteWrapper.eq(CsWaveParm::getPid,id);
|
||||||
|
this.baseMapper.delete(deleteWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user