|
@@ -1,6 +1,7 @@
|
|
|
package com.fdkankan.manage.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fdkankan.manage.common.PageInfo;
|
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
@@ -104,4 +105,19 @@ public class RtkInfoServiceImpl extends ServiceImpl<IRtkInfoMapper, RtkInfo> imp
|
|
|
wrapper.eq(RtkInfo::getCameraSnCode,cameraSnCode);
|
|
|
return this.getOne(wrapper);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void activation(RtkInfo rtkInfo) {
|
|
|
+ if(rtkInfo.getId() == null){
|
|
|
+ throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
+ }
|
|
|
+ RtkInfo rtkInfo1 = this.getById(rtkInfo.getId());
|
|
|
+ if(rtkInfo1 == null){
|
|
|
+ throw new BusinessException(ResultCode.RECOED_NO_EXITS);
|
|
|
+ }
|
|
|
+ LambdaUpdateWrapper<RtkInfo> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.eq(RtkInfo::getId,rtkInfo.getId());
|
|
|
+ wrapper.set(RtkInfo::getStatus,1);
|
|
|
+ this.update(wrapper);
|
|
|
+ }
|
|
|
}
|