package com.tanpu.community.service.other; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.tanpu.community.api.enums.DeleteTagEnum; import com.tanpu.community.dao.entity.user.OrderFlowEntity; import com.tanpu.community.dao.mapper.user.OrderFlowMapper; import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.Collections; import java.util.List; @Service public class OrderFlowService { @Resource private OrderFlowMapper orderFlowMapper; public OrderFlowEntity selectById(String id){ return orderFlowMapper.selectById(id); } public List<OrderFlowEntity> selectByIds(List<String> ids){ if (CollectionUtils.isEmpty(ids)){ return Collections.emptyList(); } return orderFlowMapper.selectBatchIds(ids); } public OrderFlowEntity queryByUserAndProId(String proId,String userId){ return orderFlowMapper.selectOne(new LambdaQueryWrapper<OrderFlowEntity>() .eq(OrderFlowEntity::getCreateby,userId) .eq(OrderFlowEntity::getAbProid,proId) .eq(OrderFlowEntity::getDeletetag, DeleteTagEnum.NOT_DELETED.getCode()) .eq(OrderFlowEntity::getAbStatus,"SUCCESS")); } }