Update AgentService

parent 2425b67e
......@@ -2,7 +2,11 @@ package com.bytesw.bytebot.repository;
import com.bytesw.bytebot.model.DeploymentChannelParamValue;
import org.springframework.cache.annotation.CachePut;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import java.util.List;
/**
* @author Sebastián Chicoma Sandmann.
......@@ -16,4 +20,7 @@ import org.springframework.data.repository.CrudRepository;
* licencia de uso que firmó con Byte.
*/
public interface DeploymentChannelParamValueRepository extends CrudRepository<DeploymentChannelParamValue, Long> { }
public interface DeploymentChannelParamValueRepository extends CrudRepository<DeploymentChannelParamValue, Long> {
@Query("select d from DeploymentChannelParamValue d where d.deploymentChannel.id = :id order by d.id asc")
List<DeploymentChannelParamValue> getParameter(@Param("id") Long id);
}
......@@ -408,8 +408,8 @@ public class AgentService extends CustomPaginationService<Agent> {
}
//Parameters
for (DeploymentChannelParamValue parameter : deploymentChannel.getParameters()) {
List<DeploymentChannelParamValue> list = deploymentChannelParamValueRepository.getParameter(deploymentChannel.getId());
for (DeploymentChannelParamValue parameter : list) {
DeploymentChannelParamValueBean parameterBean = new DeploymentChannelParamValueBean();
parameterBean.setId(parameter.getId());
parameterBean.setValue(parameter.getValue());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment