|
@@ -319,9 +319,9 @@ public class FrontOrderServiceImpl implements FrontOrderService {
|
|
|
@Override
|
|
|
public OrderNoResponse createOrder(CreateOrderRequest orderRequest) {
|
|
|
User user = userService.getInfo();
|
|
|
- //if (user ==null) {
|
|
|
- // throw new CrmebException("获取用户信息失败无法创建订单");
|
|
|
- //}
|
|
|
+ if (user ==null) {
|
|
|
+ throw new CrmebException("获取用户信息失败无法创建订单");
|
|
|
+ }
|
|
|
//if(Strings.isNullOrEmpty(user.getPhone())){
|
|
|
// throw new CrmebException("请添加手机号");
|
|
|
//}
|
|
@@ -408,6 +408,7 @@ public class FrontOrderServiceImpl implements FrontOrderService {
|
|
|
UserEnterprise userEnterprise = userEnterpriseService.getOne(enterpriseLambdaQueryWrapper);
|
|
|
if (null != userEnterprise) {
|
|
|
order.setProcureUnit(userEnterprise.getEnterpriseName());
|
|
|
+ order.setEnterpriseId(userEnterprise.getId());
|
|
|
}
|
|
|
|
|
|
} else if (3 == isEnterpriseUser) {
|
|
@@ -419,6 +420,7 @@ public class FrontOrderServiceImpl implements FrontOrderService {
|
|
|
Integer enterpriseId = userBypassAccount.getEnterpriseId();
|
|
|
UserEnterprise userEnterprise = userEnterpriseService.getById(enterpriseId);
|
|
|
order.setProcureUnit(userEnterprise.getEnterpriseName());
|
|
|
+ order.setEnterpriseId(enterpriseId);
|
|
|
} else {
|
|
|
order.setProcureUnit("");
|
|
|
}
|
|
@@ -431,7 +433,7 @@ public class FrontOrderServiceImpl implements FrontOrderService {
|
|
|
}
|
|
|
|
|
|
//企业子账户只能看自己企业的订单
|
|
|
- if (2 == user.getIsEnterpriseUser() || 3 == user.getIsEnterpriseUser()) {
|
|
|
+/* if (2 == user.getIsEnterpriseUser() || 3 == user.getIsEnterpriseUser()) {
|
|
|
LambdaQueryWrapper<UserBypassAccount> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(UserBypassAccount::getUserId, user.getId());
|
|
|
queryWrapper.eq(UserBypassAccount::getIsDelete, 0);
|
|
@@ -449,7 +451,7 @@ public class FrontOrderServiceImpl implements FrontOrderService {
|
|
|
order.setEnterpriseId(enterpriseId);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
// 商户订单
|
|
|
List<Integer> couponIdList = CollUtil.newArrayList();
|