| | |
| | | <result property="remark" column="remark" /> |
| | | <result property="companyId" column="company_id" /> |
| | | <result property="code" column="code" /> |
| | | <result property="tempType" column="temp_type" /> |
| | | <result property="templateClass" column="template_class" /> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | <result property="remark" column="remark" /> |
| | | <result property="companyId" column="company_id" /> |
| | | <result property="code" column="code" /> |
| | | <result property="tempType" column="temp_type" /> |
| | | <result property="templateClass" column="template_class" /> |
| | | </resultMap> |
| | | |
| | | <!-- 字段sql --> |
| | |
| | | status, |
| | | remark, |
| | | company_id, |
| | | code |
| | | code, |
| | | temp_type, |
| | | template_class |
| | | </sql> |
| | | |
| | | <!-- 属性sql --> |
| | |
| | | #{item.status}, |
| | | #{item.remark}, |
| | | #{item.companyId}, |
| | | #{item.code} |
| | | #{item.code}, |
| | | #{item.tempType}, |
| | | #{item.templateClass} |
| | | </sql> |
| | | |
| | | <!-- where sql --> |
| | | <sql id="where_sql"> |
| | | |
| | |
| | | <if test="(record.companyId!=null and record.companyId!='') or (record.companyId!='' and record.companyId==0) "> |
| | | and company_id = #{record.companyId} |
| | | </if> |
| | | |
| | | <if test="(record.tempType!=null and record.tempType!='') or (record.tempType!='' and record.tempType==0) "> |
| | | and tempType = #{record.tempType} |
| | | </if> |
| | | |
| | | |
| | | </if> |
| | | |
| | | </sql> |
| | |
| | | <if test="_parameter.containsKey('code')"> |
| | | code = #{code}, |
| | | </if> |
| | | <if test="_parameter.containsKey('temp_type')"> |
| | | temp_type = #{tempType}, |
| | | </if> |
| | | |
| | | </set> |
| | | WHERE id=#{id} |
| | | </update> |
| | |
| | | <if test="record.code != null and record.code != '' "> |
| | | code = #{record.code}, |
| | | </if> |
| | | |
| | | <if test="record.tempType != null and record.tempType != '' "> |
| | | temp_type = #{record.tempType}, |
| | | </if> |
| | | |
| | | </set> |
| | | WHERE id=#{record.id} |
| | | </update> |
| | |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="selectInPage" resultMap="ShopWxtemplateMsgMap"> |
| | | select |
| | | <include refid="columns" ></include> |
| | | select |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | id, |
| | | name, |
| | | uuid, |
| | | status, |
| | | remark, |
| | | company_id, |
| | | code, |
| | | temp_type |
| | | from shop_wxtemplate_msg |
| | | <where> |
| | | <include refid="where_sql"></include> |
| | |
| | | select |
| | | <include refid="columns" ></include> |
| | | from shop_wxtemplate_msg |
| | | where code=#{code} |
| | | where code=#{code} and company_id=#{companyId} |
| | | </select> |
| | | |
| | | |