同学好,请检查你的mapper写得是否和我的一致,应该说mapper写得不对<?xml version="1.0" encoding="UTF-8"?>
mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
javaType="com.imooc.o2o.entity.Area">
javaType="com.imooc.o2o.entity.ShopCategory">
javaType="com.imooc.o2o.entity.PersonInfo">
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
test="shopCondition.shopCategory != null and
shopCondition.shopCategory.shopCategoryId != null">
and s.shop_category_id =
#{shopCondition.shopCategory.shopCategoryId}
test="shopCondition.shopCategory != null
and shopCondition.shopCategory.parent!=null
and shopCondition.shopCategory.parent.shopCategoryId !=null">
and s.shop_category_id in (select shop_category_id from
tb_shop_category
WHERE parent_id =
#{shopCondition.shopCategory.parent.shopCategoryId})
test="shopCondition.area != null and
sho...
2018-06-25 01:01:36