Browse Source

client

master
6 years ago
parent
commit
820ddb8b36
  1. 1
      game/src/main/java/com/ccsens/game/api/ScreenController.java
  2. 18
      game/src/main/java/com/ccsens/game/bean/dto/ClientDto.java
  3. 18
      game/src/main/java/com/ccsens/game/bean/vo/ClientVo.java
  4. 9
      game/src/main/java/com/ccsens/game/service/ClientService.java
  5. 11
      game/src/main/java/com/ccsens/game/service/IClientService.java
  6. 6
      ht/src/main/java/com/ccsens/ht/intercept/MybatisInterceptor.java
  7. 6
      util/src/test/java/com/ccsens/util/KeyTest.java

1
game/src/main/java/com/ccsens/game/api/ScreenController.java

@ -36,6 +36,7 @@ public class ScreenController {
@ApiOperation(value = "获取游戏基本信息", notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ScreenVo.GameInfoVo> getGameInfo(HttpServletRequest request,

18
game/src/main/java/com/ccsens/game/bean/dto/ClientDto.java

@ -0,0 +1,18 @@
package com.ccsens.game.bean.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/26 15:03
*/
public class ClientDto {
@Data
@ApiModel("ClientDtoJoin")
public static class Join{
}
}

18
game/src/main/java/com/ccsens/game/bean/vo/ClientVo.java

@ -0,0 +1,18 @@
package com.ccsens.game.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/26 15:01
*/
public class ClientVo {
@Data
@ApiModel("ClientVoJoin")
public static class Join{
}
}

9
game/src/main/java/com/ccsens/game/service/ClientService.java

@ -0,0 +1,9 @@
package com.ccsens.game.service;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/26 15:01
*/
public class ClientService implements IClientService {
}

11
game/src/main/java/com/ccsens/game/service/IClientService.java

@ -0,0 +1,11 @@
package com.ccsens.game.service;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/26 15:00
*/
public interface IClientService {
}

6
ht/src/main/java/com/ccsens/ht/intercept/MybatisInterceptor.java

@ -36,11 +36,15 @@ public class MybatisInterceptor implements Interceptor {
String selectByExample = "selectByExample";
String countByExample = "countByExample";
String countByExample2 = "selectByExample_COUNT";
String selectByPrimaryKey = "selectByPrimaryKey";
Object[] args = invocation.getArgs();
MappedStatement statement = (MappedStatement) args[0];
if (statement.getId().endsWith(selectByExample)) {
if (statement.getId().endsWith(selectByExample)
|| statement.getId().endsWith(countByExample)
|| statement.getId().endsWith(countByExample2)) {
//XXXExample
Object example = args[1];

6
util/src/test/java/com/ccsens/util/KeyTest.java

@ -15,13 +15,13 @@ import org.junit.Test;
*/
public class KeyTest {
/**生成密钥*/
@Test
// @Test
public void test33(){
byte[] key = SecureUtil.generateKey(SymmetricAlgorithm.AES.getValue()).getEncoded();
Console.log(Base64.encode(key));
}
/**加密*/
@Test
// @Test
public void test3(){
String key = "a6RlI/GctLgENUvF6DOY7w==";
String string = "po3OynBO[M3579p6L7)o";
@ -31,7 +31,7 @@ public class KeyTest {
}
/**解密*/
@Test
// @Test
public void test4(){
// String key = "";
String key = System.getenv("CCSENS_GAME");

Loading…
Cancel
Save