Commit e81cbffd by 阮思源

修改下定时发送计划展示

parent e0733afd
......@@ -23,4 +23,9 @@ public interface AdvertisingWechatMsgDao extends BaseDao<AdvertisingWechatMsg> {
* @param adId
*/
public void deleteByAdId(Long adId);
/**
* 根据广告位id集合查询
*/
List<AdvertisingWechatMsg> getByAdIds(List<Long> adIds);
}
......@@ -26,4 +26,9 @@ public class AdvertisingWechatMsgDaoImpl extends BaseDaoImpl<AdvertisingWechatMs
public void deleteByAdId(Long adId) {
getSessionTemplate().delete(getStatement("deleteByAdId"), adId);
}
@Override
public List<AdvertisingWechatMsg> getByAdIds(List<Long> list) {
return getSessionTemplate().selectList(getStatement("getByAdIds"), list);
}
}
......@@ -52,6 +52,9 @@ public class AdvertisingPlanGroup extends BaseEntity {
@ApiModelProperty("微信群名称")
private String weixinGroupName;
@ApiModelProperty("微信群是否已删除")
private Boolean groupDelete;
public Long getAdvertisingPlanId() {
return advertisingPlanId;
......@@ -157,6 +160,14 @@ public class AdvertisingPlanGroup extends BaseEntity {
this.weixinGroupName = weixinGroupName;
}
public Boolean getGroupDelete() {
return groupDelete;
}
public void setGroupDelete(Boolean groupDelete) {
this.groupDelete = groupDelete;
}
@Override
public String toString() {
return "AdvertisingPlanGroup{" +
......@@ -173,6 +184,7 @@ public class AdvertisingPlanGroup extends BaseEntity {
", groupQrcodeName='" + groupQrcodeName + '\'' +
", classify='" + classify + '\'' +
", weixinGroupName='" + weixinGroupName + '\'' +
", groupDelete=" + groupDelete +
"} " + super.toString();
}
}
......@@ -9,6 +9,7 @@
<result column="classify_id" property="classifyId" jdbcType="BIGINT"/>
<result column="qrcode_id" property="qrcodeId" jdbcType="BIGINT"/>
<result column="weixin_group_id" property="weixinGroupId" jdbcType="VARCHAR"/>
<result column="weixin_group_name" property="weixinGroupName" jdbcType="VARCHAR"/>
<result column="is_delete" property="isDelete" jdbcType="BOOLEAN"/>
<result column="create_user" property="createUser" jdbcType="BIGINT"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
......@@ -18,7 +19,7 @@
<sql id="Base_Column_List">
id, advertising_plan_id, book_id, book_group_id, classify_id, qrcode_id,
weixin_group_id, is_delete, create_user, create_time, update_user, update_time
weixin_group_id, weixin_group_name, is_delete, create_user, create_time, update_user, update_time
</sql>
<select id="getById" resultMap="BaseResultMap" parameterType="java.lang.Long">
......@@ -44,6 +45,7 @@
classify_id,
qrcode_id,
weixin_group_id,
weixin_group_name,
is_delete,
create_user,
create_time,
......@@ -57,6 +59,7 @@
#{classifyId,jdbcType=BIGINT},
#{qrcodeId,jdbcType=BIGINT},
#{weixinGroupId,jdbcType=VARCHAR},
#{weixinGroupName,jdbcType=VARCHAR},
0,
#{createUser,jdbcType=BIGINT},
NOW(),
......@@ -84,7 +87,10 @@
qrcode_id = #{qrcodeId,jdbcType=TIMESTAMP},
</if>
<if test="weixinGroupId != null">
weixin_group_id = #{weixinGroupId,jdbcType=TIMESTAMP},
weixin_group_id = #{weixinGroupId,jdbcType=VARCHAR},
</if>
<if test="weixinGroupName != null">
weixin_group_id = #{weixinGroupName,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
is_delete = #{isDelete,jdbcType=BOOLEAN},
......@@ -106,6 +112,7 @@
classify_id,
qrcode_id,
weixin_group_id,
weixin_group_name,
is_delete,
create_user,
create_time,
......@@ -120,6 +127,7 @@
#{item.classifyId,jdbcType=BIGINT},
#{item.qrcodeId,jdbcType=BIGINT},
#{item.weixinGroupId,jdbcType=VARCHAR},
#{item.weixinGroupName,jdbcType=VARCHAR},
0,
#{item.createUser,jdbcType=BIGINT},
NOW(),
......
......@@ -72,4 +72,14 @@
where ad_id = #{adId,jdbcType=BIGINT}
</delete>
<!--根据广告id集合查询-->
<select id="getByAdIds" parameterType="list" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
FROM advertising_wechat_msg WHERE ad_id in
<foreach collection="list" open="(" close=")" separator="," item="item">
#{item}
</foreach>
order by seq asc
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment