فهرست منبع

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	mec-web/src/main/resources/config/mybatis/EmployeeMapper.xml
Joburgess 5 سال پیش
والد
کامیت
4e3a30f5d2

+ 33 - 19
mec-web/src/main/java/com/ym/mec/web/dal/entity/Employee.java

@@ -1,5 +1,8 @@
 package com.ym.mec.web.dal.entity;
 
+import com.ym.mec.web.dal.enums.JobNatureEnum;
+import com.ym.mec.web.dal.enums.YesOrNoEnum;
+import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -11,30 +14,39 @@ public class Employee {
 	private Integer userId;
 	
 	/**  */
+	@ApiModelProperty(value = "机构编号",required = false)
 	private Integer organId;
 	
 	/** 工作性质(兼职、全职、临时) */
-	private String jobNature;
+	@ApiModelProperty(value = "工作性质",required = false)
+	private JobNatureEnum jobNature;
 	
 	/** 是否试用期(1-是 0-否) */
-	private String isProbationPeriod;
+	@ApiModelProperty(value = "是否试用期",required = false)
+	private YesOrNoEnum isProbationPeriod;
 	
 	/** 学历 */
+	@ApiModelProperty(value = "学历",required = false)
 	private String educationBackground;
 	
 	/** 毕业学校 */
+	@ApiModelProperty(value = "毕业学校",required = false)
 	private String graduateSchool;
 	
 	/** 技术职称 */
+	@ApiModelProperty(value = "技术职称",required = false)
 	private String technicalTitles;
 	
 	/** 入职时间 */
+	@ApiModelProperty(value = "入职时间",required = false)
 	private java.util.Date entryDate;
 	
 	/** 证件类型 */
+	@ApiModelProperty(value = "证件类型",required = false)
 	private String certificateType;
 	
 	/** 证件号码 */
+	@ApiModelProperty(value = "证件号码",required = false)
 	private String certificateNum;
 	
 	/**  */
@@ -44,9 +56,11 @@ public class Employee {
 	private java.util.Date createTime;
 	
 	/** 介绍 */
+	@ApiModelProperty(value = "介绍",required = false)
 	private String introduction;
 	
 	/** 离职日期 */
+	@ApiModelProperty(value = "离职日期",required = false)
 	private java.util.Date demissionDate;
 	
 	public void setUserId(Integer userId){
@@ -65,22 +79,6 @@ public class Employee {
 		return this.organId;
 	}
 			
-	public void setJobNature(String jobNature){
-		this.jobNature = jobNature;
-	}
-	
-	public String getJobNature(){
-		return this.jobNature;
-	}
-			
-	public void setIsProbationPeriod(String isProbationPeriod){
-		this.isProbationPeriod = isProbationPeriod;
-	}
-	
-	public String getIsProbationPeriod(){
-		return this.isProbationPeriod;
-	}
-			
 	public void setEducationBackground(String educationBackground){
 		this.educationBackground = educationBackground;
 	}
@@ -160,7 +158,23 @@ public class Employee {
 	public java.util.Date getDemissionDate(){
 		return this.demissionDate;
 	}
-			
+
+	public JobNatureEnum getJobNature() {
+		return jobNature;
+	}
+
+	public void setJobNature(JobNatureEnum jobNature) {
+		this.jobNature = jobNature;
+	}
+
+	public YesOrNoEnum getIsProbationPeriod() {
+		return isProbationPeriod;
+	}
+
+	public void setIsProbationPeriod(YesOrNoEnum isProbationPeriod) {
+		this.isProbationPeriod = isProbationPeriod;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 7 - 3
mec-web/src/main/java/com/ym/mec/web/dal/entity/MusicGroupPurchaseList.java

@@ -1,5 +1,6 @@
 package com.ym.mec.web.dal.entity;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -11,12 +12,15 @@ public class MusicGroupPurchaseList {
 	private Integer id;
 	
 	/**  */
-	private Integer musicGroupId;
+	@ApiModelProperty(value = "乐团编号",required = false)
+	private String musicGroupId;
 	
 	/**  */
+	@ApiModelProperty(value = "商品编号",required = false)
 	private Integer goodsId;
 	
 	/** 采购数量 */
+	@ApiModelProperty(value = "采购数量",required = false)
 	private Integer purchaseNum;
 	
 	/**  */
@@ -33,11 +37,11 @@ public class MusicGroupPurchaseList {
 		return this.id;
 	}
 			
-	public void setMusicGroupId(Integer musicGroupId){
+	public void setMusicGroupId(String musicGroupId){
 		this.musicGroupId = musicGroupId;
 	}
 	
-	public Integer getMusicGroupId(){
+	public String getMusicGroupId(){
 		return this.musicGroupId;
 	}
 			

+ 40 - 26
mec-web/src/main/java/com/ym/mec/web/dal/entity/StudentRecharge.java

@@ -1,40 +1,54 @@
 package com.ym.mec.web.dal.entity;
 
+import com.ym.mec.web.dal.enums.DealStatusEnum;
+import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
+import java.math.BigDecimal;
+
 /**
  * 对应数据库表(student_recharge):
  */
 public class StudentRecharge {
 
 	/** 充值流水号 */
+	@ApiModelProperty(value = "充值流水号",required = false)
 	private String id;
 	
 	/** 用户编号 */
+	@ApiModelProperty(value = "用户编号",required = false)
 	private Long userId;
 	
 	/** 交易流水号,第三方支付机构返回的 */
+	@ApiModelProperty(value = "交易流水号",required = false)
 	private String transNo;
 	
 	/** 1,交易中;2,成功交易;3,交易失败;4,交易关闭 */
-	private Integer status;
+	@ApiModelProperty(value = "交易状态",required = false)
+	private DealStatusEnum status;
 	
 	/** 充值金额 */
-	private long amount;
+	@ApiModelProperty(value = "充值金额",required = false)
+	private BigDecimal amount;
 	
 	/** 用户承担的充值费用(单位:分) */
-	private long feeUser;
+	@ApiModelProperty(value = "用户承担的充值费用",required = false)
+	private BigDecimal feeUser;
 	
 	/** 平台承担的费用(单位:分) */
-	private long feePlatform;
+	@ApiModelProperty(value = "平台承担的费用",required = false)
+	private BigDecimal feePlatform;
 	
 	/** 第三方支付平台名称(用拼音简称代替) */
+	@ApiModelProperty(value = "第三方支付平台名称",required = false)
 	private String payPlatform;
 	
 	/** 描述 */
+	@ApiModelProperty(value = "描述",required = false)
 	private String description;
 	
 	/** 后台备注 */
+	@ApiModelProperty(value = "后台备注",required = false)
 	private String comment;
 	
 	/** 创建时间 */
@@ -66,39 +80,39 @@ public class StudentRecharge {
 	public String getTransNo(){
 		return this.transNo;
 	}
-			
-	public void setStatus(Integer status){
+
+	public DealStatusEnum getStatus() {
+		return status;
+	}
+
+	public void setStatus(DealStatusEnum status) {
 		this.status = status;
 	}
-	
-	public Integer getStatus(){
-		return this.status;
+
+	public BigDecimal getAmount() {
+		return amount;
 	}
-			
-	public void setAmount(long amount){
+
+	public void setAmount(BigDecimal amount) {
 		this.amount = amount;
 	}
-	
-	public long getAmount(){
-		return this.amount;
+
+	public BigDecimal getFeeUser() {
+		return feeUser;
 	}
-			
-	public void setFeeUser(long feeUser){
+
+	public void setFeeUser(BigDecimal feeUser) {
 		this.feeUser = feeUser;
 	}
-	
-	public long getFeeUser(){
-		return this.feeUser;
+
+	public BigDecimal getFeePlatform() {
+		return feePlatform;
 	}
-			
-	public void setFeePlatform(long feePlatform){
+
+	public void setFeePlatform(BigDecimal feePlatform) {
 		this.feePlatform = feePlatform;
 	}
-	
-	public long getFeePlatform(){
-		return this.feePlatform;
-	}
-			
+
 	public void setPayPlatform(String payPlatform){
 		this.payPlatform = payPlatform;
 	}

+ 40 - 26
mec-web/src/main/java/com/ym/mec/web/dal/entity/StudentWithdraw.java

@@ -1,40 +1,54 @@
 package com.ym.mec.web.dal.entity;
 
+import com.ym.mec.web.dal.enums.DealStatusEnum;
+import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
+import java.math.BigDecimal;
+
 /**
  * 对应数据库表(student_withdraw):
  */
 public class StudentWithdraw {
 
 	/** 提现流水号 */
+	@ApiModelProperty(value = "提现流水号",required = false)
 	private String id;
 	
 	/** 用户编号 */
+	@ApiModelProperty(value = "用户编号",required = false)
 	private Long userId;
 	
 	/** 银行卡号 */
+	@ApiModelProperty(value = "银行卡号",required = false)
 	private String bankCardNo;
 	
 	/** 银行流水号 */
+	@ApiModelProperty(value = "银行流水号",required = false)
 	private String transNo;
 	
 	/** 交易状态(1,交易中;2,成功交易;3,交易失败;4,交易关闭) */
-	private Integer status;
+	@ApiModelProperty(value = "交易状态",required = false)
+	private DealStatusEnum status;
 	
 	/** 提现金额 */
-	private long amount;
+	@ApiModelProperty(value = "提现金额",required = false)
+	private BigDecimal amount;
 	
 	/** 用户承担的费用(单位:分) */
-	private long feeUser;
+	@ApiModelProperty(value = "用户承担的费用",required = false)
+	private BigDecimal feeUser;
 	
 	/** 平台承担的费用(单位:分) */
-	private long feePlatform;
+	@ApiModelProperty(value = "平台承担的费用",required = false)
+	private BigDecimal feePlatform;
 	
 	/** 描述 */
+	@ApiModelProperty(value = "描述",required = false)
 	private String description;
 	
 	/** 备注 */
+	@ApiModelProperty(value = "备注",required = false)
 	private String comment;
 	
 	/** 创建时间 */
@@ -74,39 +88,39 @@ public class StudentWithdraw {
 	public String getTransNo(){
 		return this.transNo;
 	}
-			
-	public void setStatus(Integer status){
+
+	public DealStatusEnum getStatus() {
+		return status;
+	}
+
+	public void setStatus(DealStatusEnum status) {
 		this.status = status;
 	}
-	
-	public Integer getStatus(){
-		return this.status;
+
+	public BigDecimal getAmount() {
+		return amount;
 	}
-			
-	public void setAmount(long amount){
+
+	public void setAmount(BigDecimal amount) {
 		this.amount = amount;
 	}
-	
-	public long getAmount(){
-		return this.amount;
+
+	public BigDecimal getFeeUser() {
+		return feeUser;
 	}
-			
-	public void setFeeUser(long feeUser){
+
+	public void setFeeUser(BigDecimal feeUser) {
 		this.feeUser = feeUser;
 	}
-	
-	public long getFeeUser(){
-		return this.feeUser;
+
+	public BigDecimal getFeePlatform() {
+		return feePlatform;
 	}
-			
-	public void setFeePlatform(long feePlatform){
+
+	public void setFeePlatform(BigDecimal feePlatform) {
 		this.feePlatform = feePlatform;
 	}
-	
-	public long getFeePlatform(){
-		return this.feePlatform;
-	}
-			
+
 	public void setDescription(String description){
 		this.description = description;
 	}

+ 40 - 26
mec-web/src/main/java/com/ym/mec/web/dal/entity/SysMessage.java

@@ -1,5 +1,9 @@
 package com.ym.mec.web.dal.entity;
 
+import com.ym.mec.web.dal.enums.SendStatusEnum;
+import com.ym.mec.web.dal.enums.SendTypeEnum;
+import com.ym.mec.web.dal.enums.YesOrNoEnum;
+import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -11,24 +15,31 @@ public class SysMessage {
 	private Long id;
 	
 	/** 标题 */
+	@ApiModelProperty(value = "标题",required = false)
 	private String title;
 	
 	/** 消息内容 */
+	@ApiModelProperty(value = "消息内容",required = false)
 	private String content;
 	
 	/** 消息类型;1,表示短信;2,表示邮件; 3,app推送消息 */
-	private Integer type;
+	@ApiModelProperty(value = "消息类型",required = false)
+	private SendTypeEnum type;
 	
 	/** 状态,-1,发送失败;0,待发送;1,发送中;2,发送完成 */
-	private Integer status;
+	@ApiModelProperty(value = "状态",required = false)
+	private SendStatusEnum status;
 	
 	/** 接收人(多个人用逗号分隔) */
+	@ApiModelProperty(value = "接收人(多个人用逗号分隔)",required = false)
 	private String receiver;
 	
 	/** 发送时间 */
+	@ApiModelProperty(value = "发送时间",required = false)
 	private java.util.Date sendTime;
 	
 	/** 错误信息 */
+	@ApiModelProperty(value = "错误信息",required = false)
 	private String errorMsg;
 	
 	/** 创建时间 */
@@ -38,13 +49,16 @@ public class SysMessage {
 	private java.util.Date modifyOn;
 	
 	/** 用户编号 */
+	@ApiModelProperty(value = "用户编号",required = false)
 	private Long userId;
 	
 	/** 备注 */
+	@ApiModelProperty(value = "备注",required = false)
 	private String memo;
 	
 	/** 是否已读 */
-	private String readStatus;
+	@ApiModelProperty(value = "是否已读",required = false)
+	private YesOrNoEnum readStatus;
 	
 	public void setId(Long id){
 		this.id = id;
@@ -70,22 +84,6 @@ public class SysMessage {
 		return this.content;
 	}
 			
-	public void setType(Integer type){
-		this.type = type;
-	}
-	
-	public Integer getType(){
-		return this.type;
-	}
-			
-	public void setStatus(Integer status){
-		this.status = status;
-	}
-	
-	public Integer getStatus(){
-		return this.status;
-	}
-			
 	public void setReceiver(String receiver){
 		this.receiver = receiver;
 	}
@@ -141,15 +139,31 @@ public class SysMessage {
 	public String getMemo(){
 		return this.memo;
 	}
-			
-	public void setReadStatus(String readStatus){
-		this.readStatus = readStatus;
+
+	public SendTypeEnum getType() {
+		return type;
 	}
-	
-	public String getReadStatus(){
-		return this.readStatus;
+
+	public void setType(SendTypeEnum type) {
+		this.type = type;
 	}
-			
+
+	public SendStatusEnum getStatus() {
+		return status;
+	}
+
+	public void setStatus(SendStatusEnum status) {
+		this.status = status;
+	}
+
+	public YesOrNoEnum getReadStatus() {
+		return readStatus;
+	}
+
+	public void setReadStatus(YesOrNoEnum readStatus) {
+		this.readStatus = readStatus;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 5 - 0
mec-web/src/main/java/com/ym/mec/web/dal/entity/SysSuggestion.java

@@ -1,5 +1,6 @@
 package com.ym.mec.web.dal.entity;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -11,15 +12,19 @@ public class SysSuggestion {
 	private Long id;
 	
 	/** 联系方式 */
+	@ApiModelProperty(value = "联系方式",required = false)
 	private String mobileNo;
 	
 	/** 标题 */
+	@ApiModelProperty(value = "标题",required = false)
 	private String title;
 	
 	/** 内容 */
+	@ApiModelProperty(value = "内容",required = false)
 	private String content;
 	
 	/** 用户编号 */
+	@ApiModelProperty(value = "用户编号",required = false)
 	private Long userId;
 	
 	/** 提交时间 */

+ 6 - 0
mec-web/src/main/java/com/ym/mec/web/dal/entity/TeacherLeaveRecord.java

@@ -1,5 +1,6 @@
 package com.ym.mec.web.dal.entity;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -11,18 +12,23 @@ public class TeacherLeaveRecord {
 	private Long id;
 	
 	/**  */
+	@ApiModelProperty(value = "用户编号",required = false)
 	private Integer userId;
 	
 	/** 请假天数 */
+	@ApiModelProperty(value = "请假天数",required = false)
 	private Integer days;
 	
 	/** 请假类型 */
+	@ApiModelProperty(value = "请假类型",required = false)
 	private String type;
 	
 	/** 请假状态(审批中、拒绝、通过) */
+	@ApiModelProperty(value = "请假状态",required = false)
 	private String status;
 	
 	/** 备注 */
+	@ApiModelProperty(value = "备注",required = false)
 	private String remark;
 	
 	/**  */

+ 3 - 2
mec-web/src/main/java/com/ym/mec/web/dal/enums/DealStatusEnum.java

@@ -3,12 +3,13 @@ package com.ym.mec.web.dal.enums;
 import com.ym.mec.common.enums.BaseEnum;
 
 /**
- * '交易状态(1,交易中;2,成功交易;3,交易失败;)',
+ * '交易状态(1,交易中;2,成功交易;3,交易失败,4交易关闭;)',
  */
 public enum DealStatusEnum implements BaseEnum<Integer, DealStatusEnum> {
 	ING(1, "交易中"),
 	SUCCESS(2, "成功交易"),
-	FALIED(3, "交易失败");
+	FAilED(3, "交易失败"),
+	CLOSE(4, "交易关闭");
 
 	private Integer code;
 

+ 36 - 0
mec-web/src/main/java/com/ym/mec/web/dal/enums/SendStatusEnum.java

@@ -0,0 +1,36 @@
+package com.ym.mec.web.dal.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+/**
+ 状态,1,发送失败;2,待发送;3,发送中;4,发送完成
+ */
+public enum SendStatusEnum implements BaseEnum<Integer, SendStatusEnum> {
+	FAILED(1, "发送失败"), WAIT(2, "待发送"), INT(3, "发送中"), SUCCESS(4, "发送完成");
+
+	private Integer code;
+
+	private String msg;
+
+	SendStatusEnum(Integer code, String msg) {
+		this.code = code;
+		this.msg = msg;
+	}
+
+	public void setCode(Integer code) {
+		this.code = code;
+	}
+
+	public String getMsg() {
+		return msg;
+	}
+
+	public void setMsg(String msg) {
+		this.msg = msg;
+	}
+
+	@Override
+	public Integer getCode() {
+		return this.code;
+	}
+}

+ 36 - 0
mec-web/src/main/java/com/ym/mec/web/dal/enums/SendTypeEnum.java

@@ -0,0 +1,36 @@
+package com.ym.mec.web.dal.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+/**
+ 状态,1,表示短信;2,表示邮件; 3,app推送消息
+ */
+public enum SendTypeEnum implements BaseEnum<Integer, SendTypeEnum> {
+	SMS(1, "短信"), EMAIL(2, "邮件"), PUSH(3, "app推送消息");
+
+	private Integer code;
+
+	private String msg;
+
+	SendTypeEnum(Integer code, String msg) {
+		this.code = code;
+		this.msg = msg;
+	}
+
+	public void setCode(Integer code) {
+		this.code = code;
+	}
+
+	public String getMsg() {
+		return msg;
+	}
+
+	public void setMsg(String msg) {
+		this.msg = msg;
+	}
+
+	@Override
+	public Integer getCode() {
+		return this.code;
+	}
+}

+ 24 - 79
mec-web/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -5,31 +5,32 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.ym.mec.web.dal.dao.EmployeeDao">
-	
-	<resultMap type="com.ym.mec.web.dal.entity.Employee" id="Employee">
-		<result column="user_id_" property="userId" />
-		<result column="organ_id_" property="organId" />
-		<result column="job_nature_" property="jobNature" />
-		<result column="is_probation_period_" property="isProbationPeriod" />
-		<result column="education_background_" property="educationBackground" />
-		<result column="graduate_school_" property="graduateSchool" />
-		<result column="technical_titles_" property="technicalTitles" />
-		<result column="entry_date_" property="entryDate" />
-		<result column="certificate_type_" property="certificateType" />
-		<result column="certificate_num_" property="certificateNum" />
-		<result column="update_time_" property="updateTime" />
-		<result column="create_time_" property="createTime" />
-		<result column="introduction_" property="introduction" />
-		<result column="demission_date_" property="demissionDate" />
-	</resultMap>
-	
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="Employee" >
+
+    <resultMap type="com.ym.mec.web.dal.entity.Employee" id="Employee">
+        <result column="user_id_" property="userId"/>
+        <result column="organ_id_" property="organId"/>
+        <result column="job_nature_" property="jobNature" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="is_probation_period_" property="isProbationPeriod"
+                typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="education_background_" property="educationBackground"/>
+        <result column="graduate_school_" property="graduateSchool"/>
+        <result column="technical_titles_" property="technicalTitles"/>
+        <result column="entry_date_" property="entryDate"/>
+        <result column="certificate_type_" property="certificateType"/>
+        <result column="certificate_num_" property="certificateNum"/>
+        <result column="update_time_" property="updateTime"/>
+        <result column="create_time_" property="createTime"/>
+        <result column="introduction_" property="introduction"/>
+        <result column="demission_date_" property="demissionDate"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="Employee">
 		SELECT * FROM employee WHERE user_id_ = #{userId} 
 	</select>
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="Employee">
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="Employee">
 		SELECT * FROM employee ORDER BY user_id_
 	</select>
 	
@@ -113,60 +114,4 @@ demission_date_ = #{demissionDate},
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM employee
 	</select>
-
-	<resultMap type="com.ym.mec.web.dal.dto.EmployeeDto" id="EmployeeDto">
-		<result property="id" column="id_" />
-		<result property="username" column="username_" />
-		<result property="gender" column="gender_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-		<result property="phone" column="phone_" />
-		<result property="lockFlag" column="role_name_" />
-		<result property="roleName" column="lock_flag_" />
-		<result property="jobNature" column="job_nature_" />
-		<result property="entryDate" column="entry_date_" />
-		<result property="demissionDate" column="demission_date_" />
-	</resultMap>
-
-	<sql id="queryCondition">
-		<where>
-			<if test="organId != null">
-				and su.organ_id_ = #{organId}
-			</if>
-			<if test="roleId != null">
-				and sr.id_ = #{roleId}
-			</if>
-			<if test="userNameOrPhone != null">
-				and (su.username_ like LIKE CONCAT('%',#{userNameOrPhone},'%')
-				or su.phone_ like LIKE CONCAT('%',#{userNameOrPhone},'%') or )
-			</if>
-		</where>
-	</sql>
-
-	<select id="queryEmployByOrganId" resultMap="EmployeeDto">
-		SELECT
-			su.id_,
-			su.username_,
-			su.gender_,
-			su.phone_,
-			sr.role_name_,
-			su.lock_flag_,
-			e.job_nature_,
-			e.entry_date_,
-			e.demission_date_
-		FROM
-			sys_user su
-		LEFT JOIN employee e ON su.id_=e.user_id_
-		LEFT JOIN sys_user_role sur ON su.id_=sur.user_id_
-		LEFT JOIN sys_role sr ON sur.role_id_=sr.id_
-		<include refid="queryCondition"/>
-	</select>
-
-	<select id="queryEmployByOrganIdCount" resultType="java.lang.Integer">
-		SELECT
-			count(*)
-		FROM
-			sys_user su
-		LEFT JOIN employee e ON su.id_=e.user_id_
-		LEFT JOIN sys_user_role sur ON su.id_=sur.user_id_
-		LEFT JOIN sys_role sr ON sur.rol
-	</select>
 </mapper>

+ 59 - 60
mec-web/src/main/resources/config/mybatis/MusicGroupPurchaseListMapper.xml

@@ -5,72 +5,71 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.ym.mec.web.dal.dao.MusicGroupPurchaseListDao">
-	
-	<resultMap type="com.ym.mec.web.dal.entity.MusicGroupPurchaseList" id="MusicGroupPurchaseList">
-		<result column="id_" property="id" />
-		<result column="music_group_id_" property="musicGroupId" />
-		<result column="goods_id_" property="goodsId" />
-		<result column="purchase_num_" property="purchaseNum" />
-		<result column="create_time_" property="createTime" />
-		<result column="update_time_" property="updateTime" />
-	</resultMap>
-	
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="MusicGroupPurchaseList" >
+
+    <resultMap type="com.ym.mec.web.dal.entity.MusicGroupPurchaseList" id="MusicGroupPurchaseList">
+        <result column="id_" property="id"/>
+        <result column="music_group_id_" property="musicGroupId"/>
+        <result column="goods_id_" property="goodsId"/>
+        <result column="purchase_num_" property="purchaseNum"/>
+        <result column="create_time_" property="createTime"/>
+        <result column="update_time_" property="updateTime"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="MusicGroupPurchaseList">
 		SELECT * FROM music_group_purchase_list WHERE id_ = #{id} 
 	</select>
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="MusicGroupPurchaseList">
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="MusicGroupPurchaseList">
 		SELECT * FROM music_group_purchase_list ORDER BY id_
 	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.MusicGroupPurchaseList" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO music_group_purchase_list (id_,music_group_id_,goods_id_,purchase_num_,create_time_,update_time_) VALUES(#{id},#{musicGroupId},#{goodsId},#{purchaseNum},#{createTime},#{updateTime})
-	</insert>
-	
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.web.dal.entity.MusicGroupPurchaseList">
-		UPDATE music_group_purchase_list <set>
-<if test="purchaseNum != null">
-purchase_num_ = #{purchaseNum},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="updateTime != null">
-update_time_ = #{updateTime},
-</if>
-<if test="musicGroupId != null">
-music_group_id_ = #{musicGroupId},
-</if>
-<if test="goodsId != null">
-goods_id_ = #{goodsId},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-</set> WHERE id_ = #{id} 
-	</update>
-	
-	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.web.dal.entity.MusicGroupPurchaseList" useGeneratedKeys="true"
+            keyColumn="id" keyProperty="id">
+        <!--
+        <selectKey resultClass="int" keyProperty="id" >
+        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
+        </selectKey>
+        -->
+        INSERT INTO music_group_purchase_list (id_,music_group_id_,goods_id_,purchase_num_,create_time_,update_time_)
+        VALUES(#{id},#{musicGroupId},#{goodsId},#{purchaseNum},now(),now())
+    </insert>
+
+    <!-- 根据主键查询一条记录 -->
+    <update id="update" parameterType="com.ym.mec.web.dal.entity.MusicGroupPurchaseList">
+        UPDATE music_group_purchase_list
+        <set>
+            <if test="purchaseNum != null">
+                purchase_num_ = #{purchaseNum},
+            </if>
+            <if test="updateTime != null">
+                update_time_ = #{updateTime},
+            </if>
+            <if test="musicGroupId != null">
+                music_group_id_ = #{musicGroupId},
+            </if>
+            <if test="goodsId != null">
+                goods_id_ = #{goodsId},
+            </if>
+        </set>
+        WHERE id_ = #{id}
+    </update>
+
+    <!-- 根据主键删除一条记录 -->
+    <delete id="delete">
 		DELETE FROM music_group_purchase_list WHERE id_ = #{id} 
 	</delete>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="MusicGroupPurchaseList" parameterType="map">
-		SELECT * FROM music_group_purchase_list ORDER BY id_ <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="MusicGroupPurchaseList" parameterType="map">
+        SELECT * FROM music_group_purchase_list ORDER BY id_
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM music_group_purchase_list
 	</select>
 </mapper>

+ 84 - 84
mec-web/src/main/resources/config/mybatis/StudentRechargeMapper.xml

@@ -5,96 +5,96 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.ym.mec.web.dal.dao.StudentRechargeDao">
-	
-	<resultMap type="com.ym.mec.web.dal.entity.StudentRecharge" id="StudentRecharge">
-		<result column="id_" property="id" />
-		<result column="user_id_" property="userId" />
-		<result column="trans_no_" property="transNo" />
-		<result column="status_" property="status" />
-		<result column="amount_" property="amount" />
-		<result column="fee_user_" property="feeUser" />
-		<result column="fee_platform_" property="feePlatform" />
-		<result column="pay_platform_" property="payPlatform" />
-		<result column="description_" property="description" />
-		<result column="comment_" property="comment" />
-		<result column="create_time_" property="createTime" />
-		<result column="modify_time_" property="modifyTime" />
-	</resultMap>
-	
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="StudentRecharge" >
+
+    <resultMap type="com.ym.mec.web.dal.entity.StudentRecharge" id="StudentRecharge">
+        <result column="id_" property="id"/>
+        <result column="user_id_" property="userId"/>
+        <result column="trans_no_" property="transNo"/>
+        <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="amount_" property="amount"/>
+        <result column="fee_user_" property="feeUser"/>
+        <result column="fee_platform_" property="feePlatform"/>
+        <result column="pay_platform_" property="payPlatform"/>
+        <result column="description_" property="description"/>
+        <result column="comment_" property="comment"/>
+        <result column="create_time_" property="createTime"/>
+        <result column="modify_time_" property="modifyTime"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="StudentRecharge">
 		SELECT * FROM student_recharge WHERE id_ = #{id} 
 	</select>
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="StudentRecharge">
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="StudentRecharge">
 		SELECT * FROM student_recharge ORDER BY id_
 	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.StudentRecharge" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO student_recharge (id_,user_id_,trans_no_,status_,amount_,fee_user_,fee_platform_,pay_platform_,description_,comment_,create_time_,modify_time_) VALUES(#{id},#{userId},#{transNo},#{status},#{amount},#{feeUser},#{feePlatform},#{payPlatform},#{description},#{comment},#{createTime},#{modifyTime})
-	</insert>
-	
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.web.dal.entity.StudentRecharge">
-		UPDATE student_recharge <set>
-<if test="status != null">
-status_ = #{status},
-</if>
-<if test="userId != null">
-user_id_ = #{userId},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="modifyTime != null">
-modify_time_ = #{modifyTime},
-</if>
-<if test="feePlatform != null">
-fee_platform_ = #{feePlatform},
-</if>
-<if test="comment != null">
-comment_ = #{comment},
-</if>
-<if test="amount != null">
-amount_ = #{amount},
-</if>
-<if test="feeUser != null">
-fee_user_ = #{feeUser},
-</if>
-<if test="description != null">
-description_ = #{description},
-</if>
-<if test="transNo != null">
-trans_no_ = #{transNo},
-</if>
-<if test="payPlatform != null">
-pay_platform_ = #{payPlatform},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-</set> WHERE id_ = #{id} 
-	</update>
-	
-	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.web.dal.entity.StudentRecharge" useGeneratedKeys="true" keyColumn="id"
+            keyProperty="id">
+        <!--
+        <selectKey resultClass="int" keyProperty="id" >
+        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
+        </selectKey>
+        -->
+        INSERT INTO student_recharge
+        (id_,user_id_,trans_no_,status_,amount_,fee_user_,fee_platform_,pay_platform_,description_,comment_,create_time_,modify_time_)
+        VALUES(#{id},#{userId},#{transNo},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{amount},#{feeUser},#{feePlatform},#{payPlatform},#{description},#{comment},now(),now())
+    </insert>
+
+    <!-- 根据主键查询一条记录 -->
+    <update id="update" parameterType="com.ym.mec.web.dal.entity.StudentRecharge">
+        UPDATE student_recharge
+        <set>
+            <if test="status != null">
+                status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
+            <if test="userId != null">
+                user_id_ = #{userId},
+            </if>
+            <if test="modifyTime != null">
+                modify_time_ = #{modifyTime},
+            </if>
+            <if test="feePlatform != null">
+                fee_platform_ = #{feePlatform},
+            </if>
+            <if test="comment != null">
+                comment_ = #{comment},
+            </if>
+            <if test="amount != null">
+                amount_ = #{amount},
+            </if>
+            <if test="feeUser != null">
+                fee_user_ = #{feeUser},
+            </if>
+            <if test="description != null">
+                description_ = #{description},
+            </if>
+            <if test="transNo != null">
+                trans_no_ = #{transNo},
+            </if>
+            <if test="payPlatform != null">
+                pay_platform_ = #{payPlatform},
+            </if>
+        </set>
+        WHERE id_ = #{id}
+    </update>
+
+    <!-- 根据主键删除一条记录 -->
+    <delete id="delete">
 		DELETE FROM student_recharge WHERE id_ = #{id} 
 	</delete>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="StudentRecharge" parameterType="map">
-		SELECT * FROM student_recharge ORDER BY id_ <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="StudentRecharge" parameterType="map">
+        SELECT * FROM student_recharge ORDER BY id_
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM student_recharge
 	</select>
 </mapper>

+ 84 - 84
mec-web/src/main/resources/config/mybatis/StudentWithdrawMapper.xml

@@ -5,96 +5,96 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.ym.mec.web.dal.dao.StudentWithdrawDao">
-	
-	<resultMap type="com.ym.mec.web.dal.entity.StudentWithdraw" id="StudentWithdraw">
-		<result column="id_" property="id" />
-		<result column="user_id_" property="userId" />
-		<result column="bank_card_no_" property="bankCardNo" />
-		<result column="trans_no_" property="transNo" />
-		<result column="status_" property="status" />
-		<result column="amount_" property="amount" />
-		<result column="fee_user_" property="feeUser" />
-		<result column="fee_platform_" property="feePlatform" />
-		<result column="description_" property="description" />
-		<result column="comment_" property="comment" />
-		<result column="create_time_" property="createTime" />
-		<result column="modify_time_" property="modifyTime" />
-	</resultMap>
-	
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="StudentWithdraw" >
+
+    <resultMap type="com.ym.mec.web.dal.entity.StudentWithdraw" id="StudentWithdraw">
+        <result column="id_" property="id"/>
+        <result column="user_id_" property="userId"/>
+        <result column="bank_card_no_" property="bankCardNo"/>
+        <result column="trans_no_" property="transNo"/>
+        <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="amount_" property="amount"/>
+        <result column="fee_user_" property="feeUser"/>
+        <result column="fee_platform_" property="feePlatform"/>
+        <result column="description_" property="description"/>
+        <result column="comment_" property="comment"/>
+        <result column="create_time_" property="createTime"/>
+        <result column="modify_time_" property="modifyTime"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="StudentWithdraw">
 		SELECT * FROM student_withdraw WHERE id_ = #{id} 
 	</select>
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="StudentWithdraw">
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="StudentWithdraw">
 		SELECT * FROM student_withdraw ORDER BY id_
 	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.StudentWithdraw" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO student_withdraw (id_,user_id_,bank_card_no_,trans_no_,status_,amount_,fee_user_,fee_platform_,description_,comment_,create_time_,modify_time_) VALUES(#{id},#{userId},#{bankCardNo},#{transNo},#{status},#{amount},#{feeUser},#{feePlatform},#{description},#{comment},#{createTime},#{modifyTime})
-	</insert>
-	
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.web.dal.entity.StudentWithdraw">
-		UPDATE student_withdraw <set>
-<if test="status != null">
-status_ = #{status},
-</if>
-<if test="userId != null">
-user_id_ = #{userId},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="modifyTime != null">
-modify_time_ = #{modifyTime},
-</if>
-<if test="feePlatform != null">
-fee_platform_ = #{feePlatform},
-</if>
-<if test="comment != null">
-comment_ = #{comment},
-</if>
-<if test="amount != null">
-amount_ = #{amount},
-</if>
-<if test="feeUser != null">
-fee_user_ = #{feeUser},
-</if>
-<if test="bankCardNo != null">
-bank_card_no_ = #{bankCardNo},
-</if>
-<if test="description != null">
-description_ = #{description},
-</if>
-<if test="transNo != null">
-trans_no_ = #{transNo},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-</set> WHERE id_ = #{id} 
-	</update>
-	
-	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.web.dal.entity.StudentWithdraw" useGeneratedKeys="true" keyColumn="id"
+            keyProperty="id">
+        <!--
+        <selectKey resultClass="int" keyProperty="id" >
+        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
+        </selectKey>
+        -->
+        INSERT INTO student_withdraw
+        (id_,user_id_,bank_card_no_,trans_no_,status_,amount_,fee_user_,fee_platform_,description_,comment_,create_time_,modify_time_)
+        VALUES(#{id},#{userId},#{bankCardNo},#{transNo},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{amount},#{feeUser},#{feePlatform},#{description},#{comment},now(),now())
+    </insert>
+
+    <!-- 根据主键查询一条记录 -->
+    <update id="update" parameterType="com.ym.mec.web.dal.entity.StudentWithdraw">
+        UPDATE student_withdraw
+        <set>
+            <if test="status != null">
+                status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
+            <if test="userId != null">
+                user_id_ = #{userId},
+            </if>
+            <if test="modifyTime != null">
+                modify_time_ = #{modifyTime},
+            </if>
+            <if test="feePlatform != null">
+                fee_platform_ = #{feePlatform},
+            </if>
+            <if test="comment != null">
+                comment_ = #{comment},
+            </if>
+            <if test="amount != null">
+                amount_ = #{amount},
+            </if>
+            <if test="feeUser != null">
+                fee_user_ = #{feeUser},
+            </if>
+            <if test="bankCardNo != null">
+                bank_card_no_ = #{bankCardNo},
+            </if>
+            <if test="description != null">
+                description_ = #{description},
+            </if>
+            <if test="transNo != null">
+                trans_no_ = #{transNo},
+            </if>
+        </set>
+        WHERE id_ = #{id}
+    </update>
+
+    <!-- 根据主键删除一条记录 -->
+    <delete id="delete">
 		DELETE FROM student_withdraw WHERE id_ = #{id} 
 	</delete>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="StudentWithdraw" parameterType="map">
-		SELECT * FROM student_withdraw ORDER BY id_ <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="StudentWithdraw" parameterType="map">
+        SELECT * FROM student_withdraw ORDER BY id_
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM student_withdraw
 	</select>
 </mapper>

+ 89 - 88
mec-web/src/main/resources/config/mybatis/SysMessageMapper.xml

@@ -5,100 +5,101 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.ym.mec.web.dal.dao.SysMessageDao">
-	
-	<resultMap type="com.ym.mec.web.dal.entity.SysMessage" id="SysMessage">
-		<result column="id_" property="id" />
-		<result column="title_" property="title" />
-		<result column="content_" property="content" />
-		<result column="type_" property="type" />
-		<result column="status_" property="status" />
-		<result column="receiver_" property="receiver" />
-		<result column="send_time_" property="sendTime" />
-		<result column="error_msg_" property="errorMsg" />
-		<result column="create_on_" property="createOn" />
-		<result column="modify_on_" property="modifyOn" />
-		<result column="user_id_" property="userId" />
-		<result column="memo_" property="memo" />
-		<result column="read_status_" property="readStatus" />
-	</resultMap>
-	
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="SysMessage" >
+
+    <resultMap type="com.ym.mec.web.dal.entity.SysMessage" id="SysMessage">
+        <result column="id_" property="id"/>
+        <result column="title_" property="title"/>
+        <result column="content_" property="content"/>
+        <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="receiver_" property="receiver"/>
+        <result column="send_time_" property="sendTime"/>
+        <result column="error_msg_" property="errorMsg"/>
+        <result column="create_on_" property="createOn"/>
+        <result column="modify_on_" property="modifyOn"/>
+        <result column="user_id_" property="userId"/>
+        <result column="memo_" property="memo"/>
+        <result column="read_status_" property="readStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="SysMessage">
 		SELECT * FROM sys_message WHERE id_ = #{id} 
 	</select>
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="SysMessage">
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="SysMessage">
 		SELECT * FROM sys_message ORDER BY id_
 	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.SysMessage" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO sys_message (id_,title_,content_,type_,status_,receiver_,send_time_,error_msg_,create_on_,modify_on_,user_id_,memo_,read_status_) VALUES(#{id},#{title},#{content},#{type},#{status},#{receiver},#{sendTime},#{errorMsg},#{createOn},#{modifyOn},#{userId},#{memo},#{readStatus})
-	</insert>
-	
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.web.dal.entity.SysMessage">
-		UPDATE sys_message <set>
-<if test="status != null">
-status_ = #{status},
-</if>
-<if test="receiver != null">
-receiver_ = #{receiver},
-</if>
-<if test="modifyOn != null">
-modify_on_ = #{modifyOn},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="sendTime != null">
-send_time_ = #{sendTime},
-</if>
-<if test="readStatus != null">
-read_status_ = #{readStatus},
-</if>
-<if test="content != null">
-content_ = #{content},
-</if>
-<if test="memo != null">
-memo_ = #{memo},
-</if>
-<if test="userId != null">
-user_id_ = #{userId},
-</if>
-<if test="errorMsg != null">
-error_msg_ = #{errorMsg},
-</if>
-<if test="title != null">
-title_ = #{title},
-</if>
-<if test="createOn != null">
-create_on_ = #{createOn},
-</if>
-<if test="type != null">
-type_ = #{type},
-</if>
-</set> WHERE id_ = #{id} 
-	</update>
-	
-	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.web.dal.entity.SysMessage" useGeneratedKeys="true" keyColumn="id"
+            keyProperty="id">
+        <!--
+        <selectKey resultClass="int" keyProperty="id" >
+        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
+        </selectKey>
+        -->
+        INSERT INTO sys_message
+        (id_,title_,content_,type_,status_,receiver_,send_time_,error_msg_,create_on_,modify_on_,user_id_,memo_,read_status_)
+        VALUES(#{id},#{title},#{content},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+        #{receiver},#{sendTime},#{errorMsg},now(),now(),#{userId},#{memo},#{readStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
+    </insert>
+
+    <!-- 根据主键查询一条记录 -->
+    <update id="update" parameterType="com.ym.mec.web.dal.entity.SysMessage">
+        UPDATE sys_message
+        <set>
+            <if test="status != null">
+                status_ = #{status typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"},
+            </if>
+            <if test="receiver != null">
+                receiver_ = #{receiver},
+            </if>
+            <if test="modifyOn != null">
+                modify_on_ = #{modifyOn},
+            </if>
+            <if test="sendTime != null">
+                send_time_ = #{sendTime},
+            </if>
+            <if test="readStatus != null">
+                read_status_ = #{readStatus typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"},
+            </if>
+            <if test="content != null">
+                content_ = #{content},
+            </if>
+            <if test="memo != null">
+                memo_ = #{memo},
+            </if>
+            <if test="userId != null">
+                user_id_ = #{userId},
+            </if>
+            <if test="errorMsg != null">
+                error_msg_ = #{errorMsg},
+            </if>
+            <if test="title != null">
+                title_ = #{title},
+            </if>
+            <if test="type != null">
+                type_ = #{type typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"},
+            </if>
+        </set>
+        WHERE id_ = #{id}
+    </update>
+
+    <!-- 根据主键删除一条记录 -->
+    <delete id="delete">
 		DELETE FROM sys_message WHERE id_ = #{id} 
 	</delete>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="SysMessage" parameterType="map">
-		SELECT * FROM sys_message ORDER BY id_ <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="SysMessage" parameterType="map">
+        SELECT * FROM sys_message ORDER BY id_
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM sys_message
 	</select>
 </mapper>

+ 59 - 60
mec-web/src/main/resources/config/mybatis/SysSuggestionMapper.xml

@@ -5,72 +5,71 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.ym.mec.web.dal.dao.SysSuggestionDao">
-	
-	<resultMap type="com.ym.mec.web.dal.entity.SysSuggestion" id="SysSuggestion">
-		<result column="id_" property="id" />
-		<result column="mobile_no_" property="mobileNo" />
-		<result column="title_" property="title" />
-		<result column="content_" property="content" />
-		<result column="user_id_" property="userId" />
-		<result column="create_time_" property="createTime" />
-	</resultMap>
-	
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="SysSuggestion" >
+
+    <resultMap type="com.ym.mec.web.dal.entity.SysSuggestion" id="SysSuggestion">
+        <result column="id_" property="id"/>
+        <result column="mobile_no_" property="mobileNo"/>
+        <result column="title_" property="title"/>
+        <result column="content_" property="content"/>
+        <result column="user_id_" property="userId"/>
+        <result column="create_time_" property="createTime"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="SysSuggestion">
 		SELECT * FROM sys_suggestion WHERE id_ = #{id} 
 	</select>
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="SysSuggestion">
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="SysSuggestion">
 		SELECT * FROM sys_suggestion ORDER BY id_
 	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.SysSuggestion" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO sys_suggestion (id_,mobile_no_,title_,content_,user_id_,create_time_) VALUES(#{id},#{mobileNo},#{title},#{content},#{userId},#{createTime})
-	</insert>
-	
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.web.dal.entity.SysSuggestion">
-		UPDATE sys_suggestion <set>
-<if test="userId != null">
-user_id_ = #{userId},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="title != null">
-title_ = #{title},
-</if>
-<if test="content != null">
-content_ = #{content},
-</if>
-<if test="mobileNo != null">
-mobile_no_ = #{mobileNo},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-</set> WHERE id_ = #{id} 
-	</update>
-	
-	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.web.dal.entity.SysSuggestion" useGeneratedKeys="true" keyColumn="id"
+            keyProperty="id">
+        <!--
+        <selectKey resultClass="int" keyProperty="id" >
+        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
+        </selectKey>
+        -->
+        INSERT INTO sys_suggestion (id_,mobile_no_,title_,content_,user_id_,create_time_)
+        VALUES(#{id},#{mobileNo},#{title},#{content},#{userId},now())
+    </insert>
+
+    <!-- 根据主键查询一条记录 -->
+    <update id="update" parameterType="com.ym.mec.web.dal.entity.SysSuggestion">
+        UPDATE sys_suggestion
+        <set>
+            <if test="userId != null">
+                user_id_ = #{userId},
+            </if>
+            <if test="title != null">
+                title_ = #{title},
+            </if>
+            <if test="content != null">
+                content_ = #{content},
+            </if>
+            <if test="mobileNo != null">
+                mobile_no_ = #{mobileNo},
+            </if>
+        </set>
+        WHERE id_ = #{id}
+    </update>
+
+    <!-- 根据主键删除一条记录 -->
+    <delete id="delete">
 		DELETE FROM sys_suggestion WHERE id_ = #{id} 
 	</delete>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="SysSuggestion" parameterType="map">
-		SELECT * FROM sys_suggestion ORDER BY id_ <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="SysSuggestion" parameterType="map">
+        SELECT * FROM sys_suggestion ORDER BY id_
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM sys_suggestion
 	</select>
 </mapper>