refactor mapper: 移除冗余的景点名称字段
All checks were successful
ZhenTu-BE/pipeline/head This commit looks good

- 在 BrokerMapper.xml 中移除了 scenicName 字段的查询
- 在 ExtraDeviceMapper.xml 中移除了 scenic_name 字段的查询
This commit is contained in:
2025-09-09 01:42:12 +08:00
parent 8504e29c80
commit fd4c708406
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@
delete from broker where id = #{id} delete from broker where id = #{id}
</delete> </delete>
<select id="list" resultType="com.ycwl.basic.model.pc.broker.resp.BrokerRespVO"> <select id="list" resultType="com.ycwl.basic.model.pc.broker.resp.BrokerRespVO">
select b.id, scenic_id, s.name as scenicName, b.`name`, b.phone, b.broker_enable, b.broker_rate, b.status, select b.id, scenic_id, b.`name`, b.phone, b.broker_enable, b.broker_rate, b.status,
(select count(1) from t_stats_record s where s.action = "CODE_SCAN" and s.identifier = b.id) as broker_scan_count, (select count(1) from t_stats_record s where s.action = "CODE_SCAN" and s.identifier = b.id) as broker_scan_count,
(select count(1) from broker_record r where r.broker_id = b.id) as broker_order_count, (select count(1) from broker_record r where r.broker_id = b.id) as broker_order_count,
(select sum(order_price) from broker_record r where r.broker_id = b.id) as broker_order_amount, (select sum(order_price) from broker_record r where r.broker_id = b.id) as broker_order_amount,

View File

@@ -2,7 +2,7 @@
<!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.ycwl.basic.mapper.ExtraDeviceMapper"> <mapper namespace="com.ycwl.basic.mapper.ExtraDeviceMapper">
<select id="listExtraDeviceByScenicId" resultType="com.ycwl.basic.model.pc.device.resp.DeviceRespVO"> <select id="listExtraDeviceByScenicId" resultType="com.ycwl.basic.model.pc.device.resp.DeviceRespVO">
select d.id, d.ident as no, d.scenic_id, d.name, d.status, s.name as scenic_name select d.id, d.ident as no, d.scenic_id, d.name, d.status
from extra_device d from extra_device d
where d.scenic_id = #{scenicId} where d.scenic_id = #{scenicId}