|
|
@ -8,13 +8,11 @@ import com.hnac.gglm.bigmodel.maintenance.mapper.VectorParamLogMapper; |
|
|
|
import com.hnac.gglm.bigmodel.maintenance.service.VectorParamLogService; |
|
|
|
import com.hnac.gglm.bigmodel.maintenance.service.VectorParamLogService; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.concurrent.LinkedBlockingQueue; |
|
|
|
|
|
|
|
import java.util.concurrent.ThreadPoolExecutor; |
|
|
|
|
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @Author: ypj |
|
|
|
* @Author: ypj |
|
|
@ -31,6 +29,7 @@ public class VectorParamLogServiceImpl extends ServiceImpl<VectorParamLogMapper, |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
req.setType(DataOperateType.CREATE.getCode()); |
|
|
|
req.setType(DataOperateType.CREATE.getCode()); |
|
|
|
|
|
|
|
req.setCreateUser(AuthUtil.getUserId()); |
|
|
|
return save(req); |
|
|
|
return save(req); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -40,6 +39,7 @@ public class VectorParamLogServiceImpl extends ServiceImpl<VectorParamLogMapper, |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
req.setType(DataOperateType.UPDATE.getCode()); |
|
|
|
req.setType(DataOperateType.UPDATE.getCode()); |
|
|
|
|
|
|
|
req.setCreateUser(AuthUtil.getUserId()); |
|
|
|
return save(req); |
|
|
|
return save(req); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -49,18 +49,19 @@ public class VectorParamLogServiceImpl extends ServiceImpl<VectorParamLogMapper, |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
req.setType(DataOperateType.RESET.getCode()); |
|
|
|
req.setType(DataOperateType.RESET.getCode()); |
|
|
|
|
|
|
|
req.setCreateUser(AuthUtil.getUserId()); |
|
|
|
return save(req); |
|
|
|
return save(req); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Boolean delete(List<Long> ids) { |
|
|
|
public Boolean delete(List<Long> ids) { |
|
|
|
ThreadPoolExecutor executor = new ThreadPoolExecutor(5, ids.size() > 5 ? ids.size() : 5, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>()); |
|
|
|
final Long userId = AuthUtil.getUserId(); |
|
|
|
ids.forEach(id -> { |
|
|
|
ids.forEach(id -> { |
|
|
|
executor.execute(() -> { |
|
|
|
VectorParamLogEntity log = VectorParamLogEntity.builder() |
|
|
|
save(VectorParamLogEntity.builder() |
|
|
|
.vectorParamId(id) |
|
|
|
.vectorParamId(id) |
|
|
|
.type(DataOperateType.DELETE.getCode()).build(); |
|
|
|
.type(DataOperateType.DELETE.getCode()).build()); |
|
|
|
log.setCreateUser(userId); |
|
|
|
}); |
|
|
|
save(log); |
|
|
|
}); |
|
|
|
}); |
|
|
|
return Boolean.TRUE; |
|
|
|
return Boolean.TRUE; |
|
|
|
} |
|
|
|
} |
|
|
@ -71,6 +72,7 @@ public class VectorParamLogServiceImpl extends ServiceImpl<VectorParamLogMapper, |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
req.setType(DataOperateType.SYNCHRONIZATION.getCode()); |
|
|
|
req.setType(DataOperateType.SYNCHRONIZATION.getCode()); |
|
|
|
|
|
|
|
req.setCreateUser(AuthUtil.getUserId()); |
|
|
|
return save(req); |
|
|
|
return save(req); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|