mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
token新增,编辑,接口入参修改
This commit is contained in:
+2
-2
@@ -20,7 +20,7 @@ import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
* @author Beal
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "机台授权")
|
||||
@Tag(name = "组织机台授权")
|
||||
@RequestMapping("/system/machine-auth")
|
||||
public class MachineAuthController {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class MachineAuthController {
|
||||
|
||||
|
||||
@PostMapping("update-organ-auth")
|
||||
@Operation(summary = "组织机台授权信息更新")
|
||||
@Operation(summary = "修改组织机台数量")
|
||||
@PreAuthorize("@ss.hasPermission('machine-auth::update')")
|
||||
public CommonResult<Boolean> authUpdate(@RequestBody MachineOrgAuthReq vo) {
|
||||
return success(machineService.authUpdate(vo));
|
||||
|
||||
+4
@@ -42,6 +42,10 @@ public class TokenConfigRespVO {
|
||||
private String appToken;
|
||||
|
||||
|
||||
@Schema(description = "时间类型")
|
||||
private String timeType;
|
||||
|
||||
|
||||
@Schema(description = "过期时间")
|
||||
@ExcelProperty("过期时间")
|
||||
private LocalDateTime expiresTime;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ public class TokenConfigSaveReqVO {
|
||||
|
||||
|
||||
@Schema(description = "有效时间类型")
|
||||
private String expiresTimeType;
|
||||
private String timeType;
|
||||
|
||||
|
||||
@Schema(description = "备注")
|
||||
|
||||
+5
@@ -43,6 +43,11 @@ public class TokenConfigDO extends BaseDO {
|
||||
*/
|
||||
private String appToken;
|
||||
|
||||
/**
|
||||
* 时间类型
|
||||
*/
|
||||
private String timeType;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
|
||||
+7
-4
@@ -123,8 +123,8 @@ public class TokenConfigServiceImpl implements TokenConfigService{
|
||||
LocalDateTime localDateTime = LocalDate.parse(reqVO.getCustomizeTime()).atStartOfDay();
|
||||
adjustedTime = localDateTime.withHour(23).withMinute(59).withSecond(59);
|
||||
}else {
|
||||
AssertUtils.notEmpty(reqVO.getExpiresTimeType(),TOKEN_EXPIRES_TIME_IS_NULL);
|
||||
adjustedTime = TokenExpiresTimeTypeEnum.adjustTime(reqVO.getExpiresTimeType(), LocalDateTime.now());
|
||||
AssertUtils.notEmpty(reqVO.getTimeType(),TOKEN_EXPIRES_TIME_IS_NULL);
|
||||
adjustedTime = TokenExpiresTimeTypeEnum.adjustTime(reqVO.getTimeType(), LocalDateTime.now());
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +133,7 @@ public class TokenConfigServiceImpl implements TokenConfigService{
|
||||
.appToken(token)
|
||||
.appType(reqVO.getAppType())
|
||||
.organId(organId)
|
||||
.timeType(reqVO.getTimeType())
|
||||
.expiresTime(adjustedTime)
|
||||
.remark(reqVO.getRemark())
|
||||
.build());
|
||||
@@ -156,8 +157,8 @@ public class TokenConfigServiceImpl implements TokenConfigService{
|
||||
if (reqVO.getCustomizeTime() != null){
|
||||
LocalDateTime localDateTime = LocalDate.parse(reqVO.getCustomizeTime()).atStartOfDay();
|
||||
adjustedTime = localDateTime.withHour(23).withMinute(59).withSecond(59);
|
||||
}else if(reqVO.getExpiresTimeType() != null){
|
||||
adjustedTime = TokenExpiresTimeTypeEnum.adjustTime(reqVO.getExpiresTimeType(), tokenConfigDO.getCreateTime());
|
||||
}else if(reqVO.getTimeType() != null){
|
||||
adjustedTime = TokenExpiresTimeTypeEnum.adjustTime(reqVO.getTimeType(), tokenConfigDO.getCreateTime());
|
||||
}
|
||||
|
||||
if(adjustedTime != null){
|
||||
@@ -171,6 +172,8 @@ public class TokenConfigServiceImpl implements TokenConfigService{
|
||||
|
||||
tokenConfigDO.setRemark(reqVO.getRemark() == null ? tokenConfigDO.getRemark() : reqVO.getRemark());
|
||||
|
||||
tokenConfigDO.setTimeType(reqVO.getTimeType());
|
||||
|
||||
tokenConfigMapper.updateById(tokenConfigDO);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user