Commit 353037f9 authored by Roberto Loayza Miljanovich's avatar Roberto Loayza Miljanovich

Merge branch 'dev_marcos' into 'developer'

Update AgentService

See merge request ByteBot/web/bytebot-service!27
parents 9b8a0abc 26bb12c8
...@@ -2,7 +2,11 @@ package com.bytesw.bytebot.repository; ...@@ -2,7 +2,11 @@ package com.bytesw.bytebot.repository;
import com.bytesw.bytebot.model.DeploymentChannelParamValue; import com.bytesw.bytebot.model.DeploymentChannelParamValue;
import org.springframework.cache.annotation.CachePut; import org.springframework.cache.annotation.CachePut;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import java.util.List;
/** /**
* @author Sebastián Chicoma Sandmann. * @author Sebastián Chicoma Sandmann.
...@@ -16,4 +20,7 @@ import org.springframework.data.repository.CrudRepository; ...@@ -16,4 +20,7 @@ import org.springframework.data.repository.CrudRepository;
* licencia de uso que firmó con Byte. * 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> { ...@@ -408,8 +408,8 @@ public class AgentService extends CustomPaginationService<Agent> {
} }
//Parameters //Parameters
List<DeploymentChannelParamValue> list = deploymentChannelParamValueRepository.getParameter(deploymentChannel.getId());
for (DeploymentChannelParamValue parameter : deploymentChannel.getParameters()) { for (DeploymentChannelParamValue parameter : list) {
DeploymentChannelParamValueBean parameterBean = new DeploymentChannelParamValueBean(); DeploymentChannelParamValueBean parameterBean = new DeploymentChannelParamValueBean();
parameterBean.setId(parameter.getId()); parameterBean.setId(parameter.getId());
parameterBean.setValue(parameter.getValue()); 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