Procházet zdrojové kódy

Merge branch 'dev' of http://192.168.1.245:11111/jinjilong/onlineEducation-fwd into dev

honorfire před 7 měsíci
rodič
revize
cc3a163be6

+ 3 - 2
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/controller/admin/DashboardController.java

@@ -4,6 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
+import vip.xiaonuo.common.pojo.CommonResult;
 import vip.xiaonuo.exam.base.BaseApiController;
 import vip.xiaonuo.exam.base.RestResponse;
 import vip.xiaonuo.exam.service.*;
@@ -32,7 +33,7 @@ public class DashboardController extends BaseApiController {
     }
 
     @RequestMapping(value = "/index", method = RequestMethod.POST)
-    public RestResponse<IndexVM> Index() {
+    public CommonResult<IndexVM> Index() {
         IndexVM vm = new IndexVM();
 
         Integer examPaperCount = examPaperService.selectAllCount();
@@ -51,6 +52,6 @@ public class DashboardController extends BaseApiController {
         vm.setMothDayDoExamQuestionValue(mothDayDoExamQuestionValue);
 
         vm.setMothDayText(DateTimeUtil.MothDay());
-        return RestResponse.ok(vm);
+        return CommonResult.data(vm);
     }
 }

+ 6 - 5
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/controller/student/DashboardController.java

@@ -5,6 +5,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 import vip.xiaonuo.auth.core.pojo.SaBaseLoginUser;
+import vip.xiaonuo.common.pojo.CommonResult;
 import vip.xiaonuo.exam.base.BaseApiController;
 import vip.xiaonuo.exam.base.RestResponse;
 import vip.xiaonuo.exam.domain.TaskExam;
@@ -44,7 +45,7 @@ public class DashboardController extends BaseApiController {
     }
 
     @RequestMapping(value = "/index", method = RequestMethod.POST)
-    public RestResponse<IndexVM> index() {
+    public CommonResult<IndexVM> index() {
         IndexVM indexVM = new IndexVM();
         SaBaseLoginUser user = getCurrentUser();
 
@@ -66,16 +67,16 @@ public class DashboardController extends BaseApiController {
             return vm;
         }).collect(Collectors.toList());
         indexVM.setTimeLimitPaper(paperInfoVMS);
-        return RestResponse.ok(indexVM);
+        return CommonResult.data(indexVM);
     }
 
 
     @RequestMapping(value = "/task", method = RequestMethod.POST)
-    public RestResponse<List<TaskItemVm>> task() {
+    public CommonResult<List<TaskItemVm>> task() {
         SaBaseLoginUser user = getCurrentUser();
         List<TaskExam> taskExams = taskExamService.getByGradeLevel(user.getSortCode());
         if (taskExams.size() == 0) {
-            return RestResponse.ok(new ArrayList<>());
+            return CommonResult.data(new ArrayList<>());
         }
         List<Integer> tIds = taskExams.stream().map(taskExam -> taskExam.getId()).collect(Collectors.toList());
         List<TaskExamCustomerAnswer> taskExamCustomerAnswers = taskExamCustomerAnswerService.selectByTUid(tIds, user.getId());
@@ -89,7 +90,7 @@ public class DashboardController extends BaseApiController {
             itemVm.setPaperItems(paperItemVMS);
             return itemVm;
         }).collect(Collectors.toList());
-        return RestResponse.ok(vm);
+        return CommonResult.data(vm);
     }
 
 

+ 4 - 1
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/mapper/mapping/SubjectMapper.xml

@@ -108,7 +108,7 @@
   <select id="getSubjectByLevel" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List"/>
-    from t_subject where level= #{level}
+    from t_subject where level= #{level} and deleted = 0
     order by item_order
   </select>
 
@@ -117,6 +117,9 @@
     select
     <include refid="Base_Column_List"/>
     from t_subject
+    where 1=1
+    and deleted=0
+    order by item_order
   </select>
 
   <select id="page" resultMap="BaseResultMap" parameterType="vip.xiaonuo.exam.viewmodel.admin.education.SubjectPageRequestVM">

+ 3 - 3
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/viewmodel/admin/exam/ExamResponseVM.java

@@ -14,7 +14,7 @@ public class ExamResponseVM {
 
     private String createTime;
 
-    private Integer createUser;
+    private String createUser;
 
     private Integer subjectId;
 
@@ -62,11 +62,11 @@ public class ExamResponseVM {
         this.createTime = createTime;
     }
 
-    public Integer getCreateUser() {
+    public String getCreateUser() {
         return createUser;
     }
 
-    public void setCreateUser(Integer createUser) {
+    public void setCreateUser(String createUser) {
         this.createUser = createUser;
     }