| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?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.cyksj.mapper.GroupsRelationMapper">
- <update id="updateExpiryTime">
- update groups_relation
- set start_time = null,
- expiry_time = null,
- status = #{entity.status},
- renew_status = #{entity.renewStatus},
- is_handle = #{entity.isHandle},
- user_id = #{entity.userId},
- account = #{entity.account}
- where id = #{entity.id} and expiry_time = #{expireTime}
- </update>
- <select id="getAccountIdsByUserIdOrNickNameOrSubmitAccount" resultType="java.lang.Long">
- select gr.groups_id
- from groups_relation gr,
- `user` u
- where gr.user_id = u.id
- <if test="nickName != null and nickName != ''">
- and u.nickname like '%${nickName}%'
- </if>
- <if test="userId != null">
- and u.id = #{userId,jdbcType=BIGINT}
- </if>
- <if test="submitAccount != null and submitAccount != ''">
- and gr.account = #{submitAccount,jdbcType=VARCHAR}
- </if>
- group by gr.groups_id
- </select>
- <select id="getGroupTripsSkuIdByRelationId" resultType="java.lang.Long">
- select gt.sku_id from `groups_trips` gt left join `groups_relation` gr on gr.groups_id = gt.id where gr.id = #{relationId} limit 1
- </select>
- </mapper>
|