Commit cee4db8e authored by jiaorz's avatar jiaorz

Merge branch 'master-invoice-modular' into dev

parents fbcfd409 1cf9b445
......@@ -116,9 +116,10 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
return ObjectRestResponse.createFailedResult(ResultCode.RSTOKEN_EXPIRED_CODE, ResultCode.getMsg(ResultCode.RSTOKEN_EXPIRED_CODE));
}
Example example = new Example(OrderInvoice.class);
example.createCriteria().andEqualTo("userId", appUserDTO.getUserid());
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("userId", appUserDTO.getUserid());
if (type != null) {
example.createCriteria().andEqualTo("type", type);
criteria.andEqualTo("type", type);
}
return ObjectRestResponse.succ(mapper.selectByExample(example));
}
......@@ -130,9 +131,10 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
*/
public ObjectRestResponse<List<OrderInvoice>> selectByUserId(Integer userId, Integer type) {
Example example = new Example(OrderInvoice.class);
example.createCriteria().andEqualTo("userId", userId);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("userId", userId);
if (type != null) {
example.createCriteria().andEqualTo("type", type);
criteria.andEqualTo("type", type);
}
return ObjectRestResponse.succ(mapper.selectByExample(example));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment