|
|
@@ -8,6 +8,7 @@ import com.ktg.common.annotation.Log;
|
|
|
import com.ktg.common.core.controller.BaseController;
|
|
|
import com.ktg.common.enums.BusinessType;
|
|
|
import com.ktg.common.pojo.CommonResult;
|
|
|
+import com.ktg.common.utils.StringUtils;
|
|
|
import com.ktg.common.utils.poi.ExcelUtil;
|
|
|
import com.ktg.iscs.domain.IsMotor;
|
|
|
import com.ktg.iscs.service.IIsMotorService;
|
|
|
@@ -79,7 +80,11 @@ public class IsMotorController extends BaseController
|
|
|
@PostMapping("/updateIsMotor")
|
|
|
public CommonResult<Boolean> updateIsMotor(@RequestBody @Parameter(name = "isMotor", description = "修改数据类,放到body") IsMotor isMotor)
|
|
|
{
|
|
|
- return CommonResult.success(isMotorService.updateById(isMotor));
|
|
|
+ return CommonResult.success(isMotorService.update(Wrappers.<IsMotor>lambdaUpdate()
|
|
|
+ .eq(IsMotor::getMotorId, isMotor.getMotorId())
|
|
|
+ .set(IsMotor::getMotorName, isMotor.getMotorName())
|
|
|
+ .set(isMotor.getPointId() != null, IsMotor::getPointId, isMotor.getPointId())
|
|
|
+ .set(isMotor.getPointId() == null, IsMotor::getPointId, null)));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("删除电机")
|
|
|
@@ -92,4 +97,7 @@ public class IsMotorController extends BaseController
|
|
|
Long[] longIds = Convert.toLongArray(motorIds);
|
|
|
return CommonResult.success(isMotorService.removeBatchByIds(Arrays.asList(longIds)));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|