瀏覽代碼

Merge remote-tracking branch 'origin/dev_v4.1.0' into dev_v4.1.0

deason 4 年之前
父節點
當前提交
c80e5149f8

+ 4 - 2
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/OrgController.java

@@ -524,7 +524,7 @@ public class OrgController extends ControllerSupport {
             return cb.and(predicates.toArray(new Predicate[predicates.size()]));
         };
 
-        PageRequest pageRequest = PageRequest.of(0, 50, Sort.by(Direction.DESC, "updateTime"));
+        PageRequest pageRequest = PageRequest.of(0, 50, new Sort(Direction.DESC, "updateTime"));
         Page<OrgEntity> page = orgRepo.findAll(specification, pageRequest);
         Iterator<OrgEntity> iterator = page.iterator();
         List<OrgEntity> list = Lists.newArrayList();
@@ -1409,7 +1409,9 @@ public class OrgController extends ControllerSupport {
         if (null == orgEntity) {
             throw new StatusException("140002", "orgEntity is null");
         }
-        OrgPropertyEntity fileEntity = orgPropertyRepo.findByOrgIdAndKeyId(orgId, 26L);
+        DynamicEnumManager manager = OrgProperty.getDynamicEnumManager();
+        DynamicEnum answersTemplate = manager.getByName("ANSWERS_TEMPLATE");
+        OrgPropertyEntity fileEntity = orgPropertyRepo.findByOrgIdAndKeyId(orgId, answersTemplate.getId());
         if (null == fileEntity || StringUtils.isBlank(fileEntity.getValue())) {
             return "";
         }