Compare commits
No commits in common. "1140af3199eb1d9182b9f86b92acd1c0265ae9cb" and "85af8dfa8e97f19956476ed9f02a641e99bca322" have entirely different histories.
1140af3199
...
85af8dfa8e
@ -10,7 +10,6 @@ import com.aircraft.modules.order.service.IOrderDetailService;
|
|||||||
import com.aircraft.modules.order.service.OrderDetailAnalysisService;
|
import com.aircraft.modules.order.service.OrderDetailAnalysisService;
|
||||||
import com.aircraft.modules.route.domain.CpRoute;
|
import com.aircraft.modules.route.domain.CpRoute;
|
||||||
import com.aircraft.modules.route.mapper.CpRouteMapper;
|
import com.aircraft.modules.route.mapper.CpRouteMapper;
|
||||||
import com.aircraft.modules.system.domain.EmScenic;
|
|
||||||
import com.aircraft.modules.system.mapper.EmScenicMapper;
|
import com.aircraft.modules.system.mapper.EmScenicMapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@ -524,12 +523,8 @@ public class OrderDetailAnalysisServiceImpl implements OrderDetailAnalysisServic
|
|||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
// 批量查询景区名称
|
// 批量查询景区名称
|
||||||
Map<Long, String> scenicNameMap = new HashMap<>();
|
Map<Long, String> scenicNameMap = emScenicMapper.getScenicNameMap(new ArrayList<>(scenicIds));
|
||||||
if (!scenicIds.isEmpty()) {
|
|
||||||
List<EmScenic> scenics = emScenicMapper.listByIds(new ArrayList<>(scenicIds));
|
|
||||||
scenicNameMap = scenics.stream()
|
|
||||||
.collect(Collectors.toMap(EmScenic::getId, EmScenic::getName, (existing, replacement) -> existing));
|
|
||||||
}
|
|
||||||
// 4. 组装结果
|
// 4. 组装结果
|
||||||
for (Map.Entry<Long, Long> entry : routeCountMap.entrySet()) {
|
for (Map.Entry<Long, Long> entry : routeCountMap.entrySet()) {
|
||||||
Long routeId = entry.getKey();
|
Long routeId = entry.getKey();
|
||||||
@ -558,6 +553,7 @@ public class OrderDetailAnalysisServiceImpl implements OrderDetailAnalysisServic
|
|||||||
result.add(stat);
|
result.add(stat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +36,4 @@ public interface EmScenicMapper extends BaseMapper<EmScenic> {
|
|||||||
List<AreaNumStatisVo> countByAreaId();
|
List<AreaNumStatisVo> countByAreaId();
|
||||||
|
|
||||||
Map<Long, String> getScenicNameMap(ArrayList<Long> scenicIds);
|
Map<Long, String> getScenicNameMap(ArrayList<Long> scenicIds);
|
||||||
|
|
||||||
List<EmScenic> listByIds(ArrayList<Long> ids);
|
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.aircraft.modules.system.mapper.EmAreaMapper">
|
<mapper namespace="com.aircraft.modules.system.mapper.EmAreaMapper">
|
||||||
<!-- 基础ResultMap定义,全面映射EmScenic实体类字段 -->
|
|
||||||
<resultMap id="BaseResultMap" type="com.aircraft.modules.system.domain.EmScenic">
|
|
||||||
<id column="id" property="id" jdbcType="BIGINT" />
|
|
||||||
<result column="area_id" property="areaId" jdbcType="BIGINT" />
|
|
||||||
<result column="name" property="name" jdbcType="VARCHAR" />
|
|
||||||
<result column="people_num" property="peopleNum" jdbcType="INTEGER" />
|
|
||||||
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
|
||||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
||||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
|
||||||
<result column="price" property="price" jdbcType="DECIMAL" />
|
|
||||||
<result column="create_by" property="createBy" jdbcType="VARCHAR" />
|
|
||||||
<result column="update_by" property="updateBy" jdbcType="VARCHAR" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<select id="findByName" resultType="com.aircraft.modules.system.domain.EmArea" parameterType="java.lang.String">
|
<select id="findByName" resultType="com.aircraft.modules.system.domain.EmArea" parameterType="java.lang.String">
|
||||||
SELECT id,
|
SELECT id,
|
||||||
@ -47,12 +34,4 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
AND del_flag = 0
|
AND del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listByIds" resultMap="BaseResultMap">
|
|
||||||
SELECT * FROM em_scenic WHERE id IN
|
|
||||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
AND del_flag = 0
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user