yonge 5 jaren geleden
bovenliggende
commit
0bc5142e50
17 gewijzigde bestanden met toevoegingen van 622 en 24 verwijderingen
  1. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleComplaintsDao.java
  2. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysUserContractsDao.java
  3. 0 10
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseSchedule.java
  4. 114 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleComplaints.java
  5. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentApplyRefunds.java
  6. 114 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysUserContracts.java
  7. 18 5
      mec-biz/src/main/java/com/ym/mec/biz/service/ContractService.java
  8. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleComplaintsService.java
  9. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysUserContractsService.java
  10. 105 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java
  11. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleComplaintsServiceImpl.java
  12. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysUserContractsServiceImpl.java
  13. 88 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleComplaintsMapper.xml
  14. 0 1
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  15. 6 2
      mec-biz/src/main/resources/config/mybatis/StudentApplyRefundsMapper.xml
  16. 86 0
      mec-biz/src/main/resources/config/mybatis/SysUserContractsMapper.xml
  17. 1 1
      mec-student/src/main/java/com/ym/mec/student/controller/RegisterController.java

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleComplaintsDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface CourseScheduleComplaintsDao extends BaseDAO<Long, CourseScheduleComplaints> {
+
+	
+}

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysUserContractsDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.SysUserContracts;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface SysUserContractsDao extends BaseDAO<Long, SysUserContracts> {
+
+	
+}

+ 0 - 10
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseSchedule.java

@@ -82,8 +82,6 @@ public class CourseSchedule {
 
 	private TeachModeEnum teachMode;
 
-	private boolean complaintStatus;
-	
 	private CourseScheduleType type;
 	
 	private String name;
@@ -184,14 +182,6 @@ public class CourseSchedule {
 		this.teachMode = teachMode;
 	}
 
-	public boolean isComplaintStatus() {
-		return complaintStatus;
-	}
-
-	public void setComplaintStatus(boolean complaintStatus) {
-		this.complaintStatus = complaintStatus;
-	}
-
 	public CourseScheduleType getType() {
 		return type;
 	}

+ 114 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleComplaints.java

@@ -0,0 +1,114 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(course_schedule_complaints):
+ */
+public class CourseScheduleComplaints {
+
+	/**  */
+	private Long id;
+	
+	/**  */
+	private Integer userId;
+	
+	/**  */
+	private Long courseScheduleId;
+	
+	/**  */
+	private String reason;
+	
+	/**  */
+	private String status;
+	
+	/**  */
+	private String wfProcessId;
+	
+	/**  */
+	private String wfOrderId;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setUserId(Integer userId){
+		this.userId = userId;
+	}
+	
+	public Integer getUserId(){
+		return this.userId;
+	}
+			
+	public void setCourseScheduleId(Long courseScheduleId){
+		this.courseScheduleId = courseScheduleId;
+	}
+	
+	public Long getCourseScheduleId(){
+		return this.courseScheduleId;
+	}
+			
+	public void setReason(String reason){
+		this.reason = reason;
+	}
+	
+	public String getReason(){
+		return this.reason;
+	}
+			
+	public void setStatus(String status){
+		this.status = status;
+	}
+	
+	public String getStatus(){
+		return this.status;
+	}
+			
+	public void setWfProcessId(String wfProcessId){
+		this.wfProcessId = wfProcessId;
+	}
+	
+	public String getWfProcessId(){
+		return this.wfProcessId;
+	}
+			
+	public void setWfOrderId(String wfOrderId){
+		this.wfOrderId = wfOrderId;
+	}
+	
+	public String getWfOrderId(){
+		return this.wfOrderId;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentApplyRefunds.java

@@ -42,6 +42,8 @@ public class StudentApplyRefunds {
 	/**  */
 	private java.util.Date updateTime;
 	
+	private String remark;
+	
 	/** 原订单编号 */
 	@ApiModelProperty(value = "原订单编号",required = true)
 	private Long origPaymentOrderId;
@@ -118,6 +120,14 @@ public class StudentApplyRefunds {
 		return this.origPaymentOrderId;
 	}
 			
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 114 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysUserContracts.java

@@ -0,0 +1,114 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+/**
+ * 对应数据库表(sys_user_contracts):
+ */
+public class SysUserContracts {
+
+	public enum ContractType implements BaseEnum<String, ContractType> {
+
+		REGISTER("注册"), INSTRUMENT("乐器借用"), COURSES("课程购买");
+
+		private String desc;
+
+		private ContractType(String desc) {
+			this.desc = desc;
+		}
+
+		@Override
+		public String getCode() {
+			return name();
+		}
+
+		public String getDesc() {
+			return desc;
+		}
+	}
+
+	/**  */
+	private Long id;
+
+	/**  */
+	private Integer userId;
+
+	/** 合同号 */
+	private String contractNo;
+
+	/** 协议类型 */
+	private ContractType type;
+
+	/** 协议地址 */
+	private String url;
+
+	/** 备注 */
+	private String memo;
+
+	/** 创建时间 */
+	private java.util.Date createTime;
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getId() {
+		return this.id;
+	}
+
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
+
+	public Integer getUserId() {
+		return this.userId;
+	}
+
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+
+	public String getContractNo() {
+		return this.contractNo;
+	}
+
+	public void setType(ContractType type) {
+		this.type = type;
+	}
+
+	public ContractType getType() {
+		return this.type;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	public String getUrl() {
+		return this.url;
+	}
+
+	public void setMemo(String memo) {
+		this.memo = memo;
+	}
+
+	public String getMemo() {
+		return this.memo;
+	}
+
+	public void setCreateTime(java.util.Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public java.util.Date getCreateTime() {
+		return this.createTime;
+	}
+
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 18 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/ContractService.java

@@ -1,6 +1,5 @@
 package com.ym.mec.biz.service;
 
-import java.util.Map;
 
 public interface ContractService {
 
@@ -14,16 +13,30 @@ public interface ContractService {
 	/**
 	 * 传递注册协议至第三方公证平台
 	 * @param userId
-	 * @param params
 	 * @return
 	 */
-	boolean transferRegisterContract(Integer userId, Map<String, Object> params);
+	boolean transferRegisterContract(Integer userId);
 
 	/**
 	 * 查询注册协议内容
 	 * @param userId
-	 * @param params
 	 * @return
 	 */
-	String queryRegisterContract(Integer userId, Map<String, Object> params);
+	String queryRegisterContract(Integer userId);
+	
+	/**
+	 * 传递课程协议
+	 * @param userId
+	 * @param musicGroupId
+	 * @return
+	 */
+	boolean transferCoursesContract(Integer userId,Integer musicGroupId);
+	
+	/**
+	 * 查询课程协议
+	 * @param userId
+	 * @param musicGroupId
+	 * @return
+	 */
+	String queryCoursesContract(Integer userId,Integer musicGroupId);
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleComplaintsService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
+import com.ym.mec.common.service.BaseService;
+
+public interface CourseScheduleComplaintsService extends BaseService<Long, CourseScheduleComplaints> {
+
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysUserContractsService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.SysUserContracts;
+import com.ym.mec.common.service.BaseService;
+
+public interface SysUserContractsService extends BaseService<Long, SysUserContracts> {
+
+}

+ 105 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java

@@ -5,6 +5,7 @@ import java.io.IOException;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.commons.io.FileUtils;
@@ -15,8 +16,11 @@ import org.springframework.stereotype.Service;
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.entity.SysUserContracts;
+import com.ym.mec.biz.dal.entity.SysUserContracts.ContractType;
 import com.ym.mec.biz.dal.entity.SysUserTsign;
 import com.ym.mec.biz.service.ContractService;
+import com.ym.mec.biz.service.SysUserContractsService;
 import com.ym.mec.biz.service.SysUserTsignService;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.thirdparty.eseal.ESealPlugin;
@@ -34,6 +38,9 @@ public class ContractServiceImpl implements ContractService {
 	private SysUserFeignService sysUserFeignService;
 
 	@Autowired
+	private SysUserContractsService sysUserContractsService;
+
+	@Autowired
 	private ESealPlugin eSealPlugin;
 
 	@Autowired
@@ -76,7 +83,7 @@ public class ContractServiceImpl implements ContractService {
 	}
 
 	@Override
-	public boolean transferRegisterContract(Integer userId, Map<String, Object> params) {
+	public boolean transferRegisterContract(Integer userId) {
 
 		SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
 
@@ -85,7 +92,7 @@ public class ContractServiceImpl implements ContractService {
 		}
 
 		// 合成freemarker
-		String srcPdfPath = contractBaseDir + "/" + userId + ".pdf";
+		String srcPdfPath = contractBaseDir + "/register/" + userId + ".pdf";
 		File debtFile = new File(contractBaseDir);
 		if (!debtFile.exists()) {
 			debtFile.mkdirs();
@@ -94,6 +101,8 @@ public class ContractServiceImpl implements ContractService {
 		FreemarkerTemplateEngine templateEngine = FreemarkerTemplateEngine.getInstance();
 		templateEngine.setClassForTemplateLoading(ContractServiceImpl.class, "/config/contracts/");
 
+		Map<String, Object> params = new HashMap<String, Object>();
+
 		templateEngine.render(params, "register.ftl", new File(srcPdfPath));
 
 		// 生成借款协议PDF
@@ -101,7 +110,7 @@ public class ContractServiceImpl implements ContractService {
 			PDFUtil.renderToPDFByData(ContractServiceImpl.class.getResource("/").getFile(), FileUtils.readFileToString(new File(srcPdfPath)), srcPdfPath,
 					"config/fonts/simsun.ttc");
 		} catch (IOException e) {
-			throw new BizException("生pdf协议失败", e);
+			throw new BizException("生pdf协议失败", e);
 		}
 
 		eSealPlugin.userSign(sysUserTsign.getAccountId(), sysUserTsign.getSealData(), srcPdfPath, srcPdfPath);
@@ -111,16 +120,24 @@ public class ContractServiceImpl implements ContractService {
 		String dateStrOss = dateFormatOss.format(date);
 		String pdfFilePath = storagePlugin.uploadFile(dateStrOss, new File(srcPdfPath));
 
+		SysUserContracts sysUserContracts = new SysUserContracts();
+		sysUserContracts.setCreateTime(date);
+		sysUserContracts.setType(ContractType.REGISTER);
+		sysUserContracts.setUrl(pdfFilePath);
+		sysUserContracts.setUserId(userId);
+
+		sysUserContractsService.insert(sysUserContracts);
+
 		FileUtils.deleteQuietly(new File(srcPdfPath));
 
 		return true;
 	}
 
 	@Override
-	public String queryRegisterContract(Integer userId, Map<String, Object> params) {
+	public String queryRegisterContract(Integer userId) {
 
 		// 合成freemarker
-		String srcPdfPath = contractBaseDir + "/" + userId + ".pdf";
+		String srcPdfPath = contractBaseDir + "/register/" + userId + ".pdf";
 		File debtFile = new File(contractBaseDir);
 		if (!debtFile.exists()) {
 			debtFile.mkdirs();
@@ -129,6 +146,8 @@ public class ContractServiceImpl implements ContractService {
 		FreemarkerTemplateEngine templateEngine = FreemarkerTemplateEngine.getInstance();
 		templateEngine.setClassForTemplateLoading(ContractServiceImpl.class, "/config/contracts/");
 
+		Map<String, Object> params = new HashMap<String, Object>();
+
 		templateEngine.render(params, "register.ftl", new File(srcPdfPath));
 
 		String result = "";
@@ -142,4 +161,85 @@ public class ContractServiceImpl implements ContractService {
 		return result;
 	}
 
+	@Override
+	public boolean transferCoursesContract(Integer userId, Integer musicGroupId) {
+		SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
+
+		if (sysUserTsign == null) {
+			return false;
+		}
+
+		// 合成freemarker
+		String srcPdfPath = contractBaseDir + "/courses/" + userId + ".pdf";
+		File debtFile = new File(contractBaseDir);
+		if (!debtFile.exists()) {
+			debtFile.mkdirs();
+		}
+
+		FreemarkerTemplateEngine templateEngine = FreemarkerTemplateEngine.getInstance();
+		templateEngine.setClassForTemplateLoading(ContractServiceImpl.class, "/config/contracts/");
+
+		Map<String, Object> params = new HashMap<String, Object>();
+		
+		//查询参数信息
+		
+
+		templateEngine.render(params, "courses.ftl", new File(srcPdfPath));
+
+		// 生成借款协议PDF
+		try {
+			PDFUtil.renderToPDFByData(ContractServiceImpl.class.getResource("/").getFile(), FileUtils.readFileToString(new File(srcPdfPath)), srcPdfPath,
+					"config/fonts/simsun.ttc");
+		} catch (IOException e) {
+			throw new BizException("生成pdf协议失败", e);
+		}
+
+		eSealPlugin.userSign(sysUserTsign.getAccountId(), sysUserTsign.getSealData(), srcPdfPath, srcPdfPath);
+
+		Date date = new Date();
+		// 上传到oss
+		String dateStrOss = dateFormatOss.format(date);
+		String pdfFilePath = storagePlugin.uploadFile(dateStrOss, new File(srcPdfPath));
+
+		SysUserContracts sysUserContracts = new SysUserContracts();
+		sysUserContracts.setCreateTime(date);
+		sysUserContracts.setType(ContractType.REGISTER);
+		sysUserContracts.setUrl(pdfFilePath);
+		sysUserContracts.setUserId(userId);
+
+		sysUserContractsService.insert(sysUserContracts);
+
+		FileUtils.deleteQuietly(new File(srcPdfPath));
+
+		return true;
+	}
+
+	@Override
+	public String queryCoursesContract(Integer userId, Integer musicGroupId) {
+
+		// 合成freemarker
+		String srcPdfPath = contractBaseDir + "/courses/" + userId + ".pdf";
+		File debtFile = new File(contractBaseDir);
+		if (!debtFile.exists()) {
+			debtFile.mkdirs();
+		}
+
+		FreemarkerTemplateEngine templateEngine = FreemarkerTemplateEngine.getInstance();
+		templateEngine.setClassForTemplateLoading(ContractServiceImpl.class, "/config/contracts/");
+
+		Map<String, Object> params = new HashMap<String, Object>();
+
+		templateEngine.render(params, "courses.ftl", new File(srcPdfPath));
+
+		String result = "";
+		try {
+			result = FileUtils.readFileToString(new File(srcPdfPath));
+		} catch (IOException e) {
+			throw new BizException("读取课程协议出错", e);
+		}
+		FileUtils.deleteQuietly(new File(srcPdfPath));
+
+		return result;
+	}
+
 }

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleComplaintsServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.CourseScheduleComplaintsDao;
+import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
+import com.ym.mec.biz.service.CourseScheduleComplaintsService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class CourseScheduleComplaintsServiceImpl extends BaseServiceImpl<Long, CourseScheduleComplaints>  implements CourseScheduleComplaintsService {
+	
+	@Autowired
+	private CourseScheduleComplaintsDao courseScheduleComplaintsDao;
+
+	@Override
+	public BaseDAO<Long, CourseScheduleComplaints> getDAO() {
+		return courseScheduleComplaintsDao;
+	}
+	
+}

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysUserContractsServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.SysUserContractsDao;
+import com.ym.mec.biz.dal.entity.SysUserContracts;
+import com.ym.mec.biz.service.SysUserContractsService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class SysUserContractsServiceImpl extends BaseServiceImpl<Long, SysUserContracts>  implements SysUserContractsService {
+	
+	@Autowired
+	private SysUserContractsDao sysUserContractsDao;
+
+	@Override
+	public BaseDAO<Long, SysUserContracts> getDAO() {
+		return sysUserContractsDao;
+	}
+	
+}

+ 88 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleComplaintsMapper.xml

@@ -0,0 +1,88 @@
+<?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.biz.dal.dao.CourseScheduleComplaintsDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.CourseScheduleComplaints" id="CourseScheduleComplaints">
+		<result column="id_" property="id" />
+		<result column="user_id_" property="userId" />
+		<result column="course_schedule_id_" property="courseScheduleId" />
+		<result column="reason_" property="reason" />
+		<result column="status_" property="status" />
+		<result column="wf_process_id_" property="wfProcessId" />
+		<result column="wf_order_id_" property="wfOrderId" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="CourseScheduleComplaints" >
+		SELECT * FROM course_schedule_complaints WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="CourseScheduleComplaints">
+		SELECT * FROM course_schedule_complaints ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleComplaints" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO course_schedule_complaints (id_,user_id_,course_schedule_id_,reason_,status_,wf_process_id_,wf_order_id_,create_time_,update_time_) VALUES(#{id},#{userId},#{courseScheduleId},#{reason},#{status},#{wfProcessId},#{wfOrderId},#{createTime},#{updateTime})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleComplaints">
+		UPDATE course_schedule_complaints <set>
+<if test="status != null">
+status_ = #{status},
+</if>
+<if test="wfOrderId != null">
+wf_order_id_ = #{wfOrderId},
+</if>
+<if test="userId != null">
+user_id_ = #{userId},
+</if>
+<if test="wfProcessId != null">
+wf_process_id_ = #{wfProcessId},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="courseScheduleId != null">
+course_schedule_id_ = #{courseScheduleId},
+</if>
+<if test="reason != null">
+reason_ = #{reason},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM course_schedule_complaints WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="CourseScheduleComplaints" parameterType="map">
+		SELECT * FROM course_schedule_complaints ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM course_schedule_complaints
+	</select>
+</mapper>

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

@@ -20,7 +20,6 @@
         <result column="update_time_" property="updateTime"/>
         <result column="teach_mode_" property="teachMode" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-        <result column="complaint_status_" property="complaintStatus"/>
         <result column="name_" property="name"/>
     </resultMap>
 

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

@@ -16,6 +16,7 @@
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
         <result column="orig_payment_order_id_" property="origPaymentOrderId"/>
+        <result column="remark_" property="remark"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -37,8 +38,8 @@
         </selectKey>
         -->
         INSERT INTO student_apply_refunds
-        (id_,user_id_,order_no_,status_,expect_amount_,actual_amount_,create_time_,update_time_,orig_payment_order_id_)
-        VALUES(#{id},#{userId},#{orderNo},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{expectAmount},#{actualAmount},now(),now(),#{origPaymentOrderId})
+        (id_,user_id_,order_no_,status_,expect_amount_,actual_amount_,create_time_,update_time_,orig_payment_order_id_,remark_)
+        VALUES(#{id},#{userId},#{orderNo},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{expectAmount},#{actualAmount},now(),now(),#{origPaymentOrderId},#{remark})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -66,6 +67,9 @@
             <if test="actualAmount != null">
                 actual_amount_ = #{actualAmount},
             </if>
+            <if test="remark != null">
+                remark_ = #{remark},
+            </if>
         </set>
         WHERE id_ = #{id}
     </update>

+ 86 - 0
mec-biz/src/main/resources/config/mybatis/SysUserContractsMapper.xml

@@ -0,0 +1,86 @@
+<?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.biz.dal.dao.SysUserContractsDao">
+
+	<resultMap type="com.ym.mec.biz.dal.entity.SysUserContracts"
+		id="SysUserContracts">
+		<result column="id_" property="id" />
+		<result column="user_id_" property="userId" />
+		<result column="contract_no_" property="contractNo" />
+		<result column="type_" property="type" />
+		<result column="url_" property="url" />
+		<result column="memo_" property="memo" />
+		<result column="create_time_" property="createTime" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="SysUserContracts">
+		SELECT * FROM
+		sys_user_contracts WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="SysUserContracts">
+		SELECT * FROM sys_user_contracts
+		ORDER BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SysUserContracts"
+		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_contracts
+		(id_,user_id_,contract_no_,type_,url_,memo_,create_time_)
+		VALUES(#{id},#{userId},#{contractNo},#{type},#{url},#{memo},#{createTime})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.SysUserContracts">
+		UPDATE sys_user_contracts
+		<set>
+			<if test="userId != null">
+				user_id_ = #{userId},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="url != null">
+				url_ = #{url},
+			</if>
+			<if test="memo != null">
+				memo_ = #{memo},
+			</if>
+			<if test="contractNo != null">
+				contract_no_ = #{contractNo},
+			</if>
+			<if test="type != null">
+				type_ = #{type},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM sys_user_contracts WHERE id_ =
+		#{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="SysUserContracts"
+		parameterType="map">
+		SELECT * FROM sys_user_contracts ORDER BY id_
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM
+		sys_user_contracts
+	</select>
+</mapper>

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/RegisterController.java

@@ -31,7 +31,7 @@ public class RegisterController extends BaseController {
 		if (sysUser == null) {
 			return failed("获取用户信息失败");
 		}
-		return succeed(contractService.queryRegisterContract(sysUser.getId(), null));
+		return succeed(contractService.queryRegisterContract(sysUser.getId()));
 	}
 
 }