| @@ -122,9 +122,7 @@ public class AliBusinessCircleOrderController extends BaseController { | |||||
| if (null == circleOrder) { | if (null == circleOrder) { | ||||
| circleOrder = new AliBusinessCircleOrder(); | circleOrder = new AliBusinessCircleOrder(); | ||||
| } | } | ||||
| // circleOrder.updateTenantInfo(getTenantInfo()); | |||||
| circleOrder.setTenantId("789"); | |||||
| circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||||
| final PageInfo<AlipayOrWxStatistics> page = aliBusinessCircleOrderService.aliPayList(circleOrder, pageNum, pageSize); | final PageInfo<AlipayOrWxStatistics> page = aliBusinessCircleOrderService.aliPayList(circleOrder, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -118,9 +118,7 @@ public class WxBusinessCircleOrderController extends BaseController { | |||||
| if (null == circleOrder) { | if (null == circleOrder) { | ||||
| circleOrder = new WxBusinessCircleOrder(); | circleOrder = new WxBusinessCircleOrder(); | ||||
| } | } | ||||
| // circleOrder.updateTenantInfo(getTenantInfo()); | |||||
| circleOrder.setTenantId("789"); | |||||
| circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||||
| final PageInfo<AlipayOrWxStatistics> page = wxBusinessCircleOrderService.wxPayList(circleOrder, pageNum, pageSize); | final PageInfo<AlipayOrWxStatistics> page = wxBusinessCircleOrderService.wxPayList(circleOrder, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -389,6 +389,9 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder | |||||
| List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | ||||
| if (!CollectionUtils.isEmpty(ids)) { | if (!CollectionUtils.isEmpty(ids)) { | ||||
| record.setMerchantIds(ids); | record.setMerchantIds(ids); | ||||
| }else{ | |||||
| ids.add(-999l); | |||||
| record.setMerchantIds(ids); | |||||
| } | } | ||||
| } | } | ||||
| @@ -564,6 +564,9 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe | |||||
| List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | ||||
| if (!CollectionUtils.isEmpty(ids)) { | if (!CollectionUtils.isEmpty(ids)) { | ||||
| record.setMerchantIds(ids); | record.setMerchantIds(ids); | ||||
| }else{ | |||||
| ids.add(-999l); | |||||
| record.setMerchantIds(ids); | |||||
| } | } | ||||
| } | } | ||||
| @@ -229,7 +229,7 @@ | |||||
| and is_refund = 1 | and is_refund = 1 | ||||
| </select> | </select> | ||||
| <select id="aliPayList" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||||
| <select id="aliPayList" parameterType="com.iformall.domain.po.AliBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||||
| SELECT SUM(pay_amount) as 'payAmount', | SELECT SUM(pay_amount) as 'payAmount', | ||||
| SUM(refund_amount) as 'refundAmount', | SUM(refund_amount) as 'refundAmount', | ||||
| merchant_id as 'merchantId', | merchant_id as 'merchantId', | ||||
| @@ -241,7 +241,8 @@ | |||||
| #{id} | #{id} | ||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| GROUP BY merchant_id,is_refund; | |||||
| GROUP BY merchant_id,is_refund | |||||
| order by payAmount desc; | |||||
| </select> | </select> | ||||
| </mapper> | </mapper> | ||||
| @@ -261,7 +261,7 @@ | |||||
| and is_refund = 1 | and is_refund = 1 | ||||
| </select> | </select> | ||||
| <select id="wxPayList" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||||
| <select id="wxPayList" parameterType="com.iformall.domain.po.WxBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||||
| SELECT SUM(pay_amount) as 'payAmount', | SELECT SUM(pay_amount) as 'payAmount', | ||||
| SUM(refund_amount) as 'refundAmount', | SUM(refund_amount) as 'refundAmount', | ||||
| merchant_id as 'merchantId', | merchant_id as 'merchantId', | ||||
| @@ -273,6 +273,7 @@ | |||||
| #{id} | #{id} | ||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| GROUP BY merchant_id,is_refund; | |||||
| GROUP BY merchant_id,is_refund | |||||
| order by payAmount desc; | |||||
| </select> | </select> | ||||
| </mapper> | </mapper> | ||||