src/main/java/com/moon/server/controller/show/ApplyController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/moon/server/controller/sys/TokenController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/moon/server/entity/all/StaticData.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/moon/server/helper/FileHelper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/moon/server/controller/show/ApplyController.java
@@ -168,7 +168,7 @@ if (null == applyEntity) { return fail("找不到数据申请"); } if (!(applyEntity.getStatus() >= -1 && applyEntity.getStatus() <= StaticData.NINE)) { if (!(applyEntity.getStatus() >= -1 && applyEntity.getStatus() <= StaticData.I9)) { return fail("该数据申请无法废弃"); } @@ -226,7 +226,7 @@ if (null == applyEntity) { return fail("找不到数据申请"); } if (!(applyEntity.getStatus() >= 0 && applyEntity.getStatus() <= StaticData.NINE)) { if (!(applyEntity.getStatus() >= 0 && applyEntity.getStatus() <= StaticData.I9)) { return fail("该数据申请无需打回"); } @@ -234,7 +234,7 @@ int rows = applyService.updateForSubmit(ue.getId(), applyEntity.getId(), flowEntity.getId()); applyEntity = applyService.selectById(applyEntity.getId()); if (StaticData.TEN == applyEntity.getStatus()) { if (StaticData.I10 == applyEntity.getStatus()) { UserEntity user = userService.selectUser(applyEntity.getUserid()); applyService.zipDbData(user, applyEntity); } @@ -265,7 +265,7 @@ if (null == applyEntity) { return fail("找不到数据申请"); } if (!(applyEntity.getStatus() >= 0 && applyEntity.getStatus() <= StaticData.NINE)) { if (!(applyEntity.getStatus() >= 0 && applyEntity.getStatus() <= StaticData.I9)) { return fail("该数据申请无需打回"); } src/main/java/com/moon/server/controller/sys/TokenController.java
@@ -3,6 +3,8 @@ import com.moon.server.annotation.SysLog; import com.moon.server.controller.all.BaseController; import com.moon.server.entity.all.ResponseMsg; import com.moon.server.entity.all.SettingData; import com.moon.server.entity.all.StaticData; import com.moon.server.entity.sys.TokenEntity; import com.moon.server.entity.sys.UserEntity; import com.moon.server.helper.StringHelper; @@ -77,6 +79,28 @@ } @SysLog() @ApiOperation(value = "插入一条新令牌") @ApiImplicitParams({ @ApiImplicitParam(name = "type", value = "令牌类别:0-临时,1-固定", dataType = "Integer", paramType = "query", example = "1"), @ApiImplicitParam(name = "min", value = "分钟数:默认1个月", dataType = "Integer", paramType = "query", example = "43200") }) @GetMapping(value = "/insertNewToken") public ResponseMsg<Object> insertNewToken(Integer type, Integer min, HttpServletRequest req) { try { if (null == type || type > 1) { type = 0; } if (null == min || min < StaticData.I10) { min = SettingData.TOKEN_EXPIRE; } return success(null); } catch (Exception ex) { return fail(ex, null); } } @SysLog() @ApiOperation(value = "删除一条") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") src/main/java/com/moon/server/entity/all/StaticData.java
@@ -32,11 +32,13 @@ public final static int I8 = 8; public final static int NINE = 9; public final static int I9 = 9; public final static int TEN = 10; public final static int I10 = 10; public final static int SIXTEEN = 16; public final static int I16 = 16; public final static int I30 = 30; public final static int ONE_HUNDRED = 100; src/main/java/com/moon/server/helper/FileHelper.java
@@ -367,7 +367,7 @@ // 所以表示成 16 进制需要 32 个字符,表示转换结果中对应的字符位置 int k = 0; // 从第一个字节开始,对 MD5 的每一个字节 for (int i = 0; i < StaticData.SIXTEEN; i++) { for (int i = 0; i < StaticData.I16; i++) { // 转换成 16 进制字符的转换 byte byte0 = tmp[i]; // 取字节中高 4 位的数字转换