提交 04449d53 作者: chaining

feat: 墙盒申请增加获取当前账号供应商

父级 bb6410d3
......@@ -74,20 +74,20 @@ public class WallboxApplyController {
Integer status = order.getStatus();
// 检查订单状态是否在0-43之间
boolean allowed = status >= OrderStatus.DISPATCHING.getType() && status <= OrderStatus.INSTALLING.getType();
// if (!allowed) {
// throw new ServiceException("订单已在安装中,无法申请");
// }
if (!allowed) {
throw new ServiceException("订单已在安装中,无法申请");
}
SessionInfo loginUser = tokenService.getUser();
String userId = loginUser.getUserId();
// SupplierStaff infoByAccount = supplierStaffService.getByAccountId(Integer.valueOf(userId));
// Supplier supplier = supplierService.getById(infoByAccount.getSupplierId());
// if (supplier == null) {
// throw new ServiceException("供应商不存在");
// }
SupplierStaff infoByAccount = supplierStaffService.getByAccountId(Integer.valueOf(userId));
Supplier supplier = supplierService.getById(infoByAccount.getSupplierId());
if (supplier == null) {
throw new ServiceException("供应商不存在");
}
WallboxApply wa = new WallboxApply();
wa.setSupplierId(2L);
wa.setSupplierTeam("服务商-万帮云安装");
wa.setSupplierId(Long.valueOf(supplier.getId()));
wa.setSupplierTeam(supplier.getName());
wa.setOrderId(orderId);
wa.setIfEmergency(ifEmergency);
wa.setCreateAccount(tokenService.getUser().getUserId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论