|
@@ -6,6 +6,7 @@ import com.diagbot.client.UserServiceClient;
|
|
|
import com.diagbot.dto.AuthDetailDTO;
|
|
|
import com.diagbot.dto.OrderDetialsDTO;
|
|
|
import com.diagbot.dto.ProductAuthProgressDTO;
|
|
|
+import com.diagbot.dto.ProductLineDTO;
|
|
|
import com.diagbot.dto.ProductOrderDTO;
|
|
|
import com.diagbot.dto.ProductOrderExportDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
@@ -19,6 +20,7 @@ import com.diagbot.entity.User;
|
|
|
import com.diagbot.entity.wrapper.ProductOrderWrapper;
|
|
|
import com.diagbot.enums.AuditStatusEnum;
|
|
|
import com.diagbot.enums.AuthStatusEnum;
|
|
|
+import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.NotPassEnum;
|
|
|
import com.diagbot.enums.VisibleIdTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
@@ -44,7 +46,6 @@ import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 订单业务
|
|
@@ -157,6 +158,7 @@ public class ProductOrderFacade extends ProductOrderServiceImpl {
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
List<Long> opendId = openedProductsFacade.getOpendCountByUserId(userId);
|
|
|
List<Long> orderDetailsId = orderDetailsFacade.getOrderDetailsByUser(userId);
|
|
|
+ List<ProductLineDTO> productList = lantoneProductFacade.productLinesB();
|
|
|
List<Long> userIdList =new ArrayList<>();
|
|
|
userIdList.add(userId);
|
|
|
RespDTO<Map<Long, UserOrgDTO>> mapRespDTO = userServiceClient.getUserAndOrg(userIdList);
|
|
@@ -171,6 +173,12 @@ public class ProductOrderFacade extends ProductOrderServiceImpl {
|
|
|
"账号信息系不完善,请先认证");
|
|
|
}
|
|
|
for (int i =0; i<addOrderVO.getProductId().size();i++){
|
|
|
+ for(int l = 0; l< productList.size(); l++){
|
|
|
+ if(addOrderVO.getProductId().get(l).intValue() == productList.get(l).getId().intValue() && productList.get(l).getIsDeleted().equals(IsDeleteEnum.Y.getKey())){
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS,
|
|
|
+ "【"+productList.get(l).getName()+"】产品已删除,请刷新重试");
|
|
|
+ }
|
|
|
+ }
|
|
|
for (int j =0; j<opendId.size();j++){
|
|
|
if(addOrderVO.getProductId().get(i)==opendId.get(j)){
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "请勿重复提交已开通产品");
|