| | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.tcm.training.admin.agent.entity.ProvincialAgent; |
| | | import com.tcm.training.admin.agent.mapper.ProvincialAgentMapper; |
| | | import com.tcm.training.admin.app.auth.service.AppAuthSessionService; |
| | | import com.tcm.training.admin.app.home.vo.AppVzanLiveEntryVO; |
| | | import com.tcm.training.admin.app.user.service.AppUserCenterService; |
| | | import com.tcm.training.admin.app.user.vo.AppUserCenterVO; |
| | |
| | | private final UserMapper userMapper; |
| | | private final ClinicMapper clinicMapper; |
| | | private final ProvincialAgentMapper provincialAgentMapper; |
| | | private final AppAuthSessionService appAuthSessionService; |
| | | |
| | | public AppVzanLiveEntryService(LiveRoomSettingService liveRoomSettingService, |
| | | UserMapper userMapper, |
| | | ClinicMapper clinicMapper, |
| | | ProvincialAgentMapper provincialAgentMapper) { |
| | | ProvincialAgentMapper provincialAgentMapper, |
| | | AppAuthSessionService appAuthSessionService) { |
| | | this.liveRoomSettingService = liveRoomSettingService; |
| | | this.userMapper = userMapper; |
| | | this.clinicMapper = clinicMapper; |
| | | this.provincialAgentMapper = provincialAgentMapper; |
| | | this.appAuthSessionService = appAuthSessionService; |
| | | } |
| | | |
| | | public AppVzanLiveEntryVO createEntry(Long userId) { |
| | | Long sessionUserId = appAuthSessionService.getLoginUserId(); |
| | | log.info("微赞直播入口userId对比,请求体userId={},会话userId={},是否一致={}", |
| | | userId, sessionUserId, java.util.Objects.equals(userId, sessionUserId)); |
| | | LiveRoomSettingVO setting = liveRoomSettingService.current(); |
| | | String liveRoomUrl = setting == null ? null : StrUtil.trim(setting.getLiveRoomUrl()); |
| | | validateLiveRoomUrl(liveRoomUrl); |