Attribute "result" must be declared for element type "select".
返回结果声明错误
原因:定义返回类型与实际不匹配
修改前:
<select id="queryByShopId" result="shopMap" parameterType="Long">
SELECT
s.shop_id,
s.shop_name,
s.shop_desc,
s.shop_addr,
s.phone,
s.shop_img,
s.priority,
s.create_time,
s.last_edit_time,
s.enable_status,
s.advice,
a.area_id,
a.area_name,
sc.shop_category_id,
sc.shop_category_name
FROM
tb_shop s,
tb_area a,
tb_shop_category sc
WHERE
s.area_id = a.area_id
AND
s.shop_category_id = sc.shop_category_id
AND
s.shop_id = ${shopId}
</select>
修改后:
<select id="queryByShopId" resultMap="shopMap" parameterType="Long">
SELECT
s.shop_id,
s.shop_name,
s.shop_desc,
s.shop_addr,
s.phone,
s.shop_img,
s.priority,
s.create_time,
s.last_edit_time,
s.enable_status,
s.advice,
a.area_id,
a.area_name,
sc.shop_category_id,
sc.shop_category_name
FROM
tb_shop s,
tb_area a,
tb_shop_category sc
WHERE
s.area_id = a.area_id
AND
s.shop_category_id = sc.shop_category_id
AND
s.shop_id = ${shopId}
</select>
更多推荐
所有评论(0)