|
@@ -1,5 +1,6 @@
|
|
|
package com.txz.cif.web.mng;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import com.txz.cif.configurer.LocalUtil;
|
|
|
import com.txz.cif.core.Result;
|
|
|
import com.txz.cif.core.ResultGenerator;
|
|
|
import com.txz.cif.model.MidChannelMethod;
|
|
@@ -10,6 +11,7 @@ import com.txz.cif.core.ResultCode;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.txz.cif.web.para.updateparam.MidChannelMethodUpdateParam;
|
|
|
+import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -79,7 +81,13 @@ public class MidChannelMethodController {
|
|
|
if(midChannelMethodUpdateParam.getId() == null){
|
|
|
return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
|
|
|
}
|
|
|
+ if(!ObjectUtils.isEmpty(midChannelMethodUpdateParam.getWeight())){
|
|
|
+ Byte weight = 10;
|
|
|
+ if(midChannelMethodUpdateParam.getWeight()>weight){
|
|
|
+ return ResultGenerator.genFailResult(LocalUtil.get("the.weight.cannot.exceed.10"));
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
MidChannelMethod bean = BeanUtil.toBean(midChannelMethodUpdateParam, MidChannelMethod.class);
|
|
|
try {
|
|
|
// midChannelMethod.setUpdateTime(new Date());
|