Commit 418f5040 by zhengxj

finish 服务商用户不做数据权限处理 on 20190320 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18736 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 9a2e4ce4
...@@ -226,7 +226,8 @@ public class OrderServiceImpl implements IOrderService { ...@@ -226,7 +226,8 @@ public class OrderServiceImpl implements IOrderService {
// //
// 订单渠道过滤 // 订单渠道过滤
List<Integer> dataRight = new ArrayList<>(); List<Integer> dataRight = new ArrayList<>();
// 非服务商用户 按数据权限获取订单数据
if (BizConstants.USER_TYPE_MERCHANT != userType){
if (userId == BizConstants.USER_TYPE_AMIN) { if (userId == BizConstants.USER_TYPE_AMIN) {
// 超级管理员 // 超级管理员
dataRight = orderChannelDao.getDataRight(null, oueryOrderReq.getOrderChannel()); dataRight = orderChannelDao.getDataRight(null, oueryOrderReq.getOrderChannel());
...@@ -241,6 +242,10 @@ public class OrderServiceImpl implements IOrderService { ...@@ -241,6 +242,10 @@ public class OrderServiceImpl implements IOrderService {
return orderDao.selectByExample(example); return orderDao.selectByExample(example);
} }
criteria.andShopIdIn(dataRight); criteria.andShopIdIn(dataRight);
}else{
// 服务商用户只能查看自己的订单
criteria.andMerchantIdEqualTo(userId);
}
// 订单编号 // 订单编号
if (oueryOrderReq.getOrderSn() != null) { if (oueryOrderReq.getOrderSn() != null) {
...@@ -267,12 +272,11 @@ public class OrderServiceImpl implements IOrderService { ...@@ -267,12 +272,11 @@ public class OrderServiceImpl implements IOrderService {
// 订单状态 // 订单状态
Byte orderStatus = oueryOrderReq.getOrderStatus(); Byte orderStatus = oueryOrderReq.getOrderStatus();
List<Byte> values = new ArrayList<>(); List<Byte> values = new ArrayList<>();
if (userType == 2) { if (BizConstants.USER_TYPE_SHOP == userType) {
// 门店端 // 门店端
// 待接单(状态1、状态2、状态3、状态4、状态5)、 // 待接单(状态1、状态2、状态3、状态4、状态5)、
// 已接单(状态6、状态7)、 // 已接单(状态6、状态7)、
// 已完成(状态8) // 已完成(状态8)
criteria.andShopIdEqualTo(userId); criteria.andShopIdEqualTo(userId);
if (orderStatus != null) { if (orderStatus != null) {
switch (orderStatus) { switch (orderStatus) {
...@@ -300,7 +304,7 @@ public class OrderServiceImpl implements IOrderService { ...@@ -300,7 +304,7 @@ public class OrderServiceImpl implements IOrderService {
break; break;
} }
} }
} else if (userType == 3) { } else if (BizConstants.USER_TYPE_MECHANIC == userType) {
// 技工端 待接单(状态4) // 技工端 待接单(状态4)
// 待完成(状态6、状态7) // 待完成(状态6、状态7)
// 已完成(状态8) // 已完成(状态8)
...@@ -327,7 +331,7 @@ public class OrderServiceImpl implements IOrderService { ...@@ -327,7 +331,7 @@ public class OrderServiceImpl implements IOrderService {
break; break;
} }
} }
} else if (userType == 1) { } else if (BizConstants.USER_TYPE_MERCHANT == userType) {
// 服务商端 // 服务商端
// 待指派(状态1、状态2、状态5)、 // 待指派(状态1、状态2、状态5)、
// 待接单(状态4)(对于服务商来说,技工是否接单都是未完成状态) // 待接单(状态4)(对于服务商来说,技工是否接单都是未完成状态)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!