Commit 87fb7440 by 高鹏

Merge branch 'zhengyongqiang' into 'master'

Zhengyongqiang

See merge request rays/pcloud-book!104
parents 291d1d0c 4c80928b
......@@ -585,16 +585,13 @@ public class AdNewsBizImpl implements AdNewsBiz {
adNewsWechatChoose.setUpdateUser(partyId);
adNewsWechatChooses.add(adNewsWechatChoose);
}
// //校验重复添加
// Integer count = adNewsWechatChooseDao.getCountByAdNewsWechatIdsAndPartyId(adNewsWechatIds, partyId);
// if (count > 0) {
// throw new BookBizException(BookBizException.PARAM_IS_ERROR, "请勿重复添加!");
// }
// 移除编辑之前的选择
adNewsWechatChooseDao.deleteAdNewsWechatChooseByPartyId(partyId);
if(!ListUtils.isEmpty(adNewsWechatChooses)){
// 重新建立关系
adNewsWechatChooseDao.batchInsert(adNewsWechatChooses);
}
}
@Transactional(rollbackFor = Exception.class)
@ParamLog("编辑移除选择的公众号")
......
......@@ -41,6 +41,9 @@ public class AdNews extends BaseEntity {
@ApiModelProperty("是否禁用")
private Boolean hasBan ;
@ApiModelProperty("公众号")
private String wechatName;
public String getType() {
return type;
}
......@@ -113,6 +116,14 @@ public class AdNews extends BaseEntity {
this.hasBan = hasBan;
}
public String getWechatName() {
return wechatName;
}
public void setWechatName(String wechatName) {
this.wechatName = wechatName;
}
@Override
public String toString() {
return "AdNews{" +
......@@ -125,8 +136,7 @@ public class AdNews extends BaseEntity {
", newsDate='" + newsDate + '\'' +
", hasUsed=" + hasUsed +
", hasBan=" + hasBan +
", createTime=" + createTime +
", updateTime=" + updateTime +
", wechatName='" + wechatName + '\'' +
'}';
}
}
......@@ -149,9 +149,6 @@ public class AdNewsFacadeImpl implements AdNewsFacade {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "每页条数不能为空且必须大于0!");
}
adNewsListParam.setPartyId(partyId);
// 将2019-08-12时间转换为 2019-08-12 23:59:59
if (adNewsListParam.getEndTime() != null)
adNewsListParam.setEndTime(adNewsListParam.getEndTime().concat(" 23:59:59"));
return new ResponseDto<>(adNewsBiz.getAdNewsList(adNewsListParam));
}
......
......@@ -129,6 +129,7 @@
a.id id
,a.type type
,a.news_from newsFrom
,b.wechat_name wechatName
,a.title title
,a.publisher publisher
,a.url url
......@@ -146,6 +147,7 @@
${item}
</foreach>
</if>
INNER JOIN ad_news_wechat_choose c ON b.id=c.ad_news_wechat_id and c.create_user=#{partyId} and c.is_delete=0
where 1=1
<if test="title!=null">
AND a.title like concat('%', #{title},'%')
......
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