Commit 0b78358d by zhengxj

finish 订单渠道搜索 on 20190319 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18658 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent de1d882f
...@@ -212,7 +212,7 @@ public class OrderServiceImpl implements IOrderService { ...@@ -212,7 +212,7 @@ public class OrderServiceImpl implements IOrderService {
public List<SysOrder> selectByExample(SysOrderExample example, Page page, QueryOrderReq oueryOrderReq, Integer userId){ public List<SysOrder> selectByExample(SysOrderExample example, Page page, QueryOrderReq oueryOrderReq, Integer userId){
JSONObject user = getUserInfo(userId); JSONObject user = getUserInfo(userId);
List<SysOrder> orderList = new ArrayList<>();
Criteria criteria = example.createCriteria().andActiveStatusNotEqualTo((byte)OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_DELETED.getActiveStatus()); Criteria criteria = example.createCriteria().andActiveStatusNotEqualTo((byte)OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_DELETED.getActiveStatus());
List<Integer> Ids = new ArrayList<>(); List<Integer> Ids = new ArrayList<>();
example.setOrderByClause("create_time desc"); example.setOrderByClause("create_time desc");
...@@ -227,14 +227,23 @@ public class OrderServiceImpl implements IOrderService { ...@@ -227,14 +227,23 @@ public class OrderServiceImpl implements IOrderService {
// criteria.andMerchantIdEqualTo(userId); // criteria.andMerchantIdEqualTo(userId);
// //
// } // }
//
// 订单渠道过滤 // 订单渠道过滤
List<Integer> dataRight=new ArrayList<>();
if (userId == BizConstants.USER_TYPE_AMIN){ if (userId == BizConstants.USER_TYPE_AMIN){
// 超级管理员 // 超级管理员
criteria.andShopIdIn(orderChannelDao.getDataRight(null, oueryOrderReq.getOrderChannel())); dataRight=orderChannelDao.getDataRight(null, oueryOrderReq.getOrderChannel());
}else{ }else{
criteria.andShopIdIn(orderChannelDao.getDataRight(userId, oueryOrderReq.getOrderChannel())); dataRight=orderChannelDao.getDataRight(userId, oueryOrderReq.getOrderChannel());
} }
if (dataRight == null || dataRight.size() == 0) {
// 集团下无商户
PageHelper.startPage(page.getPageIndex(), page.getPageSize(), true);
example.createCriteria().andIdEqualTo(-200);
return orderDao.selectByExample(example);
}
criteria.andShopIdIn(dataRight);
// 订单编号 // 订单编号
if (oueryOrderReq.getOrderSn() != null) { if (oueryOrderReq.getOrderSn() != null) {
...@@ -426,7 +435,6 @@ public class OrderServiceImpl implements IOrderService { ...@@ -426,7 +435,6 @@ public class OrderServiceImpl implements IOrderService {
} }
List<SysOrder> orderList = new ArrayList<>();
// 传递的是技工名字,且搜索不到该技工 // 传递的是技工名字,且搜索不到该技工
if (oueryOrderReq.getMachanicInfo() != null if (oueryOrderReq.getMachanicInfo() != null
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!