|
@@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectRecStallVo">
|
|
<sql id="selectRecStallVo">
|
|
- select id, category_id, trade_type, stall_name, stall_desc, stall_address, stall_cont, stall_cont_wx, stall_cont_address, stall_icon, create_by, create_date, update_by, update_date from rec_stall
|
|
|
|
|
|
+ select id, category_id, trade_type, stall_name, stall_desc, stall_address, stall_cont, stall_cont_wx, stall_cont_address, stall_icon, create_by, create_date, update_by, update_date, city_id from rec_stall
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectRecStallList" parameterType="RecStall" resultMap="RecStallResult">
|
|
<select id="selectRecStallList" parameterType="RecStall" resultMap="RecStallResult">
|
|
@@ -123,4 +123,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
SELECT rb.brand as brand, rc.id as id, rc.model as model,rc.specs as specs
|
|
SELECT rb.brand as brand, rc.id as id, rc.model as model,rc.specs as specs
|
|
FROM rec_commodity rc left join rec_brand rb on rb.id = rc.brand_id
|
|
FROM rec_commodity rc left join rec_brand rb on rb.id = rc.brand_id
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="selectMinCityId" resultType="java.util.Map">
|
|
|
|
+ SELECT trade_type as tradeType, min(city_id) as cityId from rec_stall where city_id is not null GROUP BY trade_type
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectRecStallListByCategoryId" resultType="com.ruoyi.framework.recovery.domain.RecStall">
|
|
|
|
+ select rs.id, rs.category_id as categoryId, rs.trade_type as tradeType, rs.stall_name as stallName, rs.stall_desc as stallDesc,
|
|
|
|
+ rs.stall_address as stallAddress, rs.stall_cont as stallCont, rs.stall_cont_wx as stallContWx,
|
|
|
|
+ rs.stall_cont_address as stallContAddress, rs.stall_icon as stallIcon, rs.create_by as createBy, rs.create_date as createDate,
|
|
|
|
+ rs.update_by as updateBy, rs.update_date as updateDate, rs.city_id as cityId, rc.city as city
|
|
|
|
+ from rec_stall rs
|
|
|
|
+ left join rec_city rc on rc.id = rs.city_id
|
|
|
|
+ <where>
|
|
|
|
+ <if test="categoryId != null "> and category_id = #{categoryId}</if>
|
|
|
|
+ <if test="tradeType != null "> and trade_type = #{tradeType}</if>
|
|
|
|
+ <if test="stallName != null and stallName != ''"> and stall_name like concat('%', #{stallName}, '%')</if>
|
|
|
|
+ <if test="stallDesc != null and stallDesc != ''"> and stall_desc = #{stallDesc}</if>
|
|
|
|
+ <if test="stallAddress != null and stallAddress != ''"> and stall_address = #{stallAddress}</if>
|
|
|
|
+ <if test="stallCont != null and stallCont != ''"> and stall_cont = #{stallCont}</if>
|
|
|
|
+ <if test="stallContWx != null and stallContWx != ''"> and stall_cont_wx = #{stallContWx}</if>
|
|
|
|
+ <if test="stallContAddress != null and stallContAddress != ''"> and stall_cont_address = #{stallContAddress}</if>
|
|
|
|
+ <if test="stallIcon != null and stallIcon != ''"> and stall_icon = #{stallIcon}</if>
|
|
|
|
+ <if test="createDate != null "> and create_date = #{createDate}</if>
|
|
|
|
+ <if test="updateDate != null "> and update_date = #{updateDate}</if>
|
|
|
|
+ <if test="cityId != null "> and city_id = #{cityId}</if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|