|
@@ -16,6 +16,7 @@ import com.diagbot.entity.ProductOrderIndex;
|
|
|
import com.diagbot.entity.wrapper.OrderDetailsWapper;
|
|
|
import com.diagbot.entity.wrapper.ProductOrderWrapper;
|
|
|
import com.diagbot.enums.AuditStatusEnum;
|
|
|
+import com.diagbot.enums.AuthStatusEnum;
|
|
|
import com.diagbot.enums.NotPassEnum;
|
|
|
import com.diagbot.enums.VisibleIdTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
@@ -118,6 +119,19 @@ public class ProductOrderFacade extends ProductOrderServiceImpl {
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
List<Long> opendId = openedProductsFacade.getOpendCountByUserId(userId);
|
|
|
List<Long> orderDetailsId = orderDetailsFacade.getOrderDetailsByUser(userId);
|
|
|
+ List<Long> userIdList =new ArrayList<>();
|
|
|
+ userIdList.add(userId);
|
|
|
+ RespDTO<Map<Long, UserOrgDTO>> mapRespDTO = userServiceClient.getUserAndOrg(userIdList);
|
|
|
+ if (mapRespDTO == null || !"0".equals(mapRespDTO.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "获取用户机构信息失败");
|
|
|
+ }
|
|
|
+ Map<Long, UserOrgDTO> dataMap =mapRespDTO.data;
|
|
|
+ UserOrgDTO uo =dataMap.get(userId);
|
|
|
+ if(uo.getAuStatus() != AuthStatusEnum.Authorized.getKey()){
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "账号信息系不完善,请先认证");
|
|
|
+ }
|
|
|
for (int i =0; i<addOrderVO.getProductId().size();i++){
|
|
|
for (int j =0; j<opendId.size();j++){
|
|
|
if(addOrderVO.getProductId().get(i)==opendId.get(j)){
|