|
@@ -13,6 +13,7 @@ import com.diagbot.entity.wrapper.LantoneProductWrapper;
|
|
import com.diagbot.entity.wrapper.OpendProductWrapper;
|
|
import com.diagbot.entity.wrapper.OpendProductWrapper;
|
|
import com.diagbot.enums.AccessTypeEnum;
|
|
import com.diagbot.enums.AccessTypeEnum;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
|
+import com.diagbot.enums.ProductAuditEnum;
|
|
import com.diagbot.enums.StatusEnum;
|
|
import com.diagbot.enums.StatusEnum;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonException;
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -153,10 +154,24 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
|
|
* @return 根据用户id查询是否有开通产品
|
|
* @return 根据用户id查询是否有开通产品
|
|
*/
|
|
*/
|
|
public RespDTO<List<ProductLineDTO>> productLine() {
|
|
public RespDTO<List<ProductLineDTO>> productLine() {
|
|
|
|
+ List<ProductLineDTO> productLineDTOList = this.productLines();//所有产品
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
- List<Long> list = openedProductsFacade.getOpendCountByUserId(userId);
|
|
|
|
-
|
|
|
|
- return RespDTO.onSuc(this.productLine(list));
|
|
|
|
|
|
+ List<Long> opendId = openedProductsFacade.getOpendCountByUserId(userId);
|
|
|
|
+ List<Long> orderDetailsId = openedProductsFacade.getOpendCountByUserId(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());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return RespDTO.onSuc(productLineDTOList);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|