master
wangning 7 years ago
parent d2ed6455d1
commit 8f0ed0f051

@ -55,17 +55,8 @@ public class BillOrderServiceImpl implements BillOrderService {
if (bill.getIntValue("client_id") != client_id) {
throw new BadRequestException("You have no right to check this bill");
}
PageList<JSONObject> list = billOrderMapper.queryWithWechatInfo(bill_id, queryBillOrderBean.toParams(),
PageList<JSONObject> list = billOrderMapper.query(bill_id, queryBillOrderBean.toParams(),
new PageBounds(queryBillOrderBean.getPage(), queryBillOrderBean.getLimit()));
for (JSONObject jsonObject : list) {
if ("Alipay".equals(jsonObject.getString("channel"))) {
JSONObject alipayInfo = customerRelationAlipayMapper.findCustomerByUserId(jsonObject.getString("customer_id"));
if (alipayInfo != null) {
jsonObject.put("nickname", alipayInfo.getString("nickname"));
jsonObject.put("headimg", alipayInfo.getString("headimg"));
}
}
}
return PageListUtils.buildPageListResult(list);
}

@ -35,7 +35,5 @@ public interface BillOrderMapper {
PageList<JSONObject> query(@Param("bill_id") String bill_id, @Param("param") JSONObject jsonObject, PageBounds pageBounds);
PageList<JSONObject> queryWithWechatInfo(@Param("bill_id") String bill_id, @Param("param") JSONObject jsonObject, PageBounds pageBounds);
JSONObject analysis(@Param("bill_id")String bill_id,@Param("param")JSONObject jsonObject);
}

@ -21,15 +21,6 @@
</if>
order by create_time
</select>
<select id="queryWithWechatInfo" resultType="com.alibaba.fastjson.JSONObject">
select o.*,r.nickname,r.headimg from pmt_bill_order o left join sys_customer_relation r on r.wechat_openid = o.customer_id
where
bill_id = #{bill_id}
<if test="param.status != null">
and order_status = #{param.status}
</if>
order by create_time
</select>
<select id="analysis" resultType="com.alibaba.fastjson.JSONObject">
select count(1) counts from pmt_bill_order

Loading…
Cancel
Save