提交 b5a0115e 作者: 刘明祎-运维用途

返回课程基本信息

上级 917b5f95
package com.mmc.csf.release.entity.curriculum; package com.mmc.csf.release.entity.curriculum;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import lombok.Data;
/** /**
* *
...@@ -27,11 +28,6 @@ public class CurriculumOrder implements Serializable { ...@@ -27,11 +28,6 @@ public class CurriculumOrder implements Serializable {
private Integer userAccountId; private Integer userAccountId;
/** /**
* 上传课程的后台id
*/
private Integer backUserId;
/**
* 订单总金额 * 订单总金额
*/ */
private BigDecimal orderTotalAmount; private BigDecimal orderTotalAmount;
...@@ -66,5 +62,15 @@ public class CurriculumOrder implements Serializable { ...@@ -66,5 +62,15 @@ public class CurriculumOrder implements Serializable {
*/ */
private Date updateTime; private Date updateTime;
/**
* 课程id
*/
private Integer curriculumInfoId;
/**
* 消耗多少积分
*/
private Integer jifenConsume;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
package com.mmc.csf.release.entity.curriculum; package com.mmc.csf.release.entity.curriculum;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
*
* @author Admin * @author Admin
* @TableName curriculum_order * @TableName curriculum_order
*/ */
@Data @Data
@AllArgsConstructor
@NoArgsConstructor
public class CurriculumOrderDO implements Serializable { public class CurriculumOrderDO implements Serializable {
/** /**
* *
...@@ -74,5 +77,28 @@ public class CurriculumOrderDO implements Serializable { ...@@ -74,5 +77,28 @@ public class CurriculumOrderDO implements Serializable {
private int jifenConsume; private int jifenConsume;
private String curriculumName;
/**
* 课程简介
*/
private String curriculumDesc;
/**
* 课程封面
*/
private String surfaceUrl;
/**
* 课程视频
*/
private String videoUrl;
/**
* 课程所需金额
*/
private BigDecimal requireAmout;
/**
* 课程所需积分
*/
private Integer requireIntegral;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -39,6 +39,8 @@ public class CurriculumOrderQO implements Serializable { ...@@ -39,6 +39,8 @@ public class CurriculumOrderQO implements Serializable {
@JsonIgnore @JsonIgnore
private Integer userAccountId; private Integer userAccountId;
private Integer courseAttribute;
public void buildCurrentPage() { public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize; this.pageNo = (pageNo - 1) * pageSize;
} }
......
...@@ -267,11 +267,11 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService { ...@@ -267,11 +267,11 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
// 微信已经支付的金额 // 微信已经支付的金额
BigDecimal weChatPay = new BigDecimal(0); BigDecimal weChatPay = new BigDecimal(0);
String paymentOrderNumber = curriculumPayVO.getPaymentOrderNumber(); curriculumPayVO.getPaymentOrderNumber();
if (objects.contains("3") && paymentOrderNumber != null) { if (objects.contains("3") && curriculumPayVO.getPaymentOrderNumber() != null) {
// 获取当前微信已经支付的金额 // 获取当前微信已经支付的金额
String json = stringRedisTemplate.opsForValue().get(paymentOrderNumber + accountId); String json = stringRedisTemplate.opsForValue().get(curriculumPayVO.getPaymentOrderNumber() + accountId);
GetOrderNumberDTO orderNumberDTO = JSONObject.parseObject(json, GetOrderNumberDTO.class); GetOrderNumberDTO orderNumberDTO = JSONObject.parseObject(json, GetOrderNumberDTO.class);
weChatPay = orderNumberDTO.getWeChatPay(); weChatPay = orderNumberDTO.getWeChatPay();
} }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mmc.csf.release.dao.CurriculumOrderDao"> <mapper namespace="com.mmc.csf.release.dao.CurriculumOrderDao">
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id,order_no,user_account_id, id,order_no,user_account_id,
order_total_amount,salary_amount, order_total_amount,salary_amount,
...@@ -17,7 +18,8 @@ ...@@ -17,7 +18,8 @@
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>
<select id="getCountCurriculumOrder" resultType="java.lang.Integer"> <select id="getCountCurriculumOrder" resultType="java.lang.Integer">
select count(id) from curriculum_order select count(ci.id) from curriculum_order
left join curriculum_info ci on ci.id = curriculum_order.curriculum_info_id
where 1=1 where 1=1
<if test="orderNo!=null"> <if test="orderNo!=null">
and order_no = #{orderNo} and order_no = #{orderNo}
...@@ -28,11 +30,24 @@ ...@@ -28,11 +30,24 @@
<if test="userAccountId != null"> <if test="userAccountId != null">
and user_account_id = #{userAccountId} and user_account_id = #{userAccountId}
</if> </if>
<if test="courseAttribute != null">
and ci.course_attribute = #{courseAttribute}
</if>
</select> </select>
<select id="selectOrderList" resultType="com.mmc.csf.release.entity.curriculum.CurriculumOrderDO"> <select id="selectOrderList" resultType="com.mmc.csf.release.entity.curriculum.CurriculumOrderDO">
select select
<include refid="Base_Column_List"/> co.id,order_no,user_account_id,
from curriculum_order order_total_amount,salary_amount,
cash_amount,we_chat,wechat_pay_order_number,jifen_consume,curriculum_info_id,
ci.surface_url,
ci.video_url,
ci.curriculum_name,
ci.curriculum_desc,
ci.require_amout,
ci.require_integral,
ci.course_attribute
from curriculum_order co left join curriculum_info ci on ci.id = co.curriculum_info_id
where 1=1 where 1=1
<if test="orderNo!=null"> <if test="orderNo!=null">
and order_no = #{orderNo} and order_no = #{orderNo}
...@@ -42,8 +57,12 @@ ...@@ -42,8 +57,12 @@
</if> </if>
<if test="userAccountId != null"> <if test="userAccountId != null">
and user_account_id = #{userAccountId} and user_account_id = #{userAccountId}
<if test="courseAttribute != null">
and ci.course_attribute = #{courseAttribute}
</if>
</if> </if>
order by create_time desc order by co.create_time desc
limit #{pageNo},#{pageSize} limit #{pageNo},#{pageSize}
</select> </select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论