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

Merge remote-tracking branch 'origin/develop' into develop

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
3009eccf53
18 измененных файлов: 208 добавлений и 28 удалений
  1. +14
    -0
      mallinkAdmin/src/main/resources/db/migration/V201904111520__UPDATE_BILL_TABLE.sql
  2. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java
  3. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java
  4. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java
  5. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java
  6. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java
  7. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java
  8. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java
  9. +13
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java
  10. +37
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java
  11. +6
    -4
      mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml
  12. +6
    -2
      mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
  13. +6
    -2
      mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml
  14. +6
    -3
      mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
  15. +6
    -2
      mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml
  16. +7
    -3
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  17. +7
    -2
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
  18. +23
    -10
      mallinkService/src/main/resources/mapper/WxCouponMerchantMapper.xml

+ 14
- 0
mallinkAdmin/src/main/resources/db/migration/V201904111520__UPDATE_BILL_TABLE.sql Просмотреть файл

@@ -0,0 +1,14 @@
ALTER TABLE `wx_bill_rent`
ADD COLUMN `pay_way` smallint (2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他';
ALTER TABLE `wx_bill_rent_deposit`
ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他';
ALTER TABLE `wx_bill_property`
ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他';
ALTER TABLE `wx_bill_property_deposit`
ADD COLUMN `pay_way` smallint (2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他';
ALTER TABLE `wx_bill_other`
ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他';
ALTER TABLE `wx_bill_other_deposit`
ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他';
ALTER TABLE `wx_bill_daily`
ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他';

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

@@ -108,6 +108,17 @@ public class WxBillDaily implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay;

public Integer getPayWay() {
return payWay;
}

public void setPayWay(Integer payWay) {
this.payWay = payWay;
}

public Integer getReceivePay() {
return receivePay;
}


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

@@ -107,6 +107,17 @@ public class WxBillDeposit implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo")
private String shopInfo;

@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay;

public Integer getPayWay() {
return payWay;
}

public void setPayWay(Integer payWay) {
this.payWay = payWay;
}

public String getShopInfo() {
return shopInfo;
}


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

@@ -119,6 +119,17 @@ public class WxBillOther implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
private Integer rentShopType;

@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay;

public Integer getPayWay() {
return payWay;
}

public void setPayWay(Integer payWay) {
this.payWay = payWay;
}

public Integer getReceivePay() {
return receivePay;
}


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

@@ -125,6 +125,17 @@ public class WxBillOtherDeposit implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "退还金额", name = "returnPrice")
private Integer returnPrice;

@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay;

public Integer getPayWay() {
return payWay;
}

public void setPayWay(Integer payWay) {
this.payWay = payWay;
}

public Integer getReceivePay() {
return receivePay;
}


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

@@ -122,6 +122,17 @@ public class WxBillProperty implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo")
private String shopInfo;

@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay;

public Integer getPayWay() {
return payWay;
}

public void setPayWay(Integer payWay) {
this.payWay = payWay;
}

public String getShopInfo() {
return shopInfo;
}


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

@@ -107,6 +107,17 @@ public class WxBillPropertyDeposit implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo")
private String shopInfo;

@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay;

public Integer getPayWay() {
return payWay;
}

public void setPayWay(Integer payWay) {
this.payWay = payWay;
}

public String getShopInfo() {
return shopInfo;
}


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

@@ -124,6 +124,17 @@ public class WxBillRent implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo")
private String shopInfo;

@io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay")
private Integer payWay;

public Integer getPayWay() {
return payWay;
}

public void setPayWay(Integer payWay) {
this.payWay = payWay;
}

public String getShopInfo() {
return shopInfo;
}


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

@@ -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;
}


+ 37
- 0
mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java Просмотреть файл

@@ -0,0 +1,37 @@
package com.iformall.enums;

/**
* Created by Stormeye on 2018/08/09.
*/
public enum EnumBillPayWay {
CASH(1, "现金"),
ALIPAY(2, "支付宝"),
WECHAT_PAY(3, "微信"),
BANK(4, "银行卡转账"),
OTHER(-1, "其他"),;

public static EnumBillPayWay getEnum(Integer code) {
for (EnumBillPayWay value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumBillPayWay(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 6
- 4
mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml Просмотреть файл

@@ -19,13 +19,14 @@
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/>
<result column="pay_way" jdbcType="INTEGER" property="payWay"/>
</resultMap>
<sql id="allColumns">
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,
`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`type`,
`rent_shop_type`
`rent_shop_type`,`pay_way`
</sql>

<sql id="dynamicWhereConditions">
@@ -47,7 +48,7 @@
<if test=" null != updatetime "> and `updatetime` = #{updatetime} </if>
<if test=" null != type "> and `type` = #{type} </if>
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -65,8 +66,8 @@
<select id="queryBillDailyList" parameterType="com.iformall.domain.po.WxBillDaily" resultType="hashmap">
select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate,
br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`,
m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,
br.`merchant_id` merchantId,br.shop_id shopId,br.type,br.`rent_shop_type` rentShopType
m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,br.`merchant_id` merchantId,
br.shop_id shopId,br.type,br.`rent_shop_type` rentShopType,br.pay_way payWay
from wx_bill_daily br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
<where>
@@ -78,6 +79,7 @@
<if test=" null != isDel ">and br.`is_del` = #{isDel}</if>
<if test=" null != type ">and br.`type` = #{type}</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and br.`pay_way` = #{payWay}</if>
</where>
order by id desc


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

@@ -21,13 +21,14 @@
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
<result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/>
<result column="return_price" jdbcType="INTEGER" property="returnPrice"/>
<result column="pay_way" jdbcType="INTEGER" property="payWay"/>
</resultMap>
<sql id="allColumns">
`id`,`rent_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,
`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,
`rent_shop_type`,`return_price`
`rent_shop_type`,`return_price`,`pay_way`
</sql>

<sql id="dynamicWhereConditions">
@@ -50,6 +51,7 @@
<if test=" null != shopId "> and `shop_id` = #{shopId} </if>
<if test=" null != updatetime ">and `updatetime` = #{updatetime}</if>
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" null != ids ">
and id in
@@ -70,7 +72,8 @@
select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate,
br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`,
br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,
br.`merchant_id` merchantId,br.`rent_shop_type` rentShopType,br.`return_price` returnPrice
br.`merchant_id` merchantId,br.`rent_shop_type` rentShopType,br.`return_price` returnPrice,
br.pay_way payWay
from wx_bill_rent_deposit br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
<where>
@@ -82,6 +85,7 @@
<if test=" null != isDel ">and br.`is_del` = #{isDel}</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != rentContractId ">and br.`rent_contract_id` = #{rentContractId}</if>
<if test=" null != payWay ">and br.`pay_way` = #{payWay}</if>
</where>
order by id desc


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

@@ -21,13 +21,14 @@
<result column="comments" jdbcType="VARCHAR" property="comments"/>
<result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/>
<result column="return_price" jdbcType="INTEGER" property="returnPrice"/>
<result column="pay_way" jdbcType="INTEGER" property="payWay"/>
</resultMap>
<sql id="allColumns">
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,
`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`name`,`comments`,
`rent_shop_type`,`return_price`
`rent_shop_type`,`return_price`,`pay_way`
</sql>
<sql id="dynamicWhereConditions">
@@ -49,6 +50,7 @@
<if test=" null != updatetime ">and `updatetime` = #{updatetime}</if>
<if test=" null != name ">and `name` = #{name}</if>
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" null != ids ">
and id in
@@ -70,7 +72,8 @@
select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate,
br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`,
m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,br.`return_price` returnPrice,
br.`merchant_id` merchantId,br.shop_id shopId,br.name,br.comments,br.`rent_shop_type` rentShopType
br.`merchant_id` merchantId,br.shop_id shopId,br.name,br.comments,br.`rent_shop_type` rentShopType,
br.pay_way payWay
from wx_bill_other_deposit br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
<where>
@@ -83,6 +86,7 @@
<if test=" null != isDel ">and br.`is_del` = #{isDel}</if>
<if test=" null != name ">and br.`name` = #{name}</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and br.`pay_way` = #{payWay}</if>
</where>
order by id desc


+ 6
- 3
mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml Просмотреть файл

@@ -20,13 +20,14 @@
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="comments" jdbcType="VARCHAR" property="comments" />
<result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/>
<result column="pay_way" jdbcType="INTEGER" property="payWay"/>
</resultMap>
<sql id="allColumns">
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,
`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`name`,`comments`,
`rent_shop_type`
`rent_shop_type`,`pay_way`
</sql>

<sql id="dynamicWhereConditions">
@@ -48,6 +49,7 @@
<if test=" null != updatetime "> and `updatetime` = #{updatetime} </if>
<if test=" null != name "> and `name` = #{name} </if>
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" null != ids ">
and id in
@@ -66,8 +68,8 @@
<select id="queryBillList" parameterType="com.iformall.domain.po.WxBillOther" resultType="hashmap">
select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate,
br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`,
m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,
br.`merchant_id` merchantId,br.shop_id shopId,br.name,br.comments,br.`rent_shop_type` rentShopType
m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,br.`merchant_id` merchantId,
br.shop_id shopId,br.name,br.comments,br.`rent_shop_type` rentShopType,br.pay_way payWay
from wx_bill_other br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
<where>
@@ -79,6 +81,7 @@
<if test=" null != isDel ">and br.`is_del` = #{isDel}</if>
<if test=" null != name ">and br.`name` = #{name}</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and br.`pay_way` = #{payWay}</if>
</where>
order by id desc


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

@@ -22,13 +22,14 @@
<result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/>
<result column="return_price" jdbcType="INTEGER" property="returnPrice"/>
<result column="shop_info" jdbcType="VARCHAR" property="shopInfo"/>
<result column="pay_way" jdbcType="INTEGER" property="payWay"/>
</resultMap>
<sql id="allColumns">
`id`,`property_contract_id`,`receive_pay`,`pay`,`receive_date`,
`pay_date`,`createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`,
`merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`return_price`,`shop_info`
`merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`return_price`,`shop_info`,`pay_way`
</sql>

<sql id="dynamicWhereConditions">
@@ -51,6 +52,7 @@
<if test=" null != shopId "> and `shop_id` = #{shopId} </if>
<if test=" null != updatetime ">and `updatetime` = #{updatetime}</if>
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" null != ids ">
and id in
@@ -71,7 +73,7 @@
br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`,
br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,
br.`merchant_id` merchantId,br.`rent_shop_type` rentShopType,br.`return_price` returnPrice,br.`shop_info`
shopInfo
shopInfo,br.pay_way payWay,br.pay_way payWay
from wx_bill_property_deposit br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
<where>
@@ -83,6 +85,8 @@
<if test=" null != isDel ">and br.`is_del` = #{isDel}</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != propertyContractId ">and br.`property_contract_id` = #{propertyContractId}</if>
<if test=" null != payWay ">and br.`pay_way` = #{payWay}</if>
</where>
order by id desc
</select>


+ 7
- 3
mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml Просмотреть файл

@@ -27,6 +27,7 @@
<result column="period" jdbcType="INTEGER" property="period"/>
<result column="is_preview" property="isPreview"/>
<result column="shop_info" jdbcType="VARCHAR" property="shopInfo"/>
<result column="pay_way" jdbcType="INTEGER" property="payWay"/>
</resultMap>
@@ -34,8 +35,8 @@
`id`,`property_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,
`createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`,
`merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,
`revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`
`revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`,
`pay_way`
</sql>

<sql id="dynamicWhereConditions">
@@ -60,6 +61,7 @@
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null == isPreview ">and is_preview = 0</if>
<if test=" null != isPreview ">and is_preview = #{isPreview}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>

<if test=" null != ids ">
and id in
@@ -85,7 +87,7 @@
else
FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe) end latePayPrice,
(select max(period) from wx_bill_property where property_contract_id=br.property_contract_id)
allPeriod,d.`status` depositStatus,br.`shop_info` shopInfo
allPeriod,d.`status` depositStatus,br.`shop_info` shopInfo,br.pay_way payWay
from wx_bill_property br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
left join wx_bill_property_deposit d on br.property_contract_id=d.property_contract_id
@@ -100,6 +102,8 @@
<if test=" null != starttime and null!=endtime ">and br.`receive_date` between #{starttime} and #{endtime}</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != propertyContractId ">and br.`property_contract_id` = #{propertyContractId}</if>
<if test=" null != payWay ">and br.`pay_way` = #{payWay}</if>
</where>
<if test=" null != sortColumns">order by br.${sortColumns}</if>
</select>


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

@@ -27,6 +27,7 @@
<result column="period" jdbcType="INTEGER" property="period"/>
<result column="is_preview" property="isPreview"/>
<result column="shop_info" jdbcType="VARCHAR" property="shopInfo"/>
<result column="pay_way" jdbcType="INTEGER" property="payWay"/>
</resultMap>
@@ -34,7 +35,8 @@
`id`,`rent_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,
`createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`,
`merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,
`revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`
`revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`,
`pay_way`
</sql>
<sql id="dynamicWhereConditions">
@@ -59,6 +61,7 @@
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null == isPreview ">and is_preview = 0</if>
<if test=" null != isPreview ">and is_preview = #{isPreview}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>

<if test=" null != ids ">
and id in
@@ -86,7 +89,7 @@
br.`rent_contract_id` rentContractId,d.receive_pay deposit,case when br.late_pay_time is null then 0 else
FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe) end latePayPrice,
(select max(period) from wx_bill_rent where rent_contract_id=br.rent_contract_id) allPeriod,d.`status`
depositStatus,br.shop_info shopInfo
depositStatus,br.shop_info shopInfo,br.pay_way payWay
from wx_bill_rent br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
left join wx_rent_contract r on br.rent_contract_id=r.id
@@ -102,6 +105,8 @@
<if test=" null != starttime and null!=endtime ">and br.`receive_date` between #{starttime} and #{endtime}</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != rentContractId ">and br.`rent_contract_id` = #{rentContractId}</if>
<if test=" null != payWay ">and br.`pay_way` = #{payWay}</if>
</where>
<if test=" null != sortColumns">order by br.${sortColumns}</if>
</select>


+ 23
- 10
mallinkService/src/main/resources/mapper/WxCouponMerchantMapper.xml Просмотреть файл

@@ -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>


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