Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

周箭河 5 lat temu
rodzic
commit
5d80ff8e52

+ 4 - 4
mec-biz/src/main/resources/config/mybatis/StudentRepairMapper.xml

@@ -176,23 +176,23 @@
             <if test="studentId != null">
                 AND sr.student_id_ = #{studentId}
             </if>
-            <if test="organIdList != null">
+            <if test="organIdList != null and organIdList != ''">
                 AND FIND_IN_SET(sr.organ_id_,#{organIdList})
             </if>
             <if test="subjectId != null">
                 AND sr.subject_id_ = #{subjectId}
             </if>
             <if test="type != null">
-                AND sr.type = #{type}
+                AND sr.type_ = #{type}
             </if>
             <if test="repairStatus != null">
                 AND sr.repair_status_ = #{repairStatus}
             </if>
             <if test="startTime != null">
-                AND sr.create_time_ >= #{startTime}
+                AND sr.finish_time_ >= #{startTime}
             </if>
             <if test="endTime != null">
-                AND sr.create_time_ &lt;= #{endTime}
+                AND sr.finish_time_ &lt;= #{endTime}
             </if>
         </where>
     </sql>

+ 8 - 3
mec-web/src/main/java/com/ym/mec/web/controller/ExtracurricularExercisesReplyController.java

@@ -11,6 +11,7 @@ import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -55,10 +56,14 @@ public class ExtracurricularExercisesReplyController extends BaseController {
     }
 
     @GetMapping("/exercisesSituationStatistics")
-    public HttpResponseResult exercisesSituationStatistics(){
-        String[] mondays=new String[]{"2020-03-30","2020-04-06","2020-04-13","2020-04-20","2020-04-27"};
-        for (String monday : mondays) {
+    public HttpResponseResult exercisesSituationStatistics(String monday){
+        if(StringUtils.isNotBlank(monday)){
             extracurricularExercisesReplyService.exercisesSituationStatistics2(monday);
+        }else{
+            String[] mondays=new String[]{"2020-03-30","2020-04-06","2020-04-13","2020-04-20","2020-04-27"};
+            for (String mondayStr : mondays) {
+                extracurricularExercisesReplyService.exercisesSituationStatistics2(mondayStr);
+            }
         }
         return succeed();
     }