[general] Refactoring chunithm UpsertUserAll request and some clean up

This commit is contained in:
samnyan
2020-03-28 22:23:22 +09:00
parent 9a4ca3a612
commit 528b2f8b4d
70 changed files with 310 additions and 241 deletions

View File

@@ -33,10 +33,9 @@ public class AimeDbDecoder extends ByteToMessageDecoder {
/**
* Decrypt the incoming request including frame management
*
* @param ctx
* @param in
* @param out
* @param ctx ChannelHandlerContext
* @param in ByteBuf in
* @param out List<Object>
* @throws Exception
*/
@Override

View File

@@ -1,6 +1,6 @@
package icu.samnyan.aqua.sega.aimedb;
import icu.samnyan.aqua.sega.aimedb.handler.Impl.*;
import icu.samnyan.aqua.sega.aimedb.handler.impl.*;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

View File

@@ -1,6 +1,6 @@
package icu.samnyan.aqua.sega.aimedb;
import icu.samnyan.aqua.sega.aimedb.handler.Impl.*;
import icu.samnyan.aqua.sega.aimedb.handler.impl.*;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
@@ -40,7 +40,7 @@ public class AimeDbServerInitializer extends ChannelInitializer<SocketChannel> {
@Override
protected void initChannel(SocketChannel ch) throws Exception {
protected void initChannel(SocketChannel ch) {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast("encoder", new AimeDbEncoder());
pipeline.addLast("decoder", new AimeDbDecoder());

View File

@@ -1,4 +1,4 @@
package icu.samnyan.aqua.sega.aimedb.handler.Impl;
package icu.samnyan.aqua.sega.aimedb.handler.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import icu.samnyan.aqua.sega.aimedb.handler.BaseHandler;

View File

@@ -1,4 +1,4 @@
package icu.samnyan.aqua.sega.aimedb.handler.Impl;
package icu.samnyan.aqua.sega.aimedb.handler.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import icu.samnyan.aqua.sega.aimedb.handler.BaseHandler;

View File

@@ -1,4 +1,4 @@
package icu.samnyan.aqua.sega.aimedb.handler.Impl;
package icu.samnyan.aqua.sega.aimedb.handler.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

View File

@@ -1,4 +1,4 @@
package icu.samnyan.aqua.sega.aimedb.handler.Impl;
package icu.samnyan.aqua.sega.aimedb.handler.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import icu.samnyan.aqua.sega.aimedb.handler.BaseHandler;

View File

@@ -1,4 +1,4 @@
package icu.samnyan.aqua.sega.aimedb.handler.Impl;
package icu.samnyan.aqua.sega.aimedb.handler.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import icu.samnyan.aqua.sega.aimedb.handler.BaseHandler;

View File

@@ -1,4 +1,4 @@
package icu.samnyan.aqua.sega.aimedb.handler.Impl;
package icu.samnyan.aqua.sega.aimedb.handler.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import icu.samnyan.aqua.sega.aimedb.handler.BaseHandler;

View File

@@ -1,4 +1,4 @@
package icu.samnyan.aqua.sega.aimedb.handler.Impl;
package icu.samnyan.aqua.sega.aimedb.handler.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import icu.samnyan.aqua.sega.aimedb.handler.BaseHandler;

View File

@@ -1,10 +1,9 @@
package icu.samnyan.aqua.sega.aimedb.handler.Impl;
package icu.samnyan.aqua.sega.aimedb.handler.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import icu.samnyan.aqua.sega.aimedb.handler.BaseHandler;
import icu.samnyan.aqua.sega.aimedb.util.AimeDbUtil;
import icu.samnyan.aqua.sega.aimedb.util.LogMapper;
import icu.samnyan.aqua.sega.general.dao.CardRepository;
import icu.samnyan.aqua.sega.general.model.Card;
import icu.samnyan.aqua.sega.general.service.CardService;
import io.netty.buffer.ByteBuf;

View File

@@ -14,11 +14,10 @@ import org.springframework.stereotype.Component;
public class LogMapper {
private final ObjectMapper mapper;
private final SimpleModule module;
public LogMapper() {
mapper = new ObjectMapper();
module = new SimpleModule();
SimpleModule module = new SimpleModule();
module.addSerializer(ByteBuf.class, new ByteBufSerializer());
mapper.registerModule(module);
}