diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b60bb04492e29189cf5ffb414daeaf10fa116406
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,143 @@
+
+
+ 4.0.0
+
+ com.es
+ disped
+ 1.0.0-SNAPSHOT
+
+ disped-common
+ disped-common
+ http://maven.apache.org
+
+
+
+ commons-io
+ commons-io
+ 2.6
+
+
+ commons-fileupload
+ commons-fileupload
+ 1.3.3
+
+
+ commons-io
+ commons-io
+
+
+
+
+ org.apache.commons
+ commons-lang3
+ 3.7
+
+
+ commons-logging
+ commons-logging
+ 1.2
+
+
+
+
+ org.springframework
+ spring-context
+ ${spring.version}
+
+
+ org.springframework
+ spring-context-support
+ ${spring.version}
+
+
+ org.springframework
+ spring-aspects
+ ${spring.version}
+
+
+ aspectjweaver
+ org.aspectj
+
+
+
+
+ org.springframework
+ spring-jdbc
+ ${spring.version}
+
+
+ org.springframework
+ spring-jms
+ ${spring.version}
+
+
+ org.springframework
+ spring-web
+ ${spring.version}
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.aspectj
+ aspectjweaver
+ ${aspectj.version}
+
+
+ org.aspectj
+ aspectjrt
+ ${aspectj.version}
+
+
+
+ com.alibaba
+ fastjson
+ 1.2.47
+
+
+
+ org.mybatis
+ mybatis
+ 3.4.5
+
+
+ org.mybatis
+ mybatis-spring
+ 1.3.1
+
+
+
+ com.github.pagehelper
+ pagehelper
+ 5.1.2
+
+
+
+ com.aliyun
+ aliyun-java-sdk-core
+ 4.1.1
+
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.3.6
+
+
+
+ dom4j
+ dom4j
+ 1.6.1
+
+
+ com.thoughtworks.xstream
+ xstream
+ 1.3.1
+
+
+
diff --git a/src/main/java/com/es/disped/common/annotation/DynamicDataSource.java b/src/main/java/com/es/disped/common/annotation/DynamicDataSource.java
new file mode 100644
index 0000000000000000000000000000000000000000..647ea13d567c16ea9912cb458b7c7a6f8f5f1174
--- /dev/null
+++ b/src/main/java/com/es/disped/common/annotation/DynamicDataSource.java
@@ -0,0 +1,29 @@
+package com.es.disped.common.annotation;
+
+import java.lang.annotation.*;
+
+
+/**
+ * @author Anson
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年3月29日 下午4:16:08
+ *
+ * 名称:DynamicDataSource
+ *
+ * 描述:动态数据源切换注解(默认切换扩展数据源)
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface DynamicDataSource {
+
+ /**
+ * 需要切换的数据源名称
+ *
+ * @return DataSourceName
+ */
+ String value() default "extendDataSource";
+}
diff --git a/src/main/java/com/es/disped/common/aspect/DataSourceAspect.java b/src/main/java/com/es/disped/common/aspect/DataSourceAspect.java
new file mode 100644
index 0000000000000000000000000000000000000000..50af6d648718a22b82b41a378c48f1af59170888
--- /dev/null
+++ b/src/main/java/com/es/disped/common/aspect/DataSourceAspect.java
@@ -0,0 +1,55 @@
+package com.es.disped.common.aspect;
+
+import com.es.disped.common.annotation.DynamicDataSource;
+import com.es.disped.common.spring.DataSourceContextHolder;
+
+import java.lang.reflect.Method;
+
+import org.springframework.aop.AfterReturningAdvice;
+import org.springframework.aop.MethodBeforeAdvice;
+
+
+/**
+ * @author Anson
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年3月29日 下午4:16:42
+ * 名称:DataSourceAspect
+ *
+ * 描述:切换数据源 aop 切面(order=1 优先级最高)
+ */
+public class DataSourceAspect implements MethodBeforeAdvice, AfterReturningAdvice {
+
+
+ /**
+ * 前置通知(用于在事物开启之前切换数据源)
+ *
+ * @see MethodBeforeAdvice#before(Method, Object[], Object)
+ */
+ public void before(Method method, Object[] args, Object target) throws Throwable {
+ if (method.isAnnotationPresent(DynamicDataSource.class)) {
+ DynamicDataSource dataSource = method.getAnnotation(DynamicDataSource.class);
+ if (dataSource.value() != "defaultDataSource") {
+ DataSourceContextHolder.setDataSource(dataSource.value());
+ System.out.println(">>>>>>>>>>>>>>>>>>>>>>切换数据源:"+dataSource.value());
+ }
+ }
+ }
+
+ /**
+ * 后置通知(用于清理切换过的数据源,还原默认数据源)
+ *
+ * @see AfterReturningAdvice#afterReturning(Object, Method, Object[], Object)
+ */
+ public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
+ if (method.isAnnotationPresent(DynamicDataSource.class)) {
+ DynamicDataSource dataSource = method.getAnnotation(DynamicDataSource.class);
+ if (dataSource.value() != "defaultDataSource") {
+ DataSourceContextHolder.clearDataSource();
+ }
+ }
+ }
+
+}
diff --git a/src/main/java/com/es/disped/common/constant/AliSms.java b/src/main/java/com/es/disped/common/constant/AliSms.java
new file mode 100644
index 0000000000000000000000000000000000000000..30d671f5f81769d1a271aa258c89606b874fa91d
--- /dev/null
+++ b/src/main/java/com/es/disped/common/constant/AliSms.java
@@ -0,0 +1,93 @@
+/**
+ *
+ */
+package com.es.disped.common.constant;
+
+import java.io.Serializable;
+
+import com.es.disped.common.support.BaseSupport;
+
+/**
+ * @author Anson
+ *
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 下午1:44:56
+ *
+ * 名称:SmsConstants.java
+ *
+ * 描述:阿里云短信常量
+ */
+public class AliSms extends BaseSupport implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1528222552685097162L;
+ public static String ALI_MESSAGE_REGIION_ID = "cn-hangzhou";
+ protected static String ALI_ACCESS_KEY_ID="LTAIwKpMxSL7O2Uc";
+ protected static String ALI_ACCESS_SECRET="CzNIMsO5UFRMgOvUXpl3ZjJNGTikAb";
+
+ public enum ALI_MESSAGE_SIGN_NAME
+ {
+ ES_TECH(1,"易享科技");
+
+ private int name;
+ private String value;
+
+ private ALI_MESSAGE_SIGN_NAME(int name, String value) {
+ this.setName(name);
+ this.setValue(value);
+ }
+
+ public int getName() {
+ return name;
+ }
+
+ public void setName(int name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+
+ public enum ALI_MESSAGE_TEMPLATE_CODE
+ {
+ VERTIFY_CODE(1,"SMS_165678220"),
+ PASSWORD_RESET(2,"SMS_166095362"),
+ ACCOUNT_VERTIFY(3,"SMS_166095366"),
+ ORDINARY_NOTICE(4,"SMS_166665311");
+
+ private int name;
+ private String value;
+
+ private ALI_MESSAGE_TEMPLATE_CODE(int name, String value) {
+ this.setName(name);
+ this.setValue(value);
+ }
+
+ public int getName() {
+ return name;
+ }
+
+ public void setName(int name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/com/es/disped/common/constant/DataSourceName.java b/src/main/java/com/es/disped/common/constant/DataSourceName.java
new file mode 100644
index 0000000000000000000000000000000000000000..6f85a019825fb44e3efd189ad7b0d16dbfc2ad30
--- /dev/null
+++ b/src/main/java/com/es/disped/common/constant/DataSourceName.java
@@ -0,0 +1,50 @@
+package com.es.disped.common.constant;
+
+
+/**
+ * @author Anson
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年3月29日 下午4:16:26
+ * 名称:DataSourceName
+ *
+ * 描述:常量定义,枚举类型多数据源名称
+ */
+public enum DataSourceName {
+
+ /**
+ * 默认数据源
+ */
+ DEFAULT("defaultDataSource"),
+
+ /**
+ * 扩展数据源
+ */
+ EXTEND("extendDataSource");
+
+ /**
+ * 数据源名称
+ */
+ private String name;
+
+ /**
+ * 构造方法
+ *
+ * @param name 数据源名称
+ */
+ DataSourceName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * 获取名称的 get 方法
+ *
+ * @return String 数据源真实名称
+ */
+ public String getName() {
+ return name;
+ }
+
+}
diff --git a/src/main/java/com/es/disped/common/constant/RecordStatus.java b/src/main/java/com/es/disped/common/constant/RecordStatus.java
new file mode 100644
index 0000000000000000000000000000000000000000..1aaef30546967276a15ecb64ca123b3084852388
--- /dev/null
+++ b/src/main/java/com/es/disped/common/constant/RecordStatus.java
@@ -0,0 +1,54 @@
+package com.es.disped.common.constant;
+
+/**
+ * @Author Anson
+ *
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年4月27日
+ *
+ * @名称: DataStatusModel.java
+ *
+ * @描述: 数据状态枚举模型
+ */
+public enum RecordStatus {
+
+ VERTIFY("审核中",1),USEAGE("使用中",2),DELETE("已删除",3),FREEZE("冻结",4);
+
+ private String name;
+ private int value;
+
+ private RecordStatus(String name,int value)
+ {
+ this.setName(name);
+ this.setValue(value);
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public static String getName(int value)
+ {
+ for(int i=0;i
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年6月19日 下午8:47:30
+ * 微信消息类型
+ */
+ public enum MessageType
+ {
+ TEXT("本文消息","text"),IMAGE("图片消息","image"),VOICE("语音消息","voice"),VIDEO("视频消息","video"),
+ LINK("链接消息","link"),LOCATION("位置消息","location"),EVENT("事件消息","event"),EVENT_SUBSCRIBE("关注","subscribe"),
+ EVENT_UNSUBSCRIBE("取消关注","unsubscribe"),CLICK("点击菜单","CLICK"),VIEW("视图菜单","view");
+
+ String name;
+ String value;
+
+ private MessageType(String name, String value) {
+ this.setName(name);
+ this.setValue(value);
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getValue() {
+ return value;
+ }
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+
+ /**
+ * @author Anson
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年6月17日 下午1:15:36
+ * 微信模板信息
+ */
+ public enum TemplateMessage
+ {
+ COURSE_RESERVATION_SUCCESS("课程预约成功通知","PDI8SwmeInfh5YHDTivjemste1V-kUcNnoJ6D7uSe0g"),
+ COURSE_NOTICE("上课提醒","9IkiqzdU8LkpdjaGKaTS2XBbH2dOhb1JHj0u5Hqm8P0");
+
+ String name;
+ String value;
+
+ private TemplateMessage(String name, String value) {
+ this.setName(name);
+ this.setValue(value);
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getValue() {
+ return value;
+ }
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+
+ public static String getAccessTokenUrl()
+ {
+ return accessTokenUrl;
+ }
+
+ public static String getTemplateMessageUrl(String accessToken) {
+ setTemplateMessageUrl(accessToken);
+ return templateMessageUrl;
+ }
+
+ private static void setTemplateMessageUrl(String accessToken) {
+ WeChat.templateMessageUrl=WeChat.templateMessageUrl.replace("ACCESS_TOKEN_VAL", accessToken);
+ }
+
+ public static void setAccessTokenUrl(String accessTokenUrl) {
+ WeChat.accessTokenUrl = accessTokenUrl;
+ }
+
+ public static String getTemplateMessageDetailUrl() {
+ return TemplateMessageDetailUrl;
+ }
+
+ public static void setTemplateMessageDetailUrl(String templateMessageDetailUrl) {
+ TemplateMessageDetailUrl = templateMessageDetailUrl;
+ }
+
+}
diff --git a/src/main/java/com/es/disped/common/model/MsgModel.java b/src/main/java/com/es/disped/common/model/MsgModel.java
new file mode 100644
index 0000000000000000000000000000000000000000..702d290f9cdc4d40d551561dce7658e92101cbbd
--- /dev/null
+++ b/src/main/java/com/es/disped/common/model/MsgModel.java
@@ -0,0 +1,147 @@
+package com.es.disped.common.model;
+
+import java.io.Serializable;
+
+/**
+ * @author Anson
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年3月29日 下午1:01:00
+ *
+ * 名称:MsgModel
+ *
+ * 描述:消息模型
+ *
+ */
+public class MsgModel implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 状态值
+ */
+ private Integer status;
+
+ /**
+ * 消息
+ */
+ private String msg;
+
+ /**
+ * 返回对象
+ */
+ private Object res;
+
+ /**
+ * 获取状态值
+ *
+ * @return Integer 状态值
+ */
+ public Integer getStatus() {
+ return status;
+ }
+
+ /**
+ * 设置状态值
+ *
+ * @param status 状态值
+ */
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ /**
+ * 获取消息
+ *
+ * @return String 消息内容
+ */
+ public String getMsg() {
+ return msg;
+ }
+
+ /**
+ * 设置消息
+ *
+ * @param msg 消息内容
+ */
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+
+ /**
+ * 获取结果对象
+ *
+ * @return Object 结果对象
+ */
+ public Object getRes() {
+ return res;
+ }
+
+ /**
+ * 设置结果对象
+ *
+ * @param res 结果对象
+ */
+ public void setRes(Object res) {
+ this.res = res;
+ }
+
+ /**
+ * 无参构造方法,构建 MsgModel 对象
+ */
+ public MsgModel() {
+ super();
+ }
+
+ /**
+ * 代参构造方法,构建 MsgModel 对象
+ *
+ * @param status 状态值
+ * @param msg 消息内容
+ * @param res 结果对象
+ */
+ public MsgModel(Integer status, String msg, Object res) {
+ super();
+ this.status = status;
+ this.msg = msg;
+ this.res = res;
+ }
+
+ /**
+ * 代参构造方法,构建 MsgModel 对象
+ *
+ * @param status 状态值
+ * @param msg 消息内容
+ * @param res 结果对象
+ */
+ public MsgModel(Integer status, Object res) {
+ super();
+ this.status = status;
+ this.res = res;
+ }
+
+ /**
+ * 代参构造方法,构建 MsgModel 对象
+ *
+ * @param status 状态值
+ * @param msg 消息内容
+ */
+ public MsgModel(Integer status, String msg) {
+ super();
+ this.status = status;
+ this.msg = msg;
+ }
+
+ /**
+ * 代参构造方法,构建 MsgModel 对象
+ *
+ * @param msg 消息内容
+ */
+ public MsgModel(String msg) {
+ super();
+ this.msg = msg;
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/es/disped/common/model/PageModel.java b/src/main/java/com/es/disped/common/model/PageModel.java
new file mode 100644
index 0000000000000000000000000000000000000000..e0eddd8d23996b0d2292568d4ba373b0428b883a
--- /dev/null
+++ b/src/main/java/com/es/disped/common/model/PageModel.java
@@ -0,0 +1,195 @@
+package com.es.disped.common.model;
+
+import com.github.pagehelper.Page;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Anson
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年3月29日 下午1:01:40
+ *
+ * 名称:PageModel
+ *
+ * 描述:分页Page对象,与页面 boostrapTable 插件交互使用
+ */
+public class PageModel implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 总记录数
+ */
+ private long total;
+
+ /**
+ * 结果集
+ */
+ private List rows;
+
+ /**
+ * 页码值
+ */
+ private int pageNum;
+
+ /**
+ * 每页记录数
+ */
+ private int pageSize;
+
+ /**
+ * 总页数
+ */
+ private int pages;
+
+ /**
+ * 当前页的数量 <= pageSize,该属性来自ArrayList的size属性
+ */
+ private int size;
+
+ /**
+ * 无参构造方法,构建 PageModel 对象
+ */
+ public PageModel() {
+ super();
+ }
+
+ /**
+ * 构造方法(根据参数 List 创建 PageModel)
+ *
+ * @param list 分页查询出的 Page 集合
+ */
+ public PageModel(List list) {
+ if (list instanceof Page) {
+ Page page = (Page) list;
+ this.pageNum = page.getPageNum();
+ this.pageSize = page.getPageSize();
+ this.total = page.getTotal();
+ this.pages = page.getPages();
+ List customList = new ArrayList();
+ for (T t : list) {
+ customList.add(t);
+ }
+ this.rows = customList;
+ this.size = page.size();
+ }
+ }
+
+ /**
+ * 获取总记录数
+ *
+ * @return long 总记录数
+ */
+ public long getTotal() {
+ return total;
+ }
+
+ /**
+ * 设置总记录数
+ *
+ * @param total 总记录数
+ */
+ public void setTotal(long total) {
+ this.total = total;
+ }
+
+ /**
+ * 获取数据集合
+ *
+ * @return List 结果数据集合
+ */
+ public List getRows() {
+ return rows;
+ }
+
+ /**
+ * 设置数据结合(使用 forEach 遍历集合转换对象)
+ *
+ * @param rows 结果对象集合
+ */
+ public void setRows(List rows) {
+ List list = new ArrayList();
+ for (T t : rows) {
+ list.add(t);
+ }
+ this.rows = list;
+ }
+
+ /**
+ * 获取当前页码值
+ *
+ * @return int 当前页码值
+ */
+ public int getPageNum() {
+ return pageNum;
+ }
+
+ /**
+ * 设置当前页码值
+ *
+ * @param pageNum 当前页码值
+ */
+ public void setPageNum(int pageNum) {
+ this.pageNum = pageNum;
+ }
+
+ /**
+ * 获取每页记录数
+ *
+ * @return int 每页记录数
+ */
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ /**
+ * 设置每页记录数
+ *
+ * @param pageSize 每页记录数
+ */
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ /**
+ * 获取总页数
+ *
+ * @return int 总页数
+ */
+ public int getPages() {
+ return pages;
+ }
+
+ /**
+ * 设置总页数
+ *
+ * @param pages 总页数
+ */
+ public void setPages(int pages) {
+ this.pages = pages;
+ }
+
+ /**
+ * 获取当前页数量
+ *
+ * @return int 当前页条数
+ */
+ public int getSize() {
+ return size;
+ }
+
+ /**
+ * 设置当前页数量
+ *
+ * @param size 当前页条数
+ */
+ public void setSize(int size) {
+ this.size = size;
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/es/disped/common/service/BaseService.java b/src/main/java/com/es/disped/common/service/BaseService.java
new file mode 100644
index 0000000000000000000000000000000000000000..efb6dc30a4a6da611b99defa36787e5160e0e87e
--- /dev/null
+++ b/src/main/java/com/es/disped/common/service/BaseService.java
@@ -0,0 +1,200 @@
+package com.es.disped.common.service;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.es.disped.common.model.PageModel;
+
+import java.util.List;
+
+/**
+ * @author Anson
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年3月29日 下午1:02:09
+ *
+ * 描述:通用base接口,封装CRUD操作
+ */
+public interface BaseService {
+
+ /**
+ * 根据条件查询记录数量
+ *
+ * @param example
+ * @return
+ */
+ int countByExample(Example example);
+
+ /**
+ * 根据条件删除记录
+ *
+ * @param example
+ * @return
+ */
+ int deleteByExample(Example example);
+
+ /**
+ * 根据主键删除记录
+ *
+ * @param id
+ * @return
+ */
+ int deleteByPrimaryKey(Object id);
+
+ /**
+ * 插入记录
+ *
+ * @param record
+ * @return
+ */
+ int insert(Record record);
+
+ /**
+ * 插入记录有效字段
+ *
+ * @param record
+ * @return
+ */
+ int insertSelective(Record record);
+
+ /**
+ * 根据条件查询记录,附带BLOB字段
+ *
+ * @param example
+ * @return
+ */
+ List selectByExampleWithBLOBs(Example example);
+
+ /**
+ * 根据条件查询记录
+ *
+ * @param example
+ * @return
+ */
+ List selectByExample(Example example);
+
+ /**
+ * 根据条件查询记录并按页码分页,附带BLOB字段
+ *
+ * @param example 条件
+ * @param pageNum 页数
+ * @param pageSize 每页记录数
+ * @return
+ */
+ PageModel selectByExampleWithBLOBsForStartPage(Example example, Integer pageNum, Integer pageSize);
+
+ /**
+ * 根据条件查询记录并按页码分页
+ *
+ * @param example 条件
+ * @param pageNum 页数
+ * @param pageSize 每页记录数
+ * @return
+ */
+ PageModel selectByExampleForStartPage(Example example, Integer pageNum, Integer pageSize);
+
+ /**
+ * 根据条件查询记录并按最后记录数分页,附带BLOB字段
+ *
+ * @param example 条件
+ * @param offset 跳过数量
+ * @param limit 查询数量
+ * @return
+ */
+ PageModel selectByExampleWithBLOBsForOffsetPage(Example example, Integer offset, Integer limit);
+
+ /**
+ * 根据条件查询记录并按最后记录数分页
+ *
+ * @param example 条件
+ * @param offset 跳过数量
+ * @param limit 查询数量
+ * @return
+ */
+ PageModel selectByExampleForOffsetPage(Example example, Integer offset, Integer limit);
+
+ /**
+ * 根据条件查询第一条记录
+ *
+ * @param example
+ * @return
+ */
+ Record selectFirstByExample(Example example);
+
+ /**
+ * 根据条件查询第一条记录,附带BLOB字段
+ *
+ * @param example
+ * @return
+ */
+ Record selectFirstByExampleWithBLOBs(Example example);
+
+ /**
+ * 根据主键查询记录
+ *
+ * @param id
+ * @return
+ */
+ Record selectByPrimaryKey(Object id);
+
+ /**
+ * 根据条件更新有效字段
+ *
+ * @param record
+ * @param example
+ * @return
+ */
+ int updateByExampleSelective(@Param("record") Record record, @Param("example") Example example);
+
+ /**
+ * 根据条件更新记录有效字段,附带BLOB字段
+ *
+ * @param record
+ * @param example
+ * @return
+ */
+ int updateByExampleWithBLOBs(@Param("record") Record record, @Param("example") Example example);
+
+ /**
+ * 根据条件更新记录
+ *
+ * @param record
+ * @param example
+ * @return
+ */
+ int updateByExample(@Param("record") Record record, @Param("example") Example example);
+
+ /**
+ * 根据主键更新记录有效字段
+ *
+ * @param record
+ * @return
+ */
+ int updateByPrimaryKeySelective(Record record);
+
+ /**
+ * 根据主键更新记录,附带BLOB字段
+ *
+ * @param record
+ * @return
+ */
+ int updateByPrimaryKeyWithBLOBs(Record record);
+
+ /**
+ * 根据主键更新记录
+ *
+ * @param record
+ * @return
+ */
+ int updateByPrimaryKey(Record record);
+
+ /**
+ * 根据主键批量删除记录
+ *
+ * @param ids
+ * @return
+ */
+ int deleteByPrimaryKeys(Object...ids);
+
+}
diff --git a/src/main/java/com/es/disped/common/service/impl/BaseServiceImpl.java b/src/main/java/com/es/disped/common/service/impl/BaseServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..563e8119af90b1b41d93c49dd2348b359e4a3aab
--- /dev/null
+++ b/src/main/java/com/es/disped/common/service/impl/BaseServiceImpl.java
@@ -0,0 +1,379 @@
+package com.es.disped.common.service.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ObjectUtils;
+
+import com.es.disped.common.model.PageModel;
+import com.es.disped.common.service.BaseService;
+import com.github.pagehelper.PageHelper;
+
+
+/**
+ * @author Anson
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 2019年3月29日 下午1:02:24
+ *
+ * 描述:基本base接口,CRUD泛型接口实现类,抽象类只能被继承
+ */
+@SuppressWarnings("unchecked")
+public abstract class BaseServiceImpl implements BaseService {
+
+ @Autowired
+ private Mapper mapper;
+
+ public int countByExample(Example example) {
+ int res = 0;
+ try {
+ Method countByExample = mapper.getClass().getDeclaredMethod("countByExample", example.getClass());
+ Object result = countByExample.invoke(mapper, example);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int deleteByExample(Example example) {
+ int res = 0;
+ try {
+ Method deleteByExample = mapper.getClass().getDeclaredMethod("deleteByExample", example.getClass());
+ Object result = deleteByExample.invoke(mapper, example);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int deleteByPrimaryKey(Object id) {
+ int res = 0;
+ try {
+ Method deleteByPrimaryKey = mapper.getClass().getDeclaredMethod("deleteByPrimaryKey", id.getClass());
+ Object result = deleteByPrimaryKey.invoke(mapper, id);
+ return Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int insert(Record record) {
+ int res = 0;
+ try {
+ Method insert = mapper.getClass().getDeclaredMethod("insert", record.getClass());
+ Object result = insert.invoke(mapper, record);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int insertSelective(Record record) {
+ int res = 0;
+ try {
+ Method insertSelective = mapper.getClass().getDeclaredMethod("insertSelective", record.getClass());
+ Object result = insertSelective.invoke(mapper, record);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public List selectByExampleWithBLOBs(Example example) {
+ List list = null;
+ try {
+ Method selectByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("selectByExampleWithBLOBs", example.getClass());
+ Object result = selectByExampleWithBLOBs.invoke(mapper, example);
+ list = (List) result;
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return list;
+ }
+
+ public List selectByExample(Example example) {
+ List list = null;
+ try {
+ Method selectByExample = mapper.getClass().getDeclaredMethod("selectByExample", example.getClass());
+ Object result = selectByExample.invoke(mapper, example);
+ list = (List) result;
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return list;
+ }
+
+ public PageModel selectByExampleWithBLOBsForStartPage(Example example, Integer pageNum, Integer pageSize) {
+ PageModel pageModel = null;
+ try {
+ Method selectByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("selectByExampleWithBLOBs", example.getClass());
+ PageHelper.startPage(pageNum, pageSize);
+ Object result = selectByExampleWithBLOBs.invoke(mapper, example);
+ pageModel = new PageModel((List) result);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return pageModel;
+ }
+
+ public PageModel selectByExampleForStartPage(Example example, Integer pageNum, Integer pageSize) {
+ PageModel pageModel = null;
+ try {
+ Method selectByExample = mapper.getClass().getDeclaredMethod("selectByExample", example.getClass());
+ PageHelper.startPage(pageNum, pageSize);
+ Object result = selectByExample.invoke(mapper, example);
+ pageModel = new PageModel((List) result);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return pageModel;
+ }
+
+ public PageModel selectByExampleWithBLOBsForOffsetPage(Example example, Integer offset, Integer limit) {
+ PageModel pageModel = null;
+ try {
+ Method selectByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("selectByExampleWithBLOBs", example.getClass());
+ PageHelper.offsetPage(offset, limit);
+ Object result = selectByExampleWithBLOBs.invoke(mapper, example);
+ pageModel = new PageModel((List) result);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return pageModel;
+ }
+
+ public PageModel selectByExampleForOffsetPage(Example example, Integer offset, Integer limit) {
+ PageModel pageModel = null;
+ try {
+ Method selectByExample = mapper.getClass().getDeclaredMethod("selectByExample", example.getClass());
+ PageHelper.offsetPage(offset, limit);
+ Object result = selectByExample.invoke(mapper, example);
+ pageModel = new PageModel((List) result);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return pageModel;
+ }
+
+ public Record selectFirstByExample(Example example) {
+ Record res = null;
+ try {
+ Method selectByExample = mapper.getClass().getDeclaredMethod("selectByExample", example.getClass());
+ List result = (List) selectByExample.invoke(mapper, example);
+ if (null != result && result.size() > 0) {
+ res = result.get(0);
+ }
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public Record selectFirstByExampleWithBLOBs(Example example) {
+ Record res = null;
+ try {
+ Method selectByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("selectByExampleWithBLOBs", example.getClass());
+ List result = (List) selectByExampleWithBLOBs.invoke(mapper, example);
+ if (null != result && result.size() > 0) {
+ res = result.get(0);
+ }
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public Record selectByPrimaryKey(Object id) {
+ Record res = null;
+ try {
+ Method selectByPrimaryKey = mapper.getClass().getDeclaredMethod("selectByPrimaryKey", id.getClass());
+ Object result = selectByPrimaryKey.invoke(mapper, id);
+ res = (Record) result;
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int updateByExampleSelective(@Param("record") Record record, @Param("example") Example example) {
+ int res = 0;
+ try {
+ Method updateByExampleSelective = mapper.getClass().getDeclaredMethod("updateByExampleSelective", record.getClass(), example.getClass());
+ Object result = updateByExampleSelective.invoke(mapper, record, example);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int updateByExampleWithBLOBs(@Param("record") Record record, @Param("example") Example example) {
+ int res = 0;
+ try {
+ Method updateByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("updateByExampleWithBLOBs", record.getClass(), example.getClass());
+ Object result = updateByExampleWithBLOBs.invoke(mapper, record, example);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int updateByExample(@Param("record") Record record, @Param("example") Example example) {
+ int res = 0;
+ try {
+ Method updateByExample = mapper.getClass().getDeclaredMethod("updateByExample", record.getClass(), example.getClass());
+ Object result = updateByExample.invoke(mapper, record, example);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int updateByPrimaryKeySelective(Record record) {
+ int res = 0;
+ try {
+ Method updateByPrimaryKeySelective = mapper.getClass().getDeclaredMethod("updateByPrimaryKeySelective", record.getClass());
+ Object result = updateByPrimaryKeySelective.invoke(mapper, record);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int updateByPrimaryKeyWithBLOBs(Record record) {
+ int res = 0;
+ try {
+ Method updateByPrimaryKeyWithBLOBs = mapper.getClass().getDeclaredMethod("updateByPrimaryKeyWithBLOBs", record.getClass());
+ Object result = updateByPrimaryKeyWithBLOBs.invoke(mapper, record);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int updateByPrimaryKey(Record record) {
+ int res = 0;
+ try {
+ Method updateByPrimaryKey = mapper.getClass().getDeclaredMethod("updateByPrimaryKey", record.getClass());
+ Object result = updateByPrimaryKey.invoke(mapper, record);
+ res = Integer.parseInt(String.valueOf(result));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public int deleteByPrimaryKeys(Object...ids) {
+ int count = 0;
+ try {
+ if(!ObjectUtils.isEmpty(ids)){
+ for(Object id:ids){
+ Method deleteByPrimaryKey = mapper.getClass().getDeclaredMethod("deleteByPrimaryKey", id.getClass());
+ Object result = deleteByPrimaryKey.invoke(mapper, id);
+ count += Integer.parseInt(String.valueOf(result));
+ }
+ }
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ return count;
+ }
+}
diff --git a/src/main/java/com/es/disped/common/sms/AliMsg.java b/src/main/java/com/es/disped/common/sms/AliMsg.java
new file mode 100644
index 0000000000000000000000000000000000000000..3f156818d6094b91180d9c4b9bf58efbb6a9f969
--- /dev/null
+++ b/src/main/java/com/es/disped/common/sms/AliMsg.java
@@ -0,0 +1,241 @@
+/**
+ *
+ */
+package com.es.disped.common.sms;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * @author Anson
+ *
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 上午11:50:31
+ *
+ * 名称:AliMsg.java
+ *
+ * 描述:阿里云短信客户端返回信息
+ */
+public class AliMsg implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8926141311343135404L;
+ private String Message=null;
+ private String RequestId=null;
+ private String BizId=null;
+ private String Code=null;
+ private int TotalCount;
+ private List SmsSendDetailDTOs=null;
+ /**
+ *
+ */
+ public AliMsg() {
+ this.SmsSendDetailDTOs=new ArrayList();
+ }
+ /**
+ *
+ * @author Anson
+ *
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 下午9:14:34
+ *
+ * 名称:AliQueryMsg.java
+ *
+ * 描述:短信查询结果
+ */
+ class SmsSendDetailDTO
+ {
+ private String SendDate=null;
+ private String OutId=null;
+ private int SendStatus;
+ private String ReceiveDate=null;
+ private String ErrCode=null;
+ private String TemplateCode=null;
+ private String Content=null;
+ private String PhoneNum=null;
+ /**
+ *
+ */
+ public SmsSendDetailDTO() {
+
+ }
+ /**
+ * @return the sendDate
+ */
+ public String getSendDate() {
+ return SendDate;
+ }
+ /**
+ * @param sendDate the sendDate to set
+ */
+ public void setSendDate(String sendDate) {
+ SendDate = sendDate;
+ }
+ /**
+ * @return the outId
+ */
+ public String getOutId() {
+ return OutId;
+ }
+ /**
+ * @param outId the outId to set
+ */
+ public void setOutId(String outId) {
+ OutId = outId;
+ }
+ /**
+ * @return the sendStatus
+ */
+ public int getSendStatus() {
+ return SendStatus;
+ }
+ /**
+ * @param sendStatus the sendStatus to set
+ */
+ public void setSendStatus(int sendStatus) {
+ SendStatus = sendStatus;
+ }
+ /**
+ * @return the receiveDate
+ */
+ public String getReceiveDate() {
+ return ReceiveDate;
+ }
+ /**
+ * @param receiveDate the receiveDate to set
+ */
+ public void setReceiveDate(String receiveDate) {
+ ReceiveDate = receiveDate;
+ }
+ /**
+ * @return the errCode
+ */
+ public String getErrCode() {
+ return ErrCode;
+ }
+ /**
+ * @param errCode the errCode to set
+ */
+ public void setErrCode(String errCode) {
+ ErrCode = errCode;
+ }
+ /**
+ * @return the templateCode
+ */
+ public String getTemplateCode() {
+ return TemplateCode;
+ }
+ /**
+ * @param templateCode the templateCode to set
+ */
+ public void setTemplateCode(String templateCode) {
+ TemplateCode = templateCode;
+ }
+ /**
+ * @return the content
+ */
+ public String getContent() {
+ return Content;
+ }
+ /**
+ * @param content the content to set
+ */
+ public void setContent(String content) {
+ Content = content;
+ }
+ /**
+ * @return the phoneNum
+ */
+ public String getPhoneNum() {
+ return PhoneNum;
+ }
+ /**
+ * @param phoneNum the phoneNum to set
+ */
+ public void setPhoneNum(String phoneNum) {
+ PhoneNum = phoneNum;
+ }
+ }
+ /**
+ * @return the message
+ */
+ public String getMessage() {
+ return Message;
+ }
+ /**
+ * @param message the message to set
+ */
+ public void setMessage(String message) {
+ Message = message;
+ }
+ /**
+ * @return the requestId
+ */
+ public String getRequestId() {
+ return RequestId;
+ }
+ /**
+ * @param requestId the requestId to set
+ */
+ public void setRequestId(String requestId) {
+ RequestId = requestId;
+ }
+ /**
+ * @return the bizId
+ */
+ public String getBizId() {
+ return BizId;
+ }
+ /**
+ * @param bizId the bizId to set
+ */
+ public void setBizId(String bizId) {
+ BizId = bizId;
+ }
+ /**
+ * @return the code
+ */
+ public String getCode() {
+ return Code;
+ }
+ /**
+ * @param code the code to set
+ */
+ public void setCode(String code) {
+ Code = code;
+ }
+ /**
+ * @return the totalCount
+ */
+ public int getTotalCount() {
+ return TotalCount;
+ }
+ /**
+ * @param totalCount the totalCount to set
+ */
+ public void setTotalCount(int totalCount) {
+ TotalCount = totalCount;
+ }
+ /**
+ * @return the smsSendDetailDTOs
+ */
+ public List getSmsSendDetailDTOs() {
+ return SmsSendDetailDTOs;
+ }
+ /**
+ * @param smsSendDetailDTOs the smsSendDetailDTOs to set
+ */
+ public void setSmsSendDetailDTOs(List smsSendDetailDTOs) {
+ SmsSendDetailDTOs = smsSendDetailDTOs;
+ }
+}
diff --git a/src/main/java/com/es/disped/common/sms/SmsClient.java b/src/main/java/com/es/disped/common/sms/SmsClient.java
new file mode 100644
index 0000000000000000000000000000000000000000..e8394e3895ef2a58a8f5c09762b700ff27125b4c
--- /dev/null
+++ b/src/main/java/com/es/disped/common/sms/SmsClient.java
@@ -0,0 +1,120 @@
+/**
+ *
+ */
+package com.es.disped.common.sms;
+
+import com.aliyuncs.CommonRequest;
+import com.aliyuncs.CommonResponse;
+import com.aliyuncs.DefaultAcsClient;
+import com.aliyuncs.IAcsClient;
+import com.aliyuncs.profile.DefaultProfile;
+import com.es.disped.common.constant.AliSms;
+/**
+ * @author Anson
+ *
+ * Copyright by EasyShare 2019
+ *
+ * All right reserved
+ *
+ * Created on 下午1:11:04
+ *
+ * 名称:SmsClient.java
+ *
+ * 描述:提供阿里云短信客户端
+ */
+public class SmsClient extends AliSms{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1630607837618861484L;
+ private IAcsClient client=null;
+ private CommonRequest request=null;
+ private CommonResponse response=null;
+ private int status;
+ private AliMsg aliMsg=null;
+
+ public SmsClient() {
+ this.request=new CommonRequest();
+ this.client = new DefaultAcsClient(DefaultProfile.getProfile(
+ ALI_MESSAGE_REGIION_ID, ALI_ACCESS_KEY_ID, ALI_ACCESS_SECRET));
+ }
+
+ /**
+ * @return the client
+ */
+ public IAcsClient getClient() {
+ return client;
+ }
+
+ /**
+ * @param client the client to set
+ */
+ public void setClient(IAcsClient client) {
+ this.client = client;
+ }
+
+ /**
+ * @return the request
+ */
+ public CommonRequest getRequest() {
+ return request;
+ }
+
+ /**
+ * @param request the request to set
+ */
+ public void setRequest(CommonRequest request) {
+ this.request = request;
+ }
+
+ /**
+ * @return the response
+ */
+ public CommonResponse getResponse() {
+ return response;
+ }
+
+ /**
+ * @param response the response to set
+ */
+ public void setResponse(CommonResponse response) {
+ this.response = response;
+ }
+
+ /**
+ * @return the status
+ */
+ public int getStatus() {
+ if(!this.isNull(getResponse()))
+ {
+ setStatus(this.getResponse().getHttpStatus());
+ }
+ return status;
+ }
+
+ /**
+ * @param status the status to set
+ */
+ public void setStatus(int status) {
+ this.status = status;
+ }
+
+ /**
+ * @return the aliMsg
+ */
+ public AliMsg getAliMsg() {
+ if(!this.isNull(getResponse()))
+ {
+ aliMsg=this.fromJson(this.getResponse().getData(), AliMsg.class);
+ }
+ return aliMsg;
+ }
+
+ /**
+ * @param aliMsg the aliMsg to set
+ */
+ public void setAliMsg(AliMsg aliMsg) {
+ this.aliMsg = aliMsg;
+ }
+}
diff --git a/src/main/java/com/es/disped/common/spring/CustomSqlSessionTemplate.java b/src/main/java/com/es/disped/common/spring/CustomSqlSessionTemplate.java
new file mode 100644
index 0000000000000000000000000000000000000000..f61bbffc1dd65d98507844b1f17d044ad953036e
--- /dev/null
+++ b/src/main/java/com/es/disped/common/spring/CustomSqlSessionTemplate.java
@@ -0,0 +1,318 @@
+//package com.es.disped.common.spring;
+//
+//import static java.lang.reflect.Proxy.newProxyInstance;
+//import static org.apache.ibatis.reflection.ExceptionUtil.unwrapThrowable;
+//import static org.mybatis.spring.SqlSessionUtils.closeSqlSession;
+//import static org.mybatis.spring.SqlSessionUtils.getSqlSession;
+//import static org.mybatis.spring.SqlSessionUtils.isSqlSessionTransactional;
+//
+//import java.lang.reflect.InvocationHandler;
+//import java.lang.reflect.Method;
+//import java.sql.Connection;
+//import java.util.List;
+//import java.util.Map;
+//
+//import org.apache.ibatis.exceptions.PersistenceException;
+//import org.apache.ibatis.executor.BatchResult;
+//import org.apache.ibatis.session.Configuration;
+//import org.apache.ibatis.session.ExecutorType;
+//import org.apache.ibatis.session.ResultHandler;
+//import org.apache.ibatis.session.RowBounds;
+//import org.apache.ibatis.session.SqlSession;
+//import org.apache.ibatis.session.SqlSessionFactory;
+//import org.mybatis.spring.MyBatisExceptionTranslator;
+//import org.mybatis.spring.SqlSessionTemplate;
+//import org.springframework.dao.support.PersistenceExceptionTranslator;
+//import org.springframework.util.Assert;
+//
+//
+//public class CustomSqlSessionTemplate extends SqlSessionTemplate {
+//
+// private final SqlSessionFactory sqlSessionFactory;
+// private final ExecutorType executorType;
+// private final SqlSession sqlSessionProxy;
+// private final PersistenceExceptionTranslator exceptionTranslator;
+//
+// private Map