|
- <?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.WxCustomizeModuleMapper">
-
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCustomizeModule">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
- <result column="theme_id" jdbcType="VARCHAR" property="themeId" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="remarks" jdbcType="VARCHAR" property="remarks" />
- <result column="theme_type" jdbcType="INTEGER" property="themeType"/>
- <result column="icon" jdbcType="VARCHAR" property="icon" />
- <result column="style" jdbcType="VARCHAR" property="style" />
- <result column="link_type" jdbcType="INTEGER" property="linkType"/>
- <result column="link_url" jdbcType="VARCHAR" property="linkUrl" />
- <result column="out_link_appid" jdbcType="VARCHAR" property="outLinkAppid" />
- <result column="sort" jdbcType="INTEGER" property="sort"/>
- <result column="is_using" jdbcType="INTEGER" property="isUsing"/>
- <result column="create_date" property="createDate" />
- <result column="update_date" property="updateDate" />
-
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`theme_id`,`name`,`remarks`,`theme_type`,`icon`,`style`,`link_type`,`link_url`,`out_link_appid`,
- `sort`,`is_using`,
- `create_date`,`update_date`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where del_status = 0
- <if test=" null != id "> and `id` = #{id} </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 != themeId">
- and `theme_id` = #{themeId}
- </if>
- <if test=" null != name and '' != name "> and `name` like concat('%', #{name},'%') </if>
- <if test=" null != themeType">
- and `theme_type` = #{themeType}
- </if>
- <if test=" null != linkType">
- and `link_type` = #{linkType}
- </if>
- <if test=" null != isUsing">
- and `is_using` = #{isUsing}
- </if>
- order by `is_using` desc, `sort` asc, `update_date` desc
- </sql>
-
- <select id="findList" parameterType="com.iformall.domain.po.WxCustomizeModule" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_customize_module
- <include refid="dynamicWhereConditions"/>
- </select>
-
- <update id="updateDel" parameterType="com.iformall.domain.po.WxCustomizeModule">
- update wx_customize_module set `del_status` = 1, update_date = now() where id = #{id};
- </update>
-
- <update id="updateDelByTenantId" parameterType="com.iformall.domain.po.WxCustomizeModule">
- update wx_customize_module set `del_status` = 1, update_date = now() where tenant_id = #{tenantId};
- </update>
-
- </mapper>
|