Browse Source

1、基础资料接口
2、错误代码注解
3、微信前端构建代码

guq 6 years ago
parent
commit
e76a7537c7
22 changed files with 1145 additions and 319 deletions
  1. 0 21
      .idea/compiler.xml
  2. 585 236
      .idea/workspace.xml
  3. 7 0
      applications/school/school-dto/pom.xml
  4. 144 0
      applications/school/school-dto/src/main/java/com/usoftchina/smartschool/school/dto/ListReqDTO.java
  5. 5 0
      applications/school/school-server/pom.xml
  6. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java
  7. 16 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/GradeController.java
  8. 36 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/SchoolController.java
  9. 0 19
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/SchoolTest.java
  10. 30 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java
  11. 17 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysSchoolMapper.java
  12. 91 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysSchool.java
  13. 13 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/SchoolService.java
  14. 38 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/impl/SchoolServiceImpl.java
  15. 2 2
      applications/school/school-server/src/main/resources/application.yml
  16. 129 0
      applications/school/school-server/src/main/resources/mapper/SysSchoolMapper.xml
  17. 0 3
      applications/wechat/wechat-api/wechat-api.iml
  18. 1 1
      applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/WechatApplication.java
  19. 0 36
      applications/wechat/wechat-server/wechat-server.iml
  20. 5 0
      frontend/wechat-web/Dockerfile
  21. 20 0
      frontend/wechat-web/runtime/nginx/default.conf
  22. 5 0
      pom.xml

+ 0 - 21
.idea/compiler.xml

@@ -53,25 +53,4 @@
       <module name="wechat-server" target="1.8" />
     </bytecodeTargetLevel>
   </component>
-  <component name="JavacSettings">
-    <option name="ADDITIONAL_OPTIONS_OVERRIDE">
-      <module name="account" options="-parameters" />
-      <module name="core" options="-parameters" />
-      <module name="eureka-server" options="-parameters" />
-      <module name="file-api" options="-parameters" />
-      <module name="file-dto" options="-parameters" />
-      <module name="file-server" options="-parameters" />
-      <module name="gateway-server" options="-parameters" />
-      <module name="school-api" options="-parameters" />
-      <module name="school-dto" options="-parameters" />
-      <module name="school-server" options="-parameters" />
-      <module name="server-starter" options="-parameters" />
-      <module name="sms" options="-parameters" />
-      <module name="test-starter" options="-parameters" />
-      <module name="websocket-api" options="-parameters" />
-      <module name="websocket-server" options="-parameters" />
-      <module name="wechat-api" options="-parameters" />
-      <module name="wechat-server" options="-parameters" />
-    </option>
-  </component>
 </project>

File diff suppressed because it is too large
+ 585 - 236
.idea/workspace.xml


+ 7 - 0
applications/school/school-dto/pom.xml

@@ -11,5 +11,12 @@
 
     <artifactId>school-dto</artifactId>
 
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+    </dependencies>
+
 
 </project>

+ 144 - 0
applications/school/school-dto/src/main/java/com/usoftchina/smartschool/school/dto/ListReqDTO.java

@@ -0,0 +1,144 @@
+package com.usoftchina.smartschool.school.dto;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+
+import java.io.Serializable;
+
+/**
+ * @author: guq
+ * @create: 2019-01-21 16:16
+ **/
+public class ListReqDTO implements Serializable{
+
+    private String condition;
+
+    /**
+     * 区分是否为关联列表
+     */
+    private String mode;
+
+    private String calculateFields;
+
+
+    //将列拼成查询语句,直接查询出数据的格式为json
+    public String getCalculateFieldsSql() {
+        try {
+            JSONArray jsonArray = JSONArray.parseArray(this.calculateFields);
+            if (null != jsonArray && jsonArray.size() > 0) {
+                StringBuilder fieldsSql = new StringBuilder();
+                StringBuilder fieldSql = null;
+                Object field = null;
+                Object operation = null;
+                String sql = null;
+                for (int i = 0; i < jsonArray.size(); i++) {
+                    JSONObject obj = (JSONObject) jsonArray.get(i);
+                    field = obj.get("field");
+                    operation = obj.get("operation");
+                    //
+                    if (null != field && null != operation && !"".equals(field) && !"".equals(operation) && !operation.toString().startsWith("customize")) {
+                        fieldSql = new StringBuilder("'{");
+                        fieldSql.append("\"" + field + "\":'");
+                        fieldSql.append(",");
+                        fieldSql.append("ifnull(" + operation + "(" + field + ")" + ",'0')");
+                        fieldSql.append(",");
+                        fieldSql.append("',\"operation\":\"" + operation + "\"");
+                        fieldSql.append("}'");
+                    }
+                    if (null != fieldSql) {
+                        fieldsSql.append(fieldSql + ",\",\",");
+                    }
+                }
+                if (fieldsSql.length() > 0) {
+                    sql = "concat('['," + fieldsSql.substring(0, fieldsSql.length() - 5) + ",']')";
+                }
+                return sql;
+            }
+            return null;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    public String getCalculateFields() {
+        return calculateFields;
+    }
+
+    public void setCalculateFields(String calculateFields) {
+        this.calculateFields = calculateFields;
+    }
+
+    public String getCondition() {
+        return condition;
+    }
+
+    public void setCondition(String condition) {
+        this.condition = condition;
+    }
+
+    public String getMode() {
+        return mode;
+    }
+
+    public void setMode(String mode) {
+        this.mode = mode;
+    }
+
+    /**
+     * @Description 拼最后查询条件
+     * @Param: []
+     * @return: java.lang.String
+     * @Author: guq
+     * @Date: 2018/10/25
+     */
+    public String getFinalCondition() {
+        try {
+            JSONArray jsonArray = JSONArray.parseArray(this.condition);
+            if (null != jsonArray && jsonArray.size() > 0) {
+                StringBuffer finalCondition = new StringBuffer();
+                for (int i = 0; i < jsonArray.size(); i++) {
+                    String con = null;
+                    JSONObject jsonObject = (JSONObject) jsonArray.get(i);
+                    Object type = jsonObject.get("type");
+                    Object field = jsonObject.get("field");
+                    Object operation = jsonObject.get("operation");
+                    Object value = jsonObject.get("value");
+                    //包含状态时,前台会自动加单引号
+                    if (null != value && !"in".equals(operation) && !"not in".equals(operation) &&
+                            !"condition".equals(type)) {
+                        value = value.toString().replaceAll("'", "''");
+                    }
+                    if ("between".equals(operation)) {
+                        String[] vals = value.toString().split(",");
+                        con = " ( " + field + " " + operation + " '" + vals[0] + "' and '" + vals[1] + "' ) and";
+                    } else if ("startsWith".equals(operation)) {
+                        con = " " + field + "  like '" + value + "%' and";
+                    } else if ("endsWith".equals(operation)) {
+                        con = " " + field + " like '%" + value + "' and";
+                    } else if ("in".equals(operation) || "not in".equals(operation)) {
+                        con = " ( " + field + " " + operation + " (" + value + ") ) and";
+                    } else {
+                        //字符串默认是模糊查询
+                        if ("string".equals(type)) {
+                            con = " (" + field + " like '%" + value + "%') and";
+                        } else if ("condition".equals(type)) {
+                            //type为condition为前端拼的条件
+                            con = " (" + value + ") and";
+                        } else {
+                            con = " (" + field + " " + operation + " '" + value + "') and";
+                        }
+
+                    }
+                    finalCondition = finalCondition.append(con);
+                }
+                return finalCondition.substring(0, finalCondition.length() - 3);
+            }
+            return null;
+        }catch (Exception e){
+            return null;
+        }
+    }
+
+
+}

+ 5 - 0
applications/school/school-server/pom.xml

@@ -69,6 +69,11 @@
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.smartschool</groupId>
+            <artifactId>school-dto</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java

@@ -12,7 +12,7 @@ import org.springframework.context.annotation.ComponentScan;
  * @create: 2019-01-16 17:41
  **/
 @SpringBootApplication
-@MapperScan("com.usoftchina.smartschool.mapper")
+@MapperScan("com.usoftchina.smartschool.school")
 @EnableEurekaClient
 @EnableFeignClients("com.usoftchina.smartschool")
 @ComponentScan(basePackages = {"com.usoftchina.smartschool"})

+ 16 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/GradeController.java

@@ -0,0 +1,16 @@
+package com.usoftchina.smartschool.school.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 09:27
+ **/
+@RestController
+@RequestMapping("/grade")
+public class GradeController {
+
+
+
+}

+ 36 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/SchoolController.java

@@ -0,0 +1,36 @@
+package com.usoftchina.smartschool.school.controller;
+
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.school.po.SysSchool;
+import com.usoftchina.smartschool.school.service.SchoolService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 学校信息
+ * @author: guq
+ * @create: 2019-01-21 14:17
+ **/
+@RestController
+@RequestMapping("/school")
+public class SchoolController {
+
+    @Autowired
+    private SchoolService schoolService;
+
+    @RequestMapping("/read/{id}")
+    public Result getFormData(@PathVariable("id") Long id) {
+        SysSchool school = schoolService.getFormData(id);
+        return Result.success(school);
+    }
+
+    @RequestMapping("/save")
+    public Result saveFormData(@RequestBody SysSchool school) {
+        schoolService.saveFormData(school);
+        return Result.success();
+    }
+
+}

+ 0 - 19
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/SchoolTest.java

@@ -1,19 +0,0 @@
-package com.usoftchina.smartschool.school.controller;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author: guq
- * @create: 2019-01-21 09:36
- **/
-@RestController
-@RequestMapping("school")
-public class SchoolTest {
-
-    @RequestMapping("/test")
-    public String test() {
-        return "测试网络是否正常";
-    }
-}

+ 30 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java

@@ -0,0 +1,30 @@
+package com.usoftchina.smartschool.school.exception;
+
+import com.usoftchina.smartschool.exception.BaseExceptionCode;
+
+/**
+ * @author: guq
+ * @create: 2019-01-21 19:48
+ **/
+public enum BizExceptionCode implements BaseExceptionCode {
+
+    USELESS_DATA(50001, "无效数据");
+
+    private int code;
+    private String message;
+
+    BizExceptionCode(int code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+
+    @Override
+    public int getCode() {
+        return code;
+    }
+
+    @Override
+    public String getMessage() {
+        return message;
+    }
+}

+ 17 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysSchoolMapper.java

@@ -0,0 +1,17 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.SysSchool;
+
+public interface SysSchoolMapper {
+    int deleteByPrimaryKey(Long school_id);
+
+    int insert(SysSchool record);
+
+    int insertSelective(SysSchool record);
+
+    SysSchool selectByPrimaryKey(Long school_id);
+
+    int updateByPrimaryKeySelective(SysSchool record);
+
+    int updateByPrimaryKey(SysSchool record);
+}

+ 91 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysSchool.java

@@ -0,0 +1,91 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.io.Serializable;
+
+/**
+ * @author: guq
+ * @create: 2019-01-21 18:01
+ **/
+public class SysSchool implements Serializable{
+
+    private Long school_id;
+
+    private String school_name;
+
+    private Integer school_status;
+
+    private String school_remarks;
+
+    private String school_address;
+
+    private String school_phone;
+
+    private String school_appid;
+
+    private String school_secret;
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+
+    public String getSchool_name() {
+        return school_name;
+    }
+
+    public void setSchool_name(String school_name) {
+        this.school_name = school_name == null ? null : school_name.trim();
+    }
+
+    public Integer getSchool_status() {
+        return school_status;
+    }
+
+    public void setSchool_status(Integer school_status) {
+        this.school_status = school_status;
+    }
+
+    public String getSchool_remarks() {
+        return school_remarks;
+    }
+
+    public void setSchool_remarks(String school_remarks) {
+        this.school_remarks = school_remarks == null ? null : school_remarks.trim();
+    }
+
+    public String getSchool_address() {
+        return school_address;
+    }
+
+    public void setSchool_address(String school_address) {
+        this.school_address = school_address == null ? null : school_address.trim();
+    }
+
+    public String getSchool_phone() {
+        return school_phone;
+    }
+
+    public void setSchool_phone(String school_phone) {
+        this.school_phone = school_phone == null ? null : school_phone.trim();
+    }
+
+    public String getSchool_appid() {
+        return school_appid;
+    }
+
+    public void setSchool_appid(String school_appid) {
+        this.school_appid = school_appid == null ? null : school_appid.trim();
+    }
+
+    public String getSchool_secret() {
+        return school_secret;
+    }
+
+    public void setSchool_secret(String school_secret) {
+        this.school_secret = school_secret == null ? null : school_secret.trim();
+    }
+
+}

+ 13 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/SchoolService.java

@@ -0,0 +1,13 @@
+package com.usoftchina.smartschool.school.service;
+
+import com.usoftchina.smartschool.school.po.SysSchool;
+
+/**
+ * @author: guq
+ * @create: 2019-01-21 16:48
+ **/
+public interface SchoolService {
+    SysSchool getFormData(Long id);
+
+    void saveFormData(SysSchool school);
+}

+ 38 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/impl/SchoolServiceImpl.java

@@ -0,0 +1,38 @@
+package com.usoftchina.smartschool.school.service.impl;
+
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.SysSchoolMapper;
+import com.usoftchina.smartschool.school.po.SysSchool;
+import com.usoftchina.smartschool.school.service.SchoolService;
+import com.usoftchina.smartschool.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author: guq
+ * @create: 2019-01-21 16:49
+ **/
+@Service
+public class SchoolServiceImpl implements SchoolService{
+
+    @Autowired
+    private SysSchoolMapper sysSchoolMapper;
+
+    @Override
+    public SysSchool getFormData(Long id) {
+        if (null == id || "0".equals(id)) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        SysSchool school = sysSchoolMapper.selectByPrimaryKey(id);
+        return school;
+    }
+
+    @Override
+    public void saveFormData(SysSchool school) {
+        if (StringUtils.isEmpty(school) || StringUtils.isEmpty(school.getSchool_id())) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        sysSchoolMapper.updateByPrimaryKey(school);
+    }
+}

+ 2 - 2
applications/school/school-server/src/main/resources/application.yml

@@ -7,7 +7,7 @@ spring:
       password: select111***
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://10.10.100.166:3306/school?characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
+    url: jdbc:mysql://10.10.100.166:3306/smart_campus?characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
     username: root
     password: select111***
     hikari:
@@ -70,7 +70,7 @@ info:
   spring-boot-version: '@spring.boot.version@'
   spring-cloud-version: '@spring.cloud.version@'
 mybatis:
-  type-aliases-package: com.usoftchina.saas.commons.po
+  type-aliases-package: com.usoftchina.smartschool.school.po
   mapper-locations: classpath:mapper/*.xml
 auth:
   public-key: auth/pub.key

+ 129 - 0
applications/school/school-server/src/main/resources/mapper/SysSchoolMapper.xml

@@ -0,0 +1,129 @@
+<?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.usoftchina.smartschool.school.mapper.SysSchoolMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.SysSchool" >
+    <id column="school_id" property="school_id" jdbcType="INTEGER" />
+    <result column="school_name" property="school_name" jdbcType="VARCHAR" />
+    <result column="school_status" property="school_status" jdbcType="INTEGER" />
+    <result column="school_remarks" property="school_remarks" jdbcType="VARCHAR" />
+    <result column="school_address" property="school_address" jdbcType="VARCHAR" />
+    <result column="school_phone" property="school_phone" jdbcType="VARCHAR" />
+    <result column="school_appid" property="school_appid" jdbcType="VARCHAR" />
+    <result column="school_secret" property="school_secret" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    school_id, school_name, school_status, school_remarks, school_address, school_phone, 
+    school_appid, school_secret
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from sys_school
+    where school_id = #{school_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from sys_school
+    where school_id = #{school_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.SysSchool" >
+    insert into sys_school (school_id, school_name, school_status, 
+      school_remarks, school_address, school_phone, 
+      school_appid, school_secret)
+    values (#{school_id,jdbcType=BIGINT}, #{school_name,jdbcType=VARCHAR}, #{school_status,jdbcType=INTEGER}, 
+      #{school_remarks,jdbcType=VARCHAR}, #{school_address,jdbcType=VARCHAR}, #{school_phone,jdbcType=VARCHAR}, 
+      #{school_appid,jdbcType=VARCHAR}, #{school_secret,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.SysSchool" >
+    insert into sys_school
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="school_id != null" >
+        school_id,
+      </if>
+      <if test="school_name != null" >
+        school_name,
+      </if>
+      <if test="school_status != null" >
+        school_status,
+      </if>
+      <if test="school_remarks != null" >
+        school_remarks,
+      </if>
+      <if test="school_address != null" >
+        school_address,
+      </if>
+      <if test="school_phone != null" >
+        school_phone,
+      </if>
+      <if test="school_appid != null" >
+        school_appid,
+      </if>
+      <if test="school_secret != null" >
+        school_secret,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+      <if test="school_name != null" >
+        #{school_name,jdbcType=VARCHAR},
+      </if>
+      <if test="school_status != null" >
+        #{school_status,jdbcType=INTEGER},
+      </if>
+      <if test="school_remarks != null" >
+        #{school_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="school_address != null" >
+        #{school_address,jdbcType=VARCHAR},
+      </if>
+      <if test="school_phone != null" >
+        #{school_phone,jdbcType=VARCHAR},
+      </if>
+      <if test="school_appid != null" >
+        #{school_appid,jdbcType=VARCHAR},
+      </if>
+      <if test="school_secret != null" >
+        #{school_secret,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysSchool" >
+    update sys_school
+    <set >
+      <if test="school_name != null" >
+        school_name = #{school_name,jdbcType=VARCHAR},
+      </if>
+      <if test="school_status != null" >
+        school_status = #{school_status,jdbcType=INTEGER},
+      </if>
+      <if test="school_remarks != null" >
+        school_remarks = #{school_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="school_address != null" >
+        school_address = #{school_address,jdbcType=VARCHAR},
+      </if>
+      <if test="school_phone != null" >
+        school_phone = #{school_phone,jdbcType=VARCHAR},
+      </if>
+      <if test="school_appid != null" >
+        school_appid = #{school_appid,jdbcType=VARCHAR},
+      </if>
+      <if test="school_secret != null" >
+        school_secret = #{school_secret,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where school_id = #{school_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.SysSchool" >
+    update sys_school
+    set school_name = #{school_name,jdbcType=VARCHAR},
+      school_status = #{school_status,jdbcType=INTEGER},
+      school_remarks = #{school_remarks,jdbcType=VARCHAR},
+      school_address = #{school_address,jdbcType=VARCHAR},
+      school_phone = #{school_phone,jdbcType=VARCHAR},
+      school_appid = #{school_appid,jdbcType=VARCHAR},
+      school_secret = #{school_secret,jdbcType=VARCHAR}
+    where school_id = #{school_id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 0 - 3
applications/wechat/wechat-api/wechat-api.iml

@@ -13,9 +13,6 @@
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.9" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
     <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.22" level="project" />
     <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.9" level="project" />
     <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/WechatApplication.java

@@ -20,6 +20,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 //@ComponentScan(basePackages = {"com.usoftchina.smartschool.wechat"})
 public class WechatApplication {
     public static void main(String[] args) {
-        SpringApplication.run(WechatApplication.class, args);
+        //SpringApplication.run(WechatApplication.class, args);
     }
 }

+ 0 - 36
applications/wechat/wechat-server/wechat-server.iml

@@ -25,42 +25,6 @@
     </content>
     <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
-    <orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
-    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.46" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.0.4.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.9.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.15.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.7.11" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.0.8.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.5.1" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:druid:1.0.31" level="project" />
-    <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:3.5.1" level="project" />
-    <orderEntry type="library" name="Maven: org.json:json:20170516" level="project" />
-    <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-dysmsapi:1.1.0" level="project" />
-    <orderEntry type="library" name="Maven: org.jdom:jdom:2.0.2" level="project" />
-    <orderEntry type="library" name="Maven: net.sf.json-lib:json-lib:jdk15:2.4" level="project" />
-    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.0" level="project" />
-    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.5" level="project" />
-    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
-    <orderEntry type="library" name="Maven: net.sf.ezmorph:ezmorph:1.0.6" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.9" level="project" />
-    <orderEntry type="library" name="Maven: com.auth0:java-jwt:3.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
-    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
-    <orderEntry type="library" name="Maven: com.github.kevinsawicki:http-request:6.0" level="project" />
-    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.9" level="project" />
-    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.31" level="project" />
     <orderEntry type="module" module-name="wechat-api" />
     <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />

+ 5 - 0
frontend/wechat-web/Dockerfile

@@ -0,0 +1,5 @@
+FROM hub.c.163.com/library/nginx
+MAINTAINER USOFTCHINA <yingp@usoftchina.com>
+RUN rm /etc/nginx/conf.d/default.conf
+ADD runtime/nginx/default.conf /etc/nginx/conf.d/
+COPY build/ /usr/share/nginx/html/

+ 20 - 0
frontend/wechat-web/runtime/nginx/default.conf

@@ -0,0 +1,20 @@
+server {
+    listen       80;
+    server_name  localhost;
+
+    charset utf-8;
+
+    location / {
+        root   /usr/share/nginx/html;
+        index  index.html index.htm;
+    }
+
+    #error_page  404              /404.html;
+
+    # redirect server error pages to the static page /50x.html
+    #
+    error_page   500 502 503 504  /50x.html;
+    location = /50x.html {
+        root   html;
+    }
+}

+ 5 - 0
pom.xml

@@ -229,6 +229,11 @@
                 <artifactId>file-api</artifactId>
                 <version>${project.release.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.usoftchina.smartschool</groupId>
+                <artifactId>school-dto</artifactId>
+                <version>${project.release.version}</version>
+            </dependency>
             <!-- file upload -->
             <dependency>
                 <groupId>io.github.openfeign.form</groupId>

Some files were not shown because too many files changed in this diff