|
@@ -30,6 +30,7 @@ import com.tencentcloudapi.vod.v20180717.models.MediaBasicInfo;
|
|
|
import com.tencentcloudapi.vod.v20180717.models.MediaInfo;
|
|
|
import com.tencentcloudapi.vod.v20180717.models.SearchMediaResponse;
|
|
|
import io.swagger.annotations.*;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
@@ -123,6 +124,9 @@ public class SysController {
|
|
|
@Resource
|
|
|
TMTencentVideoMessageService tmTencentVideoMessageService;
|
|
|
|
|
|
+ @Value(value = "${app.version}")
|
|
|
+ private String version;
|
|
|
+
|
|
|
@ApiOperation(value = "同步机构接口")
|
|
|
@RequestMapping(value = "/sync/org", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "菜单信息", response = Result.class)})
|
|
@@ -261,16 +265,19 @@ public class SysController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "机构信息", response = TBOrg.class)})
|
|
|
public Result queryByOrgCode(@ApiParam(value = "机构code", required = true) @RequestParam String code) {
|
|
|
Optional.ofNullable(code).orElseThrow(() -> new BusinessException(ExceptionResultEnum.ORG_CODE_IS_NULL));
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put(SystemConstant.VERSION, version);
|
|
|
if (!Objects.equals(code.toUpperCase(), SystemConstant.ADMIN)) {
|
|
|
TBOrg tbOrg = themisCacheService.addOrgCodeCache(code);
|
|
|
Optional.ofNullable(tbOrg).orElseThrow(() -> new BusinessException(ExceptionResultEnum.ORG_NO));
|
|
|
authInfoService.appHasExpired(code);
|
|
|
- return ResultUtil.ok(Collections.singletonMap("logo", tbOrg.getLogo()));
|
|
|
+ map.put("logo", tbOrg.getLogo());
|
|
|
} else {
|
|
|
SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.ADMIN_LOGO_URL);
|
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置超级管理员logo"));
|
|
|
- return ResultUtil.ok(Collections.singletonMap("logo", sysConfig.getConfigValue()));
|
|
|
+ map.put("logo", sysConfig.getConfigValue());
|
|
|
}
|
|
|
+ return ResultUtil.ok(map);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "机构查询接口")
|