|
@@ -1,6 +1,7 @@
|
|
package com.fdkankan.fusion.controller;
|
|
package com.fdkankan.fusion.controller;
|
|
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.fdkankan.fusion.common.ResultCode;
|
|
import com.fdkankan.fusion.common.ResultCode;
|
|
import com.fdkankan.fusion.common.ResultData;
|
|
import com.fdkankan.fusion.common.ResultData;
|
|
import com.fdkankan.fusion.common.util.JwtUtil;
|
|
import com.fdkankan.fusion.common.util.JwtUtil;
|
|
@@ -12,6 +13,7 @@ import com.fdkankan.fusion.request.ScenePram;
|
|
import com.fdkankan.fusion.service.ICaseFusionService;
|
|
import com.fdkankan.fusion.service.ICaseFusionService;
|
|
import com.fdkankan.fusion.service.ICaseNumService;
|
|
import com.fdkankan.fusion.service.ICaseNumService;
|
|
import com.fdkankan.fusion.service.IModelService;
|
|
import com.fdkankan.fusion.service.IModelService;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -59,5 +61,19 @@ public class ModelController {
|
|
modelService.delete(param.getModelId());
|
|
modelService.delete(param.getModelId());
|
|
return ResultData.ok();
|
|
return ResultData.ok();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @PostMapping("/updateTitle")
|
|
|
|
+ public ResultData updateTitle(@RequestBody ModelPram param){
|
|
|
|
+ if(param.getModelId() == null){
|
|
|
|
+ throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
|
+ }
|
|
|
|
+ LambdaUpdateWrapper<Model> wrapper = new LambdaUpdateWrapper<>();
|
|
|
|
+ wrapper.eq(Model::getModelId,param.getModelId());
|
|
|
|
+ if(StringUtils.isNotBlank(param.getModelTitle())){
|
|
|
|
+ wrapper.set(Model::getModelTitle,param.getModelTitle());
|
|
|
|
+ }
|
|
|
|
+ modelService.update(wrapper);
|
|
|
|
+ return ResultData.ok();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|