Przeglądaj źródła

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

seyason 5 lat temu
rodzic
commit
bcccd12cf2
100 zmienionych plików z 4199 dodań i 262 usunięć
  1. 11 0
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldController.java
  2. 33 0
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldDownPacketController.java
  3. 12 0
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/AppVersion.java
  4. 142 0
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/EquipmentSendCommand.java
  5. 22 0
      cloud-model/src/main/java/com/hssx/cloudmodel/mapper/EquipmentSendCommandMapper.java
  6. 24 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/EquipmentSendCommandService.java
  7. 2 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldService.java
  8. 133 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/EquipmentSendCommandServiceImpl.java
  9. 1 1
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldHistoryServiceImpl.java
  10. 32 1
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldServiceImpl.java
  11. 6 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/PowerServiceImpl.java
  12. 0 1
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/ProjectServiceImpl.java
  13. 3 3
      cloud-model/src/main/java/com/hssx/cloudmodel/util/CodeGenerator.java
  14. 3 0
      cloud-model/src/main/resources/application-prod.properties
  15. 3 3
      cloud-model/src/main/resources/application.properties
  16. 39 0
      cloud-model/src/main/resources/mapper/EquipmentSendCommandMapper.xml
  17. 2 2
      cloud-model/src/main/resources/mapper/MouldMapper.xml
  18. 22 8
      cloud-model/src/test/java/com/hssx/cloudmodel/CloudModelApplicationTests.java
  19. 28 23
      cloud-socket/src/com/js/kbt/UserTempGenConfig.xml
  20. 96 0
      cloud-socket/src/com/js/kbt/mapper/EquipmentSendCommandMapper.java
  21. 318 0
      cloud-socket/src/com/js/kbt/mapper/EquipmentSendCommandMapper.xml
  22. 236 0
      cloud-socket/src/com/js/kbt/model/EquipmentSendCommand.java
  23. 733 0
      cloud-socket/src/com/js/kbt/model/EquipmentSendCommandExample.java
  24. 207 140
      cloud-socket/src/com/js/kbt/socket/UserHandler.java
  25. 3 2
      cloud-socket/src/com/js/kbt/task/MyTask.java
  26. 4 4
      cloud-socket/src/jdbc.properties
  27. 56 0
      official_backend/src/main/java/com/hssx/ysofficial/controller/CharacteristicController.java
  28. 5 7
      official_backend/src/main/java/com/hssx/ysofficial/controller/CompanyProductsController.java
  29. 7 0
      official_backend/src/main/java/com/hssx/ysofficial/controller/CooperationsController.java
  30. 74 0
      official_backend/src/main/java/com/hssx/ysofficial/controller/FeedbackController.java
  31. 21 0
      official_backend/src/main/java/com/hssx/ysofficial/controller/ParameterController.java
  32. 56 0
      official_backend/src/main/java/com/hssx/ysofficial/controller/QualificationController.java
  33. 65 0
      official_backend/src/main/java/com/hssx/ysofficial/controller/RecruitmentController.java
  34. 59 0
      official_backend/src/main/java/com/hssx/ysofficial/controller/VipProductsController.java
  35. 1 1
      official_backend/src/main/java/com/hssx/ysofficial/entity/Article.java
  36. 1 1
      official_backend/src/main/java/com/hssx/ysofficial/entity/BannerPictures.java
  37. 59 0
      official_backend/src/main/java/com/hssx/ysofficial/entity/Characteristic.java
  38. 9 9
      official_backend/src/main/java/com/hssx/ysofficial/entity/Comment.java
  39. 7 7
      official_backend/src/main/java/com/hssx/ysofficial/entity/CompanyProducts.java
  40. 4 4
      official_backend/src/main/java/com/hssx/ysofficial/entity/Cooperations.java
  41. 65 0
      official_backend/src/main/java/com/hssx/ysofficial/entity/Feedback.java
  42. 1 4
      official_backend/src/main/java/com/hssx/ysofficial/entity/OnlineApplication.java
  43. 53 0
      official_backend/src/main/java/com/hssx/ysofficial/entity/Parameter.java
  44. 57 0
      official_backend/src/main/java/com/hssx/ysofficial/entity/Qualification.java
  45. 66 0
      official_backend/src/main/java/com/hssx/ysofficial/entity/Recruitment.java
  46. 1 1
      official_backend/src/main/java/com/hssx/ysofficial/entity/User.java
  47. 71 0
      official_backend/src/main/java/com/hssx/ysofficial/entity/VipProducts.java
  48. 16 0
      official_backend/src/main/java/com/hssx/ysofficial/mapper/CharacteristicMapper.java
  49. 16 0
      official_backend/src/main/java/com/hssx/ysofficial/mapper/FeedbackMapper.java
  50. 16 0
      official_backend/src/main/java/com/hssx/ysofficial/mapper/ParameterMapper.java
  51. 16 0
      official_backend/src/main/java/com/hssx/ysofficial/mapper/QualificationMapper.java
  52. 16 0
      official_backend/src/main/java/com/hssx/ysofficial/mapper/RecruitmentMapper.java
  53. 16 0
      official_backend/src/main/java/com/hssx/ysofficial/mapper/VipProductsMapper.java
  54. 22 0
      official_backend/src/main/java/com/hssx/ysofficial/service/CharacteristicService.java
  55. 26 0
      official_backend/src/main/java/com/hssx/ysofficial/service/FeedbackService.java
  56. 16 0
      official_backend/src/main/java/com/hssx/ysofficial/service/ParameterService.java
  57. 22 0
      official_backend/src/main/java/com/hssx/ysofficial/service/QualificationService.java
  58. 24 0
      official_backend/src/main/java/com/hssx/ysofficial/service/RecruitmentService.java
  59. 22 0
      official_backend/src/main/java/com/hssx/ysofficial/service/VipProductsService.java
  60. 79 0
      official_backend/src/main/java/com/hssx/ysofficial/service/impl/CharacteristicServiceImpl.java
  61. 1 1
      official_backend/src/main/java/com/hssx/ysofficial/service/impl/CooperationsServiceImpl.java
  62. 101 0
      official_backend/src/main/java/com/hssx/ysofficial/service/impl/FeedbackServiceImpl.java
  63. 20 0
      official_backend/src/main/java/com/hssx/ysofficial/service/impl/ParameterServiceImpl.java
  64. 72 0
      official_backend/src/main/java/com/hssx/ysofficial/service/impl/QualificationServiceImpl.java
  65. 85 0
      official_backend/src/main/java/com/hssx/ysofficial/service/impl/RecruitmentServiceImpl.java
  66. 80 0
      official_backend/src/main/java/com/hssx/ysofficial/service/impl/VipProductsServiceImpl.java
  67. 2 2
      official_backend/src/main/java/com/hssx/ysofficial/utility/CodeGenerator.java
  68. 12 2
      official_backend/src/main/resources/application-prod.properties
  69. 14 7
      official_backend/src/main/resources/application.properties
  70. 18 0
      official_backend/src/main/resources/mapper/CharacteristicMapper.xml
  71. 2 2
      official_backend/src/main/resources/mapper/CompanyProductsMapper.xml
  72. 19 0
      official_backend/src/main/resources/mapper/FeedbackMapper.xml
  73. 17 0
      official_backend/src/main/resources/mapper/ParameterMapper.xml
  74. 18 0
      official_backend/src/main/resources/mapper/QualificationMapper.xml
  75. 19 0
      official_backend/src/main/resources/mapper/RecruitmentMapper.xml
  76. 20 0
      official_backend/src/main/resources/mapper/VipProductsMapper.xml
  77. 1 0
      official_frontend/src/icons/svg/about.svg
  78. 1 0
      official_frontend/src/icons/svg/advantage.svg
  79. 1 0
      official_frontend/src/icons/svg/application.svg
  80. 1 0
      official_frontend/src/icons/svg/banner.svg
  81. 1 0
      official_frontend/src/icons/svg/case.svg
  82. 1 0
      official_frontend/src/icons/svg/comment.svg
  83. 1 0
      official_frontend/src/icons/svg/customer.svg
  84. 1 0
      official_frontend/src/icons/svg/home.svg
  85. 1 0
      official_frontend/src/icons/svg/label.svg
  86. 1 0
      official_frontend/src/icons/svg/partner.svg
  87. 1 0
      official_frontend/src/icons/svg/position.svg
  88. 1 0
      official_frontend/src/icons/svg/product.svg
  89. 1 0
      official_frontend/src/icons/svg/qualifications.svg
  90. 1 0
      official_frontend/src/icons/svg/vip.svg
  91. 68 14
      official_frontend/src/router/index.js
  92. 1 1
      official_frontend/src/utils/request.js
  93. 118 0
      official_frontend/src/views/about/position.vue
  94. 137 0
      official_frontend/src/views/about/positionEdit.vue
  95. 190 0
      official_frontend/src/views/about/qualifications.vue
  96. 1 1
      official_frontend/src/views/application/application.vue
  97. 1 1
      official_frontend/src/views/article/advantage.vue
  98. 8 8
      official_frontend/src/views/article/case.vue
  99. 1 1
      official_frontend/src/views/article/detail.vue
  100. 0 0
      official_frontend/src/views/article/tinymce.vue

+ 11 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldController.java

@@ -245,5 +245,16 @@ public class MouldController {
         return msg;
     }
 
+    /**
+     * 运行次数更新(23:00-24:00)
+     */
+    @ApiOperation("运行次数更新(23:00-24:00)")
+    @RequestMapping("/updateLastTimeRuntimesTask")
+    @ResponseBody
+    @Scheduled(cron = "0 0 1 * * ?")//定时任务,每天1点触发
+    public HttpRespMsg updateLastTimeRuntimesTask() throws Exception {
+        HttpRespMsg msg = mouldService.updateLastTimeRuntimesTask();
+        return msg;
+    }
 }
 

+ 33 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldDownPacketController.java

@@ -1,8 +1,14 @@
 package com.hssx.cloudmodel.controller;
 
 
+import com.hssx.cloudmodel.entity.EquipmentSendCommand;
+import com.hssx.cloudmodel.service.EquipmentSendCommandService;
+import com.hssx.cloudmodel.util.HttpRespMsg;
+import com.hssx.cloudmodel.util.PageUtil;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
@@ -16,6 +22,33 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("/mould-down-packet")
 public class MouldDownPacketController {
+    @Autowired
+    private EquipmentSendCommandService equipmentSendCommandService;
+
+    /**
+     * 下发某些指令,如清空指令
+     * 参数:equipmentNo 云模盒的ccid(云模盒编号),uid 当前操作人的id,
+     * state 指令类型(0-清空,1-待定)
+     * @return
+     */
+
+    @RequestMapping("/sendCommand")
+    @ResponseBody
+    public HttpRespMsg sendCommand(EquipmentSendCommand equipmentSendCommand) {
+        return equipmentSendCommandService.sendCommand(equipmentSendCommand);
+    }
+
+    /**
+     * 获取下发命令的列表
+     * token 当前人唯一权限 pageNum 当前页码,pageSize 每页条数
+     * @return
+     */
+
+    @RequestMapping("/sendCommandList")
+    @ResponseBody
+    public HttpRespMsg sendCommandList(EquipmentSendCommand equipmentSendCommand,PageUtil page,String token) {
+        return equipmentSendCommandService.sendCommandList(equipmentSendCommand,page,token);
+    }
 
 }
 

+ 12 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/entity/AppVersion.java

@@ -3,9 +3,12 @@ package com.hssx.cloudmodel.entity;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * <p>
@@ -90,4 +93,13 @@ public class AppVersion extends Model<AppVersion> {
         ", url=" + url +
         "}";
     }
+
+    public static void main(String[] args) {
+        Date now = new Date(2020,03,16,10,29,25);
+        System.out.println(now);
+
+        //规则是, 运动状态下,上次接受,超过1.5个小时,不到6个小时的模具设备,状态设置为5-异常,6小时以上的,状态设置为掉线
+        now.setMinutes(now.getMinutes()-150);
+        System.out.println(now);
+    }
 }

+ 142 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/entity/EquipmentSendCommand.java

@@ -0,0 +1,142 @@
+package com.hssx.cloudmodel.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-03-19
+ */
+public class EquipmentSendCommand extends Model<EquipmentSendCommand> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 清空次数表主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 设备编号
+     */
+    @TableField("equipment_no")
+    private String equipmentNo;
+
+    /**
+     * 设置下发人的id
+     */
+    @TableField("uid")
+    private Integer uid;
+
+    /**
+     * 设置下发命令的时间
+     */
+    @TableField("indate")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime indate;
+
+    /**
+     * 实际下发的时间
+     */
+    @TableField("send_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime sendTime;
+
+    /**
+     * 操作状态0-清空,1-。。。
+     */
+    @TableField("state")
+    private Integer state;
+
+    /**
+     * 是否已下发0-未,1-已
+     */
+    @TableField("is_send")
+    private Integer isSend;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getEquipmentNo() {
+        return equipmentNo;
+    }
+
+    public void setEquipmentNo(String equipmentNo) {
+        this.equipmentNo = equipmentNo;
+    }
+
+    public Integer getUid() {
+        return uid;
+    }
+
+    public void setUid(Integer uid) {
+        this.uid = uid;
+    }
+
+    public LocalDateTime getIndate() {
+        return indate;
+    }
+
+    public void setIndate(LocalDateTime indate) {
+        this.indate = indate;
+    }
+
+    public LocalDateTime getSendTime() {
+        return sendTime;
+    }
+
+    public void setSendTime(LocalDateTime sendTime) {
+        this.sendTime = sendTime;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public Integer getIsSend() {
+        return isSend;
+    }
+
+    public void setIsSend(Integer isSend) {
+        this.isSend = isSend;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+    @Override
+    public String toString() {
+        return "EquipmentSendCommand{" +
+        "id=" + id +
+        ", equipmentNo=" + equipmentNo +
+        ", uid=" + uid +
+        ", indate=" + indate +
+        ", sendTime=" + sendTime +
+        ", state=" + state +
+        ", isSend=" + isSend +
+        "}";
+    }
+}

+ 22 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/mapper/EquipmentSendCommandMapper.java

@@ -0,0 +1,22 @@
+package com.hssx.cloudmodel.mapper;
+
+import com.hssx.cloudmodel.entity.EquipmentSendCommand;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import javax.validation.constraints.Pattern;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-03-19
+ */
+public interface EquipmentSendCommandMapper extends BaseMapper<EquipmentSendCommand> {
+
+    List<Map<String,Object>> getList(@Param("list") List<String>equipmentSendCommand);
+}

+ 24 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/EquipmentSendCommandService.java

@@ -0,0 +1,24 @@
+package com.hssx.cloudmodel.service;
+
+import com.hssx.cloudmodel.entity.EquipmentSendCommand;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.hssx.cloudmodel.mapper.EquipmentSendCommandMapper;
+import com.hssx.cloudmodel.util.HttpRespMsg;
+import com.hssx.cloudmodel.util.PageUtil;
+
+import javax.annotation.Resource;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-03-19
+ */
+public interface EquipmentSendCommandService extends IService<EquipmentSendCommand> {
+
+    HttpRespMsg sendCommand(EquipmentSendCommand equipmentSendCommand);
+
+    HttpRespMsg sendCommandList(EquipmentSendCommand equipmentSendCommand, PageUtil page, String token);
+}

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldService.java

@@ -37,4 +37,6 @@ public interface MouldService extends IService<Mould> {
     HttpRespMsg packageLoss();
 
     HttpRespMsg updateRuntimesTask();
+
+    HttpRespMsg updateLastTimeRuntimesTask();
 }

+ 133 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/EquipmentSendCommandServiceImpl.java

@@ -0,0 +1,133 @@
+package com.hssx.cloudmodel.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hssx.cloudmodel.constant.Constant;
+import com.hssx.cloudmodel.entity.*;
+import com.hssx.cloudmodel.entity.vo.MouldVO;
+import com.hssx.cloudmodel.mapper.*;
+import com.hssx.cloudmodel.service.EquipmentSendCommandService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.hssx.cloudmodel.util.HttpRespMsg;
+import com.hssx.cloudmodel.util.PageUtil;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 服务实现类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-03-19
+ */
+@Transactional
+@Service
+public class EquipmentSendCommandServiceImpl extends ServiceImpl<EquipmentSendCommandMapper, EquipmentSendCommand> implements EquipmentSendCommandService {
+
+    @Resource
+    private EquipmentSendCommandMapper equipmentSendCommandMapper;
+    @Resource
+    private UserMapper userMapper;
+    @Resource
+    ProjectMapper projectMapper;
+    @Resource
+    ProjectUserMapper projectUserMapper;
+    @Resource
+    CustomCompanyMapper customCompanyMapper;
+    @Resource
+    MouldMapper mouldMapper;
+    @Resource
+    ProjectApproveMapper projectApproveMapper;
+    @Resource
+    private MouldEquipmentMapper mouldEquipmentMapper;
+
+
+    @Override
+    public HttpRespMsg sendCommand(EquipmentSendCommand equipmentSendCommand) {
+        HttpRespMsg msg = new HttpRespMsg();
+        equipmentSendCommandMapper.insert(equipmentSendCommand);
+        return msg;
+    }
+
+    @Override
+    public HttpRespMsg sendCommandList(EquipmentSendCommand equipmentSendCommand, PageUtil page, String token) {
+        HttpRespMsg msg = new HttpRespMsg();
+        User user = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", token));
+        if (user == null) {
+            msg.setError("用户不存在");
+            return msg;
+        }
+        List<Integer> set = new ArrayList<>();
+        List<Mould> moulds = new ArrayList<>();
+        //用於接受最後數據的集合
+        List<Map<String, Object>> list = new ArrayList<>();
+        //分頁接受的數據
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>();
+        //资产方管理员,获取他公司下的所有模具
+        if (Constant.SYS_PARENT_ID.equals(user.getParentId())) {
+            //超级管理员,获取平台所有模具
+            moulds = mouldMapper.selectList(null);
+        } else if (Constant.SYS_ID.equals(user.getParentId())) {
+            if (Constant.ASSETS_COMPANY.equals(user.getSubordinateType())) {
+                //资产方管理员
+                moulds = mouldMapper.selectList(new QueryWrapper<Mould>().eq("company_id", user.getCompanyId()));
+            } else if (Constant.PRODUCER_COMPANY.equals(user.getSubordinateType())) {
+                set = customCompanyMapper.selectList(new QueryWrapper<CustomCompany>().eq("company_id", user.getCompanyId())).stream().map(CustomCompany::getProjectId).collect(Collectors.toList());
+                set.add(-1);
+                moulds = mouldMapper.selectList(new QueryWrapper<Mould>().in("project_id", set));
+            }
+        } else {
+            //普通用户或者项目经理
+            //充当项目经理参与的项目
+//                if (userVO.getProjectId() != -1) {
+//                    set.add(userVO.getProjectId());
+//                    set.add(-1);
+//                    moulds = mouldMapper.selectListByConditionByProject(userVO, set);
+//                } else {
+            QueryWrapper<Project> qw = new QueryWrapper<>();
+            qw.eq("manager_id", user.getId());
+            List<Project> projects = projectMapper.selectList(qw);
+            if (projects.size() > 0) {
+                for (Project project : projects) {
+                    set.add(project.getId());
+                }
+            }
+//                //充当普通人员参与的项目
+            List<ProjectUser> projectUsers = projectUserMapper.selectList(new QueryWrapper<ProjectUser>().eq("user_id", user.getId()));
+            if (projectUsers.size() > 0) {
+                for (ProjectUser projectUser : projectUsers) {
+                    set.add(projectUser.getProjectId());
+                }
+            }
+//                //充当审批人员参与的项目
+            List<ProjectApprove> projectss = projectApproveMapper.selectList(new QueryWrapper<ProjectApprove>().eq("approver_id", user.getId()));
+            if (projectss.size() > 0) {
+                for (ProjectApprove projectUser : projectss) {
+                    set.add(projectUser.getProjectId());
+                }
+            }
+            set.add(-1);
+            moulds = mouldMapper.selectList(new QueryWrapper<Mould>().in("project_id", set));
+        }
+        List<Integer> equipmentIds = moulds.stream().map(Mould::getEquipmentId).collect(Collectors.toList());
+        if(!CollectionUtils.isEmpty(equipmentIds)){
+            List<String> quipmentNOs = mouldEquipmentMapper.selectList(new QueryWrapper<MouldEquipment>().in("id", equipmentIds)).stream().map(MouldEquipment::getEquipmentNo).collect(Collectors.toList());
+            System.out.println("quipmentNOs"+quipmentNOs);
+            PageHelper.startPage(page.getPageNum(), page.getPageSize());
+            List<Map<String, Object>> equipmentSendCommandList = equipmentSendCommandMapper.getList(quipmentNOs);
+            pageInfo = new PageInfo<Map<String, Object>>(equipmentSendCommandList);
+            msg.data = equipmentSendCommandList;
+        }
+
+        return msg;
+    }
+}

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldHistoryServiceImpl.java

@@ -131,7 +131,7 @@ public class MouldHistoryServiceImpl extends ServiceImpl<MouldHistoryMapper, Mou
         InjectionMolding molding = injectionMoldingMapper.selectOne(new QueryWrapper<InjectionMolding>().eq("mould_id", mould.getId()));
         Integer cycle = 0;
         if (molding != null) {
-            cycle = (null == molding.getCycle()) ? 40000 : Integer.parseInt(molding.getCycle());
+            cycle = (null == molding.getCycle()) ? 40000 : Integer.parseInt(molding.getCycle())*1000;
         } else {
             cycle = 40000;
         }

+ 32 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldServiceImpl.java

@@ -618,7 +618,8 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
 
     @Override
     public HttpRespMsg updateRuntimesTask() {
-        List<MouldHistoryTime> list = mouldHistoryTimeMapper.selectListByTime(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
+        Date date = new Date();
+        List<MouldHistoryTime> list = mouldHistoryTimeMapper.selectListByTime(new SimpleDateFormat("yyyy-MM-dd").format(date));
         Map<String, List<MouldHistoryTime>> map = list.stream().collect(Collectors.groupingBy(MouldHistoryTime::getEquipmentNo));
         for (Map.Entry<String, List<MouldHistoryTime>> stringListEntry : map.entrySet()) {
             for (int i = 0; i < 24; i++) {
@@ -648,5 +649,35 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
         }
         return new HttpRespMsg();
     }
+
+    @Override
+    public HttpRespMsg updateLastTimeRuntimesTask() {
+        List<MouldHistoryTime> mouldHistoryTimes = mouldHistoryTimeMapper.selectList(new QueryWrapper<MouldHistoryTime>().select("equipment_no","open_time").apply("date_format(open_time,'%H') between '23' and '24'"));
+        if(CollectionUtils.isEmpty(mouldHistoryTimes)){
+            return null;
+        }
+        //获取到按照equipmentNo分组的map
+        Map<String, List<MouldHistoryTime>> equipmentNoList = mouldHistoryTimes.stream().collect(Collectors.groupingBy(MouldHistoryTime::getEquipmentNo));
+        for (Map.Entry<String, List<MouldHistoryTime>> equipmentNoTimeList : equipmentNoList.entrySet()){
+            //再把给个编号的所有数据按照日期进行分组
+            Map<String, List<MouldHistoryTime>> openTimeStringDateList = equipmentNoTimeList.getValue().stream().collect(Collectors.groupingBy(x -> DateTimeFormatter.ofPattern("yyyy-MM-dd").format(x.getOpenTime())));
+            for (Map.Entry<String, List<MouldHistoryTime>> openTimeData : openTimeStringDateList.entrySet()){
+                openTimeData.getKey();
+                MouldCycleRuntime mr = new MouldCycleRuntime();
+                mr.setDateStr(openTimeData.getKey());
+                mr.setEquipmentNo(equipmentNoTimeList.getKey());
+                mr.setTimeSlot("23:00-24:00");
+                MouldCycleRuntime mouldCycleRuntime = mouldCycleRuntimeMapper.selectOne(new QueryWrapper<MouldCycleRuntime>(mr));
+                if(mouldCycleRuntime == null){
+                    mr.setRuntime(openTimeData.getValue().size());
+                    mouldCycleRuntimeMapper.insert(mr);
+                }else{
+                    mouldCycleRuntime.setRuntime(openTimeData.getValue().size());
+                    mouldCycleRuntimeMapper.updateById(mouldCycleRuntime);
+                }
+            }
+        }
+        return null;
+    }
 }
 

+ 6 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/PowerServiceImpl.java

@@ -1,5 +1,6 @@
 package com.hssx.cloudmodel.service.impl;
 
+import ch.qos.logback.core.net.SyslogOutputStream;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
@@ -90,6 +91,11 @@ public class PowerServiceImpl extends ServiceImpl<PowerMapper, Power> implements
             Project pro = projectMapper.selectById(userVO.getProjectId());
             if (pro.getManagerId().equals(user.getId())) {
                 //资产方管理员或者担任项目经理的人才可修改人员权限
+                if("".equals(userVO.getPowers())){
+                    //删除全部权限
+                    powerMapper.delete(new QueryWrapper<Power>().eq("user_id", userVO.getId()).eq("project_id", userVO.getProjectId()));
+                    return msg;
+                }
                 if (null != userVO.getPowers()) {
                     List<Integer> powerTypes = ListUtil.convertIntegerIdsArrayToList(userVO.getPowers());
                     if (powerTypes.size() > 0) {

+ 0 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/ProjectServiceImpl.java

@@ -560,7 +560,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     public HttpRespMsg getModelListByUser(UserVO userVO, PageUtil page) {
         HttpRespMsg msg = new HttpRespMsg();
         List<Integer> set = new ArrayList<>();
-        set.add(-1);
         List<MouldVO> moulds = new ArrayList<>();
         if (userVO.getId() != null) {
             //资产方管理员,获取他公司下的所有模具

+ 3 - 3
cloud-model/src/main/java/com/hssx/cloudmodel/util/CodeGenerator.java

@@ -92,11 +92,11 @@ public class CodeGenerator {
 
         // 数据源配置
         DataSourceConfig dsc = new DataSourceConfig();
-        dsc.setUrl("jdbc:mysql://118.190.47.230:3306/cloud_model_test?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8");
+        dsc.setUrl("jdbc:mysql://localhost:3306/cloud_mould?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8");
 //        dsc.setSchemaName("public");
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");
-        dsc.setPassword("p011430seya1026");
+        dsc.setPassword("102345..");
         mpg.setDataSource(dsc);
 
         // 包配置
@@ -204,7 +204,7 @@ public class CodeGenerator {
         //若想要生成的实体类继承某个Controller,则可打开下面注释。写上需要继承的Controller的位置即可
 //        strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
         //此处user是表名,多个英文逗号分割
-        strategy.setInclude("injection_molding");
+        strategy.setInclude("equipment_send_command");
 //        strategy.setExclude();//数据库表全生成
 //        strategy.setInclude(scanner("user").split(","));//表名,多个英文逗号分割
         strategy.setControllerMappingHyphenStyle(true);

+ 3 - 0
cloud-model/src/main/resources/application-prod.properties

@@ -1,6 +1,9 @@
 # ####################################################################################################
 # ·þÎñ¶ËÅäÖÃ
+#ÔÆÄ£¶Ë¿Ú
 server.port=9099
+##»ðʯ¶Ë¿Ú
+#server.port=8092
 server.servlet.context-path=/
 server.tomcat.uri-encoding=UTF-8
 server.tomcat.max-http-post-size=-1

+ 3 - 3
cloud-model/src/main/resources/application.properties

@@ -1,6 +1,6 @@
 # ####################################################################################################
 # ·þÎñ¶ËÅäÖÃ
-server.port=8099
+server.port=9099
 server.servlet.context-path=/
 server.tomcat.uri-encoding=UTF-8
 server.tomcat.max-http-post-size=-1
@@ -14,9 +14,9 @@ spring.thymeleaf.jackson.date-format=yyyy-MM-dd HH:mm:ss
 # Êý¾ÝÔ´ÅäÖÃ
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 #spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
-spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model_test?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+spring.datasource.url=jdbc:mysql://47.100.37.243:7644/cloud_mould?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
 spring.datasource.username=root
-spring.datasource.password=p011430seya1026
+spring.datasource.password=Hssx2018.!
 #spring.datasource.druid.test-on-borrow=true
 #spring.datasource.druid.test-while-idle=true
 # ####################################################################################################

+ 39 - 0
cloud-model/src/main/resources/mapper/EquipmentSendCommandMapper.xml

@@ -0,0 +1,39 @@
+<?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.cloudmodel.mapper.EquipmentSendCommandMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.EquipmentSendCommand">
+        <id column="id" property="id" />
+        <result column="equipment_no" property="equipmentNo" />
+        <result column="uid" property="uid" />
+        <result column="indate" property="indate" />
+        <result column="send_time" property="sendTime" />
+        <result column="state" property="state" />
+        <result column="is_send" property="isSend" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, equipment_no, uid, indate, send_time, state, is_send
+    </sql>
+
+    <select id="getList" resultType="java.util.Map">
+        select
+            esc.id, esc.equipment_no, esc.uid, DATE_FORMAT(esc.indate,'%Y-%m-%d %H:%m:%s') indate, DATE_FORMAT(esc.send_time,'%Y-%m-%d %H:%m:%s') send_time, esc.state, esc.is_send, tu.username
+        from
+            equipment_send_command esc
+        left join
+            tb_user tu
+        on
+            tu.id = esc.uid
+        <where>
+            esc.equipment_no in
+                <foreach collection="list" separator="," item="item" index="index" open="(" close=")">
+                    #{item}
+                </foreach>
+        </where>
+            order by indate desc
+    </select>
+
+</mapper>

+ 2 - 2
cloud-model/src/main/resources/mapper/MouldMapper.xml

@@ -90,7 +90,7 @@
         tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbco.company_name produceCompany,tbm.pre_update_id,
         tbp.manager mangerName,tbco.company_address area,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,tbmp.equipment_name equipmentName,
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
-        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT indate FROM `mould_history` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime
+        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT open_time FROM `mould_history_time` WHERE equipment_no=equipmentNo ORDER BY open_time DESC LIMIT 1) lastopentime
         ,tbmp.curhill_number hillNumber,tbmp.curtemperature temperature
         from
         tb_mould tbm
@@ -140,7 +140,7 @@
         tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbm.holes,tbm.pre_update_id,tbco.company_name produceCompany,
         tbp.manager mangerName,tbco.company_address area,tbm.oc_cycle oc_cycle,tbm.creator_id creator_id,tbmp.equipment_name equipmentName,
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
-        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT indate FROM `mould_history` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime,
+        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT open_time FROM `mould_history_time` WHERE equipment_no=equipmentNo ORDER BY open_time DESC LIMIT 1) lastopentime,
         tbmp.curhill_number hillNumber,
         tbmp.curtemperature temperature
         from

+ 22 - 8
cloud-model/src/test/java/com/hssx/cloudmodel/CloudModelApplicationTests.java

@@ -1,8 +1,11 @@
 package com.hssx.cloudmodel;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.hssx.cloudmodel.entity.CustomCompany;
+import com.hssx.cloudmodel.entity.MouldHistoryTime;
 import com.hssx.cloudmodel.entity.vo.ProjectVO;
 import com.hssx.cloudmodel.entity.vo.UserVO;
+import com.hssx.cloudmodel.mapper.MouldHistoryTimeMapper;
 import com.hssx.cloudmodel.mapper.ProjectMapper;
 import com.hssx.cloudmodel.mapper.ProjectUserMapper;
 import com.hssx.cloudmodel.mapper.UserMapper;
@@ -10,8 +13,10 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 
 @RunWith(SpringRunner.class)
@@ -23,18 +28,27 @@ public class CloudModelApplicationTests {
     @Resource
     UserMapper userMapper;
     @Resource
+    MouldHistoryTimeMapper mouldHistoryTimeMapper;
+    @Resource
     ProjectMapper  projectMapper;
     @Test
     public void contextLoads() {
+//        List<MouldHistoryTime> mouldHistoryTimes;
+        System.out.println(mouldHistoryTimeMapper.selectList(new QueryWrapper<MouldHistoryTime>().apply("date_format(open_time,'%H') between '23' and '24'")));
+//        mouldHistoryTimes = null;
+//        System.out.println(CollectionUtils.isEmpty(mouldHistoryTimes));
+//        mouldHistoryTimes = new ArrayList<>();
+//        System.out.println(CollectionUtils.isEmpty(mouldHistoryTimes));
+//        System.out.println(mouldHistoryTimeMapper.selectList(new QueryWrapper<MouldHistoryTime>().apply("date_format(open_time,'%H') between '23' and '24'")));
 
-        CustomCompany customCompany = new CustomCompany();
-        UserVO vo = new UserVO();
-        vo.setProjectId(5);
-        vo.setId(165);
-//        vo.setCompanyId(9);
-        vo.setKeyName("111");
-        List<ProjectVO> projectVOS = projectMapper.selectUserPowerList1(vo, 0);
-        System.out.println(projectVOS);
+//        CustomCompany customCompany = new CustomCompany();
+//        UserVO vo = new UserVO();
+//        vo.setProjectId(5);
+//        vo.setId(165);
+////        vo.setCompanyId(9);
+//        vo.setKeyName("111");
+//        List<ProjectVO> projectVOS = projectMapper.selectUserPowerList1(vo, 0);
+//        System.out.println(projectVOS);
 //        customCompany.setCompanyId(10);
 //        customCompany.setProjectId(4);
 //        customCompanyMapper.update(customCompany,new QueryWrapper<CustomCompany>().eq("company_id",10));

+ 28 - 23
cloud-socket/src/com/js/kbt/UserTempGenConfig.xml

@@ -1,24 +1,29 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
-<generatorConfiguration >
-	<properties resource="jdbc.properties" />
-	<classPathEntry location="${classPath}"/>
-  <context id="context1" targetRuntime="MyBatis3">
-  
-    <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://118.190.47.230:3306/cloud_model"
-     userId="root" password="p011430seya1026" >
-    </jdbcConnection>
-    <javaModelGenerator targetPackage="com.js.kbt.model" targetProject="cloud-socket" />
-    <sqlMapGenerator targetPackage="com.js.kbt.mapper" targetProject="cloud-socket" />
-    <javaClientGenerator targetPackage="com.js.kbt.mapper" targetProject="cloud-socket" type="XMLMAPPER" />
-    <table schema="cloud_model" tableName="time_calibration_record" >
-    	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/>
-    </table>
-<!--     <table schema="cloud_model" tableName="tb_mould_equipment" > -->
-<!--     	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/> -->
-<!--     </table> -->
-<!--     <table schema="cloud_model" tableName="tb_factory" > -->
-<!--     	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/> -->
-<!--     </table> -->
-  </context>
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
+<generatorConfiguration >
+	<properties resource="jdbc.properties" />
+	<classPathEntry location="${classPath}"/>
+	<!-- 下面这行相当于以上两行 -->
+	<!-- <classPathEntry location="D:/mysql-connector-java-5.1.31-bin.jar"/> -->
+  <context id="context1" targetRuntime="MyBatis3">
+  
+    <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://118.190.47.230:3306/cloud_model"
+     userId="root" password="p011430seya1026" >
+    </jdbcConnection>
+     <!-- <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/cloud_mould"
+     userId="root" password="102345.." > 
+    </jdbcConnection> -->
+    <javaModelGenerator targetPackage="com.js.kbt.model" targetProject="cloud-socket" />
+    <sqlMapGenerator targetPackage="com.js.kbt.mapper" targetProject="cloud-socket" />
+    <javaClientGenerator targetPackage="com.js.kbt.mapper" targetProject="cloud-socket" type="XMLMAPPER" />
+    <table schema="cloud_mould" tableName="equipment_send_command" >
+    	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/>
+    </table>
+<!--     <table schema="cloud_model" tableName="tb_mould_equipment" > -->
+<!--     	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/> -->
+<!--     </table> -->
+<!--     <table schema="cloud_model" tableName="tb_factory" > -->
+<!--     	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/> -->
+<!--     </table> -->
+  </context>
 </generatorConfiguration>

+ 96 - 0
cloud-socket/src/com/js/kbt/mapper/EquipmentSendCommandMapper.java

@@ -0,0 +1,96 @@
+package com.js.kbt.mapper;
+
+import com.js.kbt.model.EquipmentSendCommand;
+import com.js.kbt.model.EquipmentSendCommandExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface EquipmentSendCommandMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    long countByExample(EquipmentSendCommandExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    int deleteByExample(EquipmentSendCommandExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    int insert(EquipmentSendCommand record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    int insertSelective(EquipmentSendCommand record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    List<EquipmentSendCommand> selectByExample(EquipmentSendCommandExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    EquipmentSendCommand selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    int updateByExampleSelective(@Param("record") EquipmentSendCommand record, @Param("example") EquipmentSendCommandExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    int updateByExample(@Param("record") EquipmentSendCommand record, @Param("example") EquipmentSendCommandExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    int updateByPrimaryKeySelective(EquipmentSendCommand record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    int updateByPrimaryKey(EquipmentSendCommand record);
+}

+ 318 - 0
cloud-socket/src/com/js/kbt/mapper/EquipmentSendCommandMapper.xml

@@ -0,0 +1,318 @@
+<?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.js.kbt.mapper.EquipmentSendCommandMapper">
+  <resultMap id="BaseResultMap" type="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
+    <result column="uid" jdbcType="INTEGER" property="uid" />
+    <result column="indate" jdbcType="TIMESTAMP" property="indate" />
+    <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
+    <result column="state" jdbcType="INTEGER" property="state" />
+    <result column="is_send" jdbcType="INTEGER" property="isSend" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    id, equipment_no, uid, indate, send_time, state, is_send
+  </sql>
+  <select id="selectByExample" parameterType="com.js.kbt.model.EquipmentSendCommandExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from equipment_send_command
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from equipment_send_command
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    delete from equipment_send_command
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.js.kbt.model.EquipmentSendCommandExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    delete from equipment_send_command
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into equipment_send_command (equipment_no, uid, indate, 
+      send_time, state, is_send
+      )
+    values (#{equipmentNo,jdbcType=VARCHAR}, #{uid,jdbcType=INTEGER}, #{indate,jdbcType=TIMESTAMP}, 
+      #{sendTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER}, #{isSend,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into equipment_send_command
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="equipmentNo != null">
+        equipment_no,
+      </if>
+      <if test="uid != null">
+        uid,
+      </if>
+      <if test="indate != null">
+        indate,
+      </if>
+      <if test="sendTime != null">
+        send_time,
+      </if>
+      <if test="state != null">
+        state,
+      </if>
+      <if test="isSend != null">
+        is_send,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="equipmentNo != null">
+        #{equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null">
+        #{uid,jdbcType=INTEGER},
+      </if>
+      <if test="indate != null">
+        #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sendTime != null">
+        #{sendTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="state != null">
+        #{state,jdbcType=INTEGER},
+      </if>
+      <if test="isSend != null">
+        #{isSend,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.js.kbt.model.EquipmentSendCommandExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    select count(*) from equipment_send_command
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    update equipment_send_command
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.equipmentNo != null">
+        equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="record.uid != null">
+        uid = #{record.uid,jdbcType=INTEGER},
+      </if>
+      <if test="record.indate != null">
+        indate = #{record.indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.sendTime != null">
+        send_time = #{record.sendTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.state != null">
+        state = #{record.state,jdbcType=INTEGER},
+      </if>
+      <if test="record.isSend != null">
+        is_send = #{record.isSend,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    update equipment_send_command
+    set id = #{record.id,jdbcType=INTEGER},
+      equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
+      uid = #{record.uid,jdbcType=INTEGER},
+      indate = #{record.indate,jdbcType=TIMESTAMP},
+      send_time = #{record.sendTime,jdbcType=TIMESTAMP},
+      state = #{record.state,jdbcType=INTEGER},
+      is_send = #{record.isSend,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    update equipment_send_command
+    <set>
+      <if test="equipmentNo != null">
+        equipment_no = #{equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null">
+        uid = #{uid,jdbcType=INTEGER},
+      </if>
+      <if test="indate != null">
+        indate = #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sendTime != null">
+        send_time = #{sendTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="state != null">
+        state = #{state,jdbcType=INTEGER},
+      </if>
+      <if test="isSend != null">
+        is_send = #{isSend,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Mar 19 13:16:30 CST 2020.
+    -->
+    update equipment_send_command
+    set equipment_no = #{equipmentNo,jdbcType=VARCHAR},
+      uid = #{uid,jdbcType=INTEGER},
+      indate = #{indate,jdbcType=TIMESTAMP},
+      send_time = #{sendTime,jdbcType=TIMESTAMP},
+      state = #{state,jdbcType=INTEGER},
+      is_send = #{isSend,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 236 - 0
cloud-socket/src/com/js/kbt/model/EquipmentSendCommand.java

@@ -0,0 +1,236 @@
+package com.js.kbt.model;
+
+import java.util.Date;
+
+public class EquipmentSendCommand {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column equipment_send_command.id
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column equipment_send_command.equipment_no
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    private String equipmentNo;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column equipment_send_command.uid
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    private Integer uid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column equipment_send_command.indate
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    private Date indate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column equipment_send_command.send_time
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    private Date sendTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column equipment_send_command.state
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    private Integer state;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column equipment_send_command.is_send
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    private Integer isSend;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column equipment_send_command.id
+     *
+     * @return the value of equipment_send_command.id
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column equipment_send_command.id
+     *
+     * @param id the value for equipment_send_command.id
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column equipment_send_command.equipment_no
+     *
+     * @return the value of equipment_send_command.equipment_no
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public String getEquipmentNo() {
+        return equipmentNo;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column equipment_send_command.equipment_no
+     *
+     * @param equipmentNo the value for equipment_send_command.equipment_no
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void setEquipmentNo(String equipmentNo) {
+        this.equipmentNo = equipmentNo;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column equipment_send_command.uid
+     *
+     * @return the value of equipment_send_command.uid
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public Integer getUid() {
+        return uid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column equipment_send_command.uid
+     *
+     * @param uid the value for equipment_send_command.uid
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void setUid(Integer uid) {
+        this.uid = uid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column equipment_send_command.indate
+     *
+     * @return the value of equipment_send_command.indate
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public Date getIndate() {
+        return indate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column equipment_send_command.indate
+     *
+     * @param indate the value for equipment_send_command.indate
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void setIndate(Date indate) {
+        this.indate = indate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column equipment_send_command.send_time
+     *
+     * @return the value of equipment_send_command.send_time
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public Date getSendTime() {
+        return sendTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column equipment_send_command.send_time
+     *
+     * @param sendTime the value for equipment_send_command.send_time
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void setSendTime(Date sendTime) {
+        this.sendTime = sendTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column equipment_send_command.state
+     *
+     * @return the value of equipment_send_command.state
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public Integer getState() {
+        return state;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column equipment_send_command.state
+     *
+     * @param state the value for equipment_send_command.state
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column equipment_send_command.is_send
+     *
+     * @return the value of equipment_send_command.is_send
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public Integer getIsSend() {
+        return isSend;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column equipment_send_command.is_send
+     *
+     * @param isSend the value for equipment_send_command.is_send
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void setIsSend(Integer isSend) {
+        this.isSend = isSend;
+    }
+}

+ 733 - 0
cloud-socket/src/com/js/kbt/model/EquipmentSendCommandExample.java

@@ -0,0 +1,733 @@
+package com.js.kbt.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class EquipmentSendCommandExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public EquipmentSendCommandExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Integer value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoIsNull() {
+            addCriterion("equipment_no is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoIsNotNull() {
+            addCriterion("equipment_no is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoEqualTo(String value) {
+            addCriterion("equipment_no =", value, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoNotEqualTo(String value) {
+            addCriterion("equipment_no <>", value, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoGreaterThan(String value) {
+            addCriterion("equipment_no >", value, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoGreaterThanOrEqualTo(String value) {
+            addCriterion("equipment_no >=", value, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoLessThan(String value) {
+            addCriterion("equipment_no <", value, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoLessThanOrEqualTo(String value) {
+            addCriterion("equipment_no <=", value, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoLike(String value) {
+            addCriterion("equipment_no like", value, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoNotLike(String value) {
+            addCriterion("equipment_no not like", value, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoIn(List<String> values) {
+            addCriterion("equipment_no in", values, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoNotIn(List<String> values) {
+            addCriterion("equipment_no not in", values, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoBetween(String value1, String value2) {
+            addCriterion("equipment_no between", value1, value2, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentNoNotBetween(String value1, String value2) {
+            addCriterion("equipment_no not between", value1, value2, "equipmentNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidIsNull() {
+            addCriterion("uid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidIsNotNull() {
+            addCriterion("uid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidEqualTo(Integer value) {
+            addCriterion("uid =", value, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidNotEqualTo(Integer value) {
+            addCriterion("uid <>", value, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidGreaterThan(Integer value) {
+            addCriterion("uid >", value, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidGreaterThanOrEqualTo(Integer value) {
+            addCriterion("uid >=", value, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidLessThan(Integer value) {
+            addCriterion("uid <", value, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidLessThanOrEqualTo(Integer value) {
+            addCriterion("uid <=", value, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidIn(List<Integer> values) {
+            addCriterion("uid in", values, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidNotIn(List<Integer> values) {
+            addCriterion("uid not in", values, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidBetween(Integer value1, Integer value2) {
+            addCriterion("uid between", value1, value2, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUidNotBetween(Integer value1, Integer value2) {
+            addCriterion("uid not between", value1, value2, "uid");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateIsNull() {
+            addCriterion("indate is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateIsNotNull() {
+            addCriterion("indate is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateEqualTo(Date value) {
+            addCriterion("indate =", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateNotEqualTo(Date value) {
+            addCriterion("indate <>", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateGreaterThan(Date value) {
+            addCriterion("indate >", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateGreaterThanOrEqualTo(Date value) {
+            addCriterion("indate >=", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateLessThan(Date value) {
+            addCriterion("indate <", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateLessThanOrEqualTo(Date value) {
+            addCriterion("indate <=", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateIn(List<Date> values) {
+            addCriterion("indate in", values, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateNotIn(List<Date> values) {
+            addCriterion("indate not in", values, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateBetween(Date value1, Date value2) {
+            addCriterion("indate between", value1, value2, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateNotBetween(Date value1, Date value2) {
+            addCriterion("indate not between", value1, value2, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeIsNull() {
+            addCriterion("send_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeIsNotNull() {
+            addCriterion("send_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeEqualTo(Date value) {
+            addCriterion("send_time =", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeNotEqualTo(Date value) {
+            addCriterion("send_time <>", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeGreaterThan(Date value) {
+            addCriterion("send_time >", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("send_time >=", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeLessThan(Date value) {
+            addCriterion("send_time <", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeLessThanOrEqualTo(Date value) {
+            addCriterion("send_time <=", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeIn(List<Date> values) {
+            addCriterion("send_time in", values, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeNotIn(List<Date> values) {
+            addCriterion("send_time not in", values, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeBetween(Date value1, Date value2) {
+            addCriterion("send_time between", value1, value2, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeNotBetween(Date value1, Date value2) {
+            addCriterion("send_time not between", value1, value2, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateIsNull() {
+            addCriterion("state is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateIsNotNull() {
+            addCriterion("state is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateEqualTo(Integer value) {
+            addCriterion("state =", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateNotEqualTo(Integer value) {
+            addCriterion("state <>", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateGreaterThan(Integer value) {
+            addCriterion("state >", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateGreaterThanOrEqualTo(Integer value) {
+            addCriterion("state >=", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateLessThan(Integer value) {
+            addCriterion("state <", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateLessThanOrEqualTo(Integer value) {
+            addCriterion("state <=", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateIn(List<Integer> values) {
+            addCriterion("state in", values, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateNotIn(List<Integer> values) {
+            addCriterion("state not in", values, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateBetween(Integer value1, Integer value2) {
+            addCriterion("state between", value1, value2, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateNotBetween(Integer value1, Integer value2) {
+            addCriterion("state not between", value1, value2, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendIsNull() {
+            addCriterion("is_send is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendIsNotNull() {
+            addCriterion("is_send is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendEqualTo(Integer value) {
+            addCriterion("is_send =", value, "isSend");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendNotEqualTo(Integer value) {
+            addCriterion("is_send <>", value, "isSend");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendGreaterThan(Integer value) {
+            addCriterion("is_send >", value, "isSend");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_send >=", value, "isSend");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendLessThan(Integer value) {
+            addCriterion("is_send <", value, "isSend");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendLessThanOrEqualTo(Integer value) {
+            addCriterion("is_send <=", value, "isSend");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendIn(List<Integer> values) {
+            addCriterion("is_send in", values, "isSend");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendNotIn(List<Integer> values) {
+            addCriterion("is_send not in", values, "isSend");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendBetween(Integer value1, Integer value2) {
+            addCriterion("is_send between", value1, value2, "isSend");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSendNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_send not between", value1, value2, "isSend");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated do_not_delete_during_merge Thu Mar 19 13:16:30 CST 2020
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table equipment_send_command
+     *
+     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

Plik diff jest za duży
+ 207 - 140
cloud-socket/src/com/js/kbt/socket/UserHandler.java


+ 3 - 2
cloud-socket/src/com/js/kbt/task/MyTask.java

@@ -24,8 +24,9 @@ public class MyTask {
 	public void doTask() throws Exception {
 		Date now = new Date();
 		log.info("定时任务:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(now));
-		//规则是, 运动状态下,上次接受,超过1个小时,不到6个小时的模具设备,状态设置为5-异常,6小时以上的,状态设置为掉线
-		now.setHours(now.getHours() -1);
+		//规则是, 运动状态下,上次接受,超过2.5个小时,不到6个小时的模具设备,状态设置为5-异常,6小时以上的,状态设置为掉线
+		now.setHours(now.getHours() -2);
+		now.setMinutes(now.getMinutes()-30);
 		TbMouldExample example = new TbMouldExample();
 		example.createCriteria().andStateEqualTo("1").andLastRecTimeLessThanOrEqualTo(now);
 		TbMould mould = new TbMould();

+ 4 - 4
cloud-socket/src/jdbc.properties

@@ -1,9 +1,9 @@
-#classPath=D:/model/cloud-socket/WebContent/WEB-INF/lib/mysql-connector-java-5.1.31-bin.jar
-classPath=D:/workspace/yunsu/cloud-socket/WebContent/WEB-INF/lib/mysql-connector-java-5.1.31-bin.jar
+classPath=D:/mysql-connector-java-5.1.31-bin.jar
+#classPath=D:/workspace/yunsu/cloud-socket/WebContent/WEB-INF/lib/mysql-connector-java-5.1.31-bin.jar
 driver=com.mysql.jdbc.Driver
-url=jdbc:mysql://118.190.47.230:3306/cloud_model?autoReconnect=true&rewriteBatchedStatements=TRUE&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
+url=jdbc:mysql://localhost:3306/cloud_model?autoReconnect=true&rewriteBatchedStatements=TRUE&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
 username=root
-password=p011430seya1026
+password=102345..
 maxActive=255
 maxIdle=20
 maxWait=100

+ 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);
+    }
+}
+

+ 5 - 7
official_backend/src/main/java/com/hssx/ysofficial/controller/CompanyProductsController.java

@@ -30,28 +30,26 @@ public class CompanyProductsController {
     /**
      * 公司产品的录入
      * 参数:
-     *  添加:title 产品名称 ,introduction 产品简介,address 产品地址,file上传的文件(非必传)
-     *  修改 id:产品id
-     * @return
+     * 添加:title 产品名称 ,introduction 产品简介,address 产品地址, type 产品类型, file上传的文件(非必传)
+     * 修改 id:产品id
      */
     @RequestMapping("/addAndUpdate")
-    public HttpRespMsg addAndUpdate(CompanyProducts CompanyProducts, @RequestParam(required = false)MultipartFile file) {
-        return companyProductsService.addAndUpdate(CompanyProducts,file);
+    public HttpRespMsg addAndUpdate(CompanyProducts CompanyProducts, @RequestParam(required = false) MultipartFile file) {
+        return companyProductsService.addAndUpdate(CompanyProducts, file);
     }
 
     /**
      * 公司产品删除
      * 参数:id:产品id
-     * @return
      */
     @RequestMapping("/del")
     public HttpRespMsg del(CompanyProducts companyProducts) {
         return companyProductsService.del(companyProducts);
     }
+
     /**
      * 公司产品列表
      * 参数:pageNum 当前页码,pageSize 每页条数
-     * @return
      */
     @RequestMapping("/companyProductsList")
     public HttpRespMsg companyProductsList(PageUtil page) {

+ 7 - 0
official_backend/src/main/java/com/hssx/ysofficial/controller/CooperationsController.java

@@ -33,6 +33,13 @@ public class CooperationsController {
         return cooperationsService.getCooperations();
     }
 
+    /**
+     * 添加合作者
+     * name 合作者名称
+     * description 合作者描述
+     * type 合作者种类 0-研发机构类、1-材料供应商、2-设备合作商、3-系统授权商、4-孵化中心、5-平台合作单位
+     * multipartFile 合作者图片
+     */
     @RequestMapping("/addCooperation")
     public HttpRespMsg addCooperation(
             Cooperations cooperations,

+ 74 - 0
official_backend/src/main/java/com/hssx/ysofficial/controller/FeedbackController.java

@@ -0,0 +1,74 @@
+package com.hssx.ysofficial.controller;
+
+
+import com.hssx.ysofficial.entity.Feedback;
+import com.hssx.ysofficial.service.FeedbackService;
+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("/feedback")
+public class FeedbackController {
+    @Autowired
+    private FeedbackService feedbackService;
+
+    /**
+     * 获取用户说模块的标题
+     */
+    @RequestMapping("/getFeedbackTitle")
+    public HttpRespMsg getFeedbackTitle() {
+        return feedbackService.getFeedbackTitle();
+    }
+
+    /**
+     * 更新用户说模块的标题
+     * content 标题内容
+     */
+    @RequestMapping("/updateFeedbackTitle")
+    public HttpRespMsg updateFeedbackTitle(@RequestParam String content) {
+        return feedbackService.updateFeedbackTitle(content);
+    }
+
+    /**
+     * 获取用户说模块具体的信息列表
+     */
+    @RequestMapping("/listFeedback")
+    public HttpRespMsg listFeedback() {
+        return feedbackService.listFeedback();
+    }
+
+    /**
+     * 新增或修改某个用户说模块具体的信息
+     * id 修改时需要的id
+     * companyName 公司名称
+     * clientName 客户名称和职称
+     * description 具体描述
+     * file 可上传的图片
+     */
+    @RequestMapping("/insertOrUpdateFeedback")
+    public HttpRespMsg insertOrUpdateFeedback(Feedback feedback, MultipartFile file) {
+        return feedbackService.insertOrUpdateFeedback(feedback, file);
+    }
+
+    /**
+     * 删除某个用户说模块具体的信息
+     * id 要删除的id
+     */
+    @RequestMapping("/deleteFeedback")
+    public HttpRespMsg deleteFeedback(@RequestParam Integer id) {
+        return feedbackService.deleteFeedback(id);
+    }
+}
+

+ 21 - 0
official_backend/src/main/java/com/hssx/ysofficial/controller/ParameterController.java

@@ -0,0 +1,21 @@
+package com.hssx.ysofficial.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 其他简单参数的表 前端控制器
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+@RestController
+@RequestMapping("/parameter")
+public class ParameterController {
+
+}
+

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

@@ -0,0 +1,56 @@
+package com.hssx.ysofficial.controller;
+
+
+import com.hssx.ysofficial.entity.Qualification;
+import com.hssx.ysofficial.service.QualificationService;
+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-18
+ */
+@RestController
+@RequestMapping("/qualification")
+public class QualificationController {
+    @Autowired
+    private QualificationService qualificationService;
+
+    /**
+     * 获取资质列表
+     */
+    @RequestMapping("/list")
+    public HttpRespMsg getRecruitmentList() {
+        return qualificationService.getQualificationList();
+    }
+
+    /**
+     * 删除资质
+     * id 要删除的资质id
+     */
+    @RequestMapping("/delete")
+    public HttpRespMsg deleteRecruitment(@RequestParam Integer id) {
+        return qualificationService.deleteQualification(id);
+    }
+
+    /**
+     * 新增或修改资质
+     * id 修改时要传的资质id
+     * title 资质标题
+     * content 资质内容
+     * file 图片文件
+     */
+    @RequestMapping("/insertOrUpdate")
+    public HttpRespMsg editRecruitment(Qualification qualification, MultipartFile file) {
+        return qualificationService.editQualification(qualification, file);
+    }
+}
+

+ 65 - 0
official_backend/src/main/java/com/hssx/ysofficial/controller/RecruitmentController.java

@@ -0,0 +1,65 @@
+package com.hssx.ysofficial.controller;
+
+
+import com.hssx.ysofficial.service.RecruitmentService;
+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-14
+ */
+@RestController
+@RequestMapping("/recruitment")
+public class RecruitmentController {
+    @Autowired
+    private RecruitmentService recruitmentService;
+
+    /**
+     * 获取招聘信息列表
+     */
+    @RequestMapping("/list")
+    public HttpRespMsg getRecruitmentList() {
+        return recruitmentService.getRecruitmentList();
+    }
+
+    /**
+     * 获取某个id的招聘信息
+     * id 要获取的id
+     */
+    @RequestMapping("/get")
+    public HttpRespMsg getRecruitment(@RequestParam Integer id) {
+        return recruitmentService.getRecruitment(id);
+    }
+
+    /**
+     * 删除招聘信息
+     * id 要删除的招聘信息id
+     */
+    @RequestMapping("/delete")
+    public HttpRespMsg deleteRecruitmentList(@RequestParam Integer id) {
+        return recruitmentService.deleteRecruitmentList(id);
+    }
+
+    /**
+     * 新增或修改招聘信息
+     * id 修改时需要的id
+     * title 标题
+     * content 内容
+     * file 图片
+     */
+    @RequestMapping("/insertOrUpdate")
+    public HttpRespMsg editRecruitmentList(Integer id, @RequestParam String title, @RequestParam String content,
+                                           MultipartFile file) {
+        return recruitmentService.editRecruitmentList(id, title, content, file);
+    }
+}
+

+ 59 - 0
official_backend/src/main/java/com/hssx/ysofficial/controller/VipProductsController.java

@@ -0,0 +1,59 @@
+package com.hssx.ysofficial.controller;
+
+
+import com.hssx.ysofficial.entity.VipProducts;
+import com.hssx.ysofficial.service.VipProductsService;
+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-05
+ */
+@RestController
+@RequestMapping("/vip-products")
+public class VipProductsController {
+    @Autowired
+    private VipProductsService vipProductsService;
+
+    /**
+     * 分页获取VIP产品
+     * pageIndex 页面索引
+     * pageSize 页面大小
+     */
+    @RequestMapping("/list")
+    public HttpRespMsg getVipProductList(@RequestParam Integer pageIndex, @RequestParam Integer pageSize) {
+        return vipProductsService.getVipProductList(pageIndex, pageSize);
+    }
+
+    /**
+     * 插入或更新VIP产品
+     * id 要修改的产品id(仅修改时)
+     * title 产品标题
+     * introduction 产品介绍
+     * address 地址
+     * file 照片
+     */
+    @RequestMapping("/insertOrUpdate")
+    public HttpRespMsg insertOrUpdateVipProduct(VipProducts vipProducts, MultipartFile file) {
+        return vipProductsService.insertOrUpdateVipProduct(vipProducts, file);
+    }
+
+    /**
+     * 删除VIP产品
+     * id 要删除的产品id
+     */
+    @RequestMapping("/delete")
+    public HttpRespMsg deleteVipProduct(@RequestParam Integer id) {
+        return vipProductsService.deleteVipProduct(id);
+    }
+}
+

+ 1 - 1
official_backend/src/main/java/com/hssx/ysofficial/entity/Article.java

@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Reiskuchen
- * @since 2019-10-24
+ * @since 2020-02-05
  */
 @Data
 @EqualsAndHashCode(callSuper = false)

+ 1 - 1
official_backend/src/main/java/com/hssx/ysofficial/entity/BannerPictures.java

@@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Reiskuchen
- * @since 2019-10-24
+ * @since 2020-02-05
  */
 @Data
 @EqualsAndHashCode(callSuper = false)

+ 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;
+    }
+
+}

+ 9 - 9
official_backend/src/main/java/com/hssx/ysofficial/entity/Comment.java

@@ -1,25 +1,25 @@
 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 java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableField;
-import java.io.Serializable;
-
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
 /**
  * <p>
  * the comments left by customers
  * </p>
  *
  * @author Reiskuchen
- * @since 2019-10-24
+ * @since 2020-02-05
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -27,7 +27,7 @@ import lombok.experimental.Accessors;
 @TableName("comment")
 public class Comment extends Model<Comment> {
 
-    private static final long serialVersionUID=1L;
+    private static final long serialVersionUID = 1L;
 
     /**
      * id
@@ -56,8 +56,8 @@ public class Comment extends Model<Comment> {
     /**
      * 留言时间
      */
-    @TableField("indate")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField("indate")
     private LocalDateTime indate;
 
 

+ 7 - 7
official_backend/src/main/java/com/hssx/ysofficial/entity/CompanyProducts.java

@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Reiskuchen
- * @since 2019-11-21
+ * @since 2020-02-05
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -50,18 +50,18 @@ public class CompanyProducts extends Model<CompanyProducts> {
     @TableField("introduction")
     private String introduction;
 
-    /**
-     * 地址
-     */
-    @TableField("address")
-    private String address;
-
     /**
      * 是否显示在首页 0不显示 1显示
      */
     @TableField("sticky")
     private Integer sticky;
 
+    /**
+     * 产品种类 0-塑料产品 1-物联网产品 2-成品 3-3D打印及检测服务 4-模具和加工设备能力 5-专利和政府政策服务 6-融资服务
+     */
+    @TableField("type")
+    private Integer type;
+
 
     @Override
     protected Serializable pkVal() {

+ 4 - 4
official_backend/src/main/java/com/hssx/ysofficial/entity/Cooperations.java

@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Reiskuchen
- * @since 2019-10-24
+ * @since 2020-02-05
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -36,7 +36,7 @@ public class Cooperations extends Model<Cooperations> {
     private String name;
 
     /**
-     * 合作者描述
+     * 合作者描述
      */
     @TableField("description")
     private String description;
@@ -48,13 +48,13 @@ public class Cooperations extends Model<Cooperations> {
     private String imageUrl;
 
     /**
-     * 合作者种类: 学校或公司
+     * 合作者种类 0-联合开发 1-材料供应商 2-芯片及PCB版合作伙伴 3-软件合作伙伴 4-投融资服务机构
      */
     @TableField("type")
     private Integer type;
 
     /**
-     * 是否显示于首页 0为不显示 1为显示
+     * 是否显示于首页 0-不显示 1-显示
      */
     @TableField("sticky")
     private Integer sticky;

+ 65 - 0
official_backend/src/main/java/com/hssx/ysofficial/entity/Feedback.java

@@ -0,0 +1,65 @@
+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("feedback")
+public class Feedback extends Model<Feedback> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 公司名字
+     */
+    @TableField("company_name")
+    private String companyName;
+
+    /**
+     * 发言人职称 姓名
+     */
+    @TableField("client_name")
+    private String clientName;
+
+    /**
+     * 对产品的评价
+     */
+    @TableField("description")
+    private String description;
+
+    /**
+     * 图片
+     */
+    @TableField("pic_url")
+    private String picUrl;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 1 - 4
official_backend/src/main/java/com/hssx/ysofficial/entity/OnlineApplication.java

@@ -7,8 +7,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -19,7 +17,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Reiskuchen
- * @since 2019-11-21
+ * @since 2020-02-05
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -69,7 +67,6 @@ public class OnlineApplication extends Model<OnlineApplication> {
      * 申请时间
      */
     @TableField("indate")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime indate;
 
     /**

+ 53 - 0
official_backend/src/main/java/com/hssx/ysofficial/entity/Parameter.java

@@ -0,0 +1,53 @@
+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("parameter")
+public class Parameter extends Model<Parameter> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 参数表主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 参数值
+     */
+    @TableField("parameter_value")
+    private String parameterValue;
+
+    /**
+     * 参数备注
+     */
+    @TableField("parameter_note")
+    private String parameterNote;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 57 - 0
official_backend/src/main/java/com/hssx/ysofficial/entity/Qualification.java

@@ -0,0 +1,57 @@
+package com.hssx.ysofficial.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("qualification")
+public class Qualification extends Model<Qualification> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 标题
+     */
+    @TableField(value = "title", insertStrategy = FieldStrategy.IGNORED)
+    private String title;
+
+    /**
+     * 内容
+     */
+    @TableField(value = "content", insertStrategy = FieldStrategy.IGNORED)
+    private String content;
+
+    /**
+     * 图片
+     */
+    @TableField("img_url")
+    private String imgUrl;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 66 - 0
official_backend/src/main/java/com/hssx/ysofficial/entity/Recruitment.java

@@ -0,0 +1,66 @@
+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 java.time.LocalDate;
+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-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("recruitment")
+public class Recruitment extends Model<Recruitment> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 职位名称
+     */
+    @TableField("title")
+    private String title;
+
+    /**
+     * 内容
+     */
+    @TableField("content")
+    private String content;
+
+    /**
+     * 图片
+     */
+    @TableField("pic_url")
+    private String picUrl;
+
+    /**
+     * 发布日期
+     */
+    @TableField("publish_time")
+    private LocalDate publishTime;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 1 - 1
official_backend/src/main/java/com/hssx/ysofficial/entity/User.java

@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Reiskuchen
- * @since 2019-10-24
+ * @since 2020-02-05
  */
 @Data
 @EqualsAndHashCode(callSuper = false)

+ 71 - 0
official_backend/src/main/java/com/hssx/ysofficial/entity/VipProducts.java

@@ -0,0 +1,71 @@
+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-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("vip_products")
+public class VipProducts extends Model<VipProducts> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 产品名称
+     */
+    @TableField("title")
+    private String title;
+
+    /**
+     * 产品图片地址
+     */
+    @TableField("image_url")
+    private String imageUrl;
+
+    /**
+     * 简介
+     */
+    @TableField("introduction")
+    private String introduction;
+
+    /**
+     * 地址
+     */
+    @TableField("address")
+    private String address;
+
+    /**
+     * 置顶 0-否 1-是
+     */
+    @TableField("sticky")
+    private Integer sticky;
+
+
+    @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> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.hssx.ysofficial.mapper;
+
+import com.hssx.ysofficial.entity.Feedback;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 装饰在首页的客户反馈 Mapper 接口
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+public interface FeedbackMapper extends BaseMapper<Feedback> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.hssx.ysofficial.mapper;
+
+import com.hssx.ysofficial.entity.Parameter;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 其他简单参数的表 Mapper 接口
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+public interface ParameterMapper extends BaseMapper<Parameter> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.hssx.ysofficial.mapper;
+
+import com.hssx.ysofficial.entity.Qualification;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-18
+ */
+public interface QualificationMapper extends BaseMapper<Qualification> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.hssx.ysofficial.mapper;
+
+import com.hssx.ysofficial.entity.Recruitment;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-14
+ */
+public interface RecruitmentMapper extends BaseMapper<Recruitment> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.hssx.ysofficial.mapper;
+
+import com.hssx.ysofficial.entity.VipProducts;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 第一个数据是公司优势 其他是案例 Mapper 接口
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-05
+ */
+public interface VipProductsMapper extends BaseMapper<VipProducts> {
+
+}

+ 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);
+}

+ 26 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/FeedbackService.java

@@ -0,0 +1,26 @@
+package com.hssx.ysofficial.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.hssx.ysofficial.entity.Feedback;
+import com.hssx.ysofficial.utility.HttpRespMsg;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * <p>
+ * 装饰在首页的客户反馈 服务类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+public interface FeedbackService extends IService<Feedback> {
+    HttpRespMsg getFeedbackTitle();
+
+    HttpRespMsg updateFeedbackTitle(String content);
+
+    HttpRespMsg listFeedback();
+
+    HttpRespMsg insertOrUpdateFeedback(Feedback feedback, MultipartFile multipartFile);
+
+    HttpRespMsg deleteFeedback(Integer id);
+}

+ 16 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/ParameterService.java

@@ -0,0 +1,16 @@
+package com.hssx.ysofficial.service;
+
+import com.hssx.ysofficial.entity.Parameter;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 其他简单参数的表 服务类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+public interface ParameterService extends IService<Parameter> {
+
+}

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

@@ -0,0 +1,22 @@
+package com.hssx.ysofficial.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.hssx.ysofficial.entity.Qualification;
+import com.hssx.ysofficial.utility.HttpRespMsg;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * <p>
+ * 服务类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-18
+ */
+public interface QualificationService extends IService<Qualification> {
+    HttpRespMsg getQualificationList();
+
+    HttpRespMsg deleteQualification(Integer id);
+
+    HttpRespMsg editQualification(Qualification qualification, MultipartFile multipartFile);
+}

+ 24 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/RecruitmentService.java

@@ -0,0 +1,24 @@
+package com.hssx.ysofficial.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.hssx.ysofficial.entity.Recruitment;
+import com.hssx.ysofficial.utility.HttpRespMsg;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * <p>
+ * 服务类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-14
+ */
+public interface RecruitmentService extends IService<Recruitment> {
+    HttpRespMsg getRecruitmentList();
+
+    HttpRespMsg getRecruitment(Integer id);
+
+    HttpRespMsg deleteRecruitmentList(Integer id);
+
+    HttpRespMsg editRecruitmentList(Integer id, String title, String content, MultipartFile file);
+}

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

@@ -0,0 +1,22 @@
+package com.hssx.ysofficial.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.hssx.ysofficial.entity.VipProducts;
+import com.hssx.ysofficial.utility.HttpRespMsg;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * <p>
+ * 第一个数据是公司优势 其他是案例 服务类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-05
+ */
+public interface VipProductsService extends IService<VipProducts> {
+    HttpRespMsg getVipProductList(Integer pageIndex, Integer pageSize);
+
+    HttpRespMsg insertOrUpdateVipProduct(VipProducts vipProducts, MultipartFile file);
+
+    HttpRespMsg deleteVipProduct(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/service/impl/CooperationsServiceImpl.java

@@ -59,7 +59,7 @@ public class CooperationsServiceImpl extends ServiceImpl<CooperationsMapper, Coo
             cooperations.setImageUrl("/upload/" + storedFileName);
             cooperationsMapper.insert(cooperations);
         }else{
-            httpRespMsg.setError("lack of file or information");
+            httpRespMsg.setError("缺少数据");
         }
         return httpRespMsg;
     }

+ 101 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/impl/FeedbackServiceImpl.java

@@ -0,0 +1,101 @@
+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.Feedback;
+import com.hssx.ysofficial.entity.Parameter;
+import com.hssx.ysofficial.mapper.FeedbackMapper;
+import com.hssx.ysofficial.mapper.ParameterMapper;
+import com.hssx.ysofficial.service.FeedbackService;
+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 FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, Feedback> implements FeedbackService {
+
+    @Value("${upload.path}")
+    private String uploadPath;
+
+    @Resource
+    private ParameterMapper parameterMapper;
+
+    @Resource
+    private FeedbackMapper feedbackMapper;
+
+    @Override
+    public HttpRespMsg getFeedbackTitle() {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.data = parameterMapper.selectById(1).getParameterValue(); //id是1的即为标题
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg updateFeedbackTitle(String content) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        Parameter parameter = parameterMapper.selectById(1).setParameterValue(content);
+        if (parameterMapper.updateById(parameter) == 0) {
+            httpRespMsg.setError("新增失败");
+        }
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg listFeedback() {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.data = feedbackMapper.selectList(new QueryWrapper<Feedback>().orderByAsc("id"));
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg insertOrUpdateFeedback(Feedback feedback, 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();
+            }
+            feedback.setPicUrl("/upload/" + storedFileName);
+        }
+        if (feedback.getId() == null) {
+            if (feedbackMapper.insert(feedback) == 0) {
+                httpRespMsg.setError("新增失败");
+            }
+        } else {
+            if (feedbackMapper.updateById(feedback) == 0) {
+                httpRespMsg.setError("修改失败");
+            }
+        }
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg deleteFeedback(Integer id) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        if (feedbackMapper.deleteById(id) == 0) {
+            httpRespMsg.setError("删除失败");
+        }
+        return httpRespMsg;
+    }
+}

+ 20 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/impl/ParameterServiceImpl.java

@@ -0,0 +1,20 @@
+package com.hssx.ysofficial.service.impl;
+
+import com.hssx.ysofficial.entity.Parameter;
+import com.hssx.ysofficial.mapper.ParameterMapper;
+import com.hssx.ysofficial.service.ParameterService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 其他简单参数的表 服务实现类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-06
+ */
+@Service
+public class ParameterServiceImpl extends ServiceImpl<ParameterMapper, Parameter> implements ParameterService {
+
+}

+ 72 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/impl/QualificationServiceImpl.java

@@ -0,0 +1,72 @@
+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.Qualification;
+import com.hssx.ysofficial.mapper.QualificationMapper;
+import com.hssx.ysofficial.service.QualificationService;
+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.time.LocalDate;
+import java.time.ZoneId;
+import java.util.UUID;
+
+/**
+ * <p>
+ * 服务实现类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-18
+ */
+@Service
+public class QualificationServiceImpl extends ServiceImpl<QualificationMapper, Qualification> implements QualificationService {
+
+    @Resource
+    private QualificationMapper qualificationMapper;
+    @Value("${upload.path}")
+    private String uploadPath;
+
+    @Override
+    public HttpRespMsg getQualificationList() {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.data = qualificationMapper.selectList(new QueryWrapper<>());
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg deleteQualification(Integer id) {
+        qualificationMapper.deleteById(id);
+        return new HttpRespMsg();
+    }
+
+    @Override
+    public HttpRespMsg editQualification(Qualification qualification, MultipartFile multipartFile) {
+        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();
+            }
+            qualification.setImgUrl("/upload/" + storedFileName);
+        }
+        if (qualification.getId() != null) {
+            qualificationMapper.updateById(qualification);
+        } else {
+            qualificationMapper.insert(qualification);
+        }
+        return new HttpRespMsg();
+    }
+}

+ 85 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/impl/RecruitmentServiceImpl.java

@@ -0,0 +1,85 @@
+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.Recruitment;
+import com.hssx.ysofficial.mapper.RecruitmentMapper;
+import com.hssx.ysofficial.service.RecruitmentService;
+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.time.LocalDate;
+import java.time.ZoneId;
+import java.util.UUID;
+
+/**
+ * <p>
+ * 服务实现类
+ * </p>
+ *
+ * @author Reiskuchen
+ * @since 2020-02-14
+ */
+@Service
+public class RecruitmentServiceImpl extends ServiceImpl<RecruitmentMapper, Recruitment> implements RecruitmentService {
+
+    @Resource
+    private RecruitmentMapper recruitmentMapper;
+
+    @Value("${upload.path}")
+    private String uploadPath;
+
+    @Override
+    public HttpRespMsg getRecruitmentList() {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.data = recruitmentMapper.selectList(new QueryWrapper<>());
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg getRecruitment(Integer id) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.data = recruitmentMapper.selectById(id);
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg deleteRecruitmentList(Integer id) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.data = recruitmentMapper.deleteById(id);
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg editRecruitmentList(Integer id, String title, String content, MultipartFile multipartFile) {
+        Recruitment recruitment = new Recruitment()
+                .setId(id)
+                .setTitle(title)
+                .setContent(content);
+        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();
+            }
+            recruitment.setPicUrl("/upload/" + storedFileName);
+        }
+        if (id != null) {
+            recruitmentMapper.updateById(recruitment);
+        } else {
+            recruitmentMapper.insert(recruitment.setPublishTime(LocalDate.now(ZoneId.systemDefault())));
+        }
+        return new HttpRespMsg();
+    }
+}

+ 80 - 0
official_backend/src/main/java/com/hssx/ysofficial/service/impl/VipProductsServiceImpl.java

@@ -0,0 +1,80 @@
+package com.hssx.ysofficial.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.hssx.ysofficial.entity.VipProducts;
+import com.hssx.ysofficial.mapper.VipProductsMapper;
+import com.hssx.ysofficial.service.VipProductsService;
+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-05
+ */
+@Service
+public class VipProductsServiceImpl extends ServiceImpl<VipProductsMapper, VipProducts> implements VipProductsService {
+
+    @Value("${upload.path}")
+    private String uploadPath;
+
+    @Resource
+    private VipProductsMapper vipProductsMapper;
+
+    @Override
+    public HttpRespMsg getVipProductList(Integer pageIndex, Integer pageSize) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.data = vipProductsMapper.selectPage(new Page<VipProducts>(pageIndex, pageSize), new QueryWrapper<>());
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg insertOrUpdateVipProduct(VipProducts vipProducts, 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();
+            }
+            vipProducts.setImageUrl("/upload/" + storedFileName);
+        }
+        if (vipProducts.getId() == null) {
+            if (vipProductsMapper.insert(vipProducts) == 0) {
+                httpRespMsg.setError("新增失败");
+            }
+        } else {
+            if (vipProductsMapper.updateById(vipProducts) == 0) {
+                httpRespMsg.setError("修改失败");
+            }
+        }
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg deleteVipProduct(Integer id) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        if (vipProductsMapper.deleteById(id) == 0) {
+            httpRespMsg.setError("删除失败");
+        }
+        return httpRespMsg;
+    }
+}

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

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

+ 12 - 2
official_backend/src/main/resources/application-prod.properties

@@ -9,14 +9,20 @@ server.connection-timeout=18000000s
 #Mybatis-plus
 mybatis-plus.type-aliases-package=com.hssx.ysofficial.entity/*
 mybatis-plus.mapper-locations=mapper/*.xml
+#mybatis-plus.global-config.db-config.id-type=auto
+mybatis-plus.global-config.db-config.select-strategy=not_empty
+mybatis-plus.global-config.db-config.update-strategy=not_empty
+mybatis-plus.global-config.db-config.insert-strategy=not_empty
+mybatis-plus.configuration.map-underscore-to-camel-case=true
+mybatis-plus.configuration.cache-enabled=false
 
 #Êý¾Ý¿â
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 spring.datasource.url=jdbc:mysql://127.0.0.1:3306/cloud_model_website?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
-#spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model_website?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
-spring.datasource.username=root
 spring.datasource.password=Hssx2019.!
+#spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model_website?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
 #spring.datasource.password=p011430seya1026
+spring.datasource.username=root
 spring.datasource.hikari.max-lifetime=60000
 spring.datasource.hikari.IdleTimeout=60000
 spring.datasource.hikari.ConnectionTimeout=60000
@@ -29,6 +35,10 @@ spring.servlet.multipart.max-file-size=100MB
 spring.servlet.multipart.max-request-size=100MB
 spring.servlet.multipart.resolve-lazily=false
 
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.default-property-inclusion=always
+spring.jackson.time-zone=GMT+8
+
 #ÎļþÉÏ´«Â·¾¶
 #upload.path=D:/mould/upload/
 upload.path=E:/staticproject/website/upload

+ 14 - 7
official_backend/src/main/resources/application.properties

@@ -1,5 +1,5 @@
 #服务端配置
-server.port=8088
+server.port=8098
 server.servlet.context-path=/
 server.tomcat.uri-encoding=UTF-8
 server.tomcat.max-http-post-size=-1
@@ -12,14 +12,17 @@ mybatis-plus.mapper-locations=mapper/*.xml
 #mybatis-plus.global-config.db-config.id-type=auto
 mybatis-plus.global-config.db-config.select-strategy=not_empty
 mybatis-plus.global-config.db-config.update-strategy=not_empty
-mybatis-plus.global-config.db-config.field-strategy=not_empty
+mybatis-plus.global-config.db-config.insert-strategy=not_empty
+mybatis-plus.configuration.map-underscore-to-camel-case=true
+mybatis-plus.configuration.cache-enabled=false
+
 #数据库
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
-#spring.datasource.url=jdbc:mysql://111.231.87.63:3306/cloud_model_website?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
 spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model_website?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
-spring.datasource.username=root
-#spring.datasource.password=Hssx2019.!
 spring.datasource.password=p011430seya1026
+#spring.datasource.url=jdbc:mysql://111.231.87.63:3306/cloud_model_website?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+#spring.datasource.password=Hssx2019.!
+spring.datasource.username=root
 spring.datasource.hikari.max-lifetime=60000
 spring.datasource.hikari.IdleTimeout=60000
 spring.datasource.hikari.ConnectionTimeout=60000
@@ -32,9 +35,13 @@ spring.servlet.multipart.max-file-size=100MB
 spring.servlet.multipart.max-request-size=100MB
 spring.servlet.multipart.resolve-lazily=false
 
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.default-property-inclusion=always
+spring.jackson.time-zone=GMT+8
+
 #文件上传路径
-#upload.path=D:/mould/upload/
-upload.path=E:/staticproject/website/upload
+upload.path=D:/mould/upload/
+#upload.path=E:/staticproject/website/upload
 
 #文件下载路径
 download.path=D:/mould/download/

+ 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>

+ 2 - 2
official_backend/src/main/resources/mapper/CompanyProductsMapper.xml

@@ -8,13 +8,13 @@
         <result column="title" property="title" />
         <result column="image_url" property="imageUrl" />
         <result column="introduction" property="introduction" />
-        <result column="address" property="address" />
         <result column="sticky" property="sticky" />
+        <result column="type" property="type" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, title, image_url, introduction, address, sticky
+        id, title, image_url, introduction, sticky, type
     </sql>
 
 </mapper>

+ 19 - 0
official_backend/src/main/resources/mapper/FeedbackMapper.xml

@@ -0,0 +1,19 @@
+<?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.FeedbackMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.ysofficial.entity.Feedback">
+        <id column="id" property="id" />
+        <result column="company_name" property="companyName" />
+        <result column="client_name" property="clientName" />
+        <result column="description" property="description" />
+        <result column="pic_url" property="picUrl" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, company_name, client_name, description, pic_url
+    </sql>
+
+</mapper>

+ 17 - 0
official_backend/src/main/resources/mapper/ParameterMapper.xml

@@ -0,0 +1,17 @@
+<?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.ParameterMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.ysofficial.entity.Parameter">
+        <id column="id" property="id" />
+        <result column="parameter_value" property="parameterValue" />
+        <result column="parameter_note" property="parameterNote" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, parameter_value, parameter_note
+    </sql>
+
+</mapper>

+ 18 - 0
official_backend/src/main/resources/mapper/QualificationMapper.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.QualificationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.ysofficial.entity.Qualification">
+        <id column="id" property="id" />
+        <result column="title" property="title" />
+        <result column="content" property="content" />
+        <result column="img_url" property="imgUrl" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, title, content, img_url
+    </sql>
+
+</mapper>

+ 19 - 0
official_backend/src/main/resources/mapper/RecruitmentMapper.xml

@@ -0,0 +1,19 @@
+<?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.RecruitmentMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.ysofficial.entity.Recruitment">
+        <id column="id" property="id" />
+        <result column="title" property="title" />
+        <result column="content" property="content" />
+        <result column="pic_url" property="picUrl" />
+        <result column="publish_time" property="publishTime" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, title, content, pic_url, publish_time
+    </sql>
+
+</mapper>

+ 20 - 0
official_backend/src/main/resources/mapper/VipProductsMapper.xml

@@ -0,0 +1,20 @@
+<?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.VipProductsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.ysofficial.entity.VipProducts">
+        <id column="id" property="id" />
+        <result column="title" property="title" />
+        <result column="image_url" property="imageUrl" />
+        <result column="introduction" property="introduction" />
+        <result column="address" property="address" />
+        <result column="sticky" property="sticky" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, title, image_url, introduction, address, sticky
+    </sql>
+
+</mapper>

Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/about.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/advantage.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/application.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/banner.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/case.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/comment.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/customer.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/home.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/label.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/partner.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/position.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/product.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/qualifications.svg


Plik diff jest za duży
+ 1 - 0
official_frontend/src/icons/svg/vip.svg


+ 68 - 14
official_frontend/src/router/index.js

@@ -52,38 +52,52 @@ export const constantRoutes = [
   {
     path: '/banner',
     component: Layout,
+    meta: { title: '首页', icon: 'home' },
     children: [
       {
-        path: '',
+        path: '/Banner',
         name: 'Banner',
         component: () => import('@/views/index/banner'),
-        meta: { title: 'Banner图片', icon: 'form' }
+        meta: { title: 'Banner图片', icon: 'banner' }
+      },
+      {
+        path: '/label',
+        name: 'label',
+        component: () => import('@/views/index/label'),
+        meta: { title: '首页标签', icon: 'label' }
+      },
+      {
+        path: '/customer',
+        name: 'customer',
+        component: () => import('@/views/index/customer'),
+        meta: { title: '客户说', icon: 'customer' }
       }
     ]
   },
 
   {
-    path: '/cooperation',
+    path: '/advantage',
     component: Layout,
     children: [
       {
         path: '',
-        name: 'Cooperation',
-        component: () => import('@/views/cooperation/client'),
-        meta: { title: '合作客户', icon: 'form' }
+        name: 'Advantage',
+        component: () => import('@/views/article/advantage'),
+        meta: { title: '公司优势', icon: 'advantage' }
       }
     ]
   },
 
+  
   {
-    path: '/advantage',
+    path: '/cooperation',
     component: Layout,
     children: [
       {
         path: '',
-        name: 'Advantage',
-        component: () => import('@/views/article/advantage'),
-        meta: { title: '公司优势', icon: 'form' }
+        name: 'Cooperation',
+        component: () => import('@/views/cooperation/client'),
+        meta: { title: '合作伙伴', icon: 'partner' }
       }
     ]
   },
@@ -96,7 +110,7 @@ export const constantRoutes = [
         path: '',
         name: 'Case',
         component: () => import('@/views/article/case'),
-        meta: { title: '成功案例', icon: 'form' }
+        meta: { title: '成功案例', icon: 'case' }
       }
     ]
   },
@@ -137,11 +151,51 @@ export const constantRoutes = [
         path: '',
         name: 'product',
         component: () => import('@/views/product/product'),
-        meta: { title: '公司产品', icon: 'form' }
+        meta: { title: '公司产品', icon: 'product' }
       }
     ]
   },
 
+  {
+    path: '/vipProduct',
+    component: Layout,
+    children: [
+      {
+        path: '',
+        name: 'vipProduct',
+        component: () => import('@/views/vipproduct/vip'),
+        meta: { title: '会员产品', icon: 'vip' }
+      }
+    ]
+  },
+
+  {
+    path: '/position',
+    component: Layout,
+    meta: { title: '关于我们', icon: 'about' },
+    children: [
+        {
+            path: '',
+            name: 'position',
+            component: () => import('@/views/about/position'),
+            meta: { title: '职位管理', icon: 'position' }
+        },
+        {
+            path: '',
+            name: 'positionEdit',
+            hidden: true,
+            component: () => import('@/views/about/positionEdit'),
+            meta: { title: '职位管理编辑', icon: 'position' }
+        },
+        {
+            path: '/qualifications',
+            name: 'qualifications',
+            component: () => import('@/views/about/qualifications'),
+            meta: { title: '荣誉资质', icon: 'qualifications' }
+        }
+    ]
+  },
+
   {
     path: '/comment',
     component: Layout,
@@ -150,7 +204,7 @@ export const constantRoutes = [
         path: '',
         name: 'Comment',
         component: () => import('@/views/comment/comment'),
-        meta: { title: '查看留言', icon: 'form' }
+        meta: { title: '查看留言', icon: 'comment' }
       }
     ]
   },
@@ -163,7 +217,7 @@ export const constantRoutes = [
         path: '',
         name: 'Comment',
         component: () => import('@/views/application/application'),
-        meta: { title: '查看申请', icon: 'form' }
+        meta: { title: '查看申请', icon: 'application' }
       }
     ]
   },

+ 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.101.166:8088",
+    // baseURL: "http://192.168.5.184:8098",
     // withCredentials: true, // send cookies when cross-domain requests
     timeout: 5000 // request timeout
 })

+ 118 - 0
official_frontend/src/views/about/position.vue

@@ -0,0 +1,118 @@
+<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.picUrl"></el-image>
+                    <!--  style="width: 200px; height: 200px" -->
+                </template>
+            </el-table-column>
+            <el-table-column prop="title" label="职位名称" width="150"></el-table-column>
+            <el-table-column label="职位信息">
+                <template slot-scope="scope">
+                    <el-link type="primary" :underline="false" @click="showAll(scope.$index)">查看全文</el-link>
+                </template>
+            </el-table-column>
+            <el-table-column prop="publishTime" label="发布日期" width="150"></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="600px">
+            <p v-html='detail'></p>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="addDialogVisible = false">取消</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+    import request from "@/utils/request";
+    import Tinymce from "@/components/Tinymce";
+    export default {
+        name: "TinymceDemo",
+        components: { Tinymce },
+        data() {
+            return {
+                editing: false,
+                loading: false,
+
+                cooperations: [],
+                addDialogVisible: false,
+                detail: "",
+            };
+        },
+        methods: {
+            //打开对话框
+            openDialog(isEdit, index) {
+                this.$router.push("/position/" + (index==null?0:this.cooperations[index].id));
+            },
+
+            //获取合作信息
+            getCooperations() {
+                this.loading = true;
+                request({
+                    url: "/recruitment/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: "/recruitment/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;
+                });
+            },
+
+            showAll(i) {
+                this.detail = this.cooperations[i].content;
+                this.addDialogVisible = true;
+            }
+        },
+        mounted() {
+            this.getCooperations();
+        }
+    };
+</script>
+
+<style scoped>
+</style>
+

+ 137 - 0
official_frontend/src/views/about/positionEdit.vue

@@ -0,0 +1,137 @@
+<template>
+    <div class="app-container">
+        <el-form ref="form" :model="cooperationsForm" :rules="rules" label-width="100px">
+            <el-form-item label="职位名称" prop="title">
+                <el-input v-model="cooperationsForm.title" placeholder="请输入职位名称" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="职位图片" required>
+                <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-item label="职位信息" prop="introduction">
+                <tinymce v-model="cooperationsForm.introduction" :height="300" />
+            </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer" style="float:right;">
+            <el-button @click="$router.go(-1);">取消</el-button>
+            <el-button type="primary" @click="addCooperation()" :loading="loading">提交</el-button>
+        </span>
+    </div>
+</template>
+
+<script>
+    import request from "@/utils/request";
+    import Tinymce from "@/components/Tinymce";
+    export default {
+        name: "TinymceDemo",
+        components: { Tinymce },
+        data() {
+            return {
+                id: this.$route.params.id,
+
+                loading: false,
+                cooperations: [],
+                cooperationsForm: {
+                    id: null,
+                    title: null,
+                    introduction: null,
+                    image: null,
+                },
+                rules: {
+                    title: [{ required: true, message: "请输入职位名称", trigger: "blur" }],
+                    introduction: [{ required: true, message: "请输入职位信息", trigger: "blur"}],
+                },
+            };
+        },
+        methods: {
+            //获取合作信息
+            getCooperations() {
+                request({
+                    url: "/recruitment/get",
+                    method: "post",
+                    params: {id: this.id}
+                })
+                .then(response => {
+                    this.cooperationsForm.id = response.data.id;
+                    this.cooperationsForm.title = response.data.title;
+                    this.cooperationsForm.introduction = response.data.content;
+                    this.cooperationsForm.image = null;
+                })
+                .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("title", this.cooperationsForm.title);
+                        form.append("content", 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: "/recruitment/insertOrUpdate",
+                            method: "post",
+                            data: form
+                        })
+                        .then(response => {
+                            this.$refs.upload.clearFiles();
+                            this.loading = false;
+                            this.$message({
+                                message: this.cooperationsForm.id != null?"修改成功":"添加成功",
+                                type: "success"
+                            });
+                            this.$router.go(-1);
+                        })
+                        .catch(error => {
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                            this.loading = false;
+                        });
+                    }
+                });
+            },
+
+            //文件上传的部分操作
+            uploadDiscardFile(params) {
+                this.cooperationsForm.image = params.file;
+                return false;
+            },
+
+            //文件上传的移除操作
+            beforeRemove(params) {
+                this.cooperationsForm.image = null;
+            }
+        },
+        mounted() {
+            if(this.id != 0) {
+                this.getCooperations();
+            }
+        }
+    };
+</script>
+
+<style scoped>
+</style>
+

+ 190 - 0
official_frontend/src/views/about/qualifications.vue

@@ -0,0 +1,190 @@
+<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.imgUrl"></el-image>
+            <!-- style="width: 200px; height: 200px"  -->
+            </template>
+        </el-table-column>
+        <el-table-column prop="title" label="名称" width="150"></el-table-column>
+        <el-table-column prop="content" label="描述"></el-table-column>
+        <el-table-column label="操作" width="300">
+            <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="name">
+                    <el-input v-model="cooperationsForm.name" placeholder="请输入名称" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="描述" prop="description">
+                    <el-input v-model="cooperationsForm.description" 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,
+                    name: null,
+                    description: null,
+                    image: null
+                },
+            };
+        },
+        methods: {
+            //打开对话框
+            openDialog(isEdit, index) {
+                this.editing = isEdit;
+                if (this.editing) {
+                    this.cooperationsForm.id = this.cooperations[index].id;
+                    this.cooperationsForm.name = this.cooperations[index].title;
+                    this.cooperationsForm.description = this.cooperations[index].content;
+                    this.cooperationsForm.image = null;
+                } else {
+                    this.cooperationsForm.id = null;
+                    this.cooperationsForm.name = "";
+                    this.cooperationsForm.description = "";
+                    this.cooperationsForm.image = null;
+                }
+                this.addDialogVisible = true;
+            },
+            //获取合作信息
+            getCooperations() {
+                this.loading = true;
+                request({
+                    url: "/qualification/list",
+                    method: "post"
+                })
+                .then(response => {
+                    this.cooperations = response.data;
+                    this.loading = false;
+                })
+                .catch(error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    this.loading = false;
+                });
+            },
+
+            //删除合作信息
+            deleteCooperation(id) {
+                request({
+                    url: "/qualification/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("title", this.cooperationsForm.name);
+                        form.append("content", this.cooperationsForm.description);
+                        //新增记录 并且 没有图片时
+                        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: "/qualification/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;
+                        });
+                    }
+                });
+            },
+            //文件上传的部分操作
+            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/application/application.vue

@@ -10,7 +10,7 @@
             <el-table-column prop="indate" label="时间" width="160"></el-table-column>
             <el-table-column label="操作" width="130">
                 <template slot-scope="scope">
-                    <el-button type="primary" v-if="scope.row.isPass == 0" @click="switchSticky(scope.row.id)">接收</el-button>
+                    <el-button size="small" type="primary" v-if="scope.row.isPass == 0" @click="switchSticky(scope.row.id)">接收</el-button>
                     <span v-else>已接收</span>
                 </template>
             </el-table-column>

+ 1 - 1
official_frontend/src/views/article/advantage.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-button type="primary" @click="goEdit()">修改</el-button>
+    <el-button size="small" type="primary" @click="goEdit()">修改</el-button>
     <div v-html="content">{{content}}</div>
   </div>
 </template>

+ 8 - 8
official_frontend/src/views/article/case.vue

@@ -1,18 +1,18 @@
 <template>
   <div class="app-container">
-    <el-button type="primary" @click="toNewCase()" :loading="loading">新增案例</el-button>
+    <el-button size="small" type="primary" @click="toNewCase()" :loading="loading">新增案例</el-button>
     <el-table :data="cases" style="width: 100%">
       <el-table-column type="index" width="50"></el-table-column>
       <el-table-column prop="title" label="标题"></el-table-column>
       <el-table-column label="操作" width="580">
         <template slot-scope="scope">
-          <el-button @click="switchPosition(scope.row.id, 1)" :disabled="scope.$index == 0">上移</el-button>
-          <el-button @click="switchPosition(scope.row.id, 0)" :disabled="scope.$index == cases.length - 1">下移</el-button>
-          <el-button v-if="scope.row.sticky == 0" @click="switchSticky(scope.row.id)">置顶</el-button>
-          <el-button v-else @click="switchSticky(scope.row.id)" type="primary">取消置顶</el-button>
-          <el-button @click="goView(scope.row.id)">预览</el-button>
-          <el-button @click="goEdit(scope.row.id)">编辑</el-button>
-          <el-button @click="deleteArticle(scope.row.id)" type="danger">删除</el-button>
+          <el-button size="small" @click="switchPosition(scope.row.id, 1)" :disabled="scope.$index == 0">上移</el-button>
+          <el-button size="small" @click="switchPosition(scope.row.id, 0)" :disabled="scope.$index == cases.length - 1">下移</el-button>
+          <el-button size="small" v-if="scope.row.sticky == 0" @click="switchSticky(scope.row.id)">置顶</el-button>
+          <el-button size="small" v-else @click="switchSticky(scope.row.id)" type="primary">取消置顶</el-button>
+          <el-button size="small" @click="goView(scope.row.id)">预览</el-button>
+          <el-button size="small" @click="goEdit(scope.row.id)">编辑</el-button>
+          <el-button size="small" @click="deleteArticle(scope.row.id)" type="danger">删除</el-button>
         </template>
       </el-table-column>
     </el-table>

+ 1 - 1
official_frontend/src/views/article/detail.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-button type="primary" @click="goBack()">返回</el-button>
+    <el-button size="small" type="primary" @click="goBack()">返回</el-button>
     <div v-html="content">{{content}}</div>
   </div>
 </template>

+ 0 - 0
official_frontend/src/views/article/tinymce.vue


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików