浏览代码

3.3bug修改需求增加

master
zhuoyang.xing 2 个月前
父节点
当前提交
e490f1f8e9
共有 22 个文件被更改,包括 267 次插入54 次删除
  1. 3
    9
      templates/index.ftl
  2. 1
    1
      templates/join.ftl
  3. 1
    1
      templates/news.ftl
  4. 1
    1
      templates/product.ftl
  5. 17
    38
      webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/controller/StaticizeController.java
  6. 23
    0
      webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/domain/Introduce.java
  7. 2
    0
      webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/mapper/master/StaticizeMapper.java
  8. 2
    0
      webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/service/StaticizeService.java
  9. 5
    0
      webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/service/impl/StaticizeServiceImpl.java
  10. 14
    2
      webstudio-modules/webstudio-modules-staticize/src/main/resources/mapper/system/StaticizeMapper.xml
  11. 6
    1
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/controller/BannerController.java
  12. 50
    0
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/controller/IntroduceController.java
  13. 11
    0
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/domain/Banner.java
  14. 23
    0
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/domain/Introduce.java
  15. 1
    0
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/mapper/master/BannerMapper.java
  16. 11
    0
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/mapper/master/IntroduceMapper.java
  17. 1
    0
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/service/BannerService.java
  18. 13
    0
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/service/IntroduceService.java
  19. 5
    0
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/service/impl/BannerServiceImpl.java
  20. 26
    0
      webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/service/impl/IntroduceServiceImpl.java
  21. 27
    1
      webstudio-modules/webstudio-modules-system/src/main/resources/mapper/system/BannerMapper.xml
  22. 24
    0
      webstudio-modules/webstudio-modules-system/src/main/resources/mapper/system/IntroduceMapper.xml

+ 3
- 9
templates/index.ftl 查看文件

@@ -3,7 +3,7 @@
3 3
 <head>
4 4
     <meta charset="utf-8"/>
5 5
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
6
-    <title>${TDK.title}走进中泽</title>
6
+    <title>${TDK.title!''}走进中泽</title>
7 7
     <meta name="description" content="${TDK.digest!''}"/>
8 8
     <meta name="Keywords" content="${TDK.key!''}"/>
9 9
     <meta content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width" name="viewport"/>
@@ -24,14 +24,8 @@
24 24
                 <#--                首页轮播-->
25 25
 
26 26
                 <#list bannerList as banner>
27
-                    <div class="swiper-slide <#if banner_index == 0>bannerS1</#if>">
27
+                    <div class="swiper-slide">
28 28
                         <#if banner_index == 0>
29
-                            <img
30
-                                    class="lazy"
31
-                                    data-src="${banner.mImgUrl!''}"
32
-                                    data-srcM="${banner.mImgUrl!''}"
33
-                                    alt=""
34
-                            />
35 29
                             <video
36 30
                                     class="lazy"
37 31
                                     data-src="${banner.pcImgUrl!''}"
@@ -63,7 +57,7 @@
63 57
     </div>
64 58
     <div class="wow fadeInUp product" id="jtjs">
65 59
         <div class="wow fadeInUp title" data-wow-delay="0.2s">集团介绍</div>
66
-        <div class="wow fadeInUp text">中泽控股集团股份有限公司是以投资并购和企业运营为核心业务的大型民营集团,创建于1995年,总部位于北京,员工1.8万人。集团将整合现有资源,着力发展铁合金、炭素、钼业、镍业、产业互联网、化工、和大消费七大产业集群。</div>
60
+        <div class="wow fadeInUp text">${introduce.introduceMsg!''}</div>
67 61
         <div class="productCon">
68 62
             <div class="wow fadeInUp productTits">
69 63
                 <div>

+ 1
- 1
templates/join.ftl 查看文件

@@ -3,7 +3,7 @@
3 3
 <head>
4 4
     <meta charset="utf-8"/>
5 5
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
6
-    <title>${TDK.title}加入中泽</title>
6
+    <title>${TDK.title!''}加入中泽</title>
7 7
     <meta name="description" content=""/>
8 8
     <meta name="Keywords" content=""/>
9 9
     <meta content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width" name="viewport"/>

+ 1
- 1
templates/news.ftl 查看文件

@@ -3,7 +3,7 @@
3 3
 <head>
4 4
     <meta charset="utf-8"/>
5 5
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
6
-    <title>${TDK.title}新闻动态</title>
6
+    <title>${TDK.title!''}新闻动态</title>
7 7
     <meta name="description" content="${TDK.digest!''}"/>
8 8
     <meta name="Keywords" content="${TDK.key!''}"/>
9 9
     <meta content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width" name="viewport"/>

+ 1
- 1
templates/product.ftl 查看文件

@@ -3,7 +3,7 @@
3 3
 <head>
4 4
     <meta charset="utf-8"/>
5 5
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
6
-    <title>${TDK.title}产业布局</title>
6
+    <title>${TDK.title!''}产业布局</title>
7 7
     <meta name="description" content="${TDK.digest!''}"/>
8 8
     <meta name="Keywords" content="${TDK.key!''}"/>
9 9
     <meta content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width" name="viewport"/>

+ 17
- 38
webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/controller/StaticizeController.java 查看文件

@@ -59,6 +59,10 @@ public class StaticizeController {
59 59
             banner.setTitleList(titleList);
60 60
         }
61 61
         map.put("bannerList",bannerList);
62
+
63
+        //首页集团介绍
64
+        Introduce introduce = staticizeService.selectIntroduce();
65
+        map.put("introduce",introduce);
62 66
         //首页新闻
63 67
         List<Map> indexNewsList = staticizeService.getIndexNews();
64 68
         map.put("indexNewsList",indexNewsList);
@@ -106,36 +110,8 @@ public class StaticizeController {
106 110
     @GetMapping("/intoTime")
107 111
     @ApiOperation(value = "发展历程", httpMethod = "GET")
108 112
     public AjaxResult intoTime(){
109
-        Map map = getFooter();
110
-        //首页轮播图
111
-        List<Banner> bannerList = staticizeService.selectBanner();
112
-        for (Banner banner:
113
-                bannerList) {
114
-            //tile换行
115
-            List<String> titleList = new ArrayList<>();
116
-            if(StringUtils.isNotBlank(banner.getTitle())){
117
-                String[] split = banner.getTitle().split("@");
118
-                for (int i = 0; i < split.length; i++) {
119
-                    titleList.add(split[i]);
120
-                }
121
-            }
122
-            banner.setTitleList(titleList);
123
-        }
124
-        map.put("bannerList",bannerList);
125
-        //首页新闻
126
-        List<Map> indexNewsList = staticizeService.getIndexNews();
127
-        map.put("indexNewsList",indexNewsList);
128
-        //发展历程
129
-        Map dhMap = staticizeService.getHistoryData();
130
-        map.put("dhMap",dhMap);
131
-        //seo
132
-        map.put("TDK",getSeo("index"));
133
-        // html名字
134
-        map.put("fileName", "index");
135
-        // 模板
136
-        map.put("template", "index.ftl");
137 113
         try {
138
-            staticizeService.pushHtml(map, "");
114
+            index();//首页
139 115
             return AjaxResult.success("发布成功");
140 116
         }catch (Exception e){
141 117
             return AjaxResult.error("发布失败"+e.getMessage());
@@ -432,17 +408,20 @@ public class StaticizeController {
432 408
                 map.put("article", news);
433 409
                 map.put("type", "news");
434 410
                 //判断是否有上一页
435
-                Map otherMap = new HashMap();
436
-                if (i == 0 && list.size() > 1){
437
-                    otherMap.put("nextNew",list.get(1));
438
-                }else {
439
-                    otherMap.put("upNew",list.get(i-1));
440
-                    if (i < list.size()-1){
441
-                        otherMap.put("nextNew",list.get(i+1));
442
-                    }
411
+                if (list.size() > 1){
412
+                    Map otherMap = new HashMap();
413
+                    if (i == 0 && list.size() > 1){
414
+                        otherMap.put("nextNew",list.get(1));
415
+                    }else {
416
+                        otherMap.put("upNew",list.get(i-1));
417
+                        if (i < list.size()-1){
418
+                            otherMap.put("nextNew",list.get(i+1));
419
+                        }
443 420
 
421
+                    }
422
+                    map.put("otherNews",otherMap);
444 423
                 }
445
-                map.put("otherNews",otherMap);
424
+
446 425
                 // html名字
447 426
                 map.put("fileName", news.getUuid());
448 427
                 // 模板

+ 23
- 0
webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/domain/Introduce.java 查看文件

@@ -0,0 +1,23 @@
1
+package com.webstudio.staticize.domain;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+
5
+/**
6
+ * @ClassName Introduce
7
+ * @Description TODO
8
+ * @Author xzy
9
+ * @Date 2025/3/3
10
+ * @Version 1.0
11
+ **/
12
+@TableName("introduce")
13
+public class Introduce {
14
+    private String introduceMsg;
15
+
16
+    public String getIntroduceMsg() {
17
+        return introduceMsg;
18
+    }
19
+
20
+    public void setIntroduceMsg(String introduceMsg) {
21
+        this.introduceMsg = introduceMsg;
22
+    }
23
+}

+ 2
- 0
webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/mapper/master/StaticizeMapper.java 查看文件

@@ -51,4 +51,6 @@ public interface StaticizeMapper {
51 51
                           @Param("suffer")String suffer);
52 52
 
53 53
     List<ProductMember> getProductMemberList();
54
+
55
+    Introduce selectIntroduce();
54 56
 }

+ 2
- 0
webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/service/StaticizeService.java 查看文件

@@ -50,4 +50,6 @@ public interface StaticizeService {
50 50
     void updatePushStatus(String uuid, String table, String suffer);
51 51
 
52 52
     List<ProductMember> getProductMemberList();
53
+
54
+    Introduce selectIntroduce();
53 55
 }

+ 5
- 0
webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/service/impl/StaticizeServiceImpl.java 查看文件

@@ -312,6 +312,11 @@ public class StaticizeServiceImpl implements StaticizeService {
312 312
         return productMembers;
313 313
     }
314 314
 
315
+    @Override
316
+    public Introduce selectIntroduce() {
317
+        return staticizeMapper.selectIntroduce();
318
+    }
319
+
315 320
     //荣誉资质证书
316 321
     private List<HonorCertificate> getHonorCertificate(String honorUuid) {
317 322
         List<HonorCertificate> certificateList = staticizeMapper.getHonorCertificate(honorUuid);

+ 14
- 2
webstudio-modules/webstudio-modules-staticize/src/main/resources/mapper/system/StaticizeMapper.xml 查看文件

@@ -12,6 +12,8 @@
12 12
         <result property="pcImg" column="banner_pc_img"/>
13 13
         <result property="mImg" column="banner_m_img"/>
14 14
         <result property="sort" column="banner_sort"/>
15
+        <result property="pcImgUrl" column="pc_img_url"/>
16
+        <result property="mImgUrl" column="m_img_url"/>
15 17
     </resultMap>
16 18
 <!--    修改文章状态-->
17 19
     <update id="updatePushStatus">
@@ -19,7 +21,7 @@
19 21
     </update>
20 22
     <!--    首页轮播图-->
21 23
     <select id="selectBanner" resultMap="BannerResult">
22
-        select banner_title,banner_digest,banner_pc_img,banner_m_img
24
+        select banner_title,banner_digest,banner_pc_img,banner_m_img,pc_img_url,m_img_url
23 25
         from banner
24 26
         order by banner_sort
25 27
     </select>
@@ -57,7 +59,7 @@
57 59
     <!--    新闻列表-->
58 60
     <select id="getNewsByParm" resultMap="NewsResult">
59 61
         select news_uuid,news_push_status,news_title,news_column,news_date,
60
-               news_surface,news_digest,news_key,news_content,create_time,news_viev_num,news_source,news_top
62
+               news_surface,news_digest,news_key,news_content,create_time,news_viev_num,news_source,news_top,
61 63
             YEAR(news_date) as year,
62 64
             LPAD(MONTH(news_date),2,0) as month ,
63 65
             LPAD(DAY(news_date),2,0) as day
@@ -349,4 +351,14 @@
349 351
         order by member_sort asc
350 352
     </select>
351 353
 
354
+
355
+    <resultMap type="com.webstudio.staticize.domain.Introduce" id="IntroduceResult">
356
+        <result property="introduceMsg" column="introduce_msg"/>
357
+    </resultMap>
358
+
359
+    <select id="selectIntroduce" resultMap="IntroduceResult">
360
+        select introduce_msg
361
+        from introduce
362
+    </select>
363
+
352 364
 </mapper>

+ 6
- 1
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/controller/BannerController.java 查看文件

@@ -46,7 +46,12 @@ public class BannerController extends BaseController {
46 46
                 banner.setUuid(String.valueOf(UuidUtils.getGuid()));
47 47
                 bannerService.insertBanner(banner);
48 48
             } else {
49
-                bannerService.updateBanner(banner);
49
+                if (banner.getUpMode() == 1){
50
+                    bannerService.updateBannerLink(banner);
51
+                }else {
52
+                    bannerService.updateBanner(banner);
53
+                }
54
+
50 55
             }
51 56
             return AjaxResult.success(ReMsg.success());
52 57
         }catch (Exception e){

+ 50
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/controller/IntroduceController.java 查看文件

@@ -0,0 +1,50 @@
1
+package com.webstudio.system.controller;
2
+
3
+import com.webstudio.common.core.tool.ReMsg;
4
+import com.webstudio.common.core.web.domain.AjaxResult;
5
+import com.webstudio.common.log.annotation.Log;
6
+import com.webstudio.common.log.enums.BusinessType;
7
+import com.webstudio.system.domain.Introduce;
8
+import com.webstudio.system.service.IntroduceService;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.*;
13
+
14
+/**
15
+ * @ClassName IntroduceController
16
+ * @Description TODO 集团介绍
17
+ * @Author xzy
18
+ * @Date 2025/3/3
19
+ * @Version 1.0
20
+ **/
21
+@RestController
22
+@RequestMapping("/introduce")
23
+@Api(value = "首页集团介绍",tags = "首页集团介绍")
24
+public class IntroduceController {
25
+
26
+    @Autowired
27
+    private IntroduceService introduceService;
28
+
29
+    @GetMapping("/selectIntroduce")
30
+    @ApiOperation(value = "查询",httpMethod = "GET")
31
+    public AjaxResult selectBanner(){
32
+        Introduce introduce = introduceService.selectIntroduce();
33
+        return AjaxResult.success(introduce);
34
+    }
35
+
36
+    @PostMapping("/saveIntroduce")
37
+    @Log(title = "首页焦点图", businessType = BusinessType.UPDATE)
38
+    @ApiOperation(value = "新增、编辑",httpMethod = "POST")
39
+    public AjaxResult saveIntroduce(@RequestBody Introduce introduce)
40
+    {
41
+        try {
42
+
43
+            introduceService.saveIntroduce(introduce);
44
+
45
+            return AjaxResult.success(ReMsg.success());
46
+        }catch (Exception e){
47
+            return AjaxResult.error(ReMsg.error());
48
+        }
49
+    }
50
+}

+ 11
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/domain/Banner.java 查看文件

@@ -31,6 +31,9 @@ public class Banner {
31 31
     @ApiModelProperty(value = "排序")
32 32
     private String sort;
33 33
 
34
+    @ApiModelProperty(value = "上传方式0:文件上传1:链接")
35
+    private Integer upMode;
36
+
34 37
     public String getUuid() {
35 38
         return uuid;
36 39
     }
@@ -94,4 +97,12 @@ public class Banner {
94 97
     public void setSort(String sort) {
95 98
         this.sort = sort;
96 99
     }
100
+
101
+    public Integer getUpMode() {
102
+        return upMode;
103
+    }
104
+
105
+    public void setUpMode(Integer upMode) {
106
+        this.upMode = upMode;
107
+    }
97 108
 }

+ 23
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/domain/Introduce.java 查看文件

@@ -0,0 +1,23 @@
1
+package com.webstudio.system.domain;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+
5
+/**
6
+ * @ClassName Introduce
7
+ * @Description TODO
8
+ * @Author xzy
9
+ * @Date 2025/3/3
10
+ * @Version 1.0
11
+ **/
12
+@TableName("introduce")
13
+public class Introduce {
14
+    private String introduceMsg;
15
+
16
+    public String getIntroduceMsg() {
17
+        return introduceMsg;
18
+    }
19
+
20
+    public void setIntroduceMsg(String introduceMsg) {
21
+        this.introduceMsg = introduceMsg;
22
+    }
23
+}

+ 1
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/mapper/master/BannerMapper.java 查看文件

@@ -14,4 +14,5 @@ public interface BannerMapper {
14 14
 
15 15
     void deleteBanner(String uuid);
16 16
 
17
+    void updateBannerLink(Banner banner);
17 18
 }

+ 11
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/mapper/master/IntroduceMapper.java 查看文件

@@ -0,0 +1,11 @@
1
+package com.webstudio.system.mapper.master;
2
+
3
+import com.webstudio.system.domain.Introduce;
4
+
5
+
6
+public interface IntroduceMapper {
7
+    public Introduce selectIntroduce();
8
+
9
+    public void saveIntroduce(Introduce introduce);
10
+
11
+}

+ 1
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/service/BannerService.java 查看文件

@@ -13,4 +13,5 @@ public interface BannerService {
13 13
 
14 14
     void deleteBanner(String bannerUuid);
15 15
 
16
+    void updateBannerLink(Banner banner);
16 17
 }

+ 13
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/service/IntroduceService.java 查看文件

@@ -0,0 +1,13 @@
1
+package com.webstudio.system.service;
2
+
3
+import com.webstudio.system.domain.Introduce;
4
+
5
+
6
+public interface IntroduceService {
7
+    /*
8
+     * 集团介绍
9
+     */
10
+    Introduce selectIntroduce();
11
+
12
+    void saveIntroduce(Introduce introduce);
13
+}

+ 5
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/service/impl/BannerServiceImpl.java 查看文件

@@ -50,4 +50,9 @@ public class BannerServiceImpl implements BannerService {
50 50
     public void deleteBanner(String bannerUuid) {
51 51
         bannerMapper.deleteBanner(bannerUuid);
52 52
     }
53
+
54
+    @Override
55
+    public void updateBannerLink(Banner banner) {
56
+        bannerMapper.updateBannerLink(banner);
57
+    }
53 58
 }

+ 26
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/service/impl/IntroduceServiceImpl.java 查看文件

@@ -0,0 +1,26 @@
1
+package com.webstudio.system.service.impl;
2
+
3
+
4
+import com.webstudio.system.domain.Introduce;
5
+import com.webstudio.system.mapper.master.IntroduceMapper;
6
+import com.webstudio.system.service.IntroduceService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+
10
+
11
+@Service
12
+public class IntroduceServiceImpl implements IntroduceService {
13
+    @Autowired
14
+    private IntroduceMapper introduceMapper;
15
+
16
+
17
+    @Override
18
+    public Introduce selectIntroduce() {
19
+        return introduceMapper.selectIntroduce();
20
+    }
21
+
22
+    @Override
23
+    public void saveIntroduce(Introduce introduce) {
24
+        introduceMapper.saveIntroduce(introduce);
25
+    }
26
+}

+ 27
- 1
webstudio-modules/webstudio-modules-system/src/main/resources/mapper/system/BannerMapper.xml 查看文件

@@ -11,6 +11,9 @@
11 11
         <result property="pcImg" column="banner_pc_img"/>
12 12
         <result property="mImg" column="banner_m_img"/>
13 13
         <result property="sort" column="banner_sort"/>
14
+        <result property="upMode" column="up_mode"/>
15
+        <result property="pcImgUrl" column="pc_img_url"/>
16
+        <result property="mImgUrl" column="m_img_url"/>
14 17
     </resultMap>
15 18
 
16 19
     <sql id="selectBannerVo">
@@ -26,6 +29,9 @@
26 29
         <if test="pcImg != null and pcImg != ''">,banner_pc_img</if>
27 30
         <if test="mImg != null and mImg != ''">,banner_m_img</if>
28 31
         <if test="sort != null">,banner_sort</if>
32
+        <if test="upMode != null">,up_mode</if>
33
+        <if test="pcImgUrl != null and pcImgUrl != ''">,pc_img_url</if>
34
+        <if test="mImgUrl != null and mImgUrl != ''">,m_img_url</if>
29 35
         ) values (
30 36
         <if test="uuid != null and uuid != ''">#{uuid}</if>
31 37
         <if test="title != null and title != ''">,#{title}</if>
@@ -33,6 +39,9 @@
33 39
         <if test="pcImg != null and pcImg != ''">,#{pcImg}</if>
34 40
         <if test="mImg != null and mImg != ''">,#{mImg}</if>
35 41
         <if test="sort != null">,#{sort}</if>
42
+        <if test="upMode != null">,#{upMode}</if>
43
+        <if test="pcImgUrl != null and pcImgUrl != ''">,#{pcImgUrl}</if>
44
+        <if test="mImgUrl != null and mImgUrl != ''">,#{mImgUrl}</if>
36 45
         )
37 46
     </insert>
38 47
 
@@ -44,6 +53,23 @@
44 53
             <if test="pcImg != null">banner_pc_img = #{pcImg},</if>
45 54
             <if test="mImg != null">banner_m_img = #{mImg},</if>
46 55
             <if test="sort != null">banner_sort = #{sort},</if>
56
+            <if test="upMode != null">up_mode = #{upMode},</if>
57
+            <if test="pcImgUrl != null">pc_img_url = #{pcImgUrl},</if>
58
+            <if test="mImgUrl != null">m_img_url = #{mImgUrl},</if>
59
+            pc_img_url = null, m_img_url = null
60
+        </set>
61
+        where banner_uuid = #{uuid}
62
+    </update>
63
+    <update id="updateBannerLink" parameterType="com.webstudio.system.domain.Banner">
64
+        update banner
65
+        <set>
66
+            <if test="title != null">banner_title = #{title},</if>
67
+            <if test="digest != null">banner_digest = #{digest},</if>
68
+            <if test="sort != null">banner_sort = #{sort},</if>
69
+            <if test="upMode != null">up_mode = #{upMode},</if>
70
+            <if test="pcImgUrl != null">pc_img_url = #{pcImgUrl},</if>
71
+            <if test="mImgUrl != null">m_img_url = #{mImgUrl},</if>
72
+            banner_pc_img = null, banner_m_img = null
47 73
         </set>
48 74
         where banner_uuid = #{uuid}
49 75
     </update>
@@ -53,7 +79,7 @@
53 79
     </delete>
54 80
 
55 81
     <select id="selectBanner" resultMap="BannerResult" parameterType="com.webstudio.system.domain.Banner">
56
-        select banner_uuid,banner_title,banner_digest,banner_pc_img,banner_m_img,banner_sort
82
+        select banner_uuid,banner_title,banner_digest,banner_pc_img,banner_m_img,banner_sort,up_mode,pc_img_url,m_img_url
57 83
         from banner
58 84
         order by banner_sort
59 85
     </select>

+ 24
- 0
webstudio-modules/webstudio-modules-system/src/main/resources/mapper/system/IntroduceMapper.xml 查看文件

@@ -0,0 +1,24 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.webstudio.system.mapper.master.IntroduceMapper">
6
+
7
+    <resultMap type="com.webstudio.system.domain.Introduce" id="IntroduceResult">
8
+        <result property="introduceMsg" column="introduce_msg"/>
9
+    </resultMap>
10
+
11
+
12
+    <update id="saveIntroduce" parameterType="com.webstudio.system.domain.Introduce">
13
+        update introduce
14
+        <set>
15
+            <if test="introduceMsg != null">introduce_msg = #{introduceMsg}</if>
16
+        </set>
17
+    </update>
18
+
19
+    <select id="selectIntroduce" resultMap="IntroduceResult">
20
+        select introduce_msg
21
+        from introduce
22
+    </select>
23
+
24
+</mapper>

正在加载...
取消
保存