zouxuan 4 years ago
parent
commit
5175040bb4

+ 6 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalender.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.dal.entity;
 import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
 import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
 import com.ym.mec.common.enums.BaseEnum;
 import com.ym.mec.common.enums.BaseEnum;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 
 import java.util.Date;
 import java.util.Date;
@@ -114,7 +115,11 @@ public class MusicGroupPaymentCalender implements Comparable<MusicGroupPaymentCa
 	}
 	}
 
 
 	public void setPaymentValidEndDate(String paymentValidEndDate) {
 	public void setPaymentValidEndDate(String paymentValidEndDate) {
-		this.paymentValidEndDate = paymentValidEndDate;
+		if(StringUtils.isEmpty(paymentValidEndDate)){
+			this.paymentValidEndDate = null;
+		}else {
+			this.paymentValidEndDate = paymentValidEndDate;
+		}
 	}
 	}
 
 
 	public String getStudentIds() {
 	public String getStudentIds() {

+ 12 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentGoodsSell.java

@@ -44,7 +44,7 @@ public class StudentGoodsSell {
 	private Boolean isUseBalancePayment = false;
 	private Boolean isUseBalancePayment = false;
 
 
 	@ApiModelProperty(value = "是否重复支付",required = true)
 	@ApiModelProperty(value = "是否重复支付",required = true)
-	private Boolean isRepeatPay = false;
+	private Boolean isRepeatPay;
 
 
 	@ApiModelProperty(value = "商品列表",required = true)
 	@ApiModelProperty(value = "商品列表",required = true)
 	private List<GoodsSellDto> goodsSellDtos;
 	private List<GoodsSellDto> goodsSellDtos;
@@ -55,6 +55,17 @@ public class StudentGoodsSell {
 	@ApiModelProperty(value = "分部编号", required = false)
 	@ApiModelProperty(value = "分部编号", required = false)
 	private Integer organId;
 	private Integer organId;
 
 
+	@ApiModelProperty(value = "创建人编号", required = false)
+	private Integer authorUser;
+
+	public Integer getAuthorUser() {
+		return authorUser;
+	}
+
+	public void setAuthorUser(Integer authorUser) {
+		this.authorUser = authorUser;
+	}
+
 	public String getUserName() {
 	public String getUserName() {
 		return userName;
 		return userName;
 	}
 	}

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

@@ -16,6 +16,7 @@
 		<result column="order_no_" property="orderNo" />
 		<result column="order_no_" property="orderNo" />
 		<result column="username_" property="userName" />
 		<result column="username_" property="userName" />
 		<result column="organ_id_" property="organId" />
 		<result column="organ_id_" property="organId" />
+		<result column="author_user_" property="authorUser" />
 		<result column="create_time_" property="createTime" />
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
 		<result column="update_time_" property="updateTime" />
 	</resultMap>
 	</resultMap>
@@ -34,13 +35,16 @@
 	
 	
 	<!-- 向数据库增加一条记录 -->
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentGoodsSell" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentGoodsSell" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		INSERT INTO student_goods_sell (id_,user_id_,teacher_id_,goods_json_,total_amount_,market_amount_,create_time_,update_time_,order_no_,organ_id_)
-		VALUES(#{id},#{userId},#{teacherId},#{goodsJson},#{totalAmount},#{marketAmount},NOW(),NOW(),#{orderNo},#{organId})
+		INSERT INTO student_goods_sell (id_,user_id_,teacher_id_,goods_json_,total_amount_,market_amount_,create_time_,update_time_,order_no_,organ_id_,author_user_)
+		VALUES(#{id},#{userId},#{teacherId},#{goodsJson},#{totalAmount},#{marketAmount},NOW(),NOW(),#{orderNo},#{organId},#{authorUser})
 	</insert>
 	</insert>
 	
 	
 	<!-- 根据主键查询一条记录 -->
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.biz.dal.entity.StudentGoodsSell">
 	<update id="update" parameterType="com.ym.mec.biz.dal.entity.StudentGoodsSell">
 		UPDATE student_goods_sell <set>
 		UPDATE student_goods_sell <set>
+		<if test="authorUser != null">
+			author_user_ = #{authorUser},
+		</if>
 		<if test="organId != null">
 		<if test="organId != null">
 			organ_id_ = #{organId},
 			organ_id_ = #{organId},
 		</if>
 		</if>

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

@@ -61,7 +61,7 @@ public class RepairController extends BaseController {
                 return failed(HttpStatus.CONTINUE, "您有待支付的订单");
                 return failed(HttpStatus.CONTINUE, "您有待支付的订单");
             }
             }
         }
         }
-
+        studentGoodsSell.setAuthorUser(studentGoodsSell.getUserId());
         Map map = studentRepairService.addGoodsSellOrder(studentGoodsSell);
         Map map = studentRepairService.addGoodsSellOrder(studentGoodsSell);
         if(map.containsKey("tradeState")){
         if(map.containsKey("tradeState")){
             return failed(HttpStatus.CREATED, "恭喜您,购买成功!");
             return failed(HttpStatus.CREATED, "恭喜您,购买成功!");

+ 1 - 0
mec-web/src/main/java/com/ym/mec/web/controller/education/EduRepairController.java

@@ -88,6 +88,7 @@ public class EduRepairController extends BaseController {
             }
             }
         }
         }
         studentGoodsSell.setTeacherId(sysUser.getId());
         studentGoodsSell.setTeacherId(sysUser.getId());
+        studentGoodsSell.setAuthorUser(sysUser.getId());
         Map map = studentRepairService.addGoodsSellOrder(studentGoodsSell);
         Map map = studentRepairService.addGoodsSellOrder(studentGoodsSell);
         if(map.containsKey("tradeState")){
         if(map.containsKey("tradeState")){
             return failed(HttpStatus.CREATED, "恭喜您,购买成功!");
             return failed(HttpStatus.CREATED, "恭喜您,购买成功!");