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

Merge branch 'develop' of https://git.youlane.cn/server/formallProject into develop

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
d4f4f4bd83
12 измененных файлов: 101 добавлений и 76 удалений
  1. +7
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java
  2. +3
    -0
      mallinkAdmin/src/main/resources/db/migration/V201910141400__L_COUPON.sql
  3. +0
    -9
      mallinkBApi/src/main/java/com/iformall/config/WebMvcConfig.java
  4. +0
    -47
      mallinkBApi/src/main/java/com/iformall/resolver/LoginUserHandlerMethodArgumentResolver.java
  5. +4
    -2
      mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java
  6. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java
  7. +16
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  8. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxBillAllVo.java
  9. +26
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  10. +25
    -15
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml
  11. +4
    -2
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml
  12. +3
    -1
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 7
- 0
mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java Просмотреть файл

@@ -4,9 +4,11 @@ import com.alibaba.fastjson.JSONArray;
import com.iformall.annotation.SystemControllerLog;
import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.vo.WxBillAll;
import com.iformall.domain.vo.WxBillExcelTemplate;
import com.iformall.service.WxBillAllService;
import com.iformall.service.WxPayAccountBillService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@@ -18,6 +20,7 @@ import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Map;

@@ -32,6 +35,9 @@ public class WxBillAllController extends BaseController {

private Logger logger = LoggerFactory.getLogger(WxBillAllController.class);

@Autowired
WxPayAccountBillService wxPayAccountBillService;

@GetMapping("oweBillCount")
@ApiImplicitParams({
@ApiImplicitParam(name = "contractId", value = "合同id", dataType = "long", paramType = "query", required = true),
@@ -49,6 +55,7 @@ public class WxBillAllController extends BaseController {
@SystemControllerLog(description = "账单总览-列表")
public ResultData list(@ModelAttribute WxBillAll wxBillAll, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxBillAllController::list");
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxBillAll.getTenantId());
if (null == wxBillAll) {
wxBillAll = new WxBillAll();
}


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

@@ -0,0 +1,3 @@
alter table wx_coupon
add column `score_price` BIGINT (12) NULL DEFAULT 0 COMMENT '积分售价';


+ 0
- 9
mallinkBApi/src/main/java/com/iformall/config/WebMvcConfig.java Просмотреть файл

@@ -9,14 +9,12 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.iformall.interceptor.AuthorizationInterceptor;
import com.iformall.interceptor.HttpServletRequestWrapperFilter;
import com.iformall.interceptor.RequestInterceptor;
import com.iformall.resolver.LoginUserHandlerMethodArgumentResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.*;

import java.math.BigDecimal;
@@ -38,8 +36,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
private AuthorizationInterceptor authorizationInterceptor;
@Autowired
private RequestInterceptor requestInterceptor;
@Autowired
private LoginUserHandlerMethodArgumentResolver loginUserHandlerMethodArgumentResolver;

@Override
public void addInterceptors(InterceptorRegistry registry) {
@@ -47,11 +43,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
registry.addInterceptor(requestInterceptor).addPathPatterns("/api/**");
}

@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
argumentResolvers.add(loginUserHandlerMethodArgumentResolver);
}

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")


+ 0
- 47
mallinkBApi/src/main/java/com/iformall/resolver/LoginUserHandlerMethodArgumentResolver.java Просмотреть файл

@@ -1,47 +0,0 @@
package com.iformall.resolver;

import com.iformall.annotation.LoginUser;
import com.iformall.domain.po.WxCUser;
import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.service.WxMerchantBUserService;
import com.iformall.utils.Constant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.support.WebDataBinderFactory;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer;

/**
* 有@LoginUser注解的方法参数,注入当前登录用户
* @author stormeye.wu
* @email wugq@mippoint.com
* @date 2017-03-23 22:02
*/
@Component
public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgumentResolver {
@Autowired
private WxMerchantBUserService wxMerchantBUserService;

@Override
public boolean supportsParameter(MethodParameter parameter) {
return parameter.getParameterType().isAssignableFrom(WxCUser.class) && parameter.hasParameterAnnotation(LoginUser.class);
}

@Override
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer container,
NativeWebRequest request, WebDataBinderFactory factory) throws Exception {
//获取用户ID
Object object = request.getAttribute(Constant.LOGIN_USER_KEY, RequestAttributes.SCOPE_REQUEST);
if(object == null){
return null;
}

//获取用户信息
WxMerchantBUser user = wxMerchantBUserService.getByToken((String)object);

return user;
}
}

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

@@ -197,14 +197,16 @@ public class WxBillRent extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "联营租金", name = "joinRentPrice")
private Long joinRentPrice;

@io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay")
private Integer serviceChargePay;


@TableField(exist = false)
private String serviceChargePayBefore;
@TableField(exist = false)
private String serviceChargePayUpdate;

@io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay")
private Integer serviceChargePay;

@io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
@TableField(exist = false)
private Long realReceivePay;


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

@@ -204,6 +204,8 @@ public class WxCoupon extends BaseEntity {
@TableField(exist = false)
private Integer pressSuccCount;

@io.swagger.annotations.ApiModelProperty(value = "积分售价", name = "scorePrice")
private Long scorePrice;

@io.swagger.annotations.ApiModelProperty(value = "过滤可投放0不过滤 1过滤", name = "filterCanPut")
@TableField(exist = false)


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

@@ -3,6 +3,7 @@ package com.iformall.domain.po;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.common.SortColumn;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.vo.WxShopVo;
import com.iformall.enums.EnumBusiness;
@@ -247,4 +248,19 @@ public class WxMerchant extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "积分锁定0正常1锁定", name = "creditLocked")
private Integer creditLocked;

@TableField(exist = false)
@SortColumn(column = "couponSale")
private String couponSale;

@TableField(exist = false)
@SortColumn(column = "couponPrice")
private String couponPrice;

@TableField(exist = false)
@SortColumn(column = "tradeAmt")
private String tradeAmt;

@TableField(exist = false)
@SortColumn(column = "tradeDate")
private String tradeDate;
}

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

@@ -113,4 +113,15 @@ public class WxBillAllVo {
}
return oweStr;
}

@io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay")
@TableField(exist = false)
private Integer serviceChargePay;

@io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
@TableField(exist = false)
private Long realReceivePay;

@io.swagger.annotations.ApiModelProperty(value = "滞纳金", name = "latePayPrice")
private Long latePayPrice;
}

+ 26
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Просмотреть файл

@@ -131,11 +131,14 @@ public class WxBillAllServiceImpl implements WxBillAllService {

@Autowired
WxBillSettleRecordMapper wxBillSettleRecordMapper;
@Autowired
WxPayAccountBillService wxPayAccountBillService;

@Override
public Map<String, Object> listAsPage(WxBillAll record, Integer pageIndex, Integer pageSize) {
//更新各账单状态
//updateBillStatus(record);
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(record.getTenantId());

if (StringUtils.isNotEmpty(record.getTypeStr())) {
List<Integer> typeList = JSONArray.parseArray(record.getTypeStr(), Integer.class);
@@ -143,6 +146,23 @@ public class WxBillAllServiceImpl implements WxBillAllService {
}
PageInfo<WxBillAllVo> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBillAllMapper.list(record));

//手续费 = 合同应收+手续费+滞纳金
pageInfo.getList().stream().forEach(e->{
//手续费 = 合同应收+手续费+滞纳金
if(e.getReceivePay() != null){
if(e.getLatePayPrice() == null) e.setLatePayPrice(0l);
BigDecimal servicePay;
if(e.getServiceChargePay() != null){
servicePay = new BigDecimal(e.getServiceChargePay());
}else{
servicePay = new BigDecimal(e.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP);
}
Long realReceivePay = servicePay.longValue() + e.getLatePayPrice() + e.getReceivePay();
e.setRealReceivePay(realReceivePay);
e.setServiceChargePay(servicePay.intValue());
}
});

Map<String, Object> result = new HashMap<>();
result.put("pageInfo", pageInfo);
return result;
@@ -1676,6 +1696,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {

@Override
public Map<String, Object> getOweBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize) {
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(record.getTenantId());
PageInfo<Map<String, Object>> pageInfo = PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxBillAllMapper.getOweBillAsPage(record));
List<Map<String, Object>> list = pageInfo.getList();
for (Map<String, Object> map : list) {
@@ -1684,6 +1705,11 @@ public class WxBillAllServiceImpl implements WxBillAllService {
map.put("depositOwe", subZeroAndDot(map.get("depositOwe").toString()));
map.put("otherOwe", subZeroAndDot(map.get("otherOwe").toString()));
map.put("totalOwe", subZeroAndDot(map.get("totalOwe").toString()));

//加上手续费
//todo:把手续费率传进sql,在sql中算,汇总到max,直接出结果
map.put("totalReceivePay", subZeroAndDot(map.get("totalOwe").toString()));

}
pageInfo.setList(list);
Map<String, Object> result = new HashMap<>();


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

@@ -40,10 +40,13 @@
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime"/>

<result column="freeze" property="freeze"/>
<result column="late_pay_price" property="latePayPrice"/>

</resultMap>


<select id="list" parameterType="com.iformall.domain.vo.WxBillAll" resultMap="allVoResultMap">

select
bill.id,bill.tenant_id tenantId,bill.merchant_id merchantId,bill.shop_id shopId,
bill.bill_type_value billTypeValue,bill.bill_type billType,bill.need_pay needPay,
@@ -51,46 +54,46 @@
bill.pay_date payDate,expired_day expiredDay,bill.status,bill.starttime,
bill.endtime,bill.name,bill.rent_shop_type rentShopType,m.name merchantName,
s.shop_number shopNumber, s.manager, s.manager_phone managerPhone,bill.shop_info
shopInfo,bill.comments,bill.price_detail,updatetime,bill.freeze
shopInfo,bill.comments,bill.price_detail,updatetime,bill.freeze,bill.late_pay_price
from (
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,''
price_detail,updatetime,freeze
price_detail,updatetime,freeze,late_pay_price
from wx_bill_rent where tenant_id=#{tenantId} and is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_rent_deposit where
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze,'' late_pay_price from wx_bill_rent_deposit where
tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,''
price_detail,updatetime,freeze
price_detail,updatetime,freeze,late_pay_price
from wx_bill_property where tenant_id=#{tenantId} and is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_property_deposit where
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze,'' late_pay_price from wx_bill_property_deposit where
tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name,
case when type=1 then 5 when type=2 then 6 else 9 end bill_type_value,
case when type=1 then '水费' when type=2 then '电费' else '空调费' end bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,
rent_shop_type,'[]' shop_info, NULL comments,price_detail,updatetime,freeze
rent_shop_type,'[]' shop_info, NULL comments,price_detail,updatetime,freeze,'' late_pay_price
from wx_bill_daily where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,concat('其他费用-',name) as bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze,'' late_pay_price
from wx_bill_other where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,concat('其他押金-',comments) as
bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze,'' late_pay_price
from wx_bill_other_deposit where tenant_id=#{tenantId}
) bill
left join wx_merchant m on bill.merchant_id=m.id
@@ -642,6 +645,7 @@
round((bill.depositReceivePay-bill.depositPay)/100,2) depositReceivePay,
round((bill.otherReceivePay-bill.otherPay)/100,2) otherReceivePay,
round((bill.rentReceivePay+bill.propertyReceivePay+bill.depositReceivePay+bill.otherReceivePay
+bill.rentLatePay+bill.propertyLatePay+bill.depositLatePay+bill.otherLatePay
-bill.rentPay-bill.propertyPay-bill.depositPay-bill.otherPay)/100,2) totalReceivePay
</when>
<otherwise>
@@ -649,7 +653,7 @@
round(bill.propertyReceivePay/100,2) propertyReceivePay,
round(bill.depositReceivePay/100,2) depositReceivePay,
round(bill.otherReceivePay/100,2) otherReceivePay,
round((bill.rentReceivePay+bill.propertyReceivePay+bill.depositReceivePay+bill.otherReceivePay)/100,2) totalReceivePay
round((bill.rentReceivePay+bill.propertyReceivePay+bill.depositReceivePay+bill.otherReceivePay+bill.rentLatePay+bill.propertyLatePay+bill.depositLatePay+bill.otherLatePay )/100,2) totalReceivePay
</otherwise>
</choose>

@@ -669,22 +673,28 @@
max(case oweList.bill_type when '租金' then oweList.pay else 0 end) rentPay,
max(case oweList.bill_type when '物业费' then oweList.pay else 0 end) propertyPay,
max(case oweList.bill_type when '欠缴押金' then oweList.pay else 0 end) depositPay,
max(case oweList.bill_type when '其他费用' then oweList.pay else 0 end) otherPay
max(case oweList.bill_type when '其他费用' then oweList.pay else 0 end) otherPay,

max(case oweList.bill_type when '租金' then oweList.latePayPrice else 0 end) rentLatePay,
max(case oweList.bill_type when '物业费' then oweList.latePayPrice else 0 end) propertyLatePay,
max(case oweList.bill_type when '欠缴押金' then oweList.latePayPrice else 0 end) depositLatePay,
max(case oweList.bill_type when '其他费用' then oweList.latePayPrice else 0 end) otherLatePay

from(
select bill.tenant_id,bill.merchant_id,bill.bill_type,sum(owe) owe,bill.receive_date,bill.expired_day,sum(bill.receive_pay) receive_pay,sum(bill.pay) pay from (
select bill.tenant_id,bill.merchant_id,bill.bill_type,sum(owe) owe,bill.receive_date,bill.expired_day,sum(bill.receive_pay) receive_pay,sum(bill.pay) pay,sum(bill.late_pay_price) latePayPrice from (

select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent where tenant_id = #{tenantId} and is_preview = 0
endtime,rent_shop_type,late_pay_price from wx_bill_rent where tenant_id = #{tenantId} and is_preview = 0
<include refid="getOweBillAsPageConditions"/>
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property where tenant_id = #{tenantId} and is_preview = 0
endtime,rent_shop_type,late_pay_price from wx_bill_property where tenant_id = #{tenantId} and is_preview = 0
<include refid="getOweBillAsPageConditions"/>
union all
select res.id,res.merchant_id,res.shop_id,res.tenant_id,res.name,res.bill_type_value,res.bill_type,res.need_pay,
res.receive_pay,res.pay,res.owe owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type from(
res.receive_pay,res.pay,res.owe owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type,0 late_pay_price from(
select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,2 bill_type_value,'欠缴押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent_deposit where tenant_id = #{tenantId}
@@ -702,7 +712,7 @@
) res
union all
select res.id,res.merchant_id,res.shop_id,res.tenant_id,res.name,res.bill_type_value,res.bill_type,res.need_pay,
res.receive_pay,res.pay,res.owe owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type from(
res.receive_pay,res.pay,res.owe owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type,0 late_pay_price from(
select id,merchant_id,shop_id,tenant_id,'其他费用' name,5 bill_type_value,'其他费用' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where tenant_id = #{tenantId} and type in(1,2,3)


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

@@ -44,6 +44,8 @@
<result column="conditions" jdbcType="VARCHAR" property="conditions"/>
<result column="approval_type" property="approvalType"/>
<result column="password_support" property="passwordSupport"/>
<result column="score_price" property="scorePrice"/>

</resultMap>
<resultMap id="statisMap" type="com.iformall.domain.vo.WxCouponStatisVo">
<id column="id" jdbcType="BIGINT" property="id"/>
@@ -89,14 +91,14 @@
<result column="sum_subsidy" property="sumSubsidy"/>
<result column="payment_rate" property="paymentRate"/>
<result column="change_rate" property="changeRate"/>
<result column="score_price" property="scorePrice"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`type`,`cover_img`,`cover_picture`,`detail_picture`,`title`,`sub_title`,`sale_price`,`use_price`,`use_limit_quantity`,`send_type`,
`valid_type`,`valid_start_date`,`valid_end_date`,`valid_days`,`detail`,`price`,`unit`,`remain_inventory`,`inventory`,
`remark`,`status`,`create_date`,`update_date`,`business`,`sub_business`,`support_transfer`,`subsidy_num`,`subsidy_type`,
`press_limit_num`, `press_limit_hours`, `auto_refund`,`credit_price`,`credit_refund`,`put_apply_status`,`stock_apply_status`,`cancle_apply_status`,`conditions`,approval_type
`press_limit_num`, `press_limit_hours`, `auto_refund`,`credit_price`,`credit_refund`,`put_apply_status`,`stock_apply_status`,`cancle_apply_status`,`conditions`,approval_type,score_price
</sql>

<sql id="statusColumns">


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

@@ -505,7 +505,9 @@
<if test="endtime != null">
and o.create_date &lt;= #{endtime}
</if>
order by o.create_date desc
<if test=" null != sortColumns">order by ${sortColumns}</if>
<if test=" null == sortColumns">order by o.create_date desc</if>

</select>

<select id="findByTrade" parameterType="java.util.Map" resultMap="BaseResultMap">


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