|
@@ -240,16 +240,12 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
|
|
|
List<Long> opendId = openedProductsFacade.getOpendCountByUserId(userId);
|
|
|
List<Long> orderDetailsId = orderDetailsFacade.getOrderDetailsByUser(userId);
|
|
|
for (ProductLineDTO productLineDTO:productLineDTOList) {
|
|
|
- productLineDTO.setProductAudit(ProductAuditEnum.NotOpend.getKey());
|
|
|
- for (int i =0; i<opendId.size();i++){
|
|
|
- if(productLineDTO.getId()==opendId.get(i)){
|
|
|
- productLineDTO.setProductAudit(ProductAuditEnum.Opended.getKey());
|
|
|
- }
|
|
|
- }
|
|
|
- for (int i =0; i<orderDetailsId.size();i++){
|
|
|
- if(productLineDTO.getId()==orderDetailsId.get(i)){
|
|
|
- productLineDTO.setProductAudit(ProductAuditEnum.Audit.getKey());
|
|
|
- }
|
|
|
+ if(opendId.contains(productLineDTO.getId())){
|
|
|
+ productLineDTO.setProductAudit(ProductAuditEnum.Opended.getKey());
|
|
|
+ }else if(orderDetailsId.contains(productLineDTO.getId())){
|
|
|
+ productLineDTO.setProductAudit(ProductAuditEnum.Audit.getKey());
|
|
|
+ }else {
|
|
|
+ productLineDTO.setProductAudit(ProductAuditEnum.NotOpend.getKey());
|
|
|
}
|
|
|
}
|
|
|
RespDTO<Map<Long, UserOrgDTO>> mapRespDTO = userServiceClient.getUserAndOrg(userIdList);
|