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,21 +226,26 @@ public class OrderServiceImpl implements IOrderService {
//
// 订单渠道过滤
List<Integer> dataRight = new ArrayList<>();
if (userId == BizConstants.USER_TYPE_AMIN) {
// 超级管理员
dataRight = orderChannelDao.getDataRight(null, oueryOrderReq.getOrderChannel());
} else {
dataRight = orderChannelDao.getDataRight(userId, oueryOrderReq.getOrderChannel());
}
if (dataRight == null || dataRight.size() == 0) {
// 集团下无商户
logger.info("");
PageHelper.startPage(page.getPageIndex(), page.getPageSize(), true);
criteria.andIdEqualTo(-200);
return orderDao.selectByExample(example);
// 非服务商用户 按数据权限获取订单数据
if (BizConstants.USER_TYPE_MERCHANT != userType){
if (userId == BizConstants.USER_TYPE_AMIN) {
// 超级管理员
dataRight = orderChannelDao.getDataRight(null, oueryOrderReq.getOrderChannel());
} else {
dataRight = orderChannelDao.getDataRight(userId, oueryOrderReq.getOrderChannel());
}
if (dataRight == null || dataRight.size() == 0) {
// 集团下无商户
logger.info("");
PageHelper.startPage(page.getPageIndex(), page.getPageSize(), true);
criteria.andIdEqualTo(-200);
return orderDao.selectByExample(example);
}
criteria.andShopIdIn(dataRight);
}else{
// 服务商用户只能查看自己的订单
criteria.andMerchantIdEqualTo(userId);
}
criteria.andShopIdIn(dataRight);
// 订单编号
if (oueryOrderReq.getOrderSn() != null) {
......@@ -267,12 +272,11 @@ public class OrderServiceImpl implements IOrderService {
// 订单状态
Byte orderStatus = oueryOrderReq.getOrderStatus();
List<Byte> values = new ArrayList<>();
if (userType == 2) {
if (BizConstants.USER_TYPE_SHOP == userType) {
// 门店端
// 待接单(状态1、状态2、状态3、状态4、状态5)、
// 已接单(状态6、状态7)、
// 已完成(状态8)
criteria.andShopIdEqualTo(userId);
if (orderStatus != null) {
switch (orderStatus) {
......@@ -300,7 +304,7 @@ public class OrderServiceImpl implements IOrderService {
break;
}
}
} else if (userType == 3) {
} else if (BizConstants.USER_TYPE_MECHANIC == userType) {
// 技工端 待接单(状态4)
// 待完成(状态6、状态7)
// 已完成(状态8)
......@@ -327,7 +331,7 @@ public class OrderServiceImpl implements IOrderService {
break;
}
}
} else if (userType == 1) {
} else if (BizConstants.USER_TYPE_MERCHANT == userType) {
// 服务商端
// 待指派(状态1、状态2、状态5)、
// 待接单(状态4)(对于服务商来说,技工是否接单都是未完成状态)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!