|
@@ -14,10 +14,8 @@ import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetApplicationExtendCli
|
|
|
import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
|
|
|
import com.dayaedu.cbs.openfeign.wrapper.musicInstrument.CbsMusicalInstrumentWrapper;
|
|
|
import com.microsvc.toolkit.common.response.template.R;
|
|
|
-import com.ym.mec.biz.dal.dao.CloudTeacherOrderDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SysMusicScoreAccompanimentDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SysMusicScoreCategoriesDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SysMusicScoreDao;
|
|
|
+import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.ReasonDto;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.ClientEnum;
|
|
@@ -74,6 +72,11 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
|
|
|
@Autowired
|
|
|
private MemberRankCategoryMapperService memberRankCategoryMapperService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private SysConfigDao sysConfigDao;
|
|
|
+ @Resource
|
|
|
+ private TeacherDao teacherDao;
|
|
|
+
|
|
|
@Value("${openfeign-client.app-id:1745637981387108354}")
|
|
|
public Long applicationId;
|
|
|
|
|
@@ -842,4 +845,26 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Boolean getUseNativeEvaluationService(Integer userId) {
|
|
|
+ //是否使用原生评测服务
|
|
|
+ String useNativeEvaluationService = sysConfigDao.findConfigValue("use_native_evaluation_service");
|
|
|
+ if (StringUtils.isEmpty(useNativeEvaluationService) || "0".equals(useNativeEvaluationService)) {
|
|
|
+ return false;
|
|
|
+ }else {
|
|
|
+ //获取使用原生评测服务的分部
|
|
|
+ String useNativeEvaluationServiceOrganIds = sysConfigDao.findConfigValue("use_native_evaluation_service_organ");
|
|
|
+ if (StringUtils.isEmpty(useNativeEvaluationServiceOrganIds)) {
|
|
|
+ return true;
|
|
|
+ }else {
|
|
|
+ SysUser user = teacherDao.getUser(userId);
|
|
|
+ if (user == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ List<String> organIds = Arrays.stream(useNativeEvaluationServiceOrganIds.split(",")) .collect(Collectors.toList());
|
|
|
+ return organIds.contains(user.getOrganId().toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|