Browse Source

3.3bug修改需求增加

master
zhuoyang.xing 2 months ago
parent
commit
e490f1f8e9
22 changed files with 267 additions and 54 deletions
  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 View File

3
 <head>
3
 <head>
4
     <meta charset="utf-8"/>
4
     <meta charset="utf-8"/>
5
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
5
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
6
-    <title>${TDK.title}走进中泽</title>
6
+    <title>${TDK.title!''}走进中泽</title>
7
     <meta name="description" content="${TDK.digest!''}"/>
7
     <meta name="description" content="${TDK.digest!''}"/>
8
     <meta name="Keywords" content="${TDK.key!''}"/>
8
     <meta name="Keywords" content="${TDK.key!''}"/>
9
     <meta content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width" name="viewport"/>
9
     <meta content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width" name="viewport"/>
24
                 <#--                首页轮播-->
24
                 <#--                首页轮播-->
25
 
25
 
26
                 <#list bannerList as banner>
26
                 <#list bannerList as banner>
27
-                    <div class="swiper-slide <#if banner_index == 0>bannerS1</#if>">
27
+                    <div class="swiper-slide">
28
                         <#if banner_index == 0>
28
                         <#if banner_index == 0>
29
-                            <img
30
-                                    class="lazy"
31
-                                    data-src="${banner.mImgUrl!''}"
32
-                                    data-srcM="${banner.mImgUrl!''}"
33
-                                    alt=""
34
-                            />
35
                             <video
29
                             <video
36
                                     class="lazy"
30
                                     class="lazy"
37
                                     data-src="${banner.pcImgUrl!''}"
31
                                     data-src="${banner.pcImgUrl!''}"
63
     </div>
57
     </div>
64
     <div class="wow fadeInUp product" id="jtjs">
58
     <div class="wow fadeInUp product" id="jtjs">
65
         <div class="wow fadeInUp title" data-wow-delay="0.2s">集团介绍</div>
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
         <div class="productCon">
61
         <div class="productCon">
68
             <div class="wow fadeInUp productTits">
62
             <div class="wow fadeInUp productTits">
69
                 <div>
63
                 <div>

+ 1
- 1
templates/join.ftl View File

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

+ 1
- 1
templates/news.ftl View File

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

+ 1
- 1
templates/product.ftl View File

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

59
             banner.setTitleList(titleList);
59
             banner.setTitleList(titleList);
60
         }
60
         }
61
         map.put("bannerList",bannerList);
61
         map.put("bannerList",bannerList);
62
+
63
+        //首页集团介绍
64
+        Introduce introduce = staticizeService.selectIntroduce();
65
+        map.put("introduce",introduce);
62
         //首页新闻
66
         //首页新闻
63
         List<Map> indexNewsList = staticizeService.getIndexNews();
67
         List<Map> indexNewsList = staticizeService.getIndexNews();
64
         map.put("indexNewsList",indexNewsList);
68
         map.put("indexNewsList",indexNewsList);
106
     @GetMapping("/intoTime")
110
     @GetMapping("/intoTime")
107
     @ApiOperation(value = "发展历程", httpMethod = "GET")
111
     @ApiOperation(value = "发展历程", httpMethod = "GET")
108
     public AjaxResult intoTime(){
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
         try {
113
         try {
138
-            staticizeService.pushHtml(map, "");
114
+            index();//首页
139
             return AjaxResult.success("发布成功");
115
             return AjaxResult.success("发布成功");
140
         }catch (Exception e){
116
         }catch (Exception e){
141
             return AjaxResult.error("发布失败"+e.getMessage());
117
             return AjaxResult.error("发布失败"+e.getMessage());
432
                 map.put("article", news);
408
                 map.put("article", news);
433
                 map.put("type", "news");
409
                 map.put("type", "news");
434
                 //判断是否有上一页
410
                 //判断是否有上一页
435
-                Map otherMap = new HashMap();
411
+                if (list.size() > 1){
436
-                if (i == 0 && list.size() > 1){
412
+                    Map otherMap = new HashMap();
437
-                    otherMap.put("nextNew",list.get(1));
413
+                    if (i == 0 && list.size() > 1){
438
-                }else {
414
+                        otherMap.put("nextNew",list.get(1));
439
-                    otherMap.put("upNew",list.get(i-1));
415
+                    }else {
440
-                    if (i < list.size()-1){
416
+                        otherMap.put("upNew",list.get(i-1));
441
-                        otherMap.put("nextNew",list.get(i+1));
417
+                        if (i < list.size()-1){
442
-                    }
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
                 // html名字
425
                 // html名字
447
                 map.put("fileName", news.getUuid());
426
                 map.put("fileName", news.getUuid());
448
                 // 模板
427
                 // 模板

+ 23
- 0
webstudio-modules/webstudio-modules-staticize/src/main/java/com/webstudio/staticize/domain/Introduce.java View File

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 View File

51
                           @Param("suffer")String suffer);
51
                           @Param("suffer")String suffer);
52
 
52
 
53
     List<ProductMember> getProductMemberList();
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 View File

50
     void updatePushStatus(String uuid, String table, String suffer);
50
     void updatePushStatus(String uuid, String table, String suffer);
51
 
51
 
52
     List<ProductMember> getProductMemberList();
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 View File

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

+ 14
- 2
webstudio-modules/webstudio-modules-staticize/src/main/resources/mapper/system/StaticizeMapper.xml View File

12
         <result property="pcImg" column="banner_pc_img"/>
12
         <result property="pcImg" column="banner_pc_img"/>
13
         <result property="mImg" column="banner_m_img"/>
13
         <result property="mImg" column="banner_m_img"/>
14
         <result property="sort" column="banner_sort"/>
14
         <result property="sort" column="banner_sort"/>
15
+        <result property="pcImgUrl" column="pc_img_url"/>
16
+        <result property="mImgUrl" column="m_img_url"/>
15
     </resultMap>
17
     </resultMap>
16
 <!--    修改文章状态-->
18
 <!--    修改文章状态-->
17
     <update id="updatePushStatus">
19
     <update id="updatePushStatus">
19
     </update>
21
     </update>
20
     <!--    首页轮播图-->
22
     <!--    首页轮播图-->
21
     <select id="selectBanner" resultMap="BannerResult">
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
         from banner
25
         from banner
24
         order by banner_sort
26
         order by banner_sort
25
     </select>
27
     </select>
57
     <!--    新闻列表-->
59
     <!--    新闻列表-->
58
     <select id="getNewsByParm" resultMap="NewsResult">
60
     <select id="getNewsByParm" resultMap="NewsResult">
59
         select news_uuid,news_push_status,news_title,news_column,news_date,
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
             YEAR(news_date) as year,
63
             YEAR(news_date) as year,
62
             LPAD(MONTH(news_date),2,0) as month ,
64
             LPAD(MONTH(news_date),2,0) as month ,
63
             LPAD(DAY(news_date),2,0) as day
65
             LPAD(DAY(news_date),2,0) as day
349
         order by member_sort asc
351
         order by member_sort asc
350
     </select>
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
 </mapper>
364
 </mapper>

+ 6
- 1
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/controller/BannerController.java View File

46
                 banner.setUuid(String.valueOf(UuidUtils.getGuid()));
46
                 banner.setUuid(String.valueOf(UuidUtils.getGuid()));
47
                 bannerService.insertBanner(banner);
47
                 bannerService.insertBanner(banner);
48
             } else {
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
             return AjaxResult.success(ReMsg.success());
56
             return AjaxResult.success(ReMsg.success());
52
         }catch (Exception e){
57
         }catch (Exception e){

+ 50
- 0
webstudio-modules/webstudio-modules-system/src/main/java/com/webstudio/system/controller/IntroduceController.java View File

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 View File

31
     @ApiModelProperty(value = "排序")
31
     @ApiModelProperty(value = "排序")
32
     private String sort;
32
     private String sort;
33
 
33
 
34
+    @ApiModelProperty(value = "上传方式0:文件上传1:链接")
35
+    private Integer upMode;
36
+
34
     public String getUuid() {
37
     public String getUuid() {
35
         return uuid;
38
         return uuid;
36
     }
39
     }
94
     public void setSort(String sort) {
97
     public void setSort(String sort) {
95
         this.sort = sort;
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 View File

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 View File

14
 
14
 
15
     void deleteBanner(String uuid);
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 View File

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 View File

13
 
13
 
14
     void deleteBanner(String bannerUuid);
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 View File

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 View File

50
     public void deleteBanner(String bannerUuid) {
50
     public void deleteBanner(String bannerUuid) {
51
         bannerMapper.deleteBanner(bannerUuid);
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 View File

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 View File

11
         <result property="pcImg" column="banner_pc_img"/>
11
         <result property="pcImg" column="banner_pc_img"/>
12
         <result property="mImg" column="banner_m_img"/>
12
         <result property="mImg" column="banner_m_img"/>
13
         <result property="sort" column="banner_sort"/>
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
     </resultMap>
17
     </resultMap>
15
 
18
 
16
     <sql id="selectBannerVo">
19
     <sql id="selectBannerVo">
26
         <if test="pcImg != null and pcImg != ''">,banner_pc_img</if>
29
         <if test="pcImg != null and pcImg != ''">,banner_pc_img</if>
27
         <if test="mImg != null and mImg != ''">,banner_m_img</if>
30
         <if test="mImg != null and mImg != ''">,banner_m_img</if>
28
         <if test="sort != null">,banner_sort</if>
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
         ) values (
35
         ) values (
30
         <if test="uuid != null and uuid != ''">#{uuid}</if>
36
         <if test="uuid != null and uuid != ''">#{uuid}</if>
31
         <if test="title != null and title != ''">,#{title}</if>
37
         <if test="title != null and title != ''">,#{title}</if>
33
         <if test="pcImg != null and pcImg != ''">,#{pcImg}</if>
39
         <if test="pcImg != null and pcImg != ''">,#{pcImg}</if>
34
         <if test="mImg != null and mImg != ''">,#{mImg}</if>
40
         <if test="mImg != null and mImg != ''">,#{mImg}</if>
35
         <if test="sort != null">,#{sort}</if>
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
     </insert>
46
     </insert>
38
 
47
 
44
             <if test="pcImg != null">banner_pc_img = #{pcImg},</if>
53
             <if test="pcImg != null">banner_pc_img = #{pcImg},</if>
45
             <if test="mImg != null">banner_m_img = #{mImg},</if>
54
             <if test="mImg != null">banner_m_img = #{mImg},</if>
46
             <if test="sort != null">banner_sort = #{sort},</if>
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
         </set>
73
         </set>
48
         where banner_uuid = #{uuid}
74
         where banner_uuid = #{uuid}
49
     </update>
75
     </update>
53
     </delete>
79
     </delete>
54
 
80
 
55
     <select id="selectBanner" resultMap="BannerResult" parameterType="com.webstudio.system.domain.Banner">
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
         from banner
83
         from banner
58
         order by banner_sort
84
         order by banner_sort
59
     </select>
85
     </select>

+ 24
- 0
webstudio-modules/webstudio-modules-system/src/main/resources/mapper/system/IntroduceMapper.xml View File

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>

Loading…
Cancel
Save