|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.DateUtil; | 
|---|
|  |  |  | import com.doumee.core.utils.Utils; | 
|---|
|  |  |  | import com.doumee.core.wx.WxMiniConfig; | 
|---|
|  |  |  | import com.doumee.dao.business.WxBillDetailMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.model.WxBill; | 
|---|
|  |  |  | import com.doumee.dao.business.model.WxBillDetail; | 
|---|
|  |  |  | import com.doumee.service.business.WxBillDetailService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public WxBillDetail findOne(WxBillDetail wxBillDetail) { | 
|---|
|  |  |  | QueryWrapper<WxBillDetail> wrapper = new QueryWrapper<>(wxBillDetail); | 
|---|
|  |  |  | return wxBillDetailMapper.selectOne(wrapper); | 
|---|
|  |  |  | return wxBillDetailMapper.selectOne(wrapper.last(" limit 1")); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | 
|---|
|  |  |  | if (pageWrap.getModel().getRateRemark() != null) { | 
|---|
|  |  |  | queryWrapper.lambda().eq(WxBillDetail::getRateRemark, pageWrap.getModel().getRateRemark()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | queryWrapper.lambda().ge(pageWrap.getModel().getStartDate() !=null, WxBillDetail::getPid,DateUtil.getShortDateStr(pageWrap.getModel().getStartDate())); | 
|---|
|  |  |  | queryWrapper.lambda().le(pageWrap.getModel().getEndDate() !=null,WxBillDetail::getPid, DateUtil.getShortDateStr(pageWrap.getModel().getEndDate())); | 
|---|
|  |  |  | //自行车交易 | 
|---|
|  |  |  | queryWrapper.lambda().eq(pageWrap.getModel().getIsBikeFee() != null&&pageWrap.getModel().getIsBikeFee().intValue() ==0, WxBillDetail::getAppid, WxMiniConfig.wxPayService.getConfig().getAppId()); | 
|---|
|  |  |  | //非自行车交易 | 
|---|
|  |  |  | queryWrapper.lambda().ne(pageWrap.getModel().getIsBikeFee() != null&&pageWrap.getModel().getIsBikeFee().intValue() ==1, WxBillDetail::getAppid, WxMiniConfig.wxPayService.getConfig().getAppId()); | 
|---|
|  |  |  | for(PageWrap.SortData sortData: pageWrap.getSorts()) { | 
|---|
|  |  |  | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { | 
|---|
|  |  |  | queryWrapper.orderByDesc(sortData.getProperty()); | 
|---|