Explorar el Código

[券详情][修改][明细显示多商铺信息]

release_toaliyun_real
gongbiao hace 7 años
padre
commit
145ad6d266
Se han modificado 2 ficheros con 36 adiciones y 10 borrados
  1. +13
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java
  2. +23
    -10
      mallinkService/src/main/resources/mapper/WxCouponMerchantMapper.xml

+ 13
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java Ver fichero

@@ -1,6 +1,8 @@
package com.iformall.domain.vo;

import javax.persistence.Id;
import java.util.List;

public class WxMerchantVo {
private static final long serialVersionUID = 6687964942922444531L;

@@ -56,6 +58,17 @@ public class WxMerchantVo {
@io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "show")
private Integer isPublic;

@io.swagger.annotations.ApiModelProperty(value = "店铺列表", name = "shopVoList")
private List<WxShopVo> shopVoList;

public List<WxShopVo> getShopVoList() {
return shopVoList;
}

public void setShopVoList(List<WxShopVo> shopVoList) {
this.shopVoList = shopVoList;
}

public Integer getIsPublic() {
return isPublic;
}


+ 23
- 10
mallinkService/src/main/resources/mapper/WxCouponMerchantMapper.xml Ver fichero

@@ -63,10 +63,7 @@
</select>

<sql id="allMerchantVoColumns">
m.id,
m.img_url,m.name,m.link_phone,m.status,m.business_id,m.sub_business_id,
s.addr,s.shop_number,s.baidu_poi,
mb.building_name,mf.floor_name,
m.id,m.img_url,m.name,m.link_phone,m.status,m.business_id,m.sub_business_id,
cm.parameter
</sql>

@@ -79,23 +76,39 @@
<result column="business_id" jdbcType="INTEGER" property="businessId"/>
<result column="sub_business_id" jdbcType="INTEGER" property="subBusinessId"/>
<result column="parameter" jdbcType="VARCHAR" property="parameter"/>

<collection column="{merchantId=id}" property="shopVoList"
ofType="com.iformall.domain.vo.WxShopVo"
javaType="java.util.List"
select="com.iformall.mapper.WxCouponMerchantMapper.findShopVoList">
</collection>
</resultMap>
<resultMap id="ShopVoResultMap" type="com.iformall.domain.vo.WxShopVo">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="addr" jdbcType="VARCHAR" property="addr"/>
<result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/>
<result column="building_name" jdbcType="VARCHAR" property="buildingName"/>
<result column="floor_name" jdbcType="VARCHAR" property="floorName"/>
<result column="baidu_poi" jdbcType="VARCHAR" property="baiduPoi"/>
</resultMap>

<select id="findShopVoList" parameterType="java.util.Map" resultMap="ShopVoResultMap">
select s.id,s.shop_number,b.building_name,f.floor_name,s.addr,s.baidu_poi
from wx_shop s left join wx_merchant_shop ms on ms.shop_id=s.id
left join wx_merchant m on ms.merchant_id=m.id
left join wx_mall_building b on s.building=b.id
left join wx_mall_floor f on s.floor=f.id
where s.is_del=0 and ms.is_del=0
and m.id=#{merchantId}
</select>
<select id="findMerchantVoList" parameterType="java.util.Map" resultMap="MerchantVoResultMap">
select
<include refid="allMerchantVoColumns"/>
from wx_coupon_merchant cm
left join wx_merchant m on m.id = cm.merchant_id
left join wx_merchant_shop ms on ms.merchant_id = m.id and ms.is_del = 0
left join wx_shop s on ms.shop_id = s.id
left join wx_mall_building mb on s.building = mb.id
left join wx_mall_floor mf on s.floor = mf.id
where cm.status = 0
and cm.product_id = #{productId}
</select>


Cargando…
Cancelar
Guardar