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

[A端][修复]:b端收银台列表接口问题

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
2b1b29dca3
2 измененных файлов: 35 добавлений и 27 удалений
  1. +20
    -15
      mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantMicroPayVo.java
  2. +15
    -12
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

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

@@ -7,28 +7,33 @@ import java.io.Serializable;
public class WxMerchantMicroPayVo implements Serializable {
private static final long serialVersionUID = 1L;

@Id
/*商户id**/
protected Long id;

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

/*租户ID**/
@io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId")
private String tenantId;
/*商户id**/
@io.swagger.annotations.ApiModelProperty(value = "商户id", name = "merchantId")
private Long merchantId;
/*交易额**/
@io.swagger.annotations.ApiModelProperty(value = "交易额", name = "tradeAmt")
private Integer tradeAmt;
/*日期**/
@io.swagger.annotations.ApiModelProperty(value = "解单日期", name = "reportDate")
private String reportDate;


/*商户电话**/
@io.swagger.annotations.ApiModelProperty(value = "商户id", name = "merchantId")
private Long merchantPhone;
/*商户名**/
@io.swagger.annotations.ApiModelProperty(value="商户名",name="merchantName")
private String merchantName;


public String getMerchantName() {
return merchantName;
}
@@ -45,14 +50,6 @@ public class WxMerchantMicroPayVo implements Serializable {
tenantId = _tenantId;
}

public Long getMerchantId() {
return merchantId;
}

public void setMerchantId(Long _merchantId) {
merchantId = _merchantId;
}

public Integer getTradeAmt() {
return tradeAmt;
}
@@ -61,6 +58,14 @@ public class WxMerchantMicroPayVo implements Serializable {
tradeAmt = _tradeAmt;
}

public Long getMerchantPhone() {
return merchantPhone;
}

public void setMerchantPhone(Long merchantPhone) {
this.merchantPhone = merchantPhone;
}

public String getReportDate() {
return reportDate;
}


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

@@ -347,37 +347,40 @@
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="trade_amt" jdbcType="DECIMAL" property="tradeAmt" />
<result column="report_date" jdbcType="VARCHAR" property="reportDate" />
<result column="merchant_phone" jdbcType="VARCHAR" property="merchantPhone" />
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
</resultMap>

<sql id="WxMerchantMicroPayColumnsVo">
m.id as id,
m.tenant_id as tenant_id,
m.name as merchant_name,
wm.id as id,
wm.tenant_id as tenant_id,
wm.name as merchant_name,
wm.link_phone as merchant_phone,
mo.xTime as report_date,
(case when mo.amount > 0 then mo.amount else 0 end) trade_amt
</sql>

<select id="findListOfMerchantMicroPayOrderByDate" parameterType="map" resultMap="WxMerchantMicroPayVo">
select
<include refid="WxMerchantMicroPayColumnsVo"/>
from wx_merchant m
from wx_merchant wm
left join
(select m.id as mid, IFNULL(sum(o.payment),0) amount
(select m.id as mid, IFNULL(sum(o.payment),0) amount,DATE_FORMAT(o.create_date,'%Y-%m-%d') xTime
from wx_merchant m, wx_order o, wx_merchant_b_user bu
where bu.id = o.product_id
and m.status = 1
and m.id = bu.merchant_id
and o.order_status = '1'
and o.type = 1
<if test="startDate != null">
AND o.create_date &gt; #{startDate,jdbcType=TIMESTAMP}
<if test="startTime != null">
AND o.create_date &gt; #{startTime}
</if>
<if test="endDate != null">
AND o.create_date &lt; #{endDate,jdbcType=TIMESTAMP}
<if test="endTime != null">
AND o.create_date &lt; #{endTime}
</if>
group by m.id) mo on mo.mid = m.id
where m.status = 1
order by m.create_date desc
group by m.id,xTime) mo on mo.mid = wm.id
where wm.status = 1
order by wm.create_date desc
</select>
<resultMap id="orderMap" type="com.iformall.domain.po.WxOrder">


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