tyronczt / imooc-o2o

SSM到Spring Boot从零开发校园商铺平台
154 stars 42 forks source link

<ShopDao.xml> 文件中的 shopMap中少写了 priority #1

Closed Draymonders closed 5 years ago

Draymonders commented 5 years ago
<resultMap id="shopMap" type="com.tyron.o2o.entity.Shop">
        <!-- 主键 -->
        <id column="shop_id" property="shopId" />
        <!--column对应库表中的字段名 property对应实体类中的属性名 -->
        <result column="shop_name" property="shopName" />
        <result column="shop_desc" property="shopDesc" />
        <result column="shop_addr" property="shopAddr" />
        <result column="phone" property="phone" />
        <result column="shop_img" property="shopImg" />
        <result column="create_time" property="createTime" />
        <result column="last_edit_time" property="lastEditTime" />
        <result column="enable_status" property="enableStatus" />
        <result column="advice" property="advice" />

        <!-- 复合对象 -->
        <association column="owner_id" property="owner" javaType="com.tyron.o2o.entity.PersonInfo">
            <id column="user_id" property="userId" />
            <result column="name" property="name" />
        </association>

        <association column="area_id" property="area" javaType="com.tyron.o2o.entity.Area">
            <id column="area_id" property="areaId" />
            <result column="area_name" property="areaName" />
        </association>

        <association property="shopCategory" column="shop_category_id" javaType="com.tyron.o2o.entity.ShopCategory">
            <id column="shop_category_id" property="shopCategoryId" />
            <result column="shop_category_name" property="shopCategoryName" />
        </association>
    </resultMap>

这段中 少写了 priority的返回映射

tyronczt commented 5 years ago

已修改。