|
|
|
@@ -0,0 +1,68 @@ |
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
|
<mapper namespace="com.iformall.mapper.TtMallGoodsCategoryMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.iformall.domain.po.TtMallGoodsCategory"> |
|
|
|
<result column="goods_category_id" jdbcType="INTEGER" property="goodsCategoryId" /> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> |
|
|
|
<result column="software_fee" jdbcType="INTEGER" property="softwareFee" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`goods_category_id`,`tenant_id`,`parent_tenant_id`,`software_fee` |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
where 1=1 |
|
|
|
|
|
|
|
<if test=" null != goodsCategoryId "> |
|
|
|
and `goods_category_id` = #{goodsCategoryId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != isDel "> |
|
|
|
and `is_del` = #{isDel} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != categoryIds "> |
|
|
|
and goods_category_id in |
|
|
|
<foreach collection="categoryIds" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
#{idItem} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test=" null != sortColumns"> order by ${sortColumns} </if> |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="findList" parameterType="com.iformall.domain.po.TtMallGoodsCategory" resultMap="BaseResultMap"> |
|
|
|
select <include refid="allColumns" /> from tt_mall_goods_category |
|
|
|
<include refid="dynamicWhereConditions" /> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findIdAll" parameterType="com.iformall.domain.po.TtMallGoodsCategory" resultType="Integer"> |
|
|
|
select id from tt_mall_goods_category |
|
|
|
<include refid="dynamicWhereConditions" /> |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="updDelByIds" parameterType="com.iformall.domain.po.TtMallGoodsCategory"> |
|
|
|
update tt_mall_goods_category set is_del = #{isDel}, update_date = #{updateDate} |
|
|
|
where goods_category_id in |
|
|
|
<foreach collection="categoryIds" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
#{idItem} |
|
|
|
</foreach> |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateFeeByIds" parameterType="com.iformall.domain.po.TtMallGoodsCategory"> |
|
|
|
update tt_mall_goods_category set `software_fee` = #{softwareFee}, update_date = #{updateDate} |
|
|
|
where goods_category_id in |
|
|
|
<foreach collection="categoryIds" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
#{idItem} |
|
|
|
</foreach> |
|
|
|
</update> |
|
|
|
|
|
|
|
</mapper> |