Explorar o código

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

wutt %!s(int64=5) %!d(string=hai) anos
pai
achega
033787dbc6
Modificáronse 33 ficheiros con 699 adicións e 71 borrados
  1. 56 0
      official_backend/src/main/java/com/hssx/ysofficial/controller/CharacteristicController.java
  2. 59 0
      official_backend/src/main/java/com/hssx/ysofficial/entity/Characteristic.java
  3. 16 0
      official_backend/src/main/java/com/hssx/ysofficial/mapper/CharacteristicMapper.java
  4. 22 0
      official_backend/src/main/java/com/hssx/ysofficial/service/CharacteristicService.java
  5. 79 0
      official_backend/src/main/java/com/hssx/ysofficial/service/impl/CharacteristicServiceImpl.java
  6. 1 1
      official_backend/src/main/java/com/hssx/ysofficial/utility/CodeGenerator.java
  7. 18 0
      official_backend/src/main/resources/mapper/CharacteristicMapper.xml
  8. 1 0
      official_frontend/src/icons/svg/label.svg
  9. 18 4
      official_frontend/src/router/index.js
  10. 1 1
      official_frontend/src/utils/request.js
  11. 225 0
      official_frontend/src/views/index/label.vue
  12. 1 1
      official_frontend/src/views/vipproduct/vip.vue
  13. 57 0
      website/src/main/java/com/hssx/website/entity/Characteristic.java
  14. 16 0
      website/src/main/java/com/hssx/website/mapper/CharacteristicMapper.java
  15. 16 0
      website/src/main/java/com/hssx/website/service/CharacteristicService.java
  16. 10 6
      website/src/main/java/com/hssx/website/service/impl/ArticleServiceImpl.java
  17. 20 0
      website/src/main/java/com/hssx/website/service/impl/CharacteristicServiceImpl.java
  18. 1 1
      website/src/main/java/com/hssx/website/until/CodeGenerator.java
  19. 18 0
      website/src/main/resources/mapper/CharacteristicMapper.xml
  20. 1 1
      website/src/main/resources/templates/about.html
  21. 1 1
      website/src/main/resources/templates/apply.html
  22. 1 1
      website/src/main/resources/templates/case.html
  23. 1 1
      website/src/main/resources/templates/caseDetail.html
  24. 1 1
      website/src/main/resources/templates/goods.html
  25. 51 44
      website/src/main/resources/templates/index.html
  26. 1 1
      website/src/main/resources/templates/job1.html
  27. 1 1
      website/src/main/resources/templates/job2.html
  28. 1 1
      website/src/main/resources/templates/job3.html
  29. 1 1
      website/src/main/resources/templates/job4.html
  30. 1 1
      website/src/main/resources/templates/login.html
  31. 1 1
      website/src/main/resources/templates/partner.html
  32. 1 1
      website/src/main/resources/templates/product.html
  33. 1 1
      website/src/main/resources/templates/vip.html

+ 56 - 0
official_backend/src/main/java/com/hssx/ysofficial/controller/CharacteristicController.java

@@ -0,0 +1,56 @@
+package com.hssx.ysofficial.controller;
+
+
+import com.hssx.ysofficial.entity.Characteristic;
+import com.hssx.ysofficial.service.CharacteristicService;
+import com.hssx.ysofficial.utility.HttpRespMsg;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * <p>
+ * 显示在首页的特点 前端控制器
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+@RestController
+@RequestMapping("/characteristic")
+public class CharacteristicController {
+    @Autowired
+    private CharacteristicService characteristicService;
+
+    /**
+     * 获取特色的列表
+     */
+    @RequestMapping("/list")
+    public HttpRespMsg getCharacteristicList() {
+        return characteristicService.getCharacteristicList();
+    }
+
+    /**
+     * 新增或更新特色
+     * id 更新时需要的id
+     * name 特色的名字
+     * description 特色的描述
+     * file 特色的图片
+     */
+    @RequestMapping("/insertOrUpdate")
+    public HttpRespMsg insertOrUpdateCharacteristic(Characteristic characteristic, MultipartFile file) {
+        return characteristicService.insertOrUpdateCharacteristic(characteristic, file);
+    }
+
+    /**
+     * 删除特色
+     * id 要删除的特色的id
+     */
+    @RequestMapping("/delete")
+    public HttpRespMsg deleteCharacteristicList(@RequestParam Integer id) {
+        return characteristicService.deleteCharacteristic(id);
+    }
+}
+

+ 59 - 0
official_backend/src/main/java/com/hssx/ysofficial/entity/Characteristic.java

@@ -0,0 +1,59 @@
+package com.hssx.ysofficial.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 显示在首页的特点
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("characteristic")
+public class Characteristic extends Model<Characteristic> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 特色表主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 特色名字
+     */
+    @TableField("name")
+    private String name;
+
+    /**
+     * 特色描述
+     */
+    @TableField("description")
+    private String description;
+
+    /**
+     * 特色图标
+     */
+    @TableField("image_url")
+    private String imageUrl;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 16 - 0
official_backend/src/main/java/com/hssx/ysofficial/mapper/CharacteristicMapper.java

@@ -0,0 +1,16 @@
+package com.hssx.ysofficial.mapper;
+
+import com.hssx.ysofficial.entity.Characteristic;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 显示在首页的特点 Mapper 接口
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+public interface CharacteristicMapper extends BaseMapper<Characteristic> {
+
+}

+ 22 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/CharacteristicService.java

@@ -0,0 +1,22 @@
+package com.hssx.ysofficial.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.hssx.ysofficial.entity.Characteristic;
+import com.hssx.ysofficial.utility.HttpRespMsg;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * <p>
+ * 显示在首页的特点 服务类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+public interface CharacteristicService extends IService<Characteristic> {
+    HttpRespMsg getCharacteristicList();
+
+    HttpRespMsg insertOrUpdateCharacteristic(Characteristic characteristic, MultipartFile multipartFile);
+
+    HttpRespMsg deleteCharacteristic(Integer id);
+}

+ 79 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/impl/CharacteristicServiceImpl.java

@@ -0,0 +1,79 @@
+package com.hssx.ysofficial.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.hssx.ysofficial.entity.Characteristic;
+import com.hssx.ysofficial.mapper.CharacteristicMapper;
+import com.hssx.ysofficial.service.CharacteristicService;
+import com.hssx.ysofficial.utility.HttpRespMsg;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.util.UUID;
+
+/**
+ * <p>
+ * 显示在首页的特点 服务实现类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+@Service
+public class CharacteristicServiceImpl extends ServiceImpl<CharacteristicMapper, Characteristic> implements CharacteristicService {
+
+    @Value("${upload.path}")
+    private String uploadPath;
+
+    @Resource
+    private CharacteristicMapper characteristicMapper;
+
+    @Override
+    public HttpRespMsg getCharacteristicList() {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.data = characteristicMapper.selectList(new QueryWrapper<Characteristic>().orderByAsc("id"));
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg insertOrUpdateCharacteristic(Characteristic characteristic, MultipartFile multipartFile) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        if (multipartFile != null) {
+            String fileName = multipartFile.getOriginalFilename();
+            File direction = new File(uploadPath);
+            String rand = UUID.randomUUID().toString().replaceAll("-", "");
+            String suffix = fileName.substring(fileName.lastIndexOf("."));
+            String storedFileName = rand + suffix;
+            try {
+                File savedFile = new File(direction, storedFileName);
+                savedFile.createNewFile();
+                multipartFile.transferTo(savedFile);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            characteristic.setImageUrl("/upload/" + storedFileName);
+        }
+        if (characteristic.getId() == null) {
+            if (characteristicMapper.insert(characteristic) == 0) {
+                httpRespMsg.setError("新增失败");
+            }
+        } else {
+            if (characteristicMapper.updateById(characteristic) == 0) {
+                httpRespMsg.setError("修改失败");
+            }
+        }
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg deleteCharacteristic(Integer id) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        if (characteristicMapper.deleteById(id) == 0) {
+            httpRespMsg.setError("删除失败");
+        }
+        return httpRespMsg;
+    }
+}

+ 1 - 1
official_backend/src/main/java/com/hssx/ysofficial/utility/CodeGenerator.java

@@ -188,7 +188,7 @@ public class CodeGenerator {
         //若想要生成的实体类继承某个Controller,则可打开下面注释。写上需要继承的Controller的位置即可
 //        strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
         //单独生成逗号隔开
-//        strategy.setInclude("");
+        strategy.setInclude("characteristic");
         //全生成
 //        strategy.setInclude();//表名,多个英文逗号分割
         //多个英文逗号隔开

+ 18 - 0
official_backend/src/main/resources/mapper/CharacteristicMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.ysofficial.mapper.CharacteristicMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.ysofficial.entity.Characteristic">
+        <id column="id" property="id" />
+        <result column="name" property="name" />
+        <result column="description" property="description" />
+        <result column="image_url" property="imageUrl" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, name, description, image_url
+    </sql>
+
+</mapper>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
official_frontend/src/icons/svg/label.svg


+ 18 - 4
official_frontend/src/router/index.js

@@ -63,14 +63,14 @@ export const constantRoutes = [
   },
 
   {
-    path: '/cooperation',
+    path: '/label',
     component: Layout,
     children: [
       {
         path: '',
-        name: 'Cooperation',
-        component: () => import('@/views/cooperation/client'),
-        meta: { title: '合作伙伴', icon: 'partner' }
+        name: 'label',
+        component: () => import('@/views/index/label'),
+        meta: { title: '首页标签', icon: 'label' }
       }
     ]
   },
@@ -88,6 +88,20 @@ export const constantRoutes = [
     ]
   },
 
+  
+  {
+    path: '/cooperation',
+    component: Layout,
+    children: [
+      {
+        path: '',
+        name: 'Cooperation',
+        component: () => import('@/views/cooperation/client'),
+        meta: { title: '合作伙伴', icon: 'partner' }
+      }
+    ]
+  },
+
   {
     path: '/case',
     component: Layout,

+ 1 - 1
official_frontend/src/utils/request.js

@@ -8,7 +8,7 @@ const service = axios.create({
     // url = base url + request url
     // baseURL: process.env.VUE_APP_BASE_API,
     baseURL: "http://111.231.87.63:8088",
-    // baseURL: "http://192.168.5.184:8098",
+    // baseURL: "http://192.168.5.101:8098",
     // withCredentials: true, // send cookies when cross-domain requests
     timeout: 5000 // request timeout
 })

+ 225 - 0
official_frontend/src/views/index/label.vue

@@ -0,0 +1,225 @@
+<template>
+    <div class="app-container">
+        <el-button size="small" type="primary" @click="openDialog(false, null)" :loading="loading">添加</el-button>
+        <el-table :data="cooperations" style="width: 100%">
+            <el-table-column type="index" width="50"></el-table-column>
+            <el-table-column label="标签图片" width="200">
+                <template slot-scope="scope">
+                    <el-image :src="scope.row.imageUrl"></el-image>
+                    <!--  style="width: 200px; height: 200px" -->
+                </template>
+            </el-table-column>
+            <el-table-column prop="name" label="标签名称" width="150"></el-table-column>
+            <el-table-column prop="description" label="标签描述"></el-table-column>
+            <el-table-column label="操作" width="180">
+                <template slot-scope="scope">
+                    <el-button size="small" @click="openDialog(true, scope.$index)" :loading="loading">编辑</el-button>
+                    <el-button size="small" type="danger" @click="deleteCooperation(scope.row.id)" :loading="loading">删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+
+        <!-- 添加和编辑的dialog -->
+        <el-dialog title="首页标签" :visible.sync="addDialogVisible" width="500px">
+            <el-form ref="form" :model="cooperationsForm" :rules="rules" label-width="80px">
+                <el-form-item label="标签名称" prop="title">
+                    <el-input v-model="cooperationsForm.title" placeholder="请输入标签名称" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="标签描述" prop="introduction">
+                    <el-input v-model="cooperationsForm.introduction" placeholder="请输入标签描述" clearable></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-upload ref="upload" action="customize" :http-request="uploadDiscardFile" :limit="1" :before-remove="beforeRemove">
+                        <el-button size="small" type="primary" :loading="loading">上传一张图片</el-button>
+                    </el-upload>
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="addDialogVisible = false">取消</el-button>
+                <el-button type="primary" @click="addCooperation()" :loading="loading">提交</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+    import request from "@/utils/request";
+    export default {
+        data() {
+            return {
+                editing: false,
+                loading: false,
+                addDialogVisible: false,
+                cooperations: [],
+                cooperationsForm: {
+                    id: null,
+                    title: null,
+                    introduction: null,
+                    // type: null,
+                    address: null,
+                    image: null
+                },
+                rules: {
+                    title: [{ required: true, message: "请输入标签名称", trigger: "blur" }],
+                    introduction: [{ required: true, message: "请输入标签描述", trigger: "blur"}],
+                    address: [{ required: true, message: "请输入标签网址", trigger: "blur"}],
+                    // type: [{ required: true, message: "请选择标签类型", trigger: "change" }]
+                }
+            };
+        },
+        methods: {
+            //打开对话框
+            openDialog(isEdit, index) {
+                this.editing = isEdit;
+                if (this.editing) {
+                    this.cooperationsForm.id = this.cooperations[index].id;
+                    this.cooperationsForm.title = this.cooperations[index].name;
+                    this.cooperationsForm.introduction = this.cooperations[index].description;
+                    this.cooperationsForm.image = null;
+                } else {
+                    this.cooperationsForm.id = null;
+                    this.cooperationsForm.title = "";
+                    this.cooperationsForm.introduction = "";
+                    this.cooperationsForm.image = null;
+                }
+                this.addDialogVisible = true;
+            },
+
+            //获取合作信息
+            getCooperations() {
+                this.loading = true;
+                request({
+                    url: "/characteristic/list",
+                    method: "post",
+                    params: {pageIndex:1,pageSize: 9999999}
+                })
+                .then(response => {
+                    this.cooperations = response.data;
+                    this.loading = false;
+                })
+                .catch(error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    this.loading = false;
+                });
+            },
+
+            //删除合作信息
+            deleteCooperation(id) {
+                request({
+                    url: "/characteristic/delete",
+                    method: "post",
+                    params: { id: id }
+                })
+                .then(response => {
+                    this.$message({
+                        message: "删除成功",
+                        type: "success"
+                    });
+                    this.getCooperations();
+                    this.addDialogVisible = false;
+                    this.loading = false;
+                })
+                .catch(error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    this.loading = false;
+                });
+            },
+
+            //添加/编辑合作信息
+            addCooperation() {
+                this.$refs.form.validate(valid => {
+                    if (valid) {
+                        this.loading = true;
+                        var form = new FormData();
+                        form.append("name", this.cooperationsForm.title);
+                        form.append("description", this.cooperationsForm.introduction);
+                        //新增记录 并且 没有图片时
+                        if (this.cooperationsForm.image == null && this.editing == false) {
+                            //如果没上传文件的话
+                            this.loading =false;
+                            this.$message({
+                                message: "尚未上传图片",
+                                type: "error"
+                            });
+                            return;
+                            //有图片时
+                        } else if (this.cooperationsForm.image != null) {
+                            form.append("file", this.cooperationsForm.image);
+                        }
+                        if (this.cooperationsForm.id != null) {
+                            form.append("id", this.cooperationsForm.id);
+                        }
+                        request({
+                            url: "/characteristic/insertOrUpdate",
+                            method: "post",
+                            data: form
+                        })
+                        .then(response => {
+                            this.$refs.upload.clearFiles();
+                            this.getCooperations();
+                            this.addDialogVisible = false;
+                            this.loading = false;
+                            this.$message({
+                                message: "添加成功",
+                                type: "success"
+                            });
+                        })
+                        .catch(error => {
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                            this.loading = false;
+                        });
+                    }
+                });
+            },
+
+            //切换置顶
+            switchSticky(id) {
+                request({
+                    url: "/cooperations/switchCooperationSticky",
+                    method: "post",
+                    params: { id: id }
+                })
+                .then(response => {
+                    this.$message({
+                        message: "操作成功",
+                        type: "success"
+                    });
+                    this.getCooperations();
+                })
+                .catch(error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //文件上传的部分操作
+            uploadDiscardFile(params) {
+                this.cooperationsForm.image = params.file;
+                return false;
+            },
+
+            //文件上传的移除操作
+            beforeRemove(params) {
+                this.cooperationsForm.image = null;
+            }
+        },
+        mounted() {
+            this.getCooperations();
+        }
+    };
+</script>
+
+<style scoped>
+</style>
+

+ 1 - 1
official_frontend/src/views/vipproduct/vip.vue

@@ -23,7 +23,7 @@
                 </template>
             </el-table-column> -->
             <el-table-column prop="introduction" label="产品描述"></el-table-column>
-            <el-table-column prop="address" label="产品址" width="300"></el-table-column>
+            <el-table-column prop="address" label="产品址" width="300"></el-table-column>
             <el-table-column label="操作" width="180">
                 <template slot-scope="scope">
                     <el-button size="small" @click="openDialog(true, scope.$index)" :loading="loading">编辑</el-button>

+ 57 - 0
website/src/main/java/com/hssx/website/entity/Characteristic.java

@@ -0,0 +1,57 @@
+package com.hssx.website.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 显示在首页的特点
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-02-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class Characteristic extends Model<Characteristic> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 特色表主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 特色名字
+     */
+    @TableField("name")
+    private String name;
+
+    /**
+     * 特色描述
+     */
+    @TableField("description")
+    private String description;
+
+    /**
+     * 特色图标
+     */
+    @TableField("image_url")
+    private String imageUrl;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 16 - 0
website/src/main/java/com/hssx/website/mapper/CharacteristicMapper.java

@@ -0,0 +1,16 @@
+package com.hssx.website.mapper;
+
+import com.hssx.website.entity.Characteristic;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 显示在首页的特点 Mapper 接口
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-02-06
+ */
+public interface CharacteristicMapper extends BaseMapper<Characteristic> {
+
+}

+ 16 - 0
website/src/main/java/com/hssx/website/service/CharacteristicService.java

@@ -0,0 +1,16 @@
+package com.hssx.website.service;
+
+import com.hssx.website.entity.Characteristic;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 显示在首页的特点 服务类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-02-06
+ */
+public interface CharacteristicService extends IService<Characteristic> {
+
+}

+ 10 - 6
website/src/main/java/com/hssx/website/service/impl/ArticleServiceImpl.java

@@ -32,6 +32,8 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> impl
     private CommentMapper commentMapper;
     @Resource
     private CompanyProductsMapper companyProductsMapper;
+    @Resource
+    private CharacteristicMapper characteristicMapper;
 
     @Override
     public Model getList(Model model) {
@@ -40,12 +42,14 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> impl
                 .eq("sticky", 1)
                 .orderByAsc("position"));
         model.addAttribute("articles", articles);
-        List<Cooperations> cooperations = cooperationsMapper.selectList(new QueryWrapper<Cooperations>().orderByAsc("id"));
-        model.addAttribute("cooperations", cooperations);
-        List<BannerPictures> pictures = bannerPicturesMapper.selectList(new QueryWrapper<BannerPictures>().orderByAsc("id"));
-        model.addAttribute("pictures", pictures);
-        List<Comment> comment = commentMapper.selectList(new QueryWrapper<Comment>().orderByAsc("id"));
-        model.addAttribute("comment", comment);
+        model.addAttribute("cooperations", cooperationsMapper
+                .selectList(new QueryWrapper<Cooperations>().orderByAsc("id")));
+        model.addAttribute("pictures", bannerPicturesMapper
+                .selectList(new QueryWrapper<BannerPictures>().orderByAsc("id")));
+        model.addAttribute("comment", commentMapper
+                .selectList(new QueryWrapper<Comment>().orderByAsc("id")));
+        model.addAttribute("characteristic", characteristicMapper
+                .selectList(new QueryWrapper<Characteristic>().orderByAsc("id")));
         return model;
     }
 

+ 20 - 0
website/src/main/java/com/hssx/website/service/impl/CharacteristicServiceImpl.java

@@ -0,0 +1,20 @@
+package com.hssx.website.service.impl;
+
+import com.hssx.website.entity.Characteristic;
+import com.hssx.website.mapper.CharacteristicMapper;
+import com.hssx.website.service.CharacteristicService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 显示在首页的特点 服务实现类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-02-06
+ */
+@Service
+public class CharacteristicServiceImpl extends ServiceImpl<CharacteristicMapper, Characteristic> implements CharacteristicService {
+
+}

+ 1 - 1
website/src/main/java/com/hssx/website/until/CodeGenerator.java

@@ -206,7 +206,7 @@ public class CodeGenerator {
         //此处user是表名,多个英文逗号分割
 //        strategy.setInclude("mould_down_packet");
 //        strategy.setExclude();//数据库表全生成
-//        strategy.setInclude("company_products");//表名,多个英文逗号分割
+        strategy.setInclude("characteristic");//表名,多个英文逗号分割
         strategy.setControllerMappingHyphenStyle(true);
         //数据库表前缀,不配置这行的话,生成的类会带有T如:TUser,配置后即可将前缀去掉
 //        strategy.setTablePrefix("tb_");

+ 18 - 0
website/src/main/resources/mapper/CharacteristicMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.website.mapper.CharacteristicMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.website.entity.Characteristic">
+        <id column="id" property="id" />
+        <result column="name" property="name" />
+        <result column="description" property="description" />
+        <result column="image_url" property="imageUrl" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, name, description, image_url
+    </sql>
+
+</mapper>

+ 1 - 1
website/src/main/resources/templates/about.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/apply.html

@@ -61,7 +61,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/case.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/caseDetail.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/goods.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 51 - 44
website/src/main/resources/templates/index.html

@@ -63,7 +63,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                             <div class="qrcode">
                                 <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                <div>请关注塑维公众号</div>
+                                <div>关注我们</div>
                             </div>
                         </li>
                         <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>
@@ -99,51 +99,58 @@
     <section class="bar background-white background-wap">
         <div class="container text-center">
             <div class="row">
-                <div class="col-lg-4 col-md-6">
+                <div class="col-lg-4 col-md-6" th:each="item : ${characteristic}">
                     <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-desktop"></i></div>
-                        <h3 class="h4">原料入场</h3>
-                        <p>扫码录入仓位和物料信息,出入库记录随时查询。</p>
-                    </div>
-                </div>
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-print"></i></div>
-                        <h3 class="h4">生产执行</h3>
-                        <p>线上即可接单、报工、扫码进行投产、生产效率数据线上直接看。</p>
-                    </div>
-                </div>
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-globe"></i></div>
-                        <h3 class="h4">仓库管理</h3>
-                        <p>二维码轻松完成物料入库管理,库存清晰可查。</p>
-                    </div>
-                </div>
-            </div>
-            <div class="row">
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-lightbulb-o"></i></div>
-                        <h3 class="h4">计划排程</h3>
-                        <p>智能分配生产设备时间、批量发生产任务到工位。</p>
-                    </div>
-                </div>
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-envelope-o"></i></div>
-                        <h3 class="h4">图形分析报表</h3>
-                        <p>物料、生产、设备等多维度数据图形化呈现、实时查看监管监控。</p>
-                    </div>
-                </div>
-                <div class="col-lg-4 col-md-6">
-                    <div class="box-simple">
-                        <div class="icon-outlined"><i class="fa fa-user"></i></div>
-                        <h3 class="h4">设备维护</h3>
-                        <p>扫码即可查看设备信息、云端配置维保计划。</p>
+                        <img class="icon-outlined" style="border: none;" th:src="${{item.imageUrl}}">
+                        <h3 class="h4" th:text="${{item.name}}"></h3>
+                        <p th:text="${{item.description}}"></p>
                     </div>
                 </div>
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-desktop"></i></div>-->
+<!--                        <h3 class="h4">原料入场</h3>-->
+<!--                        <p>扫码录入仓位和物料信息,出入库记录随时查询。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-print"></i></div>-->
+<!--                        <h3 class="h4">生产执行</h3>-->
+<!--                        <p>线上即可接单、报工、扫码进行投产、生产效率数据线上直接看。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-globe"></i></div>-->
+<!--                        <h3 class="h4">仓库管理</h3>-->
+<!--                        <p>二维码轻松完成物料入库管理,库存清晰可查。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
             </div>
+<!--            <div class="row">-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-lightbulb-o"></i></div>-->
+<!--                        <h3 class="h4">计划排程</h3>-->
+<!--                        <p>智能分配生产设备时间、批量发生产任务到工位。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-envelope-o"></i></div>-->
+<!--                        <h3 class="h4">图形分析报表</h3>-->
+<!--                        <p>物料、生产、设备等多维度数据图形化呈现、实时查看监管监控。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--                <div class="col-lg-4 col-md-6">-->
+<!--                    <div class="box-simple">-->
+<!--                        <div class="icon-outlined"><i class="fa fa-user"></i></div>-->
+<!--                        <h3 class="h4">设备维护</h3>-->
+<!--                        <p>扫码即可查看设备信息、云端配置维保计划。</p>-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--            </div>-->
         </div>
     </section>
     <section class="bar background-pentagon no-mb text-md-center">
@@ -232,9 +239,9 @@
              class="bar no-mb color-white text-center bg-fixed relative-positioned">
         <div class="dark-mask"></div>
         <div class="container">
-            <div class="icon icon-outlined icon-lg"><i class="fa fa-file-code-o"></i></div>
+            <img src="img/qrCode.jpg" alt="..." class="img-fluid" style="width: 6.5rem;margin-bottom: 1rem">
             <h3 class="text-uppercase">想要看到更多吗?</h3>
-            <p class="lead">我们准备了多个关于本公司的400多个产品的介绍,想要了解更多点击了解详情。</p>
+            <p class="lead">我们准备了多个关于本公司的多个产品的介绍,想要了解更多点击了解详情。</p>
             <p class="text-center"><a href="about.html" class="btn btn-template-outlined-white btn-lg">了解详情</a></p>
         </div>
     </section>

+ 1 - 1
website/src/main/resources/templates/job1.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/job2.html

@@ -60,7 +60,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/job3.html

@@ -60,7 +60,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/job4.html

@@ -60,7 +60,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/login.html

@@ -60,7 +60,7 @@
                                     <a href="about.html">关于我们 <b class="caret"></b></a>
                                     <div class="qrcode">
                                         <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                        <div>请关注塑维公众号</div>
+                                        <div>关注我们</div>
                                     </div>
                                 </li>
                                 <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/partner.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/product.html

@@ -60,7 +60,7 @@
                                 <a href="about.html">关于我们 <b class="caret"></b></a>
                                 <div class="qrcode">
                                     <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                    <div>请关注塑维公众号</div>
+                                    <div>关注我们</div>
                                 </div>
                             </li>
                             <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>

+ 1 - 1
website/src/main/resources/templates/vip.html

@@ -65,7 +65,7 @@
                             <a href="about.html">关于我们 <b class="caret"></b></a>
                             <div class="qrcode">
                                 <img src="img/qrCode.jpg" alt="..." class="img-fluid">
-                                <div>请关注塑维公众号</div>
+                                <div>关注我们</div>
                             </div>
                         </li>
                         <span style="border-left: 1px solid #fff;line-height: 1.5;"></span>