Forráskód Böngészése

复制模板用后创建时间设置为系统当前时间,看课记录筛选档期不匹配,上传文件不显示文件名

xw 2 hónapja
szülő
commit
68f3f5df02

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/common/CommonController.java

@@ -208,7 +208,7 @@ public class CommonController
         String prefix = fileName.substring(0, fileName.lastIndexOf("."));
         CloudStorageService storage = OSSFactory.build();
         String url = storage.upload(file.getBytes(), prefix+System.currentTimeMillis()+suffix);
-        return R.ok().put("url",url);
+        return R.ok().put("url",url).put("fileName",fileName);
     }
 
     @PostMapping("common/uploadOSSByHOOKImage")

+ 2 - 0
fs-service/src/main/java/com/fs/course/param/FsCourseWatchLogListParam.java

@@ -69,6 +69,8 @@ public class FsCourseWatchLogListParam implements Serializable {
 
     private List<Long> periodIds;//训练营期ID
 
+    private Long periodId;//单个营期ID
+
     private String customPageStr;
 
     private Long lastId;

+ 4 - 0
fs-service/src/main/java/com/fs/sop/service/impl/QwSopTempServiceImpl.java

@@ -361,6 +361,10 @@ public class QwSopTempServiceImpl implements IQwSopTempService
             qwSopTemp.setIsTop(0);
         }
         
+        // 设置创建时间为当前系统时间
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        qwSopTemp.setCreateTime(sdf.format(new Date()));
+        
         qwSopTempMapper.insertQwSopTemp(qwSopTemp);
         List<QwSopTempDay> dayList = qwSopTempRulesService.listByTempIdAll(oldId);
         if(dayList.isEmpty()) return;

+ 1 - 1
fs-service/src/main/resources/application-druid-bjczwh-test.yml

@@ -94,7 +94,7 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                    url: jdbc:mysql://1.95.177.188:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    url: jdbc:mysql://1.95.177.188:3306/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                     username: czwh
                     password: Ylrz_1q2w3e4r5t6y
                 # 初始连接数

+ 6 - 0
fs-service/src/main/resources/mapper/course/FsCourseWatchLogMapper.xml

@@ -159,6 +159,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and l.sop_id = #{maps.sopId}
             </if>
 
+            <if test="maps.periodId != null">
+                and l.period_id = #{maps.periodId}
+            </if>
             <if test="maps.periodIds != null and maps.periodIds.size() > 0">
                 and l.period_id in
                 <foreach item="periodId" index="index" collection="maps.periodIds" open="(" separator="," close=")">
@@ -244,6 +247,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                     #{sopId}
                 </foreach>
             </if>
+            <if test="periodId != null">
+                and l.period_id = #{periodId}
+            </if>
         </where>
         order by l.log_id desc
     </select>