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