Преглед на файлове

Merge remote-tracking branch 'origin/master'

kouchengxing преди 4 години
родител
ревизия
baa4e64c5a

+ 3 - 3
dgtly-admin/src/main/java/com/dgtly/web/controller/system/SysNoticeController.java

@@ -115,11 +115,11 @@ public class SysNoticeController extends BaseController
     @ResponseBody
     public AjaxResult editSave(SysNotice notice)
     {
-        if(StringUtils.isNotEmpty(notice.getFmzFile())){
+        if(StringUtils.isNotEmpty(notice.getFmzFileUrl())){
             //获取base64文件后缀
-            String houzhui = notice.getFmzFile().split(";")[0].split("\\/")[1];
+            String houzhui = notice.getFmzFileUrl().split(";")[0].split("\\/")[1];
             //获取base64值
-            String base64 = notice.getFmzFile().substring( notice.getFmzFile().indexOf(",") + 1);
+            String base64 = notice.getFmzFileUrl().substring( notice.getFmzFileUrl().indexOf(",") + 1);
 
             //base64转文件 并返回展示url
             String fileUrl = FileUploadUtils.base64ToFile(base64,FileUploadUtils.getDefaultBaseDir()+"/content",System.currentTimeMillis()+"."+houzhui);

+ 0 - 9
dgtly-system/src/main/java/com/dgtly/system/domain/SysNotice.java

@@ -46,8 +46,6 @@ public class SysNotice extends BaseEntity
 
     private String fmzFileUrl;
 
-    private String fmzFileUrlEn;
-
     private String limitFlag;
 
 
@@ -171,13 +169,6 @@ public class SysNotice extends BaseEntity
         this.noticeContentEn = noticeContentEn;
     }
 
-    public String getFmzFileUrlEn() {
-        return fmzFileUrlEn;
-    }
-
-    public void setFmzFileUrlEn(String fmzFileUrlEn) {
-        this.fmzFileUrlEn = fmzFileUrlEn;
-    }
 
     @Override
     public String toString() {

+ 0 - 8
dgtly-system/src/main/java/com/dgtly/system/mapper/SysNoticeMapper.java

@@ -19,12 +19,10 @@ public interface SysNoticeMapper
      * @return 公告信息
      */
     @SwitchEn(oldfiles = {
-            "fmz_file_url",
             "notice_title",
             "notice_outline",
             "notice_content"
     },newfiles = {
-            "fmz_file_url_en fmz_file_url",
             "notice_title_en notice_title",
             "notice_outline_en notice_outline",
             "notice_content_en notice_content"
@@ -38,12 +36,10 @@ public interface SysNoticeMapper
      * @return 公告集合
      */
     @SwitchEn(oldfiles = {
-            "fmz_file_url",
             "notice_title",
             "notice_outline",
             "notice_content"
     },newfiles = {
-            "fmz_file_url_en fmz_file_url",
             "notice_title_en notice_title",
             "notice_outline_en notice_outline",
             "notice_content_en notice_content"
@@ -57,12 +53,10 @@ public interface SysNoticeMapper
      * @return 公告集合
      */
     @SwitchEn(oldfiles = {
-            "sn.fmz_file_url",
             "sn.notice_title",
             "sn.notice_outline",
             "sn.notice_content"
     },newfiles = {
-            "sn.fmz_file_url_en fmz_file_url",
             "sn.notice_title_en notice_title",
             "sn.notice_outline_en notice_outline",
             "sn.notice_content_en notice_content"
@@ -79,12 +73,10 @@ public interface SysNoticeMapper
      * @date: 2019-11-04 11:36
      */
     @SwitchEn(oldfiles = {
-            "fmz_file_url",
             "notice_title",
             "notice_outline",
             "notice_content"
     },newfiles = {
-            "fmz_file_url_en fmz_file_url",
             "notice_title_en notice_title",
             "notice_outline_en notice_outline",
             "notice_content_en notice_content"

+ 2 - 10
dgtly-system/src/main/java/com/dgtly/system/service/impl/SysNoticeServiceImpl.java

@@ -72,11 +72,7 @@ public class SysNoticeServiceImpl implements ISysNoticeService
         if (StringUtils.isNotEmpty(noticeContent)){
             notice.setNoticeContentEn(TranslateUtil.getDesEnTranslateInfo(noticeContent));
         }
-        //图片
-        String fmzFileUrl = notice.getFmzFileUrl();
-        if (StringUtils.isNotEmpty(fmzFileUrl)){
-            notice.setFmzFileUrlEn(fmzFileUrl);
-        }
+
         return noticeMapper.insertNotice(notice);
     }
 
@@ -104,11 +100,7 @@ public class SysNoticeServiceImpl implements ISysNoticeService
         if (StringUtils.isNotEmpty(noticeContent)){
             notice.setNoticeContentEn(TranslateUtil.getDesEnTranslateInfo(noticeContent));
         }
-        //图片
-        String fmzFileUrl = notice.getFmzFileUrl();
-        if (StringUtils.isNotEmpty(fmzFileUrl)){
-            notice.setFmzFileUrlEn(fmzFileUrl);
-        }
+
         return noticeMapper.updateNotice(notice);
     }
 

+ 1 - 5
dgtly-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
     
     <sql id="selectNoticeVo">
-        select notice_id,company_id,notice_title,notice_title_en,notice_outline,notice_outline_en, notice_type, notice_content,notice_content_en, status, create_by, fmz_file_url,fmz_file_url_en, create_time, update_by, update_time, remark
+        select notice_id,company_id,notice_title,notice_title_en,notice_outline,notice_outline_en, notice_type, notice_content,notice_content_en, status, create_by, fmz_file_url, create_time, update_by, update_time, remark
 		from sys_notice
     </sql>
 
@@ -42,7 +42,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         sn.update_time,
         sn.remark,
         sn.fmz_file_url,
-        sn.fmz_file_url_en,
         sn.create_time
 		from sys_notice sn
 		left join sys_user su on su.user_id = sn.create_by
@@ -132,7 +131,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="remark != null and remark != ''">remark,</if>
  			<if test="createBy != null and createBy != ''">create_by,</if>
             <if test="fmzFileUrl != null and fmzFileUrl != ''">fmz_file_url,</if>
-            <if test="fmzFileUrlEn != null and fmzFileUrlEn != ''">fmz_file_url_en,</if>
  			create_time
  		)values(
             <if test="companyId != null and companyId != 0">#{companyId},</if>
@@ -147,7 +145,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
             <if test="fmzFileUrl != null and fmzFileUrl != ''">#{fmzFileUrl},</if>
-            <if test="fmzFileUrlEn != null and fmzFileUrlEn != ''">#{fmzFileUrlEn},</if>
              sysdate()
 		)
     </insert>
@@ -164,7 +161,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="noticeContentEn != null">notice_content_en = #{noticeContentEn}, </if>
             <if test="status != null and status != ''">status = #{status}, </if>
             <if test="fmzFileUrl != null and fmzFileUrl != ''">fmz_file_url = #{fmzFileUrl}, </if>
-            <if test="fmzFileUrlEn != null and fmzFileUrlEn != ''">fmz_file_url_en = #{fmzFileUrlEn}, </if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  			update_time = sysdate()
         </set>