NutzCN Logo
问答 nutzbook 3DES解密方法失败
发布于 2525天前 作者 qq_d6c9c504 1488 次浏览 复制 上一个帖子 下一个帖子
标签:

15:28:17.318 INFO (Toolkit.java:79) _3DES_decode - BAD 3DES decode
javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:989) ~[sunjce_provider.jar:1.8.0_112]
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:845) ~[sunjce_provider.jar:1.8.0_112]
at com.sun.crypto.provider.DESedeCipher.engineDoFinal(DESedeCipher.java:294) ~[sunjce_provider.jar:1.8.0_112]
at javax.crypto.Cipher.doFinal(Cipher.java:2165) ~[?:1.8.0_121]
at net.wendal.nutzbook.common.util.Toolkit._3DES_decode(Toolkit.java:76) [nutzcn-core-3.1.0.jar:3.1.0]
at net.wendal.nutzbook.yvr.module.YvrModule.search(YvrModule.java:313) [nutzcn-yvr-3.1.0.jar:3.1.0]
at net.wendal.nutzbook.yvr.module.YvrModule$FM$search$54fa516e335f5bbf064b7d9a73e2a5c1.invoke(YvrModule.java) [nutz-1.r.65-SNAPSHOT.jar:3.1.0]
at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:30) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.integration.shiro.NutShiroProcessor.process(NutShiroProcessor.java:126) [nutzcn-core-3.1.0.jar:3.1.0]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.nutz.plugins.hotplug.HotplugFilter.doFilter(HotplugFilter.java:73) [nutzcn-core-3.1.0.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [nutzcn-core-3.1.0.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [jetty-security-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.Server.handle(Server.java:530) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) [jetty-io-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [jetty-io-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) [jetty-io-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

7 回复

看发帖提示没?

哦,不好意思,我在修改下

这个是异常信息

15:31:48.842 INFO  (Toolkit.java:72) _3DES_decode - BAD 3DES decode
javax.crypto.BadPaddingException: Given final block not properly padded
	at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:989) ~[sunjce_provider.jar:1.8.0_112]
	at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:845) ~[sunjce_provider.jar:1.8.0_112]
	at com.sun.crypto.provider.DESedeCipher.engineDoFinal(DESedeCipher.java:294) ~[sunjce_provider.jar:1.8.0_112]
	at javax.crypto.Cipher.doFinal(Cipher.java:2165) ~[?:1.8.0_121]
	at net.wendal.nutzbook.common.util.Toolkit._3DES_decode(Toolkit.java:69) [nutzcn-core-3.1.0.jar:3.1.0]
	at net.wendal.nutzbook.yvr.module.YvrModule.search(YvrModule.java:313) [nutzcn-yvr-3.1.0.jar:3.1.0]
	at net.wendal.nutzbook.yvr.module.YvrModule$FM$search$54fa516e335f5bbf064b7d9a73e2a5c1.invoke(YvrModule.java) [nutz-1.r.65-SNAPSHOT.jar:3.1.0]
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:30) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.integration.shiro.NutShiroProcessor.process(NutShiroProcessor.java:126) [nutzcn-core-3.1.0.jar:3.1.0]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.nutz.plugins.hotplug.HotplugFilter.doFilter(HotplugFilter.java:73) [nutzcn-core-3.1.0.jar:3.1.0]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [nutzcn-core-3.1.0.jar:3.1.0]
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [nutzcn-core-3.1.0.jar:3.1.0]
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [nutzcn-core-3.1.0.jar:3.1.0]
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [nutzcn-core-3.1.0.jar:3.1.0]
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [nutzcn-core-3.1.0.jar:3.1.0]
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [nutzcn-core-3.1.0.jar:3.1.0]
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [nutzcn-core-3.1.0.jar:3.1.0]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [jetty-security-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.Server.handle(Server.java:530) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) [jetty-io-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [jetty-io-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) [jetty-io-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

下面是代码

@Ok("beetl:/yvr/index.html")
@At({"/search", "/search/?"})
public Object search(int page, HttpServletRequest request) throws Exception {
String keys = request.getParameter("q");
if (Strings.isBlank(keys)){
return new ServerRedirectView("/yvr/list");
}
log.infof("keys:%s", keys);
if(request.getMethod().equalsIgnoreCase("GET")){
keys = Toolkit._3DES_decode(queryKEY, keys.getBytes());
}
log.infof("请求方式:%s", request.getMethod());
log.infof("搜索词汇:%s", keys);
List listKey = Splitter.on(" ").splitToList(keys);
Cnd cndQuery = Cnd.where("onLine", "=", 1);
for(String key : listKey){
cndQuery.and("summaryinfo", "like", "%"+key.trim()+"%");
}
Pager pager = dao.createPager(page > 0 ? page : 1, pageSize);
pager.setRecordCount(dao.count(Mv_movie.class, cndQuery));
long userId = Toolkit.uid();
List list = dao.query(Mv_movie.class, cndQuery.orderBy("opAt", "desc"), pager);
NutMap re = processQueryList(pager, list, null, userId, "search/{page}?q="+Toolkit._3DES_encode(queryKEY, keys.getBytes()));
re.put("q", keys);
return re;
}

  @Ok("beetl:/yvr/index.html")
    @At({"/search", "/search/?"})
    public Object search(int page, HttpServletRequest request) throws Exception {
        String keys = request.getParameter("q");
        if (Strings.isBlank(keys)){
            return new ServerRedirectView("/yvr/list");
        }
        log.infof("keys:%s", keys);
        if(request.getMethod().equalsIgnoreCase("GET")){
            keys = Toolkit._3DES_decode(queryKEY, keys.getBytes());
        }
        log.infof("请求方式:%s", request.getMethod());
        log.infof("搜索词汇:%s", keys);
        List<String> listKey = Splitter.on(" ").splitToList(keys);
        Cnd cndQuery = Cnd.where("onLine", "=", 1);
        for(String key : listKey){
            cndQuery.and("summaryinfo", "like", "%"+key.trim()+"%");
        }
        Pager pager = dao.createPager(page > 0 ? page : 1, pageSize);
        pager.setRecordCount(dao.count(Mv_movie.class, cndQuery));
        long userId = Toolkit.uid();
        List<Mv_movie> list = dao.query(Mv_movie.class, cndQuery.orderBy("opAt", "desc"), pager);
        NutMap re = processQueryList(pager, list, null, userId, "search/{page}?q="+Toolkit._3DES_encode(queryKEY, keys.getBytes()));
        re.put("q", keys);
        return re;
    }

又失误没用code格式化

看邮件的加解密操作

感谢,少了一个方法,解决了

添加回复
请先登陆
回到顶部