ソースを参照

Merge branch 'master' of git.dayaedu.com:yonge/mec

chengpeng 5 年 前
コミット
75814e7c04
37 ファイル変更499 行追加325 行削除
  1. 2 3
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java
  2. 5 0
      mec-biz/pom.xml
  3. 0 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/EmployeeDao.java
  4. 0 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupDao.java
  5. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/BasicUserDto.java
  6. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/UploadFileService.java
  7. 27 33
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java
  8. 8 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java
  9. 1 1
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  10. 0 14
      mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml
  11. 23 7
      mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml
  12. 2 2
      mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml
  13. 1 1
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  14. 0 10
      mec-common/common-core/pom.xml
  15. 0 20
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfCcOrderMapper.xml
  16. 0 25
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfHistOrderMapper.xml
  17. 0 16
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfHistTaskActorMapper.xml
  18. 0 28
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfHistTaskMapper.xml
  19. 0 27
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfOrderMapper.xml
  20. 0 24
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfProcessMapper.xml
  21. 0 22
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfSurrogateMapper.xml
  22. 0 16
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfTaskActorMapper.xml
  23. 0 28
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfTaskMapper.xml
  24. 0 2
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  25. 14 2
      mec-teacher/src/main/java/com/ym/mec/teacher/TeacherApplication.java
  26. 8 0
      mec-thirdparty/pom.xml
  27. 56 1
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/eseal/ESealPlugin.java
  28. 65 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/eseal/ESealPluginContext.java
  29. 250 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/eseal/provider/TsignPlugin.java
  30. 4 4
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/MessageSenderPluginContext.java
  31. 4 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/JiguangPushPlugin.java
  32. 4 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/MOxintongSMSPlugin.java
  33. 4 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/ShiyuanSMSPlugin.java
  34. 3 3
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/StoragePluginContext.java
  35. 4 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/provider/AliyunOssStoragePlugin.java
  36. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/UploadFileController.java
  37. 2 27
      pom.xml

+ 2 - 3
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java

@@ -53,9 +53,8 @@ public class UserController extends BaseController {
 	}
 
 	@ApiOperation(value = "根据用户编号获取用户基本信息")
-	@GetMapping("/get/{userId}")
-	@ApiParam(value = "用户编号", required = true)
-	public Object getBasic(@PathVariable("userId") Integer userId) {
+	@GetMapping("/getBasic")
+	public Object getBasic(Integer userId) {
 		if(userId == null){
 			return failed("参数校验异常");
 		}

+ 5 - 0
mec-biz/pom.xml

@@ -29,5 +29,10 @@
             <groupId>com.ym</groupId>
             <artifactId>mec-client-api</artifactId>
         </dependency>
+
+		<dependency>
+			<groupId>com.ym</groupId>
+			<artifactId>mec-thirdparty</artifactId>
+		</dependency>
     </dependencies>
 </project>

+ 0 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/EmployeeDao.java

@@ -46,10 +46,6 @@ public interface EmployeeDao extends BaseDAO<Integer, Employee> {
      * 修改用户离职日期
      */
     int updateUserDemissionDate(@Param("userID") Long userID);
-
-
-    int addUser(SysUser user);
-
     /**
      * 根据手机号查询对象
      * @param phone

+ 0 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupDao.java

@@ -1,6 +1,5 @@
 package com.ym.mec.biz.dal.dao;
 
-import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.BasicUserDto;
 import com.ym.mec.biz.dal.dto.MusicCardDto;
 import com.ym.mec.biz.dal.entity.MusicGroup;

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/BasicUserDto.java

@@ -6,10 +6,20 @@ public class BasicUserDto {
 
     private String name;
 
+    private String subjectName;
+
     private String headUrl;
 
     private Integer gender;
 
+    public String getSubjectName() {
+        return subjectName;
+    }
+
+    public void setSubjectName(String subjectName) {
+        this.subjectName = subjectName;
+    }
+
     public Integer getUserId() {
         return userId;
     }

+ 1 - 1
mec-common/common-core/src/main/java/com/ym/mec/common/service/impl/UploadFileService.java → mec-biz/src/main/java/com/ym/mec/biz/service/UploadFileService.java

@@ -1,4 +1,4 @@
-package com.ym.mec.common.service.impl;
+package com.ym.mec.biz.service;
 
 import java.io.File;
 import java.io.FileOutputStream;

+ 27 - 33
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java

@@ -1,33 +1,11 @@
 package com.ym.mec.biz.service.impl;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Base64;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.auth.api.enums.SysUserType;
 import com.ym.mec.auth.api.enums.YesOrNoEnum;
-import com.ym.mec.biz.dal.dao.TeacherDao;
-import com.ym.mec.biz.dal.entity.Teacher;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.MultiValueMap;
-import org.springframework.web.client.RestTemplate;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ym.mec.biz.dal.dao.EmployeeDao;
+import com.ym.mec.biz.dal.dao.TeacherDao;
 import com.ym.mec.biz.dal.dto.EmployeeDto;
 import com.ym.mec.biz.dal.entity.Employee;
 import com.ym.mec.biz.dal.enums.EmployeeOperateEnum;
@@ -35,10 +13,23 @@ import com.ym.mec.biz.dal.enums.ParamEnum;
 import com.ym.mec.biz.dal.page.EmployeeQueryInfo;
 import com.ym.mec.biz.service.EmployeeService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.entity.ImResult;
+import com.ym.mec.common.entity.ImUserModel;
 import com.ym.mec.common.page.PageInfo;
-import com.ym.mec.common.security.SecurityUtils;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.im.ImFeignService;
 import com.ym.mec.util.collection.MapUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.client.RestTemplate;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @Service
 public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  implements EmployeeService {
@@ -47,10 +38,7 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 	private EmployeeDao employeeDao;
 
 	@Autowired
-	private RestTemplate restTemplate;
-
-	@Autowired
-	private ObjectMapper objectMapper;
+	private ImFeignService imFeignService;
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
 	@Autowired
@@ -62,20 +50,26 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 	}
 
 	@Override
-	public void add(Employee employee) throws Exception {
+	@Transactional(rollbackFor = Exception.class)
+	public void add(Employee employee){
 		SysUser user = sysUserFeignService.getUserByMobile(employee.getPhone());
 		if(user != null){
             user.setUserType(SysUserType.SYSTEM);
 			teacherDao.updateUser(user);
-            employee.setUserId(user.getId());
-            employeeDao.insert(employee);
+			Employee employee1 = employeeDao.get(user.getId());
+			if(employee1 == null || employee1.getId() == null){
+				employee.setUserId(user.getId());
+				employeeDao.insert(employee);
+			}
 			return;
 		}
 		employee.setPassword(new BCryptPasswordEncoder().encode(ParamEnum.INIT_PASSWORD.getCode().toString()));
 		employee.setUserType(SysUserType.SYSTEM);
-		employeeDao.addUser(employee);
-        employee.setUserId(employee.getId());
+		teacherDao.addSysUser(employee);
         employeeDao.insert(employee);
+		ImResult imResult = imFeignService.register(new ImUserModel(employee.getId().toString(), employee.getUsername(), employee.getAvatar()));
+		employee.setImToken(imResult.getToken());
+		employeeDao.update(employee);
 	}
 
 	@Override

+ 8 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java

@@ -52,10 +52,16 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public void add(Teacher teacher) throws Exception {
+	public void add(Teacher teacher){
 		SysUser user = sysUserFeignService.getUserByMobile(teacher.getPhone());
 		if(user != null && user.getId() != null){
-			throw new Exception("系统已存在该手机号的老师,请核查");
+			teacherDao.updateUser(user);
+			Teacher teacher1 = teacherDao.get(user.getId());
+			if(teacher1 == null || teacher1.getId() == null){
+				teacher.setId(user.getId());
+				teacherDao.insert(teacher);
+			}
+			return;
 		}
 		teacher.setUserType(SysUserType.TEACHER);
 		teacherDao.addSysUser(teacher);

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -310,7 +310,7 @@
         LEFT JOIN sys_user su ON cgsm.user_id_ = su.id_
         WHERE vgcgm.vip_group_id_ = #{musicGroupId}
     </select>
-    <select id="findGroupUsers" resultMap="com.ym.mec.auth.dal.dao.SysUserDao.ImUserModel">
+    <select id="findGroupUsers" resultMap="com.ym.mec.biz.dal.dao.MusicGroupDao.ImUserModel">
         SELECT su.id_,su.avatar_,su.username_ FROM class_group_student_mapper cgsm
         LEFT JOIN sys_user su ON cgsm.user_id_ = su.id_
         WHERE cgsm.class_group_id_ = #{musicGroupId} GROUP BY su.id_

+ 0 - 14
mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -68,20 +68,6 @@
 		INSERT INTO employee (user_id_,organ_id_list_,job_nature_,is_probation_period_,education_background_,graduate_school_,technical_titles_,entry_date_,certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_) VALUES(#{userId},#{organIdList},#{jobNature},#{isProbationPeriod},#{educationBackground},#{graduateSchool},#{technicalTitles},#{entryDate},#{certificateType},#{certificateNum},#{updateTime},#{createTime},#{introduction},#{demissionDate})
 	</insert>
 
-    <!-- 向数据库增加一条记录 -->
-    <insert id="addUser" parameterType="com.ym.mec.auth.api.entity.SysUser" useGeneratedKeys="true" keyColumn="id"
-            keyProperty="id">
-        <!--
-        <selectKey resultClass="int" keyProperty="id" >
-        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
-        </selectKey>
-        -->
-        INSERT INTO sys_user
-        (im_token_,id_,username_,salt_,phone_,avatar_,organ_id_,create_time_,update_time_,wx_openid_,qq_openid_,user_type_,gender_,nation_,birthdate_,email_,id_card_no_,esign_id_,wechat_id_)
-        VALUES(#{imToken},#{id},#{username},#{salt},#{phone},#{avatar},#{organId},now(),now(),#{wxOpenid},#{qqOpenid},#{userType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-        #{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{esignId},#{wechatId})
-    </insert>
-
     <select id="queryByPhone" resultMap="SysUser">
 		select * from sys_user where phone_ = #{phone} OR username_ = #{phone}
 	</select>

+ 23 - 7
mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml

@@ -174,6 +174,7 @@
 	</select>
 
 	<resultMap type="com.ym.mec.biz.dal.dto.BasicUserDto" id="BasicUserDto">
+		<result column="subject_name_" property="subjectName" />
 		<result column="username_" property="name" />
 		<result column="user_id_" property="userId" />
 		<result column="head_url_" property="headUrl" />
@@ -181,12 +182,22 @@
 	</resultMap>
 
 	<select id="findTeachersByStuId" resultMap="BasicUserDto">
-		SELECT username_,id_ user_id_,avatar_ head_url_,gender_ FROM sys_user
-		WHERE id_ IN (SELECT DISTINCT(su.id_) FROM class_group_student_mapper cgsp
-		LEFT JOIN class_group cg ON cgsp.class_group_id_ = cg.id_
-		LEFT JOIN class_group_teacher_mapper cgtm ON cg.id_ = cgtm.class_group_id_
-		LEFT JOIN sys_user su ON cgtm.user_id_ = su.id_
-		WHERE cgsp.user_id_ = #{studentId})
+		SELECT DISTINCT
+			su.username_,
+			su.id_ user_id_,
+			su.avatar_ head_url_,
+			gender_,
+			GROUP_CONCAT(s.name_) subject_name_
+		  FROM
+			class_group_student_mapper cgsp
+			LEFT JOIN class_group cg ON cgsp.class_group_id_ = cg.id_
+			LEFT JOIN class_group_teacher_mapper cgtm ON cg.id_ = cgtm.class_group_id_
+			LEFT JOIN sys_user su ON cgtm.user_id_ = su.id_
+			LEFT JOIN teacher t ON su.id_ = t.id_
+			LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,t.subject_id_)
+		  WHERE
+			cgsp.user_id_ = #{studentId}
+		  GROUP BY su.id_
 	</select>
 
     <select id="queryUserGroups" resultMap="com.ym.mec.biz.dal.dao.ClassGroupDao.imGroupModel">
@@ -207,7 +218,12 @@
 		SELECT SUM(student_num_) FROM class_group WHERE music_group_id_ = #{musicGroupId}
     </select>
 
-	<select id="findGroupUsers" resultMap="com.ym.mec.auth.dal.dao.SysUserDao.ImUserModel">
+	<resultMap id="ImUserModel" type="com.ym.mec.common.entity.ImUserModel">
+		<result column="id_" property="id"/>
+		<result property="name" column="username_"/>
+		<result property="portrait" column="avatar_"/>
+	</resultMap>
+	<select id="findGroupUsers" resultMap="ImUserModel">
 		SELECT su.id_,su.avatar_,su.username_ FROM class_group cg
 		LEFT JOIN class_group_student_mapper cgsm ON cg.id_ = cgsm.class_group_id_
 		LEFT JOIN sys_user su ON cgsm.user_id_ = su.id_

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml

@@ -120,8 +120,8 @@
         LEFT JOIN `subject` s ON mgsp.subject_id_ = s.id_
         WHERE mgsp.music_group_id_ =
     </select>
-    <select id="findBySubIds" resultType="java.lang.String">
-        SELECT name_ FROM `subject` IN (#{subIds}) WHERE del_flag_ = 0
+    <select id="findBySubIds" resultType="string">
+        SELECT name_ FROM `subject` WHERE del_flag_ = 0 AND FIND_IN_SET (id_,#{subIds})
     </select>
 
     <select id="findTeacherSubjects" resultMap="Subject">

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -37,7 +37,7 @@
         <result column="wx_openid_" property="wxOpenid"/>
         <result column="qq_openid_" property="qqOpenid"/>
         <result column="user_type_" property="userType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-        <result column="gender_" property="gender" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="gender_" property="gender"/>
         <result column="nation_" property="nation"/>
         <result column="birthdate_" property="birthdate"/>
         <result column="email_" property="email"/>

+ 0 - 10
mec-common/common-core/pom.xml

@@ -38,15 +38,5 @@
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-starter-openfeign</artifactId>
 		</dependency>
-
-		<dependency>
-			<groupId>com.ym</groupId>
-			<artifactId>mec-thirdparty</artifactId>
-		</dependency>
-        <dependency>
-            <groupId>org.springframework.security.oauth</groupId>
-            <artifactId>spring-security-oauth2</artifactId>
-            <version>2.2.1.RELEASE</version>
-        </dependency>
     </dependencies>
 </project>

+ 0 - 20
mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfCcOrderMapper.xml

@@ -1,20 +0,0 @@
-<?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.ym.mec.education.mapper.WfCcOrderMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.WfCcOrder">
-        <result column="order_Id" property="orderId" />
-        <result column="actor_Id" property="actorId" />
-        <result column="creator" property="creator" />
-        <result column="create_Time" property="createTime" />
-        <result column="finish_Time" property="finishTime" />
-        <result column="status" property="status" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        order_Id, actor_Id, creator, create_Time, finish_Time, status
-    </sql>
-
-</mapper>

+ 0 - 25
mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfHistOrderMapper.xml

@@ -1,25 +0,0 @@
-<?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.ym.mec.education.mapper.WfHistOrderMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.WfHistOrder">
-        <id column="id" property="id" />
-        <result column="process_Id" property="processId" />
-        <result column="order_State" property="orderState" />
-        <result column="creator" property="creator" />
-        <result column="create_Time" property="createTime" />
-        <result column="end_Time" property="endTime" />
-        <result column="expire_Time" property="expireTime" />
-        <result column="priority" property="priority" />
-        <result column="parent_Id" property="parentId" />
-        <result column="order_No" property="orderNo" />
-        <result column="variable" property="variable" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        id, process_Id, order_State, creator, create_Time, end_Time, expire_Time, priority, parent_Id, order_No, variable
-    </sql>
-
-</mapper>

+ 0 - 16
mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfHistTaskActorMapper.xml

@@ -1,16 +0,0 @@
-<?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.ym.mec.education.mapper.WfHistTaskActorMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.WfHistTaskActor">
-        <result column="task_Id" property="taskId" />
-        <result column="actor_Id" property="actorId" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        task_Id, actor_Id
-    </sql>
-
-</mapper>

+ 0 - 28
mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfHistTaskMapper.xml

@@ -1,28 +0,0 @@
-<?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.ym.mec.education.mapper.WfHistTaskMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.WfHistTask">
-        <id column="id" property="id" />
-        <result column="order_Id" property="orderId" />
-        <result column="task_Name" property="taskName" />
-        <result column="display_Name" property="displayName" />
-        <result column="task_Type" property="taskType" />
-        <result column="perform_Type" property="performType" />
-        <result column="task_State" property="taskState" />
-        <result column="operator" property="operator" />
-        <result column="create_Time" property="createTime" />
-        <result column="finish_Time" property="finishTime" />
-        <result column="expire_Time" property="expireTime" />
-        <result column="action_Url" property="actionUrl" />
-        <result column="parent_Task_Id" property="parentTaskId" />
-        <result column="variable" property="variable" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        id, order_Id, task_Name, display_Name, task_Type, perform_Type, task_State, operator, create_Time, finish_Time, expire_Time, action_Url, parent_Task_Id, variable
-    </sql>
-
-</mapper>

+ 0 - 27
mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfOrderMapper.xml

@@ -1,27 +0,0 @@
-<?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.ym.mec.education.mapper.WfOrderMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.WfOrder">
-        <id column="id" property="id" />
-        <result column="parent_Id" property="parentId" />
-        <result column="process_Id" property="processId" />
-        <result column="creator" property="creator" />
-        <result column="create_Time" property="createTime" />
-        <result column="expire_Time" property="expireTime" />
-        <result column="last_Update_Time" property="lastUpdateTime" />
-        <result column="last_Updator" property="lastUpdator" />
-        <result column="priority" property="priority" />
-        <result column="parent_Node_Name" property="parentNodeName" />
-        <result column="order_No" property="orderNo" />
-        <result column="variable" property="variable" />
-        <result column="version" property="version" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        id, parent_Id, process_Id, creator, create_Time, expire_Time, last_Update_Time, last_Updator, priority, parent_Node_Name, order_No, variable, version
-    </sql>
-
-</mapper>

+ 0 - 24
mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfProcessMapper.xml

@@ -1,24 +0,0 @@
-<?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.ym.mec.education.mapper.WfProcessMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.WfProcess">
-        <id column="id" property="id" />
-        <result column="name" property="name" />
-        <result column="display_Name" property="displayName" />
-        <result column="type" property="type" />
-        <result column="instance_Url" property="instanceUrl" />
-        <result column="state" property="state" />
-        <result column="content" property="content" />
-        <result column="version" property="version" />
-        <result column="create_Time" property="createTime" />
-        <result column="creator" property="creator" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        id, name, display_Name, type, instance_Url, state, content, version, create_Time, creator
-    </sql>
-
-</mapper>

+ 0 - 22
mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfSurrogateMapper.xml

@@ -1,22 +0,0 @@
-<?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.ym.mec.education.mapper.WfSurrogateMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.WfSurrogate">
-        <id column="id" property="id" />
-        <result column="process_Name" property="processName" />
-        <result column="operator" property="operator" />
-        <result column="surrogate" property="surrogate" />
-        <result column="odate" property="odate" />
-        <result column="sdate" property="sdate" />
-        <result column="edate" property="edate" />
-        <result column="state" property="state" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        id, process_Name, operator, surrogate, odate, sdate, edate, state
-    </sql>
-
-</mapper>

+ 0 - 16
mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfTaskActorMapper.xml

@@ -1,16 +0,0 @@
-<?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.ym.mec.education.mapper.WfTaskActorMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.WfTaskActor">
-        <result column="task_Id" property="taskId" />
-        <result column="actor_Id" property="actorId" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        task_Id, actor_Id
-    </sql>
-
-</mapper>

+ 0 - 28
mec-education/src/main/java/com/ym/mec/education/mapper/xml/WfTaskMapper.xml

@@ -1,28 +0,0 @@
-<?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.ym.mec.education.mapper.WfTaskMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.WfTask">
-        <id column="id" property="id" />
-        <result column="order_Id" property="orderId" />
-        <result column="task_Name" property="taskName" />
-        <result column="display_Name" property="displayName" />
-        <result column="task_Type" property="taskType" />
-        <result column="perform_Type" property="performType" />
-        <result column="operator" property="operator" />
-        <result column="create_Time" property="createTime" />
-        <result column="finish_Time" property="finishTime" />
-        <result column="expire_Time" property="expireTime" />
-        <result column="action_Url" property="actionUrl" />
-        <result column="parent_Task_Id" property="parentTaskId" />
-        <result column="variable" property="variable" />
-        <result column="version" property="version" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        id, order_Id, task_Name, display_Name, task_Type, perform_Type, operator, create_Time, finish_Time, expire_Time, action_Url, parent_Task_Id, variable, version
-    </sql>
-
-</mapper>

+ 0 - 2
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -4,8 +4,6 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.common.security.AuthUser;
-import com.ym.mec.common.security.SecurityUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;

+ 14 - 2
mec-teacher/src/main/java/com/ym/mec/teacher/TeacherApplication.java

@@ -1,18 +1,21 @@
 package com.ym.mec.teacher;
 
+import com.spring4all.swagger.EnableSwagger2Doc;
+import com.ym.mec.common.redis.service.RedisCache;
 import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.client.loadbalancer.LoadBalanced;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.client.RestTemplate;
 
-import com.spring4all.swagger.EnableSwagger2Doc;
-
 @SpringBootApplication
 @EnableDiscoveryClient
 @EnableFeignClients("com.ym.mec")
@@ -25,9 +28,18 @@ public class TeacherApplication {
 		SpringApplication.run(TeacherApplication.class, args);
 	}
 
+	@Autowired
+	private RedisTemplate<String, Object> redisTemplate;
+
 	@Bean
 	@LoadBalanced
 	public RestTemplate restTemplate() {
 		return new RestTemplate();
 	}
+
+	@Bean
+	@ConditionalOnBean(RedisTemplate.class)
+	public RedisCache<String, Object> redisCache() {
+		return new RedisCache<String, Object>(redisTemplate);
+	}
 }

+ 8 - 0
mec-thirdparty/pom.xml

@@ -26,6 +26,14 @@
 			<artifactId>aliyun-sdk-oss</artifactId>
 			<version>2.8.3</version>
 		</dependency>
+		
+		<dependency>
+			<groupId>com.timevale</groupId>
+			<artifactId>tech-sdk</artifactId>
+			<version>2.1.20</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/libs/tech-sdk-2.1.20.jar</systemPath>
+		</dependency>
 
 	</dependencies>
 

+ 56 - 1
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/eseal/ESealPlugin.java

@@ -2,5 +2,60 @@ package com.ym.mec.thirdparty.eseal;
 
 public interface ESealPlugin {
 
-	
+	/**
+	 * 注册客户端
+	 * @return
+	 */
+	public boolean registClient();
+
+	/**
+	 * 创建用户账户(个人)
+	 * @param realName 姓名
+	 * @param idcard 身份证号码
+	 * @param mobile 手机号码
+	 * @return 账户唯一标识
+	 */
+	public String createUserAccount(String realName, String idcard, String mobile);
+
+	/**
+	 * 创建用户账户(企业)
+	 * @param orgName  机构名称
+	 * @param organCode 统一社会信用代码
+	 * @return 账户唯一标识
+	 */
+	public String createOrganAccount(String orgName, String organCode);
+
+	/**
+	 * 创建印章
+	 * @param accountId 账户唯一标识
+	 * @return 电子印章数据
+	 */
+	public String createSeal(String accountId);
+
+	/**
+	 * 平台自身PDF摘要签署(印章标识)
+	 * @param srcPdfPath 源文件
+	 * @param destPdfPath 签名后的目标文件
+	 * @return
+	 */
+	public boolean platformSign(String srcPdfPath, String destPdfPath);
+
+	/**
+	 * 企业PDF摘要签署(印章图片)
+	 * @param sealData 电子印章数据
+	 * @param srcPdfPath 源文件
+	 * @param destPdfPath 签名后的目标文件
+	 * @return
+	 */
+	public boolean organSign(String sealData, String srcPdfPath, String destPdfPath);
+
+	/**
+	 * 用户签名
+	 * @param accountId 账户唯一标识
+	 * @param sealData 电子印章数据
+	 * @param srcPdfPath 平台签名后的源文件
+	 * @param destPdfPath 平台、用户都签名后的文件地址
+	 * @return
+	 */
+	public boolean userSign(String accountId, String sealData, String srcPdfPath, String destPdfPath);
 }

+ 65 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/eseal/ESealPluginContext.java

@@ -0,0 +1,65 @@
+package com.ym.mec.thirdparty.eseal;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+import com.ym.mec.thirdparty.eseal.provider.TsignPlugin;
+import com.ym.mec.thirdparty.exception.ThirdpartyException;
+
+//@Component
+public class ESealPluginContext implements ApplicationContextAware, InitializingBean {
+	
+	@Value("${thirdparty.eSealPluginName:Tsign}")
+	private String eSealPluginName;
+	
+	private ApplicationContext applicationContext;
+
+	private final Map<String, String> mapper = new HashMap<String, String>() {
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = -9071481806931421021L;
+
+		{
+			put(TsignPlugin.getName(), StringUtils.uncapitalize(TsignPlugin.class.getSimpleName()));
+		}
+	};
+
+	private ESealPlugin eSealPlugin;
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		if (StringUtils.isBlank(eSealPluginName)) {
+			throw new ThirdpartyException("存储插件变量thirdparty.storagePlugName不能为空");
+		}
+
+		eSealPlugin = getStoragePlugin(eSealPluginName);
+
+		if (eSealPlugin == null) {
+			throw new ThirdpartyException("电子签章插件{}不存在", eSealPluginName);
+		}
+	}
+
+	@Override
+	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+		this.applicationContext = applicationContext;
+	}
+
+	private ESealPlugin getStoragePlugin(String vendors) {
+		String beanId = mapper.get(vendors);
+
+		if (StringUtils.isBlank(beanId)) {
+			throw new ThirdpartyException("电子签章提供商不存在");
+		}
+
+		return applicationContext.getBean(beanId, ESealPlugin.class);
+	}
+}

+ 250 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/eseal/provider/TsignPlugin.java

@@ -0,0 +1,250 @@
+package com.ym.mec.thirdparty.eseal.provider;
+
+import java.text.MessageFormat;
+
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import com.timevale.esign.sdk.tech.bean.OrganizeBean;
+import com.timevale.esign.sdk.tech.bean.PersonBean;
+import com.timevale.esign.sdk.tech.bean.PosBean;
+import com.timevale.esign.sdk.tech.bean.SignPDFFileBean;
+import com.timevale.esign.sdk.tech.bean.result.AddAccountResult;
+import com.timevale.esign.sdk.tech.bean.result.AddSealResult;
+import com.timevale.esign.sdk.tech.bean.result.FileDigestSignResult;
+import com.timevale.esign.sdk.tech.bean.result.Result;
+import com.timevale.esign.sdk.tech.bean.seal.PersonTemplateType;
+import com.timevale.esign.sdk.tech.bean.seal.SealColor;
+import com.timevale.esign.sdk.tech.impl.constants.LegalAreaType;
+import com.timevale.esign.sdk.tech.impl.constants.OrganRegType;
+import com.timevale.esign.sdk.tech.impl.constants.SignType;
+import com.timevale.esign.sdk.tech.service.AccountService;
+import com.timevale.esign.sdk.tech.service.SealService;
+import com.timevale.esign.sdk.tech.service.SelfSignService;
+import com.timevale.esign.sdk.tech.service.UserSignService;
+import com.timevale.esign.sdk.tech.v3.client.ServiceClient;
+import com.timevale.esign.sdk.tech.v3.client.ServiceClientManager;
+import com.timevale.tech.sdk.bean.ProjectConfig;
+import com.ym.mec.thirdparty.exception.ThirdpartyException;
+
+//@Service
+public class TsignPlugin implements InitializingBean, DisposableBean {
+
+	@Value("${eseal.tsign.projectid:1}")
+	public String projectId; // = "1111563517";
+
+	@Value("${eseal.tsign.projectSecret:1}")
+	public String projectSecret; // = "95439b0863c241c63a861b87d1e647b7";
+
+	@Value("${eseal.tsign.apisUrl:1}")
+	public String apisUrl; // = "http://smlitsm.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2";
+
+	private ServiceClient serviceClient;
+
+	public static String getName() {
+		return "Tsign";
+	}
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		registClient();
+
+		serviceClient = serviceClient();
+		if (serviceClient == null) {
+			throw new ThirdpartyException("获取e签宝客户端失败");
+		}
+	}
+
+	@Override
+	public void destroy() throws Exception {
+		ServiceClientManager.shutdown(projectId);
+	}
+
+	/**
+	 * 客户端注册
+	 * @return
+	 */
+	public boolean registClient() {
+		ProjectConfig projectconfig = new ProjectConfig();
+		projectconfig.setProjectId(projectId);
+		projectconfig.setProjectSecret(projectSecret);
+		projectconfig.setItsmApiUrl(apisUrl);
+		Result result = ServiceClientManager.registClient(projectconfig, null, null);
+		if (result.getErrCode() == 0) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 获取客户端
+	 * @return
+	 */
+	public ServiceClient serviceClient() {
+		ServiceClient serviceclient = ServiceClientManager.get(projectId);
+		if (serviceclient == null) {
+			throw new ThirdpartyException(MessageFormat.format("ServiceClient为null,获取客户端接口调用失败 ", projectId));
+		}
+		return serviceclient;
+	}
+
+	/**
+	 * 创建用户账户(个人)
+	 * @param realName 姓名
+	 * @param idcard 身份证号码
+	 * @param mobile 手机号码
+	 * @return e签宝账户唯一标识
+	 */
+	public String createUserAccount(String realName, String idcard, String mobile) {
+		PersonBean personbean = new PersonBean();
+		personbean.setName(realName);
+		personbean.setIdNo(idcard);
+		personbean.setMobile(mobile);
+		personbean.setPersonArea(LegalAreaType.MAINLAND);
+		// personbean.setPersonArea(4);
+		AccountService service = serviceClient.accountService();
+		AddAccountResult result = service.addAccount(personbean);
+		if (result.getErrCode() == 0) {
+			return result.getAccountId();
+		}
+		throw new ThirdpartyException("创建个人账户接口调用失败code=" + result.getErrCode() + "msg=" + result.getMsg());
+	}
+
+	/**
+	 * 创建用户账户(企业)
+	 * @param orgName  机构名称
+	 * @param organCode 统一社会信用代码
+	 * @return e签宝账户唯一标识
+	 */
+	public String createOrganAccount(String orgName, String organCode) {
+		OrganizeBean organizeBean = new OrganizeBean();
+		organizeBean.setName(orgName);
+		organizeBean.setOrganCode(organCode);
+		organizeBean.setRegType(OrganRegType.MERGE);
+		organizeBean.setUserType(0);
+
+		AccountService service = serviceClient.accountService();
+		AddAccountResult result = service.addAccount(organizeBean);
+		if (result.getErrCode() == 0) {
+			return result.getAccountId();
+		}
+		throw new ThirdpartyException("创建企业账户接口调用失败code=" + result.getErrCode() + "msg=" + result.getMsg());
+	}
+
+	/**
+	 * 创建印章
+	 * @param accountId e签宝账户唯一标识
+	 * @return 电子印章数据
+	 */
+	public String createSeal(String accountId) {
+		// 创建模板类型
+		PersonTemplateType templateType = PersonTemplateType.RECTANGLE;
+		// 生成模板印章的颜色
+		SealColor color = SealColor.BLUE;
+		SealService service = serviceClient.sealService();
+		AddSealResult result = service.addTemplateSeal(accountId, templateType, color);
+		if (0 == result.getErrCode()) {
+			return result.getSealData();
+		}
+		throw new ThirdpartyException("个人模板印章接口调用失败code=" + result.getErrCode() + "msg=" + result.getMsg());
+	}
+
+	/**
+	 * 平台自身PDF摘要签署(印章标识)
+	 * @param srcPdfPath 源文件
+	 * @param destPdfPath 签名后的目标文件
+	 * @return
+	 */
+	public boolean platformSign(String srcPdfPath, String destPdfPath) {
+		PosBean posBean = new PosBean();
+		// 签章类型,Single-单页签章、Multi-多页签章、Edges-骑缝章、Key-关键字签章
+		SignType signType = SignType.Key;
+		// 接口调用方(平台方)的印章,请在www.tsign.cn官网中设置默认印章其sealId值为0
+		int sealId = 0;
+		// 设置接口调用方(平台方)签章位置信息
+		posBean.setPosPage("1");// 签署页码,若为多页签章,支持页码格式“1-3,5,8“,若为坐标定位时,不可空
+		posBean.setKey("甲方(签字)");
+		// 签署位置X坐标,默认值为0,以pdf页面的左下角作为原点,控制距离页面左端的横向移动距离,单位为px
+		posBean.setPosX(100);
+		// 签署位置Y坐标,默认值为0,以pdf页面的左下角作为原点,控制距离页面底端的纵向移动距离,单位为px
+		posBean.setPosY(0);
+		// 印章图片在PDF文件中的等比缩放大小,公章标准大小为4.2厘米即159px
+		posBean.setWidth(100);
+		SignPDFFileBean PDFbean = new SignPDFFileBean();
+		PDFbean.setSrcPdfFile(srcPdfPath);
+		PDFbean.setDstPdfFile(destPdfPath);
+
+		SelfSignService service = serviceClient.selfSignService();
+		FileDigestSignResult result = service.localSignPdf(PDFbean, posBean, sealId, signType);
+		if (0 != result.getErrCode()) {
+			throw new ThirdpartyException("平台自身PDF摘要签署接口调用失败!Code=" + result.getErrCode() + "MSG=" + result.getMsg());
+		}
+		return true;
+	}
+
+	/**
+	 * 企业PDF摘要签署(印章图片)
+	 * @param sealData 电子印章数据
+	 * @param srcPdfPath 源文件
+	 * @param destPdfPath 签名后的目标文件
+	 * @return
+	 */
+	public boolean organSign(String sealData, String srcPdfPath, String destPdfPath) {
+		PosBean posBean = new PosBean();
+		// 签章类型,Single-单页签章、Multi-多页签章、Edges-骑缝章、Key-关键字签章
+		SignType signType = SignType.Key;
+		// 设置接口调用方(平台方)签章位置信息
+		posBean.setPosPage("1");// 签署页码,若为多页签章,支持页码格式“1-3,5,8“,若为坐标定位时,不可空
+		posBean.setKey("甲方(签字)");
+		// 签署位置X坐标,默认值为0,以pdf页面的左下角作为原点,控制距离页面左端的横向移动距离,单位为px
+		posBean.setPosX(100);
+		// 签署位置Y坐标,默认值为0,以pdf页面的左下角作为原点,控制距离页面底端的纵向移动距离,单位为px
+		posBean.setPosY(0);
+		// 印章图片在PDF文件中的等比缩放大小,公章标准大小为4.2厘米即159px
+		posBean.setWidth(100);
+		SignPDFFileBean PDFbean = new SignPDFFileBean();
+		PDFbean.setSrcPdfFile(srcPdfPath);
+		PDFbean.setDstPdfFile(destPdfPath);
+
+		SelfSignService service = serviceClient.selfSignService();
+		FileDigestSignResult result = service.localSignPdf(PDFbean, posBean, sealData, signType);
+		if (0 != result.getErrCode()) {
+			throw new ThirdpartyException("平台自身PDF摘要签署接口调用失败!Code=" + result.getErrCode() + "MSG=" + result.getMsg());
+		}
+		return true;
+	}
+
+	/**
+	 * 用户签名
+	 * @param accountId e签宝账户唯一标识
+	 * @param sealData 电子印章数据
+	 * @param srcPdfPath 平台签名后的源文件
+	 * @param destPdfPath 平台、用户都签名后的文件地址
+	 * @return
+	 */
+	public boolean userSign(String accountId, String sealData, String srcPdfPath, String destPdfPath) {
+
+		SignPDFFileBean signPDFStreamBean = new SignPDFFileBean();
+		// C:test_signed.pdf为平台自身签署后路径
+		signPDFStreamBean.setSrcPdfFile(srcPdfPath);
+		signPDFStreamBean.setDstPdfFile(destPdfPath);
+		PosBean posBean = new PosBean();
+		posBean.setPosPage("1");
+		posBean.setPosType(1);
+		posBean.setWidth(80);
+		posBean.setKey("乙方(签字)");
+		posBean.setPosX(100);
+		posBean.setPosY(0);
+
+		// 签章类型,Single-单页签章、Multi-多页签章、Edges-骑缝章、Key-关键字签章
+		SignType signtype = SignType.Key;
+		UserSignService service = serviceClient.userSignService();
+		FileDigestSignResult result = service.localSignPDF(accountId, sealData, signPDFStreamBean, posBean, signtype);
+		if (result.getErrCode() == 0) {
+			return true;
+		}
+		throw new ThirdpartyException("平台用户PDF摘要签署接口调用失败" + result.getErrCode() + "msg=" + result.getMsg());
+	}
+}

+ 4 - 4
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/MessageSenderPluginContext.java

@@ -35,9 +35,9 @@ public class MessageSenderPluginContext implements ApplicationContextAware {
 		private static final long serialVersionUID = -3964872523891264522L;
 
 		{
-			put("jiguang", StringUtils.uncapitalize(JiguangPushPlugin.class.getSimpleName()));
-			put("moxingtong", StringUtils.uncapitalize(MOxintongSMSPlugin.class.getSimpleName()));
-			put("shiyuan", StringUtils.uncapitalize(ShiyuanSMSPlugin.class.getSimpleName()));
+			put(JiguangPushPlugin.getName(), StringUtils.uncapitalize(JiguangPushPlugin.class.getSimpleName()));
+			put(MOxintongSMSPlugin.getName(), StringUtils.uncapitalize(MOxintongSMSPlugin.class.getSimpleName()));
+			put(ShiyuanSMSPlugin.getName(), StringUtils.uncapitalize(ShiyuanSMSPlugin.class.getSimpleName()));
 		}
 	};
 
@@ -84,7 +84,7 @@ public class MessageSenderPluginContext implements ApplicationContextAware {
 		String beanId = mapper.get(StringUtils.lowerCase(messageSender.name()));
 
 		if (StringUtils.isBlank(beanId)) {
-			throw new ThirdpartyException("消息发送方不存在");
+			throw new ThirdpartyException("消息提供方不存在");
 		}
 
 		return applicationContext.getBean(beanId, MessageSenderPlugin.class);

+ 4 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/JiguangPushPlugin.java

@@ -36,6 +36,10 @@ public class JiguangPushPlugin implements MessageSenderPlugin, InitializingBean
 	@Value("${push.jiguang.reqURL:1}")
 	private String reqURL;// 请求极光地址
 
+	public static String getName() {
+		return "Jiguang";
+	}
+
 	/**
 	 * 组装推送Json串
 	 *

+ 4 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/MOxintongSMSPlugin.java

@@ -31,6 +31,10 @@ public class MOxintongSMSPlugin implements MessageSenderPlugin, InitializingBean
 	@Value("${Moxintong.reqUrl:1}")
 	private String reqUrl;
 
+	public static String getName() {
+		return "MOxintong";
+	}
+
 	@Override
 	public boolean send(String subject, String content, String receiver, String url) throws IOException {
 		Map<String, Object> reqParams = new HashMap<String, Object>();

+ 4 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/ShiyuanSMSPlugin.java

@@ -39,6 +39,10 @@ public class ShiyuanSMSPlugin implements MessageSenderPlugin, InitializingBean {
 	// private String product = "";//产品ID(不用填写)
 	// private String extno = "";//扩展码(不用填写)
 
+	public static String getName() {
+		return "Shiyuan";
+	}
+
 	@Override
 	public void afterPropertiesSet() throws Exception {
 		// 参数检查

+ 3 - 3
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/StoragePluginContext.java

@@ -19,7 +19,7 @@ import com.ym.mec.thirdparty.storage.provider.AliyunOssStoragePlugin;
 @Component
 public class StoragePluginContext implements ApplicationContextAware, InitializingBean {
 
-	@Value("${thirdparty.storagePluginName:aliyun}")
+	@Value("${thirdparty.storagePluginName:Aliyun}")
 	private String storagePluginName;
 
 	private ApplicationContext applicationContext;
@@ -31,7 +31,7 @@ public class StoragePluginContext implements ApplicationContextAware, Initializi
 		private static final long serialVersionUID = -9071481806931421021L;
 
 		{
-			put("aliyun", StringUtils.uncapitalize(AliyunOssStoragePlugin.class.getSimpleName()));
+			put(AliyunOssStoragePlugin.getName(), StringUtils.uncapitalize(AliyunOssStoragePlugin.class.getSimpleName()));
 		}
 	};
 
@@ -88,7 +88,7 @@ public class StoragePluginContext implements ApplicationContextAware, Initializi
 		String beanId = mapper.get(vendors);
 
 		if (StringUtils.isBlank(beanId)) {
-			throw new ThirdpartyException("存储供应商不存在");
+			throw new ThirdpartyException("存储提供方不存在");
 		}
 
 		return applicationContext.getBean(beanId, StoragePlugin.class);

+ 4 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/provider/AliyunOssStoragePlugin.java

@@ -32,6 +32,10 @@ public class AliyunOssStoragePlugin implements StoragePlugin, InitializingBean,
 
 	private OSSClient ossClient;
 
+	public static String getName() {
+		return "Aliyun";
+	}
+
 	@Override
 	public void afterPropertiesSet() throws Exception {
 		// 创建ClientConfiguration。ClientConfiguration是OSSClient的配置类,可配置代理、连接超时、最大连接数等参数。

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/UploadFileController.java

@@ -13,9 +13,9 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
+import com.ym.mec.biz.service.UploadFileService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.UploadReturnBean;
-import com.ym.mec.common.service.impl.UploadFileService;
 import com.ym.mec.util.upload.UploadUtil;
 
 /** 

+ 2 - 27
pom.xml

@@ -224,52 +224,27 @@
 	</pluginRepositories>
 
 	<dependencies>
-		<!-- SpringBoot����Web��� -->
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-web</artifactId>
 		</dependency>
-		<!--��ʡ�ͼ�صļ��ɹ��� -->
+		
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-actuator</artifactId>
 		</dependency>
+		
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-test</artifactId>
 			<scope>test</scope>
 		</dependency>
 
-		<!-- SpringBoot����config��� -->
-		<!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-config</artifactId> 
-			</dependency> -->
-		<!--ע������ -->
-		<!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> 
-			</dependency> -->
-		<!--��·�� -->
 		<dependency>
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
 		</dependency>
 
-		<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> 
-			</dependency> -->
-
-		<!--��Ⱥ�����Ϣ���� -->
-		<!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix-hystrix-stream</artifactId> 
-			</dependency> -->
-		<!--��־���� -->
-		<!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zipkin</artifactId> 
-			</dependency> -->
-		<!--��Ϣ���� -->
-		<!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-bus-amqp</artifactId> 
-			</dependency> -->
-		<!--�ȼ��� -->
-		<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> 
-			<scope>runtime</scope> <optional>true</optional> </dependency> -->
-		<!--���Կ�� -->
-		<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> 
-			<scope>test</scope> </dependency> -->
 		<dependency>
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>