This commit is contained in:
shuo.wang
2025-05-28 10:26:19 +08:00
parent 0f410ad251
commit 011d60a4d7

View File

@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -32,7 +33,7 @@ public class ShopStageRemarkInfoDAO {
}
public ShopStageRemarkInfoDO getByShopIdAndStage(Long shopId, Integer shopSubStageStatus) {
if (Objects.isNull(shopId) || Objects.isNull(shopSubStageStatus)){
return null;
return new ShopStageRemarkInfoDO();
}
Example example = new Example(ShopStageRemarkInfoDO.class);
example.createCriteria().andEqualTo("shopId", shopId).andEqualTo("shopSubStageStatus", shopSubStageStatus);
@@ -44,7 +45,7 @@ public class ShopStageRemarkInfoDAO {
}
public ShopStageRemarkInfoDO getByLineIdAndStage(Long lineId, Integer workflowSubStageStatus) {
if (Objects.isNull(lineId) || Objects.isNull(workflowSubStageStatus)){
return null;
return new ShopStageRemarkInfoDO();
}
Example example = new Example(ShopStageRemarkInfoDO.class);
example.createCriteria().andEqualTo("lineId", lineId).andEqualTo("workflowSubStageStatus", workflowSubStageStatus);
@@ -57,19 +58,27 @@ public class ShopStageRemarkInfoDAO {
public List<ShopStageRemarkInfoDO> getByShopIdsAndStage(List<Long> shopIds, List<Integer> shopSubStageStatusList) {
if (CollectionUtils.isEmpty(shopIds) || CollectionUtils.isEmpty(shopSubStageStatusList)){
return null;
return new ArrayList<>();
}
Example example = new Example(ShopStageRemarkInfoDO.class);
example.createCriteria().andIn("shopId", shopIds).andIn("shopSubStageStatus", shopSubStageStatusList);
return shopStageRemarkInfoMapper.selectByExample(example);
List<ShopStageRemarkInfoDO> result = shopStageRemarkInfoMapper.selectByExample(example);
if (CollectionUtils.isEmpty(result)){
return new ArrayList<>();
}
return result ;
}
public List<ShopStageRemarkInfoDO> getByLineIdsAndStage(List<Long> lineIds, List<Integer> workflowSubStageStatusList) {
if (CollectionUtils.isEmpty(lineIds) || CollectionUtils.isEmpty(workflowSubStageStatusList)){
return null;
return new ArrayList<>();
}
Example example = new Example(ShopStageRemarkInfoDO.class);
example.createCriteria().andIn("lineId", lineIds).andIn("workflowSubStageStatus", workflowSubStageStatusList);
return shopStageRemarkInfoMapper.selectByExample(example);
List<ShopStageRemarkInfoDO> result = shopStageRemarkInfoMapper.selectByExample(example);
if (CollectionUtils.isEmpty(result)){
return new ArrayList<>();
}
return result ;
}
}