Commit 438c812c authored by Phạm Duy Phi's avatar Phạm Duy Phi

phipd commit

parent 79e56468
<<<<<<< HEAD
[main] 26/08/2019 09:46:33 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 10:25:08 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 10:29:12 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 10:31:57 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 10:36:03 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 10:39:17 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 10:42:36 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 10:44:03 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
=======
[main] 26/08/2019 09:11:22 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 09:27:36 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 09:39:31 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 09:50:53 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 10:21:46 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[main] 26/08/2019 10:30:50 INFO RedisUtil: (38) : Start connect Redis: 10.60.156.82:8011,10.60.156.82:8012,10.60.156.82:8013,10.60.156.82:8014,10.60.156.82:8015,10.60.156.82:8016
[qtp1476061571-26] 26/08/2019 10:50:34 ERROR RedisUtil: (111) :
java.lang.NullPointerException
at com.viettel.campaign.utils.RedisUtil.get(RedisUtil.java:106)
at com.viettel.campaign.service.impl.CampaignExecuteServiceImp.searchCampaignExecute(CampaignExecuteServiceImp.java:235)
at com.viettel.campaign.service.impl.CampaignExecuteServiceImp$$FastClassBySpringCGLIB$$b9c5a263.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)
at com.viettel.campaign.service.impl.CampaignExecuteServiceImp$$EnhancerBySpringCGLIB$$b2295941.searchCampaignExecute(<generated>)
at com.viettel.campaign.web.rest.CampaignExecuteController.searchCampaignExecute(CampaignExecuteController.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:215)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at com.viettel.campaign.filter.CorsFilter.doFilter(CorsFilter.java:34)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:503)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:132)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
at java.lang.Thread.run(Thread.java:748)
[qtp1476061571-28] 26/08/2019 10:51:52 ERROR RedisUtil: (111) :
java.lang.NullPointerException
at com.viettel.campaign.utils.RedisUtil.get(RedisUtil.java:106)
at com.viettel.campaign.service.impl.CampaignExecuteServiceImp.searchCampaignExecute(CampaignExecuteServiceImp.java:235)
at com.viettel.campaign.service.impl.CampaignExecuteServiceImp$$FastClassBySpringCGLIB$$b9c5a263.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)
at com.viettel.campaign.service.impl.CampaignExecuteServiceImp$$EnhancerBySpringCGLIB$$b2295941.searchCampaignExecute(<generated>)
at com.viettel.campaign.web.rest.CampaignExecuteController.searchCampaignExecute(CampaignExecuteController.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:215)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at com.viettel.campaign.filter.CorsFilter.doFilter(CorsFilter.java:34)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:503)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
at java.lang.Thread.run(Thread.java:748)
[qtp1476061571-25] 26/08/2019 10:52:32 ERROR RedisUtil: (111) :
java.lang.NullPointerException
at com.viettel.campaign.utils.RedisUtil.get(RedisUtil.java:106)
at com.viettel.campaign.service.impl.CampaignExecuteServiceImp.searchCampaignExecute(CampaignExecuteServiceImp.java:235)
at com.viettel.campaign.service.impl.CampaignExecuteServiceImp$$FastClassBySpringCGLIB$$b9c5a263.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)
at com.viettel.campaign.service.impl.CampaignExecuteServiceImp$$EnhancerBySpringCGLIB$$b2295941.searchCampaignExecute(<generated>)
at com.viettel.campaign.web.rest.CampaignExecuteController.searchCampaignExecute(CampaignExecuteController.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:215)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at com.viettel.campaign.filter.CorsFilter.doFilter(CorsFilter.java:34)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:503)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:132)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
at java.lang.Thread.run(Thread.java:748)
>>>>>>> 5569a655cf439bfadfa12735a03e56f1c4aaceef
...@@ -32,7 +32,7 @@ public class ApParam implements Serializable { ...@@ -32,7 +32,7 @@ public class ApParam implements Serializable {
private String parCode; private String parCode;
@Column(name = "DESCRIPTION") @Column(name = "DESCRIPTION")
private Long description; private String description;
@Column(name = "IS_DELETE") @Column(name = "IS_DELETE")
private Long isDelete; private Long isDelete;
......
...@@ -4,6 +4,7 @@ import com.viettel.campaign.model.ccms_full.ApParam; ...@@ -4,6 +4,7 @@ import com.viettel.campaign.model.ccms_full.ApParam;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param; import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -23,4 +24,12 @@ public interface ApParamRepository extends JpaRepository<ApParam, Long> { ...@@ -23,4 +24,12 @@ public interface ApParamRepository extends JpaRepository<ApParam, Long> {
@Query(value = "FROM ApParam WHERE status = 1 AND parType = :parType") @Query(value = "FROM ApParam WHERE status = 1 AND parType = :parType")
List<ApParam> findAllParam(@Param("parType") String parType); List<ApParam> findAllParam(@Param("parType") String parType);
// ----------- sql lay so thu tu bang customer list ------------ //
@Query("select a from ApParam a where a.parType = 'CUSTOMER_LIST_SEQ'")
ApParam getCustomerListSeq();
@Modifying
@Query("update ApParam a set a.parValue = :p_par_value, a.description = :p_description where a.parType = 'CUSTOMER_LIST_SEQ'")
int updateCustomerListSeq(@Param("p_par_value") String p_par_value, @Param("p_description") String p_description);
} }
...@@ -38,7 +38,7 @@ public interface CustomerService { ...@@ -38,7 +38,7 @@ public interface CustomerService {
// VIẾT ĐI VIẾT LẠI 4 LẦN RỒI ĐẤY // VIẾT ĐI VIẾT LẠI 4 LẦN RỒI ĐẤY
ResultDTO createCustomerList(CustomerListDTO customerListDTO, String userName); ResultDTO createCustomerList(CustomerListDTO customerListDTO, String userName);
ResultDTO updateCustomerList(CustomerListDTO customerListDTO); ResultDTO updateCustomerList(CustomerListDTO customerListDTO, String userName);
ResultDTO deleteCustomerList(CustomerListDTO customerListDTO); ResultDTO deleteCustomerList(CustomerListDTO customerListDTO);
......
...@@ -48,6 +48,7 @@ import java.io.ByteArrayOutputStream; ...@@ -48,6 +48,7 @@ import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -94,6 +95,9 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -94,6 +95,9 @@ public class CustomerServiceImpl implements CustomerService {
@Autowired @Autowired
CustomizeFieldOptionValueRepository customizeFieldOptionValueRepository; CustomizeFieldOptionValueRepository customizeFieldOptionValueRepository;
@Autowired
ApParamRepository apParamRepository;
@Override @Override
@Transactional(DataSourceQualify.CCMS_FULL) @Transactional(DataSourceQualify.CCMS_FULL)
public ResultDTO getAllCustomer(int page, int pageSize, String sort, long customerListId, long companySiteId) { public ResultDTO getAllCustomer(int page, int pageSize, String sort, long customerListId, long companySiteId) {
...@@ -600,6 +604,23 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -600,6 +604,23 @@ public class CustomerServiceImpl implements CustomerService {
@Override @Override
@Transactional(DataSourceQualify.CCMS_FULL) @Transactional(DataSourceQualify.CCMS_FULL)
public ResultDTO createCustomerList(CustomerListDTO customerListDTO, String userName) { public ResultDTO createCustomerList(CustomerListDTO customerListDTO, String userName) {
ApParam apParam = apParamRepository.getCustomerListSeq();
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
Date currentDate = new Date(dateFormat.format(new Date()));
Date oldDate = new Date(apParam.getDescription());
Long newDay = (currentDate.getTime() - oldDate.getTime())/(1000*60*60*24);
String convertDate = dateFormat.format(new Date());
String[] dateArray = convertDate.split("/");
if (newDay == 0) {
apParamRepository.updateCustomerListSeq(String.valueOf(Integer.parseInt(apParam.getParValue()) + 1), apParam.getDescription());
customerListDTO.setCustomerListCode(dateArray[0]+dateArray[2]+dateArray[1]+"_"+(Integer.parseInt(apParam.getParValue()) + 1)+" "+customerListDTO.getCustomerListCode());
} else {
apParamRepository.updateCustomerListSeq("1", dateFormat.format(new Date()));
customerListDTO.setCustomerListCode(dateArray[0]+dateArray[2]+dateArray[1]+"_1"+" "+customerListDTO.getCustomerListCode());
}
// THÍM NÀO MERGE CONFLICT THÌ GIỮ LẠI HỘ E CÁI METHOD NÀY VỚI // THÍM NÀO MERGE CONFLICT THÌ GIỮ LẠI HỘ E CÁI METHOD NÀY VỚI
// VIẾT ĐI VIẾT LẠI 4 LẦN RỒI ĐẤY // VIẾT ĐI VIẾT LẠI 4 LẦN RỒI ĐẤY
ResultDTO resultDTO = new ResultDTO(); ResultDTO resultDTO = new ResultDTO();
...@@ -636,9 +657,8 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -636,9 +657,8 @@ public class CustomerServiceImpl implements CustomerService {
@Override @Override
@Transactional(DataSourceQualify.CCMS_FULL) @Transactional(DataSourceQualify.CCMS_FULL)
public ResultDTO updateCustomerList(CustomerListDTO customerListDTO) { public ResultDTO updateCustomerList(CustomerListDTO customerListDTO, String userName) {
ResultDTO resultDTO = new ResultDTO(); ResultDTO resultDTO = new ResultDTO();
CustomerListMapper customerListMapper = new CustomerListMapper();
try { try {
if (customerListDTO != null) { if (customerListDTO != null) {
...@@ -646,7 +666,19 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -646,7 +666,19 @@ public class CustomerServiceImpl implements CustomerService {
CustomerList customerList = customerListRepository.findByCustomerListIdAndCompanySiteId(customerListDTO.getCustomerListId(), customerListDTO.getCompanySiteId()); CustomerList customerList = customerListRepository.findByCustomerListIdAndCompanySiteId(customerListDTO.getCustomerListId(), customerListDTO.getCompanySiteId());
if (customerList != null) { if (customerList != null) {
customerList = customerListMapper.toPersistenceBean(customerListDTO); customerList.setCreateBy(customerListDTO.getCreateBy());
customerList.setCompanySiteId(customerListDTO.getCompanySiteId());
customerList.setCreateAt(customerListDTO.getCreateAt());
customerList.setCustomerListCode(customerListDTO.getCustomerListCode());
customerList.setCustomerListName(customerListDTO.getCustomerListName());
customerList.setDeptCreate(customerListDTO.getDeptCreate());
customerList.setStatus(customerList.getStatus());
customerList.setUpdateBy(userName);
customerList.setUpdateAt(new Date());
customerList.setSource(customerListDTO.getSource());
customerList.setCustomerListId(customerListDTO.getCustomerListId());
customerListRepository.save(customerList); customerListRepository.save(customerList);
resultDTO.setErrorCode(Constants.ApiErrorCode.SUCCESS); resultDTO.setErrorCode(Constants.ApiErrorCode.SUCCESS);
...@@ -741,21 +773,26 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -741,21 +773,26 @@ public class CustomerServiceImpl implements CustomerService {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("SELECT"); sb.append("SELECT");
sb.append(" CUSTOMER_LIST_ID customerListId,"); sb.append(" a.CUSTOMER_LIST_ID customerListId,");
sb.append(" COMPANY_SITE_ID companySiteId,"); sb.append(" a.COMPANY_SITE_ID companySiteId,");
sb.append(" CUSTOMER_LIST_CODE customerListCode,"); sb.append(" a.CUSTOMER_LIST_CODE customerListCode,");
sb.append(" CUSTOMER_LIST_NAME customerListName,"); sb.append(" a.CUSTOMER_LIST_NAME customerListName,");
sb.append(" STATUS status,"); sb.append(" a.STATUS status,");
sb.append(" CREATE_BY createBy,"); sb.append(" a.CREATE_BY createBy,");
sb.append(" CREATE_AT createAt,"); sb.append(" a.CREATE_AT createAt,");
sb.append(" UPDATE_BY updateBy,"); sb.append(" a.UPDATE_BY updateBy,");
sb.append(" UPDATE_AT updateAt,"); sb.append(" a.UPDATE_AT updateAt,");
sb.append(" SOURCE source,"); sb.append(" a.SOURCE source,");
sb.append(" DEPT_CREATE deptCreate"); sb.append(" a.DEPT_CREATE deptCreate,");
sb.append(" FROM CUSTOMER_LIST"); sb.append(" b.count count");
sb.append(" FROM CUSTOMER_LIST a");
sb.append(" LEFT JOIN (SELECT COUNT(CAMPAIGN_ID) as count, CUSTOMER_LIST_ID");
sb.append(" FROM CAMPAIGN_CUSTOMERLIST");
sb.append(" GROUP BY CUSTOMER_LIST_ID) b");
sb.append(" ON a.CUSTOMER_LIST_ID = b.CUSTOMER_LIST_ID");
sb.append(" WHERE 1 = 1"); sb.append(" WHERE 1 = 1");
sb.append(" AND STATUS = 1"); sb.append(" AND a.STATUS = 1");
sb.append(" AND COMPANY_SITE_ID = :p_company_site_id"); sb.append(" AND a.COMPANY_SITE_ID = :p_company_site_id");
sb.append(" AND CREATE_AT BETWEEN to_date(:p_date_from, 'YYYYMMDD') AND to_date(:p_date_to, 'YYYYMMDD')"); sb.append(" AND CREATE_AT BETWEEN to_date(:p_date_from, 'YYYYMMDD') AND to_date(:p_date_to, 'YYYYMMDD')");
...@@ -766,6 +803,8 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -766,6 +803,8 @@ public class CustomerServiceImpl implements CustomerService {
sb.append(" AND CUSTOMER_LIST_NAME LIKE :p_list_name"); sb.append(" AND CUSTOMER_LIST_NAME LIKE :p_list_name");
} }
sb.append(" ORDER BY CREATE_AT DESC");
SQLQuery query = session.createSQLQuery(sb.toString()); SQLQuery query = session.createSQLQuery(sb.toString());
query.setParameter("p_company_site_id", searchCustomerRequestDTO.getCompanySiteId()); query.setParameter("p_company_site_id", searchCustomerRequestDTO.getCompanySiteId());
...@@ -801,6 +840,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -801,6 +840,7 @@ public class CustomerServiceImpl implements CustomerService {
query.addScalar("updateAt", new DateType()); query.addScalar("updateAt", new DateType());
query.addScalar("source", new StringType()); query.addScalar("source", new StringType());
query.addScalar("deptCreate", new StringType()); query.addScalar("deptCreate", new StringType());
query.addScalar("count", new StringType());
query.setResultTransformer(Transformers.aliasToBean(CustomerListDTO.class)); query.setResultTransformer(Transformers.aliasToBean(CustomerListDTO.class));
int count = 0; int count = 0;
......
...@@ -12,7 +12,7 @@ public class ApParamDTO extends BaseDTO { ...@@ -12,7 +12,7 @@ public class ApParamDTO extends BaseDTO {
private String parName; private String parName;
private String parValue; private String parValue;
private String parCode; private String parCode;
private Long description; private String description;
private Long isDelete; private Long isDelete;
private Long isDefault; private Long isDefault;
private Long enableEdit; private Long enableEdit;
......
...@@ -123,10 +123,15 @@ public class CustomerController { ...@@ -123,10 +123,15 @@ public class CustomerController {
@PostMapping("/updateCustomerList") @PostMapping("/updateCustomerList")
@ResponseBody @ResponseBody
public ResultDTO updateCustomerList(@RequestBody @Valid CustomerListDTO customerListDTO) { public ResultDTO updateCustomerList(@RequestBody @Valid CustomerListDTO customerListDTO, HttpServletRequest request) {
ResultDTO result = new ResultDTO(); String xAuthToken = request.getHeader("X-Auth-Token");
result = customerService.updateCustomerList(customerListDTO); UserSession userSession = (UserSession) RedisUtil.getInstance().get(xAuthToken);
return result; if (userSession == null) {
userSession = new UserSession();
userSession.setSiteId(customerListDTO.getCompanySiteId());
userSession.setUserName("its4");
}
return customerService.updateCustomerList(customerListDTO, userSession.getUserName());
} }
@PostMapping("/deleteCustomerList") @PostMapping("/deleteCustomerList")
......
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