limit
This commit is contained in:
@@ -71,6 +71,7 @@ public class BigRegionDAO {
|
|||||||
}
|
}
|
||||||
Example example = new Example(BigRegionDO.class);
|
Example example = new Example(BigRegionDO.class);
|
||||||
example.createCriteria().andEqualTo("regionId", regionId);
|
example.createCriteria().andEqualTo("regionId", regionId);
|
||||||
|
example.setOrderByClause("limit 1");
|
||||||
return bigRegionMapper.selectOneByExample(example);
|
return bigRegionMapper.selectOneByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -427,6 +427,7 @@
|
|||||||
where deleted = 0
|
where deleted = 0
|
||||||
and parent_id = #{regionId}
|
and parent_id = #{regionId}
|
||||||
and region_type = #{regionType}
|
and region_type = #{regionType}
|
||||||
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="getRegionByNameListAndIsPath" resultType="com.cool.store.entity.RegionDO">
|
<select id="getRegionByNameListAndIsPath" resultType="com.cool.store.entity.RegionDO">
|
||||||
select <include refid="fields"/>
|
select <include refid="fields"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user