Browse Source

Merge commit '998825767f8465f294dd4a07314931e236e5ede7' into release

release_toaliyun_real
luozukai 6 years ago
parent
commit
fb271fceb1
3 changed files with 13 additions and 2 deletions
  1. +2
    -0
      mallinkAdmin/src/test/java/com/iformall/service/test/Test.java
  2. +10
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  3. +1
    -2
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml

+ 2
- 0
mallinkAdmin/src/test/java/com/iformall/service/test/Test.java View File

@@ -148,6 +148,8 @@ public class Test {
WxBillAll wxBillAll = new WxBillAll(); WxBillAll wxBillAll = new WxBillAll();
wxBillAll.setTenantId("456"); wxBillAll.setTenantId("456");
wxBillAll.setMerchantId(324754110547066880l); wxBillAll.setMerchantId(324754110547066880l);
wxBillAll.setPageIndex(1);
wxBillAll.setPageSize(6);
System.out.println("--------"+JsonUtil.obj2Json(wxBillAllService.listBill(wxBillAll))); System.out.println("--------"+JsonUtil.obj2Json(wxBillAllService.listBill(wxBillAll)));
} }
} }

+ 10
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java View File

@@ -191,6 +191,16 @@ public class WxBillAllServiceImpl implements WxBillAllService {
if (wxBillAll.getPageIndex() != null && wxBillAll.getPageIndex() != null) { if (wxBillAll.getPageIndex() != null && wxBillAll.getPageIndex() != null) {
PageHelper.startPage(wxBillAll.getPageIndex(), wxBillAll.getPageSize()); PageHelper.startPage(wxBillAll.getPageIndex(), wxBillAll.getPageSize());
List<Map<String, Object>> maps = wxBillAllMapper.listData(wxBillAll); List<Map<String, Object>> maps = wxBillAllMapper.listData(wxBillAll);
for (Map<String, Object> map:maps) {
Integer billType = ((Long)map.get("billTypeValue")).intValue();
if(EnumBillType.SETTLE.getCode().equals(billType)){
BigDecimal rp = (BigDecimal)map.get("receivePay");
WxBillSettle query = new WxBillSettle();
query.setId((Long)map.get("id"));
Long sum = wxBillSettleRecordMapper.getSumMoneyBySettleId(query);
map.put("owe",rp.subtract(new BigDecimal(sum)));
}
}
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(maps); PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(maps);
return new ResultData(pageInfo); return new ResultData(pageInfo);
} }


+ 1
- 2
mallinkService/src/main/resources/mapper/WxBillAllMapper.xml View File

@@ -811,12 +811,11 @@
left join wx_rent_contract rc on(rc.merchant_id = m.id) left join wx_rent_contract rc on(rc.merchant_id = m.id)
where m.status=1 where m.status=1
) tt where 1=1 ) tt where 1=1

<if test=" null != tenantId"> and tt.tenant_id = #{tenantId} </if> <if test=" null != tenantId"> and tt.tenant_id = #{tenantId} </if>
<if test=" null != merchantId"> and tt.id = #{merchantId} </if> <if test=" null != merchantId"> and tt.id = #{merchantId} </if>
<if test=" null != merchantName and ''!=merchantName">and tt.name like concat('%', #{merchantName},'%')</if> <if test=" null != merchantName and ''!=merchantName">and tt.name like concat('%', #{merchantName},'%')</if>
<if test=" null != rentShopType"> and tt.rent_shop_type = #{rentShopType} </if> <if test=" null != rentShopType"> and tt.rent_shop_type = #{rentShopType} </if>
and (receivePay >0 or payOut>0)
<if test=" null != sortColumns"> order by ${sortColumns} </if> <if test=" null != sortColumns"> order by ${sortColumns} </if>
<if test=" null == sortColumns"> order by tt.id desc </if> <if test=" null == sortColumns"> order by tt.id desc </if>
</select> </select>


Loading…
Cancel
Save