diff --git a/pom.xml b/pom.xml index 8dce506..bffbab1 100644 --- a/pom.xml +++ b/pom.xml @@ -20,8 +20,8 @@ 1.8 2.1.9 2.1.9 - - 8.0.26 + 5.1.38 + 1.1.3 2.3.0 2.6 diff --git a/src/main/java/com/platform/config/CorsConfig.java b/src/main/java/com/platform/config/CorsConfig.java index d327719..2c11e6f 100644 --- a/src/main/java/com/platform/config/CorsConfig.java +++ b/src/main/java/com/platform/config/CorsConfig.java @@ -20,21 +20,21 @@ public class CorsConfig extends WebMvcConfigurerAdapter { .maxAge(3600); } - @Bean - public CorsFilter corsFilter() { - final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource(); - final CorsConfiguration corsConfiguration = new CorsConfiguration(); - /*是否允许请求带有验证信息*/ - corsConfiguration.setAllowCredentials(true); - /*允许访问的客户端域名*/ - corsConfiguration.addAllowedOrigin("*"); - /*允许服务端访问的客户端请求头*/ - corsConfiguration.addAllowedHeader("*"); - /*允许访问的方法名,GET POST等*/ - corsConfiguration.addAllowedMethod("*"); - urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration); - return new CorsFilter(urlBasedCorsConfigurationSource); - } +// @Bean +// public CorsFilter corsFilter() { +// final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource(); +// final CorsConfiguration corsConfiguration = new CorsConfiguration(); +// /*是否允许请求带有验证信息*/ +// corsConfiguration.setAllowCredentials(true); +// /*允许访问的客户端域名*/ +// corsConfiguration.addAllowedOrigin("*"); +// /*允许服务端访问的客户端请求头*/ +// corsConfiguration.addAllowedHeader("*"); +// /*允许访问的方法名,GET POST等*/ +// corsConfiguration.addAllowedMethod("*"); +// urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration); +// return new CorsFilter(urlBasedCorsConfigurationSource); +// } diff --git a/src/main/java/com/platform/config/ShiroConfig.java b/src/main/java/com/platform/config/ShiroConfig.java index a6f25e1..bb08441 100644 --- a/src/main/java/com/platform/config/ShiroConfig.java +++ b/src/main/java/com/platform/config/ShiroConfig.java @@ -90,6 +90,9 @@ public class ShiroConfig { filterMap.put("/live/notify/*", "anon"); filterMap.put("/foreign/token", "anon"); filterMap.put("/foreign/live/**", "anon"); + //2023年1月17日11:22:21 在手机端获取栏目 + filterMap.put("/lives/syscolumn/**", "anon"); + //------------------------------------- filterMap.put("/homepage/**", "anon"); // filterMap.put("/api/clips/**", "anon"); filterMap.put("/clips/**", "anon"); diff --git a/src/main/java/com/platform/modules/app/controller/AppLiveSceneCountController.java b/src/main/java/com/platform/modules/app/controller/AppLiveSceneCountController.java index 42d59a1..b2a0109 100644 --- a/src/main/java/com/platform/modules/app/controller/AppLiveSceneCountController.java +++ b/src/main/java/com/platform/modules/app/controller/AppLiveSceneCountController.java @@ -37,12 +37,12 @@ import io.swagger.annotations.ApiResponses; @RestController @RequestMapping("/app/live/scene") public class AppLiveSceneCountController { - + @Autowired private LiveSceneCountService liveSceneCountService; @Autowired private RedisUtils redisUtils; - + @GetMapping("/counts") @ApiOperation("APP获取现场计数、并记录本次浏览数") @ApiImplicitParams({@ApiImplicitParam(value = "现场id", name = "sceneId", paramType = "query", dataType = "String")}) @@ -64,10 +64,11 @@ public class AppLiveSceneCountController { if (StringUtils.isBlank(subId)){ return R.error("参数错误"); } - + //2023年1月16日14:19:20 根据存储默认转发头像和默认播放器头像进行获取回显 + return R.ok().put("count", liveSceneCountService.getSceneCountByRedis(Integer.valueOf(subId))); } - + @GetMapping("/getCounts") @ApiOperation("APP获取现场列表计数") @ApiImplicitParams({@ApiImplicitParam(value = "现场id,多个ID用','分割", name = "sceneIds", paramType = "query", dataType = "String")}) diff --git a/src/main/java/com/platform/modules/foreign/controller/LiveForeignController.java b/src/main/java/com/platform/modules/foreign/controller/LiveForeignController.java index 1cddebd..60b5569 100644 --- a/src/main/java/com/platform/modules/foreign/controller/LiveForeignController.java +++ b/src/main/java/com/platform/modules/foreign/controller/LiveForeignController.java @@ -14,6 +14,7 @@ import com.platform.modules.sys.controller.AbstractController; import javax.servlet.http.HttpServletRequest; import com.platform.modules.sys.service.SysTenantService; +import com.platform.modules.sys.vo.SysTenantVo; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -66,7 +67,9 @@ public class LiveForeignController { PageUtils pu = liveForeignService.getSceneList(cid, source, title, page, size); return R.ok().put("data", pu); } - + //2023年1月16日15:09:01 + @Autowired + private SysTenantService sysTenantService; @GetMapping("/scene/get/{id}") @ResponseBody public R sceneInfo(@PathVariable("id") String id) { @@ -94,9 +97,11 @@ public class LiveForeignController { e.printStackTrace(); return R.error("信息不存在"); } + //根据现场id获取到播放器图片、转发图片、转发名称 + SysTenantVo sysTenantVo=sysTenantService.selectTenantBySid(id); - return R.ok().put("data", data); + return R.ok().put("data", data).put("sysTenantVo",sysTenantVo); } @GetMapping("/report/list") @@ -111,8 +116,8 @@ public class LiveForeignController { String tenantUrl= sysTenantService.selectTenant(sceneId); return R.ok().put("data", pu).put("tenantUrl",tenantUrl); } - @Autowired - private SysTenantService sysTenantService; +// @Autowired +// private SysTenantService sysTenantService; @GetMapping("/comment/list") @ResponseBody public R commentList(Integer sceneId, Integer page, Integer size) { @@ -246,6 +251,9 @@ public class LiveForeignController { @GetMapping("/weixin/getJsApiTicket") @ResponseBody public R getWeixinJsApiTicket (String url) { + //2023年1月17日15:31:00 微信动态获取公众号编码 + + if(StringUtils.isBlank(url)){ return R.error("必填参数不能为空"); } diff --git a/src/main/java/com/platform/modules/foreign/service/impl/LiveForeignServiceImpl.java b/src/main/java/com/platform/modules/foreign/service/impl/LiveForeignServiceImpl.java index b89853c..14ec367 100644 --- a/src/main/java/com/platform/modules/foreign/service/impl/LiveForeignServiceImpl.java +++ b/src/main/java/com/platform/modules/foreign/service/impl/LiveForeignServiceImpl.java @@ -13,6 +13,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import com.platform.modules.sys.dao.SysTenantDao; import org.apache.commons.lang.StringUtils; import org.apache.lucene.document.Document; import org.springframework.beans.factory.annotation.Autowired; @@ -595,10 +596,18 @@ public class LiveForeignServiceImpl implements com.platform.modules.foreign.serv /** * 获取微信JS验证 */ + @Autowired + private SysTenantDao sysTenantDao; public JSONObject getWeixinJsApiTicket(String url){ + //根据url获取到对应机构的微信公众号信息 + String wxappid=sysTenantDao.selectbyWxID(url); + String wxappsecret=sysTenantDao.selectbysecret(url); + + JSONObject jsonObject = new JSONObject(); - JsTicketApi jsTicketApi = new JsTicketApi(liveProperties.getWeixin().getAppId(), liveProperties.getWeixin().getAppSecret(), redisUtils); + //JsTicketApi jsTicketApi = new JsTicketApi(liveProperties.getWeixin().getAppId(), liveProperties.getWeixin().getAppSecret(), redisUtils); + JsTicketApi jsTicketApi = new JsTicketApi(wxappid, wxappsecret, redisUtils); String timeStamp = System.currentTimeMillis() / 1000 + ""; String nonceStr = StringKit.getRandomString(16); @@ -610,7 +619,8 @@ public class LiveForeignServiceImpl implements com.platform.modules.foreign.serv JsSignature signature = new JsSignature(nonceStr, jsapi_ticket, timeStamp, url); String sign = JsSignKit.sign(signature); - jsonObject.put("appid", liveProperties.getWeixin().getAppId()); + //jsonObject.put("appid", liveProperties.getWeixin().getAppId()); + jsonObject.put("appid",wxappid ); jsonObject.put("timeStamp", timeStamp); jsonObject.put("nonceStr", nonceStr); jsonObject.put("sign", sign); diff --git a/src/main/java/com/platform/modules/live/controller/LiveSceneController.java b/src/main/java/com/platform/modules/live/controller/LiveSceneController.java index 4363820..afcbd89 100644 --- a/src/main/java/com/platform/modules/live/controller/LiveSceneController.java +++ b/src/main/java/com/platform/modules/live/controller/LiveSceneController.java @@ -529,7 +529,7 @@ public class LiveSceneController extends AbstractController { @GetMapping("/channels") @ApiOperation(value = "获取所有栏目", produces = MediaType.APPLICATION_JSON_VALUE) @RequiresPermissions("live:livescene:channels") - public R channels(Integer sid){ + public R channels(Long id){ // return R.ok().put("list", liveChannelService.getAllList()); //return R.ok().put("list", liveChannelService.getAllChannel()); //获取对应机构下的栏目 diff --git a/src/main/java/com/platform/modules/live/controller/MediaUploadController.java b/src/main/java/com/platform/modules/live/controller/MediaUploadController.java index c6b47c9..aba0b83 100644 --- a/src/main/java/com/platform/modules/live/controller/MediaUploadController.java +++ b/src/main/java/com/platform/modules/live/controller/MediaUploadController.java @@ -110,7 +110,7 @@ public class MediaUploadController { // return R.error("资源上传失败"); // } // } -//上传到腾讯云oss + @PostMapping("/common/upload_media/chunk") @@ -173,7 +173,7 @@ public class MediaUploadController { } return R.ok("文件上传成功"); } - +//上传到腾讯云cos @SysLog("图片资源上传") @PostMapping("/common/upload_media") @ApiOperation("图片资源上传") @@ -207,7 +207,7 @@ public class MediaUploadController { localFile = File.createTempFile("temp", null); file.transferTo(localFile); // 指定要上传到 COS 上的路径 - String key = "/" + "/" + year + "/" + month + "/" + day + "/" + newFileName; + String key = "/" + "/" + year + "/" + month+1 + "/" + day + "/" + newFileName; PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, key, localFile); PutObjectResult putObjectResult = cosclient.putObject(putObjectRequest); // return new UploadMsg(1,"上传成功",this.path + putObjectRequest.getKey()); diff --git a/src/main/java/com/platform/modules/lives/LivesSyscolumn.java b/src/main/java/com/platform/modules/lives/LivesSyscolumn.java new file mode 100644 index 0000000..c8b961b --- /dev/null +++ b/src/main/java/com/platform/modules/lives/LivesSyscolumn.java @@ -0,0 +1,30 @@ +package com.platform.modules.lives; + +import com.platform.common.utils.R; +import com.platform.modules.live.service.LiveChannelService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/lives") +public class LivesSyscolumn { + @Autowired + private LiveChannelService liveChannelService; + @GetMapping("/syscolumn/{id}") + public R channels(@PathVariable("id") Long id){ + Long tenantId= id; + + if (tenantId==1){ + return R.ok().put("list", liveChannelService.getAllList()); + + }else { + return R.ok().put("list",liveChannelService.getAllChannelByTenant(tenantId)); + } + + } + + +} diff --git a/src/main/java/com/platform/modules/sys/controller/SysRoleController.java b/src/main/java/com/platform/modules/sys/controller/SysRoleController.java index 7f1c512..edac818 100644 --- a/src/main/java/com/platform/modules/sys/controller/SysRoleController.java +++ b/src/main/java/com/platform/modules/sys/controller/SysRoleController.java @@ -8,6 +8,7 @@ import com.platform.common.validator.ValidatorUtils; import com.platform.modules.sys.entity.SysRoleEntity; import com.platform.modules.sys.service.SysRoleMenuService; import com.platform.modules.sys.service.SysRoleService; +import com.platform.modules.sys.service.SysUserRoleService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -41,26 +42,42 @@ public class SysRoleController extends AbstractController { PageUtils page = sysRoleService.queryPage(params); return R.ok().put("page", page); +// //lzy +// if (getUserId() == Constant.SUPER_ADMIN){ +// PageUtils page = sysRoleService.queryPage(params); +// +// } } - + /** * 角色列表 */ + @Autowired + private SysUserRoleService sysUserRoleService; @GetMapping("/select") @RequiresPermissions("sys:role:select") public R select(){ Map map = new HashMap<>(); - + //如果不是超级管理员,则只查询自己所拥有的角色列表 // if(getUserId() != Constant.SUPER_ADMIN){ // // 20190309 TROY 字段名称错误 // map.put("create_user_id", getUserId()); // } - List list = sysRoleService.selectByMap(map); - + + + //2023年1月17日09:19:36 判断是否含有系统管理员权限,如果有则出现 + //设置评选判断条件 + List roleIdList = sysUserRoleService.queryRoleIdList(getUser().getUserId()); + if(roleIdList.contains(1L)){ + List list = sysRoleService.selectByMap(map); + return R.ok().put("list", list); + } + //显示除系统管理员之外的角色 + Listlist=sysRoleService.selectNoAdmin(); return R.ok().put("list", list); } - + /** * 角色信息 */ @@ -68,14 +85,14 @@ public class SysRoleController extends AbstractController { @RequiresPermissions("sys:role:info") public R info(@PathVariable("roleId") Long roleId){ SysRoleEntity role = sysRoleService.selectById(roleId); - + //查询角色对应的菜单 List menuIdList = sysRoleMenuService.queryMenuIdList(roleId); role.setMenuIdList(menuIdList); - + return R.ok().put("role", role); } - + /** * 保存角色 */ @@ -84,13 +101,13 @@ public class SysRoleController extends AbstractController { @RequiresPermissions("sys:role:save") public R save(@RequestBody SysRoleEntity role){ ValidatorUtils.validateEntity(role); - + role.setCreateUserId(getUserId()); sysRoleService.save(role); - + return R.ok(); } - + /** * 修改角色 */ @@ -99,13 +116,13 @@ public class SysRoleController extends AbstractController { @RequiresPermissions("sys:role:update") public R update(@RequestBody SysRoleEntity role){ ValidatorUtils.validateEntity(role); - + role.setCreateUserId(getUserId()); sysRoleService.update(role); - + return R.ok(); } - + /** * 删除角色 */ @@ -114,7 +131,7 @@ public class SysRoleController extends AbstractController { @RequiresPermissions("sys:role:delete") public R delete(@RequestBody Long[] roleIds){ sysRoleService.deleteBatch(roleIds); - + return R.ok(); } } diff --git a/src/main/java/com/platform/modules/sys/controller/SysTenantController.java b/src/main/java/com/platform/modules/sys/controller/SysTenantController.java index 26e0249..da22a8c 100644 --- a/src/main/java/com/platform/modules/sys/controller/SysTenantController.java +++ b/src/main/java/com/platform/modules/sys/controller/SysTenantController.java @@ -129,7 +129,7 @@ public class SysTenantController extends AbstractController { @ApiOperationSort(4) @ApiOperation(value = "分页查询") @GetMapping("/page") - @RequiresPermissions("sys:systenant:list") + @RequiresPermissions("sys:systenant:page") public R page(@RequestParam Map params){ PageUtils page = sysTenantService.queryPage(params); return R.ok().put("page", page); @@ -162,7 +162,7 @@ public class SysTenantController extends AbstractController { @ApiOperationSort(6) @ApiOperation(value = "机构详情") @GetMapping("/info/{id}") - //@RequiresPermissions("sys:systenant:info") + @RequiresPermissions("sys:systenant:info") public R info(@PathVariable("id") Long id){ return sysTenantService.info(id); } diff --git a/src/main/java/com/platform/modules/sys/dao/SysRoleDao.java b/src/main/java/com/platform/modules/sys/dao/SysRoleDao.java index 9fe80e8..ee4d613 100644 --- a/src/main/java/com/platform/modules/sys/dao/SysRoleDao.java +++ b/src/main/java/com/platform/modules/sys/dao/SysRoleDao.java @@ -11,9 +11,15 @@ import java.util.List; */ @Mapper public interface SysRoleDao extends BaseMapper { - + /** * 查询用户创建的角色ID列表 */ List queryRoleIdList(Long createUserId); + + /** + * 如果不是系统管理员,则不能显示系统管理员权限 + * @return + */ + List selectNoAdmin(); } diff --git a/src/main/java/com/platform/modules/sys/dao/SysTenantDao.java b/src/main/java/com/platform/modules/sys/dao/SysTenantDao.java index b273680..e33e6f7 100644 --- a/src/main/java/com/platform/modules/sys/dao/SysTenantDao.java +++ b/src/main/java/com/platform/modules/sys/dao/SysTenantDao.java @@ -2,6 +2,7 @@ package com.platform.modules.sys.dao; import com.platform.modules.sys.entity.SysTenantEntity; import com.baomidou.mybatisplus.mapper.BaseMapper; +import com.platform.modules.sys.vo.SysTenantVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -34,4 +35,15 @@ public interface SysTenantDao extends BaseMapper { String selectAnonymousurl(@Param("sceneid") Integer sceneId); String selectTenant(@Param("sceneid")Integer sceneId); + + /** + * h5页面根据直播流查询默认视频播放头像,转发名称,转发头像 + * @param id + * @return + */ + SysTenantVo selectTenantBySid(@Param("id") String id); + + String selectbyWxID(@Param("url") String url); + + String selectbysecret(@Param("url")String url); } diff --git a/src/main/java/com/platform/modules/sys/dto/SaveTenantDTO.java b/src/main/java/com/platform/modules/sys/dto/SaveTenantDTO.java index 21fed36..94f9bfb 100644 --- a/src/main/java/com/platform/modules/sys/dto/SaveTenantDTO.java +++ b/src/main/java/com/platform/modules/sys/dto/SaveTenantDTO.java @@ -101,5 +101,17 @@ public class SaveTenantDTO { * 机构默认评论头像 */ private String anonymousUrl; - + //2023年1月16日14:21:02 新增默认播放器头像和默认转发头像 + /** + * 默认播放器头像 + */ + private String imageTplayerUrl; + /** + * 默认转发头像 + */ + private String tForwardUrl; + /** + * 转发名称名称 + */ + private String tForwardName; } diff --git a/src/main/java/com/platform/modules/sys/entity/SysTenantEntity.java b/src/main/java/com/platform/modules/sys/entity/SysTenantEntity.java index e9a0c21..28cffb2 100644 --- a/src/main/java/com/platform/modules/sys/entity/SysTenantEntity.java +++ b/src/main/java/com/platform/modules/sys/entity/SysTenantEntity.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotations.TableLogic; import com.baomidou.mybatisplus.annotations.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.springframework.beans.factory.annotation.Autowired; import java.io.Serializable; import java.util.Date; @@ -90,6 +91,69 @@ public class SysTenantEntity implements Serializable { */ @ApiModelProperty(value = "机构评论匿名头像") private String anonymousUrl; + //2023年1月16日14:23:50 新增默认播放器头像 和默认转发头像 + /** + * 默认播放器头像 + */ + @ApiModelProperty(value = "默认播放器头像") + private String imageTplayerUrl; + /** + * 默认转发头像 + */ + @ApiModelProperty(value = "默认转发头像") + private String tForwardUrl; + /** + * 设置转发名称 + */ + @ApiModelProperty(value = "转发名称") + private String tForwardName; + + /** + * 微信APPid + * @return + */ + @ApiModelProperty(value = "微信APPid") + private String wxAppId; + + /** + * 微信appsecret + * @return + */ + @ApiModelProperty(value = "微信appsecret") + private String wxAppSecret; + //********************************** + + public String getWxAppId() { + return wxAppId; + } + + public void setWxAppId(String wxAppId) { + this.wxAppId = wxAppId; + } + + public String getWxAppSecret() { + return wxAppSecret; + } + + public void setWxAppSecret(String wxAppSecret) { + this.wxAppSecret = wxAppSecret; + } + + public String getImageTplayerUrl() { + return imageTplayerUrl; + } + + public void setImageTplayerUrl(String imageTplayerUrl) { + this.imageTplayerUrl = imageTplayerUrl; + } + + public String gettForwardName() { + return tForwardName; + } + + public void settForwardName(String tForwardName) { + this.tForwardName = tForwardName; + } /** @@ -262,4 +326,27 @@ public class SysTenantEntity implements Serializable { } + //2023年1月16日14:26:28 + + + + /** + * 得到默认转发头像 + * @return + */ + public String gettForwardUrl() { + return tForwardUrl; + } + + /** + * 设置默认转发头像 + * @param tForwardUrl + */ + public void settForwardUrl(String tForwardUrl) { + this.tForwardUrl = tForwardUrl; + } + + + + } diff --git a/src/main/java/com/platform/modules/sys/service/SysRoleService.java b/src/main/java/com/platform/modules/sys/service/SysRoleService.java index e8ce72c..48b2ca8 100644 --- a/src/main/java/com/platform/modules/sys/service/SysRoleService.java +++ b/src/main/java/com/platform/modules/sys/service/SysRoleService.java @@ -21,9 +21,15 @@ public interface SysRoleService extends IService { void deleteBatch(Long[] roleIds); - + /** * 查询用户创建的角色ID列表 */ List queryRoleIdList(Long createUserId); + + /** + * 如果登陆用户不是系统管理员,则不能将系统管理员显示 + * @return + */ + List selectNoAdmin(); } diff --git a/src/main/java/com/platform/modules/sys/service/SysTenantService.java b/src/main/java/com/platform/modules/sys/service/SysTenantService.java index 5d194a7..3037595 100644 --- a/src/main/java/com/platform/modules/sys/service/SysTenantService.java +++ b/src/main/java/com/platform/modules/sys/service/SysTenantService.java @@ -5,6 +5,7 @@ import com.platform.common.utils.PageUtils; import com.platform.common.utils.R; import com.platform.modules.sys.dto.SaveTenantDTO; import com.platform.modules.sys.entity.SysTenantEntity; +import com.platform.modules.sys.vo.SysTenantVo; import java.util.List; import java.util.Map; @@ -32,5 +33,13 @@ public interface SysTenantService extends IService { String selectAnonymousurl(Integer sceneId); String selectTenant(Integer sceneId); + + /** + * 根据现场id查出tenantvo + * @return + */ + SysTenantVo selectTenantBySid(String id); + + } diff --git a/src/main/java/com/platform/modules/sys/service/impl/SysRoleServiceImpl.java b/src/main/java/com/platform/modules/sys/service/impl/SysRoleServiceImpl.java index 55d14e1..39f5e9a 100644 --- a/src/main/java/com/platform/modules/sys/service/impl/SysRoleServiceImpl.java +++ b/src/main/java/com/platform/modules/sys/service/impl/SysRoleServiceImpl.java @@ -94,6 +94,11 @@ public class SysRoleServiceImpl extends ServiceImpl i return baseMapper.queryRoleIdList(createUserId); } + @Override + public List selectNoAdmin() { + return baseMapper.selectNoAdmin(); + } + /** * 检查权限是否越权 */ @@ -102,10 +107,10 @@ public class SysRoleServiceImpl extends ServiceImpl i if(role.getCreateUserId() == Constant.SUPER_ADMIN){ return ; } - + //查询用户所拥有的菜单列表 List menuIdList = sysUserService.queryAllMenuId(role.getCreateUserId()); - + //判断是否越权 if(!menuIdList.containsAll(role.getMenuIdList())){ throw new RRException("新增角色的权限,已超出你的权限范围"); diff --git a/src/main/java/com/platform/modules/sys/service/impl/SysTenantServiceImpl.java b/src/main/java/com/platform/modules/sys/service/impl/SysTenantServiceImpl.java index d4223e0..23268d2 100644 --- a/src/main/java/com/platform/modules/sys/service/impl/SysTenantServiceImpl.java +++ b/src/main/java/com/platform/modules/sys/service/impl/SysTenantServiceImpl.java @@ -18,6 +18,7 @@ import com.platform.modules.sys.service.SysTenantService; import com.platform.modules.sys.service.SysUserRoleService; import com.platform.modules.sys.service.SysUserService; import com.platform.modules.sys.service.SysUserTokenService; +import com.platform.modules.sys.vo.SysTenantVo; import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.lang.StringUtils; import org.apache.shiro.crypto.hash.Sha256Hash; @@ -82,12 +83,19 @@ public class SysTenantServiceImpl extends ServiceImpl roleIdList; +// /** +// * 创建人ID +// * */ +// @ApiModelProperty(value = "创建人ID") +// private Long userCreateUserId; +// /** +// * 机构头像 +// */ +// private String tLogoUrl; +// /** +// * 机构默认评论头像 +// */ +// private String anonymousUrl; + //2023年1月16日14:21:02 新增默认播放器头像和默认转发头像 + /** + * 默认播放器头像 + */ + private String imageTplayerUrl; + /** + * 默认转发头像 + */ + private String tForwardUrl; + /** + * 转发名称名称 + */ + private String tForwardName; +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ec44f46..fb3028b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -11,8 +11,10 @@ server: spring: # 环境 dev|test|prod profiles: - active: dev, live-dev + active: prod, live-prod # jackson时间格式化 + resources: + static-locations: classpath:/META-INF/resources/,file:${image.imagePath} jackson: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss @@ -34,6 +36,14 @@ spring: max-wait: -1 max-idle: 10 min-idle: 5 + #腾讯云cos配置信息 + tengxun: + accessKey: AKIDUnwtoleP0T0RhiW5PUVN3Xu50gJxSmt1 + secretKey: ODpAQccXDdotmIxSkmX2RfdbOyHNGzWr + bucket: ap-beijing + bucketName: ajinanlive-1303145222 + path: https://ajinanlive-1303145222.cos.ap-beijing.myqcloud.com + #mybatis @@ -91,10 +101,14 @@ video: listenerPath: D:\\video interval: 1000 baseSavePath: /video/ +image: +# imagePath: /data/syspic + baseSavePath: http://localhost:8081/ materia: materiaPath: mediaPath: /media basePath: http://zklive.zhongkedongxin.com/platform/ +# basePath: https://m.livejinan.cn/platform/ SPT: / foreign: wapurl: http://zklive.zhongkedongxin.com @@ -112,3 +126,8 @@ platform: logging: file: /var/log/platform/platform.log + + + + + diff --git a/src/main/resources/mapper/sys/SysRoleDao.xml b/src/main/resources/mapper/sys/SysRoleDao.xml index 412750b..3be9ce1 100644 --- a/src/main/resources/mapper/sys/SysRoleDao.xml +++ b/src/main/resources/mapper/sys/SysRoleDao.xml @@ -2,9 +2,12 @@ - + - \ No newline at end of file + select role_id from sys_role where create_user_id = #{createUserId} + + + diff --git a/src/main/resources/mapper/sys/SysTenantDao.xml b/src/main/resources/mapper/sys/SysTenantDao.xml index 37c6c94..b986e4d 100644 --- a/src/main/resources/mapper/sys/SysTenantDao.xml +++ b/src/main/resources/mapper/sys/SysTenantDao.xml @@ -34,5 +34,25 @@ from live_scene ls LEFT JOIN sys_tenant st on ls.tenant_id= st.tenant_id where ls.id=#{sceneid} + + +