...
|
...
|
@@ -8,16 +8,17 @@ |
|
|
<result column="create_time" property="createTime" jdbcType="INTEGER" />
|
|
|
<result column="create_user" property="createUser" jdbcType="INTEGER" />
|
|
|
<result column="create_userName" property="createUserName" jdbcType="VARCHAR" />
|
|
|
<result column="sms_number" property="smsNumber" jdbcType="INTEGER" />
|
|
|
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<resultMap id="groupResultMap" type="com.yoho.service.model.union.response.ChannelGroupRspBO" extends="BaseResultMap">
|
|
|
<result column="group_id" property="smsNumber" jdbcType="INTEGER" />
|
|
|
<result column="send_time" property="sendTime" jdbcType="INTEGER" />
|
|
|
<result column="send_user" property="sendUser" jdbcType="INTEGER" />
|
|
|
<result column="send_userName" property="sendUserName" jdbcType="VARCHAR" />
|
|
|
<result column="content" property="content" jdbcType="VARCHAR" />
|
|
|
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, name, group_number, create_time, create_user, create_userName, sms_number, send_time,
|
|
|
send_user, send_userName, content, update_time
|
|
|
id, name, group_number, create_time, create_user, create_userName, update_time
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
...
|
...
|
@@ -31,14 +32,10 @@ |
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.yoho.unions.dal.model.ChannelGroup" keyProperty="id" useGeneratedKeys="true" >
|
|
|
insert into channel_group (id, name, group_number,
|
|
|
create_time, create_user, create_userName,
|
|
|
sms_number, send_time, send_user,
|
|
|
send_userName, content, update_time
|
|
|
create_time, create_user, create_userName,update_time
|
|
|
)
|
|
|
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{groupNumber,jdbcType=INTEGER},
|
|
|
#{createTime,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, #{createUserName,jdbcType=VARCHAR},
|
|
|
#{smsNumber,jdbcType=INTEGER}, #{sendTime,jdbcType=INTEGER}, #{sendUser,jdbcType=INTEGER},
|
|
|
#{sendUserName,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{updateTime,jdbcType=INTEGER}
|
|
|
#{createTime,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, #{createUserName,jdbcType=VARCHAR}, #{updateTime,jdbcType=INTEGER}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.yoho.unions.dal.model.ChannelGroup" >
|
...
|
...
|
@@ -62,21 +59,6 @@ |
|
|
<if test="createUserName != null" >
|
|
|
create_userName,
|
|
|
</if>
|
|
|
<if test="smsNumber != null" >
|
|
|
sms_number,
|
|
|
</if>
|
|
|
<if test="sendTime != null" >
|
|
|
send_time,
|
|
|
</if>
|
|
|
<if test="sendUser != null" >
|
|
|
send_user,
|
|
|
</if>
|
|
|
<if test="sendUserName != null" >
|
|
|
send_userName,
|
|
|
</if>
|
|
|
<if test="content != null" >
|
|
|
content,
|
|
|
</if>
|
|
|
<if test="updateTime != null" >
|
|
|
update_time,
|
|
|
</if>
|
...
|
...
|
@@ -100,21 +82,6 @@ |
|
|
<if test="createUserName != null" >
|
|
|
#{createUserName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="smsNumber != null" >
|
|
|
#{smsNumber,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sendTime != null" >
|
|
|
#{sendTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sendUser != null" >
|
|
|
#{sendUser,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sendUserName != null" >
|
|
|
#{sendUserName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="content != null" >
|
|
|
#{content,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="updateTime != null" >
|
|
|
#{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
...
|
...
|
@@ -138,21 +105,6 @@ |
|
|
<if test="createUserName != null" >
|
|
|
create_userName = #{createUserName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="smsNumber != null" >
|
|
|
sms_number = #{smsNumber,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sendTime != null" >
|
|
|
send_time = #{sendTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sendUser != null" >
|
|
|
send_user = #{sendUser,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sendUserName != null" >
|
|
|
send_userName = #{sendUserName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="content != null" >
|
|
|
content = #{content,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="updateTime != null" >
|
|
|
update_time = #{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
...
|
...
|
@@ -166,16 +118,13 @@ |
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
create_user = #{createUser,jdbcType=INTEGER},
|
|
|
create_userName = #{createUserName,jdbcType=VARCHAR},
|
|
|
sms_number = #{smsNumber,jdbcType=INTEGER},
|
|
|
send_time = #{sendTime,jdbcType=INTEGER},
|
|
|
send_user = #{sendUser,jdbcType=INTEGER},
|
|
|
send_userName = #{sendUserName,jdbcType=VARCHAR},
|
|
|
content = #{content,jdbcType=VARCHAR},
|
|
|
update_time = #{updateTime,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id ="selectListCountByParam" parameterType="java.lang.Integer" resultType="java.lang.Integer">
|
|
|
select count(*) from channel_group
|
|
|
select count(*) from channel_group cg
|
|
|
left join channel_group_batch cgb
|
|
|
on cg.id = cgb.group_id
|
|
|
<where>
|
|
|
<if test="name != null" >
|
|
|
name LIKE CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
...
|
...
|
@@ -190,7 +139,7 @@ |
|
|
and create_userName LIKE CONCAT('%',#{createUserName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
<if test="smsNumber != null" >
|
|
|
and sms_number = #{smsNumber,jdbcType=INTEGER}
|
|
|
and cgb.id = #{smsNumber,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="sendTimeBegin != null" >
|
|
|
and send_time >= #{sendTimeBegin,jdbcType=INTEGER}
|
...
|
...
|
@@ -203,8 +152,12 @@ |
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="selectListByParam" resultMap="BaseResultMap" parameterType="com.yoho.service.model.union.request.ChannelGroupRequestBO" >
|
|
|
select <include refid="Base_Column_List" /> from channel_group
|
|
|
<select id="selectListByParam" resultMap="groupResultMap" parameterType="com.yoho.service.model.union.response.ChannelGroupRspBO" >
|
|
|
select cg.id as id, name, group_number, create_time, create_user, create_userName, cgb.id as group_id, send_time,
|
|
|
send_user, send_userName, content
|
|
|
from channel_group cg
|
|
|
left join channel_group_batch cgb
|
|
|
on cg.id = cgb.group_id
|
|
|
<where>
|
|
|
<if test="name != null" >
|
|
|
name LIKE CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
...
|
...
|
@@ -219,7 +172,7 @@ |
|
|
and create_userName LIKE CONCAT('%',#{createUserName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
<if test="smsNumber != null" >
|
|
|
and sms_number = #{smsNumber,jdbcType=INTEGER}
|
|
|
and cgb.id = #{smsNumber,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="sendTimeBegin != null" >
|
|
|
and send_time >= #{sendTimeBegin,jdbcType=INTEGER}
|
...
|
...
|
|