Просмотр исходного кода

[砍价][修改]:详情接口

release_toaliyun_real
Stormeye Wu 7 лет назад
Родитель
Сommit
07f1d19521
3 измененных файлов: 42 добавлений и 3 удалений
  1. +2
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java
  2. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponPressVo.java
  3. +36
    -2
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

+ 2
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java Просмотреть файл

@@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@@ -316,7 +317,7 @@ public class WxOrderController extends BaseController {
}
wxOrder.setId(id);
wxOrder.setcUserId(getUser().getId());
WxOrderCouponPressVo orderCouponPressVo = wxOrderService.detailPressVo(wxOrder);
final WxOrderCouponPressVo orderCouponPressVo = wxOrderService.detailPressVo(wxOrder);
if (orderCouponPressVo == null)
return new ResultData(ErrorCode.ORDER_IS_NOT_FIND);
return new ResultData(orderCouponPressVo);


+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponPressVo.java Просмотреть файл

@@ -1,10 +1,12 @@
package com.iformall.domain.vo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.iformall.domain.po.WxOrder;
import com.iformall.domain.po.WxOrderPress;

import java.util.List;

@JsonIgnoreProperties(value = {"handler"})
public class WxOrderCouponPressVo extends WxOrder {

/** 券ID-产品ID将来的产品都会放在coupon表里**/
@@ -168,4 +170,6 @@ public class WxOrderCouponPressVo extends WxOrder {
public void setOrderPressList(List<WxOrderPress> orderPressList) {
this.orderPressList = orderPressList;
}


}

+ 36
- 2
mallinkService/src/main/resources/mapper/WxOrderMapper.xml Просмотреть файл

@@ -584,6 +584,40 @@

<result column="coupon_order_id" jdbcType="BIGINT" property="couponOrderId"/>
<result column="coupon_order_status" jdbcType="INTEGER" property="couponOrderStatus"/>
</resultMap>

<resultMap id="PressVoDetailResultMap" type="com.iformall.domain.vo.WxOrderCouponPressVo">

<id column="id" jdbcType="BIGINT" property="id"/>
<result column="order_number" jdbcType="BIGINT" property="orderNumber"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="c_user_id" jdbcType="BIGINT" property="cUserId"/>
<result column="product_id" jdbcType="BIGINT" property="productId"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="payment_type" jdbcType="INTEGER" property="paymentType"/>
<result column="payment" jdbcType="INTEGER" property="payment"/>
<result column="payment_time" jdbcType="TIMESTAMP" property="paymentTime"/>
<result column="order_status" jdbcType="INTEGER" property="orderStatus"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="press_end_date" jdbcType="TIMESTAMP" property="pressEndDate"/>
<result column="press_current_num" jdbcType="INTEGER" property="pressCurrentNum"/>
<result column="press_current_value" jdbcType="INTEGER" property="pressCurrentValue"/>

<result column="coupon_type" jdbcType="INTEGER" property="couponType"/>
<result column="cover_img" jdbcType="VARCHAR" property="coverImg"/>
<result column="title" jdbcType="VARCHAR" property="title"/>
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
<result column="use_price" jdbcType="INTEGER" property="usePrice"/>
<result column="detail" jdbcType="VARCHAR" property="detail"/>
<result column="price" jdbcType="INTEGER" property="price"/>
<result column="unit" jdbcType="INTEGER" property="unit"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="press_limit_num" jdbcType="INTEGER" property="pressLimitNum"/>

<result column="coupon_order_id" jdbcType="BIGINT" property="couponOrderId"/>
<result column="coupon_order_status" jdbcType="INTEGER" property="couponOrderStatus"/>

<collection column="{orderId=order_number}" property="orderPressList"
ofType="com.iformall.domain.po.WxOrderPress"
@@ -605,7 +639,7 @@
co.id as coupon_order_id,co.coupon_order_status
</sql>

<select id="findListOfPress" parameterType="com.iformall.domain.po.WxOrder" resultMap="CVoResultMap">
<select id="findListOfPress" parameterType="com.iformall.domain.po.WxOrder" resultMap="PressVoResultMap">
select
<include refid="allOrderPressListColumns"/>
from wx_coupon c,wx_order o
@@ -623,7 +657,7 @@
<if test=" null != sortColumns">order by ${sortColumns}</if>
</select>

<select id="selectDetailOfPress" parameterType="com.iformall.domain.po.WxOrder" resultMap="CVoResultMap">
<select id="selectDetailOfPress" parameterType="com.iformall.domain.po.WxOrder" resultMap="PressVoDetailResultMap">
select
<include refid="allOrderPressDetailColumns"/>
FROM wx_order o


Загрузка…
Отмена
Сохранить