文章列表
This commit is contained in:
parent
631870cbe8
commit
1c6f652642
|
|
@ -1,5 +1,7 @@
|
|||
package com.ruoyi.content.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.content.domain.ArticleInfo;
|
||||
import com.ruoyi.content.domain.PageDTO;
|
||||
|
|
@ -12,6 +14,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
|
|
@ -30,50 +33,39 @@ import java.util.UUID;
|
|||
*/
|
||||
@Controller
|
||||
@RequestMapping("/article")
|
||||
public class ArticleManageController {
|
||||
public class ArticleManageController extends BaseController {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(ArticleManageController.class);
|
||||
private String prefix = "content/article";
|
||||
|
||||
@Autowired
|
||||
private ArticleService articleService;
|
||||
|
||||
@GetMapping("list")
|
||||
public String articleList() {
|
||||
return prefix + "/articleList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有公司发布的文章信息
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/articleArry")
|
||||
@ResponseBody
|
||||
public PageDTO articleArry(HttpServletRequest request, HttpServletResponse response) {
|
||||
public TableDataInfo articleArry(HttpServletRequest request) throws Exception {
|
||||
logger.info("查询文章列表的控制层方法开始!");
|
||||
Thread.currentThread().setName(UUID.randomUUID().toString());
|
||||
PageDTO pageDTO = new PageDTO();
|
||||
try {
|
||||
String rowsVal = request.getParameter("rows");
|
||||
String page = request.getParameter("page");
|
||||
String articelName = request.getParameter("articelName");
|
||||
String articelAuthor = request.getParameter("articelAuthor");
|
||||
String channelId = request.getParameter("channelId");
|
||||
String special = request.getParameter("special");
|
||||
String articleState = request.getParameter("articleState");
|
||||
int rows = Integer.parseInt(rowsVal);
|
||||
int startRow = rows * (Integer.parseInt(page) - 1);
|
||||
List<PublishedArticleInfo> list = articleService.queryArticle(startRow, rows, articelName, articelAuthor,
|
||||
special, channelId, articleState);
|
||||
pageDTO.setPage(Integer.parseInt(page));
|
||||
pageDTO.setStartRow(startRow);
|
||||
pageDTO.setDataRows(list);
|
||||
int count = articleService.countArticleInfoByState(articelName, articelAuthor, special, channelId,
|
||||
articleState);
|
||||
pageDTO.setTotal(count % rows == 0 ? count / rows : (count / rows + 1));
|
||||
pageDTO.setRecords(count);
|
||||
pageDTO.setPage(Integer.parseInt(page));
|
||||
} catch (Exception e) {
|
||||
logger.info("查询当前用户发布的文章失败【{}】", e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
String articelName = request.getParameter("articleName");
|
||||
String articelAuthor = request.getParameter("articelAuthor");
|
||||
String channelId = request.getParameter("channelId");
|
||||
String special = request.getParameter("special");
|
||||
String articleState = request.getParameter("articleState");
|
||||
startPage();
|
||||
List<PublishedArticleInfo> list = articleService.queryArticle(articelName, articelAuthor,
|
||||
special, channelId, articleState);
|
||||
logger.info("查询文章列表的控制层方法结束!");
|
||||
return pageDTO;
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.ruoyi.content.controller;
|
||||
|
||||
import com.ruoyi.common.core.page.PageDomain;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.page.TableSupport;
|
||||
import com.ruoyi.content.domain.ClickTrackInfo;
|
||||
import com.ruoyi.content.domain.ClickUserInfo;
|
||||
import com.ruoyi.content.domain.PageDTO;
|
||||
|
|
@ -42,24 +45,27 @@ public class StaffArticleManageController {
|
|||
*/
|
||||
@RequestMapping("/articleSharingTrackList")
|
||||
@ResponseBody
|
||||
public PageDTO articleSharingTrack(HttpServletRequest request) {
|
||||
public TableDataInfo articleSharingTrack(HttpServletRequest request) {
|
||||
|
||||
logger.info("查询文章分享阅读轨迹的控制层方法开始!");
|
||||
Thread.currentThread().setName(UUID.randomUUID().toString());
|
||||
PageDTO pageDTO = new PageDTO();
|
||||
TableDataInfo pageDTO = new TableDataInfo();
|
||||
try {
|
||||
String rowsVal = request.getParameter("rows");
|
||||
String page = request.getParameter("page");
|
||||
int rows = Integer.parseInt(rowsVal);
|
||||
int startRow = rows * (Integer.parseInt(page) - 1);
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Integer pageNum = pageDomain.getPageNum() - 1;
|
||||
Integer pageSize = pageDomain.getPageSize();
|
||||
String articleId = request.getParameter("articleId");
|
||||
if (StringUtils.isBlank(articleId)) {
|
||||
return pageDTO;
|
||||
}
|
||||
// 1.根据文章id去查publish表,找出该文章对应所有业务员
|
||||
pageDTO = staffArticleManageService.querySalesmanByArticleId(articleId, startRow, rows);
|
||||
pageDTO.setPage(Integer.parseInt(page));
|
||||
|
||||
pageDTO = staffArticleManageService.querySalesmanByArticleId(articleId, pageNum, pageSize);
|
||||
return pageDTO;
|
||||
} catch (Exception e) {
|
||||
logger.info("系统异常!", e);
|
||||
pageDTO.setCode(0);
|
||||
pageDTO.setRows(new ArrayList<>());
|
||||
pageDTO.setTotal(0);
|
||||
return pageDTO;
|
||||
}
|
||||
|
||||
|
|
@ -73,29 +79,31 @@ public class StaffArticleManageController {
|
|||
*/
|
||||
@RequestMapping("/publishInfoList")
|
||||
@ResponseBody
|
||||
public PageDTO publishInfoList(HttpServletRequest request) {
|
||||
|
||||
|
||||
public TableDataInfo publishInfoList(HttpServletRequest request) {
|
||||
Thread.currentThread().setName(UUID.randomUUID().toString());
|
||||
PageDTO pageDTO = new PageDTO();
|
||||
TableDataInfo pageDTO = new TableDataInfo();
|
||||
try {
|
||||
String rowsVal = request.getParameter("rows");
|
||||
String page = request.getParameter("page");
|
||||
int rows = Integer.parseInt(rowsVal);
|
||||
int startRow = rows * (Integer.parseInt(page) - 1);
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Integer pageNum = pageDomain.getPageNum() - 1;
|
||||
Integer pageSize = pageDomain.getPageSize();
|
||||
String userId = request.getParameter("userId");
|
||||
String articleId = request.getParameter("articleId");
|
||||
|
||||
if (StringUtils.isAnyBlank(articleId, userId)) {
|
||||
return pageDTO;
|
||||
}
|
||||
|
||||
logger.info("查询该业务员userId[{}]的文章articleId[{}]发布情况开始!", userId, articleId);
|
||||
|
||||
|
||||
// 1.根据文章id去查publish表,找出该文章对应所有业务员
|
||||
pageDTO = staffArticleManageService.queryClickInfoByUserId(userId, articleId, startRow, rows);
|
||||
pageDTO.setPage(Integer.parseInt(page));
|
||||
pageDTO = staffArticleManageService.queryClickInfoByUserId(userId, articleId, pageNum, pageSize);
|
||||
|
||||
return pageDTO;
|
||||
} catch (Exception e) {
|
||||
logger.info("系统异常!", e);
|
||||
pageDTO.setCode(0);
|
||||
pageDTO.setRows(new ArrayList<>());
|
||||
pageDTO.setTotal(0);
|
||||
return pageDTO;
|
||||
}
|
||||
|
||||
|
|
@ -109,16 +117,18 @@ public class StaffArticleManageController {
|
|||
*/
|
||||
@RequestMapping("/articleSharingTrackInfo")
|
||||
@ResponseBody
|
||||
public Message articleSharingTrackInfo(HttpServletRequest request) {
|
||||
public TableDataInfo articleSharingTrackInfo(HttpServletRequest request) {
|
||||
Thread.currentThread().setName(UUID.randomUUID().toString());
|
||||
Message msg = new Message();
|
||||
Map<String, Object> returnMap = new HashMap<String, Object>();
|
||||
List<ClickUserInfo> clickUserInfos = new ArrayList<ClickUserInfo>();
|
||||
ClickTrackInfo clickTrackInfo = new ClickTrackInfo();
|
||||
logger.info("查询用户查看分享文章轨迹信息的控制层方法开始!");
|
||||
String clickId = request.getParameter("clickId");
|
||||
TableDataInfo pageDTO = new TableDataInfo();
|
||||
if (StringUtils.isBlank(clickId)) {
|
||||
returnMap.put("ClickTrackInfo", clickTrackInfo);
|
||||
pageDTO.setCode(0);
|
||||
pageDTO.setRows(new ArrayList<>());
|
||||
pageDTO.setTotal(0);
|
||||
} else {
|
||||
clickTrackInfo = staffArticleManageService.articleSharingTrackInfo(clickId);
|
||||
//发布人id
|
||||
|
|
@ -135,41 +145,51 @@ public class StaffArticleManageController {
|
|||
logger.info("转换后的用户昵称为:" + userInfo.getNickName());
|
||||
} else {
|
||||
userInfo.setNickName("后台管理员");
|
||||
userInfo.setHeadImgUrl("/static/common/image/logo.png");
|
||||
userInfo.setHeadImgUrl("/img/admin.png");
|
||||
userInfo.setOpenid("");
|
||||
}
|
||||
returnMap.put("userInfo", userInfo);
|
||||
ClickUserInfo clickUserInfo1 = new ClickUserInfo();
|
||||
clickUserInfo1.setNickName(userInfo.getNickName());
|
||||
clickUserInfo1.setHeadImgUrl(userInfo.getHeadImgUrl());
|
||||
clickUserInfo1.setOpenId(userInfo.getOpenid());
|
||||
clickUserInfos.add(clickUserInfo1);
|
||||
String clickUserInfo = clickTrackInfo.getClickUserInfo();
|
||||
List<ClickUserInfo> c = new ArrayList<ClickUserInfo>();
|
||||
if (StringUtils.isNotBlank(clickUserInfo)) {
|
||||
clickUserInfos = JsonUtil.JsonToCollectionType(clickUserInfo, List.class, ClickUserInfo.class);
|
||||
c = JsonUtil.JsonToCollectionType(clickUserInfo, List.class, ClickUserInfo.class);
|
||||
|
||||
for (ClickUserInfo clickUserInfo2 : clickUserInfos) {
|
||||
for (ClickUserInfo clickUserInfo2 : c) {
|
||||
try {
|
||||
clickUserInfo2.setNickName(
|
||||
new String(Base64.getDecoder().decode(clickUserInfo2.getNickName()), "UTF-8"));
|
||||
clickUserInfos.add(clickUserInfo2);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new BusinessException("用户昵称解码异常[{" + e.getMessage() + "}]");
|
||||
}
|
||||
}
|
||||
}
|
||||
returnMap.put("ClickUserInfoList", clickUserInfos);
|
||||
|
||||
String clickUserNickname = clickTrackInfo.getClickUserNickname();
|
||||
if (StringUtils.isNotBlank(clickUserNickname)) {
|
||||
try {
|
||||
clickTrackInfo.setClickUserNickname(
|
||||
new String(Base64.getDecoder().decode(clickUserNickname), "UTF-8"));
|
||||
ClickUserInfo clickUserInfo4 = new ClickUserInfo();
|
||||
clickUserInfo4.setNickName(clickTrackInfo.getClickUserNickname());
|
||||
clickUserInfo4.setHeadImgUrl(clickTrackInfo.getClickUserHeadimgurl());
|
||||
clickUserInfo4.setOpenId(clickTrackInfo.getClickOpenId());
|
||||
clickUserInfo4.setToShareState(clickTrackInfo.getFromShareState());
|
||||
clickUserInfos.add(clickUserInfo4);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new BusinessException("用户昵称解码异常[{" + e.getMessage() + "}]");
|
||||
}
|
||||
}
|
||||
returnMap.put("ClickTrackInfo", clickTrackInfo);
|
||||
msg.setInfo("获取浏览详情查询成功");
|
||||
msg.setResult(true);
|
||||
msg.setObject(returnMap);
|
||||
pageDTO.setCode(0);
|
||||
pageDTO.setRows(clickUserInfos);
|
||||
pageDTO.setTotal(clickUserInfos.size());
|
||||
}
|
||||
logger.info("查询用户查看分享文章轨迹信息的控制层方法结束!");
|
||||
return msg;
|
||||
return pageDTO;
|
||||
}
|
||||
|
||||
// // 复制链路
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ public interface ArticleQueryMapper {
|
|||
int updatePublishedArticle(Map<String, String> articleMap);
|
||||
|
||||
public List<PublishedArticleInfo> selectAllWithLimit(@Param(value = "companyId") String companyId,
|
||||
@Param(value = "articleState") List<String> articleState, @Param(value = "startRow") int startRow,
|
||||
@Param(value = "rows") int rows, @Param(value = "articelName") String articelName,
|
||||
@Param(value = "articleState") List<String> articleState, @Param(value = "articelName") String articelName,
|
||||
@Param(value = "articelAuthor") String articelAuthor, @Param(value = "special") String special, @Param(value = "channelId") String channelId);
|
||||
|
||||
ArticleInfo queryArticleInfoByCompanyId(@Param("companyId") String companyId, @Param("originalUrl") String originalUrl);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public interface ArticleService {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
public List<PublishedArticleInfo> queryArticle(int startRow, int rows, String articelName, String articelAuthor,
|
||||
public List<PublishedArticleInfo> queryArticle(String articelName, String articelAuthor,
|
||||
String special, String articelType, String articleState) throws Exception;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.content.service;
|
||||
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.content.domain.ArticleInfo;
|
||||
import com.ruoyi.content.domain.ClickTrackInfo;
|
||||
import com.ruoyi.content.domain.PageDTO;
|
||||
|
|
@ -34,7 +35,7 @@ public interface StaffArticleManageService {
|
|||
* @param rows
|
||||
* @return
|
||||
*/
|
||||
public PageDTO querySalesmanByArticleId(String articleId, int startRow, int rows);
|
||||
public TableDataInfo querySalesmanByArticleId(String articleId, int startRow, int rows);
|
||||
|
||||
/**
|
||||
* 根据用户id查询浏览表
|
||||
|
|
@ -44,6 +45,6 @@ public interface StaffArticleManageService {
|
|||
* @param rows
|
||||
* @return
|
||||
*/
|
||||
public PageDTO queryClickInfoByUserId(String userId, String articleId, int startRow, int rows);
|
||||
public TableDataInfo queryClickInfoByUserId(String userId, String articleId, int startRow, int rows);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -471,13 +471,12 @@ public class ArticleServiceImpl implements ArticleService {
|
|||
* 查询用户当前发布的文章,分页展示
|
||||
*/
|
||||
@Override
|
||||
public List<PublishedArticleInfo> queryArticle(int startRow, int rows, String articelName, String articelAuthor,
|
||||
public List<PublishedArticleInfo> queryArticle(String articelName, String articelAuthor,
|
||||
String special, String channelId, String articleState) {
|
||||
LOGGER.info("查询文章列表的业务层方法开始!");
|
||||
LOGGER.info("拿到的参数 startRow【{}】,rows【{}】,文章名称【{}】,文章作者【{}】,一级分类【{}】,二级分类【{}】,文章状态【{}】", startRow, rows,
|
||||
LOGGER.info("拿到的参数 ,文章名称【{}】,文章作者【{}】,一级分类【{}】,二级分类【{}】,文章状态【{}】",
|
||||
articelName, articelAuthor, special, channelId, articleState);
|
||||
CmsSysUser userInfoDTO = (CmsSysUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String companyId = userInfoDTO.getCompanyId();// 公司id
|
||||
String companyId = "1";// 公司id
|
||||
|
||||
List<String> list = new ArrayList<String>();
|
||||
if (StringUtils.isBlank(articleState)) {
|
||||
|
|
@ -498,10 +497,10 @@ public class ArticleServiceImpl implements ArticleService {
|
|||
if (StringUtils.isBlank(channelId)) {
|
||||
channelId = "";
|
||||
}
|
||||
List<PublishedArticleInfo> articleList = articleQueryMapper.selectAllWithLimit(companyId, list, startRow, rows,
|
||||
List<PublishedArticleInfo> articleList = articleQueryMapper.selectAllWithLimit(companyId, list,
|
||||
articelName, articelAuthor, special, channelId);
|
||||
if (articleList == null || articleList.size() < 1) {
|
||||
LOGGER.info("根据用户查询已发布的文章,未查询到数据【{}】", JsonUtil.objectToJackson(userInfoDTO));
|
||||
LOGGER.info("根据用户查询已发布的文章,未查询到数据");
|
||||
throw new BusinessException("您还没有发布过文章!");
|
||||
}
|
||||
for (PublishedArticleInfo publishedArticleInfo : articleList) {
|
||||
|
|
@ -916,8 +915,7 @@ public class ArticleServiceImpl implements ArticleService {
|
|||
LOGGER.info("文章列表的删除功能的业务层方法开始!");
|
||||
String updateDate = DateUtil.currentDate();
|
||||
String updateTime = DateUtil.currentTime();
|
||||
CmsSysUser userInfoDTO = (CmsSysUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String updateUser = userInfoDTO.getUserId();
|
||||
String updateUser = "1";
|
||||
LOGGER.info("管理员updateUser【{}】文章列表的删除功能的业务层方法中拿到的文章的id【{}】", updateUser, id);
|
||||
Message msg = new Message();
|
||||
if (StringUtils.isBlank(id)) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.content.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.content.domain.*;
|
||||
import com.ruoyi.content.exception.BusinessException;
|
||||
import com.ruoyi.content.mapper.*;
|
||||
|
|
@ -51,7 +52,7 @@ public class StaffArticleManageServiceimpl implements StaffArticleManageService
|
|||
}
|
||||
|
||||
@Override
|
||||
public PageDTO querySalesmanByArticleId(String articleId, int startRow, int rows) {
|
||||
public TableDataInfo querySalesmanByArticleId(String articleId, int startRow, int rows) {
|
||||
List<ArticlePublishTrack> list = articlePublishTrackQueryMapper.queryPublishUserInfo(articleId, startRow, rows);
|
||||
List<YwyForwardUserInfo> ywyList = new ArrayList<>();
|
||||
|
||||
|
|
@ -87,7 +88,7 @@ public class StaffArticleManageServiceimpl implements StaffArticleManageService
|
|||
ywyForwardUserInfo.setNickName("后台管理员");
|
||||
ywyForwardUserInfo.setArticleId(articleId);
|
||||
ywyForwardUserInfo.setCreateDate(apt.getCreateDate());
|
||||
ywyForwardUserInfo.setHeadImgUrl("/static/common/image/logo.png");
|
||||
ywyForwardUserInfo.setHeadImgUrl("/img/admin.png");
|
||||
ywyForwardUserInfo.setUserId(publishUserId);
|
||||
}
|
||||
ywyList.add(ywyForwardUserInfo);
|
||||
|
|
@ -99,16 +100,15 @@ public class StaffArticleManageServiceimpl implements StaffArticleManageService
|
|||
ArticlePublishTrackExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andArticleIdEqualTo(articleId);
|
||||
int count = articlePublishTrackMapper.countByExample(example);
|
||||
PageDTO pageDTO = new PageDTO();
|
||||
pageDTO.setStartRow(startRow);
|
||||
pageDTO.setDataRows(ywyList);
|
||||
pageDTO.setTotal(count % rows == 0 ? count / rows : (count / rows + 1));
|
||||
pageDTO.setRecords(count);
|
||||
return pageDTO;
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(0);
|
||||
rspData.setRows(ywyList);
|
||||
rspData.setTotal(count);
|
||||
return rspData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageDTO queryClickInfoByUserId(String userId, String articleId, int startRow, int rows) {
|
||||
public TableDataInfo queryClickInfoByUserId(String userId, String articleId, int startRow, int rows) {
|
||||
|
||||
List<ClickTrackInfo> list = clickTrackInfoQueryMapper.queryClickInfoByUserId(userId, articleId, startRow, rows);
|
||||
List<YwyPublishInfo> YwyPublishInfolList = new ArrayList<>();
|
||||
|
|
@ -139,11 +139,10 @@ public class StaffArticleManageServiceimpl implements StaffArticleManageService
|
|||
criteria.andPublishUserIdEqualTo(userId);
|
||||
criteria.andArticleIdEqualTo(articleId);
|
||||
int count = clickTrackInfoMapper.countByExample(example);
|
||||
PageDTO pageDTO = new PageDTO();
|
||||
pageDTO.setStartRow(startRow);
|
||||
pageDTO.setDataRows(YwyPublishInfolList);
|
||||
pageDTO.setTotal(count % rows == 0 ? count / rows : (count / rows + 1));
|
||||
pageDTO.setRecords(count);
|
||||
TableDataInfo pageDTO = new TableDataInfo();
|
||||
pageDTO.setCode(0);
|
||||
pageDTO.setRows(YwyPublishInfolList);
|
||||
pageDTO.setTotal(count);
|
||||
return pageDTO;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,157 +1,157 @@
|
|||
<?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.ruoyi.content.mapper.ArticleQueryMapper">
|
||||
<resultMap id="PublishedArticlesMap"
|
||||
type="com.ruoyi.content.domain.PublishedArticleInfo">
|
||||
<result column="ARTICLE_ID" property="articleId" jdbcType="VARCHAR" />
|
||||
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR" />
|
||||
<result column="PUSH_DATE" property="pushDate" jdbcType="VARCHAR" />
|
||||
<result column="ARTICLE_AUTHOR" property="articleAuthor"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="SPECIAL" property="special" jdbcType="VARCHAR" />
|
||||
<result column="CHANNEL_ID" property="channelId" jdbcType="VARCHAR" />
|
||||
<result column="ARTICLE_STATE" property="articleState"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="CREATE_USER" property="createUser" jdbcType="VARCHAR" />
|
||||
<result column="ORIGINAL_URL" property="originalUrl" jdbcType="VARCHAR" />
|
||||
<result column="SHARE_TITLE" property="shareTitle" jdbcType="VARCHAR" />
|
||||
<result column="SHARE_DES" property="shareDes" jdbcType="VARCHAR" />
|
||||
<result column="UPDATE_DATE" property="updateDate" jdbcType="VARCHAR" />
|
||||
<result column="UPDATE_TIME" property="updateTime" jdbcType="VARCHAR" />
|
||||
<result column="MODIFIED_EDIT_URL" property="modifiedEditUrl"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="MODIFIED_VIEW_URL" property="modifiedViewUrl"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="VISITOR_COUNT" property="visitorCount"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="SHARE_COUNT" property="shareCount" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="PublishedArticlesMap"
|
||||
type="com.ruoyi.content.domain.PublishedArticleInfo">
|
||||
<result column="ARTICLE_ID" property="articleId" jdbcType="VARCHAR"/>
|
||||
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR"/>
|
||||
<result column="PUSH_DATE" property="pushDate" jdbcType="VARCHAR"/>
|
||||
<result column="ARTICLE_AUTHOR" property="articleAuthor"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="SPECIAL" property="special" jdbcType="VARCHAR"/>
|
||||
<result column="CHANNEL_ID" property="channelId" jdbcType="VARCHAR"/>
|
||||
<result column="ARTICLE_STATE" property="articleState"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="CREATE_USER" property="createUser" jdbcType="VARCHAR"/>
|
||||
<result column="ORIGINAL_URL" property="originalUrl" jdbcType="VARCHAR"/>
|
||||
<result column="SHARE_TITLE" property="shareTitle" jdbcType="VARCHAR"/>
|
||||
<result column="SHARE_DES" property="shareDes" jdbcType="VARCHAR"/>
|
||||
<result column="UPDATE_DATE" property="updateDate" jdbcType="VARCHAR"/>
|
||||
<result column="UPDATE_TIME" property="updateTime" jdbcType="VARCHAR"/>
|
||||
<result column="MODIFIED_EDIT_URL" property="modifiedEditUrl"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="MODIFIED_VIEW_URL" property="modifiedViewUrl"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="VISITOR_COUNT" property="visitorCount"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="SHARE_COUNT" property="shareCount" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.ruoyi.content.domain.ArticleInfo">
|
||||
<!-- WARNING - @mbggenerated This element is automatically generated by
|
||||
MyBatis Generator, do not modify. This element was generated on Fri May 25
|
||||
15:02:37 CST 2018. -->
|
||||
<id column="ARTICLE_ID" property="articleId" jdbcType="INTEGER" />
|
||||
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR" />
|
||||
<result column="PUSH_DATE" property="pushDate" jdbcType="VARCHAR" />
|
||||
<result column="ARTICLE_AUTHOR" property="articleAuthor"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="ARTICLE_EDIT_URL" property="articleEditUrl"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="ARTICLE_VIEW_URL" property="articleViewUrl"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="LIST_PIC_URL" property="listPicUrl" jdbcType="VARCHAR" />
|
||||
<result column="SPECIAL" property="special" jdbcType="VARCHAR" />
|
||||
<result column="CHANNEL_ID" property="channelId" jdbcType="VARCHAR" />
|
||||
<result column="COMPANY_ID" property="companyId" jdbcType="VARCHAR" />
|
||||
<result column="ORIGINAL_URL" property="originalUrl" jdbcType="VARCHAR" />
|
||||
<result column="SHARE_IMG_URL" property="shareImgUrl" jdbcType="VARCHAR" />
|
||||
<result column="SHARE_TITLE" property="shareTitle" jdbcType="VARCHAR" />
|
||||
<result column="ARTICLE_STATE" property="articleState"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="SHARE_DES" property="shareDes" jdbcType="VARCHAR" />
|
||||
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR" />
|
||||
<result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR" />
|
||||
<result column="CREATE_USER" property="createUser" jdbcType="VARCHAR" />
|
||||
<result column="UPDATE_DATE" property="updateDate" jdbcType="VARCHAR" />
|
||||
<result column="UPDATE_TIME" property="updateTime" jdbcType="VARCHAR" />
|
||||
<result column="MODIFIED_EDIT_URL" property="modifiedEditUrl"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="MODIFIED_VIEW_URL" property="modifiedViewUrl"
|
||||
jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="CompanyArticlesMap"
|
||||
type="com.ruoyi.content.domain.CompanyArticleInfo">
|
||||
<result column="PUBLISH_ID" property="publishId" jdbcType="VARCHAR" />
|
||||
<result column="ARTICLE_ID" property="articleId" jdbcType="VARCHAR" />
|
||||
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR" />
|
||||
<result column="LIST_PIC_URL" property="listPicUrl" jdbcType="VARCHAR" />
|
||||
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR" />
|
||||
<result column="VISITOR_COUNT" property="visitorCount"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="SHARED_COUNT" property="sharedCount" jdbcType="VARCHAR" />
|
||||
<result column="PUBLISH_VIEW_URL" property="publishViewUrl"
|
||||
jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<!-- 根据文章主键集合查询文章对应的所有标签集合 -->
|
||||
<resultMap id="ArticleLabelRelDTOMap"
|
||||
type="com.ruoyi.content.domain.ArticleLabelRelDTO">
|
||||
<result column="ARTICLE_ID" property="articleId" jdbcType="INTEGER" />
|
||||
<result column="LABEL_NAME" property="labelName" jdbcType="VARCHAR" />
|
||||
<result column="LABEL_ID" property="labelId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<!-- 查询文章列表 -->
|
||||
<sql id="countVisitorSQL">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.ruoyi.content.domain.ArticleInfo">
|
||||
<!-- WARNING - @mbggenerated This element is automatically generated by
|
||||
MyBatis Generator, do not modify. This element was generated on Fri May 25
|
||||
15:02:37 CST 2018. -->
|
||||
<id column="ARTICLE_ID" property="articleId" jdbcType="INTEGER"/>
|
||||
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR"/>
|
||||
<result column="PUSH_DATE" property="pushDate" jdbcType="VARCHAR"/>
|
||||
<result column="ARTICLE_AUTHOR" property="articleAuthor"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="ARTICLE_EDIT_URL" property="articleEditUrl"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="ARTICLE_VIEW_URL" property="articleViewUrl"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="LIST_PIC_URL" property="listPicUrl" jdbcType="VARCHAR"/>
|
||||
<result column="SPECIAL" property="special" jdbcType="VARCHAR"/>
|
||||
<result column="CHANNEL_ID" property="channelId" jdbcType="VARCHAR"/>
|
||||
<result column="COMPANY_ID" property="companyId" jdbcType="VARCHAR"/>
|
||||
<result column="ORIGINAL_URL" property="originalUrl" jdbcType="VARCHAR"/>
|
||||
<result column="SHARE_IMG_URL" property="shareImgUrl" jdbcType="VARCHAR"/>
|
||||
<result column="SHARE_TITLE" property="shareTitle" jdbcType="VARCHAR"/>
|
||||
<result column="ARTICLE_STATE" property="articleState"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="SHARE_DES" property="shareDes" jdbcType="VARCHAR"/>
|
||||
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR"/>
|
||||
<result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR"/>
|
||||
<result column="CREATE_USER" property="createUser" jdbcType="VARCHAR"/>
|
||||
<result column="UPDATE_DATE" property="updateDate" jdbcType="VARCHAR"/>
|
||||
<result column="UPDATE_TIME" property="updateTime" jdbcType="VARCHAR"/>
|
||||
<result column="MODIFIED_EDIT_URL" property="modifiedEditUrl"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="MODIFIED_VIEW_URL" property="modifiedViewUrl"
|
||||
jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<resultMap id="CompanyArticlesMap"
|
||||
type="com.ruoyi.content.domain.CompanyArticleInfo">
|
||||
<result column="PUBLISH_ID" property="publishId" jdbcType="VARCHAR"/>
|
||||
<result column="ARTICLE_ID" property="articleId" jdbcType="VARCHAR"/>
|
||||
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR"/>
|
||||
<result column="LIST_PIC_URL" property="listPicUrl" jdbcType="VARCHAR"/>
|
||||
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR"/>
|
||||
<result column="VISITOR_COUNT" property="visitorCount"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="SHARED_COUNT" property="sharedCount" jdbcType="VARCHAR"/>
|
||||
<result column="PUBLISH_VIEW_URL" property="publishViewUrl"
|
||||
jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 根据文章主键集合查询文章对应的所有标签集合 -->
|
||||
<resultMap id="ArticleLabelRelDTOMap"
|
||||
type="com.ruoyi.content.domain.ArticleLabelRelDTO">
|
||||
<result column="ARTICLE_ID" property="articleId" jdbcType="INTEGER"/>
|
||||
<result column="LABEL_NAME" property="labelName" jdbcType="VARCHAR"/>
|
||||
<result column="LABEL_ID" property="labelId" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
<!-- 查询文章列表 -->
|
||||
<sql id="countVisitorSQL">
|
||||
SELECT COUNT(ct.CLICK_USER_ID)
|
||||
FROM click_track_info ct
|
||||
WHERE ct.PUBLISH_USER_ID = ap.USER_ID AND ct.ARTICLE_ID =
|
||||
ap.ARTICLE_ID
|
||||
</sql>
|
||||
|
||||
<sql id="countSharedSQL">
|
||||
<sql id="countSharedSQL">
|
||||
SELECT COUNT(ct.CLICK_USER_ID)
|
||||
FROM click_track_info ct
|
||||
WHERE ct.PUBLISH_USER_ID = ap.USER_ID AND ct.ARTICLE_ID =
|
||||
ap.ARTICLE_ID AND
|
||||
ct.SHARE_STATE!='0'
|
||||
</sql>
|
||||
<sql id="pageVisitorSQL">
|
||||
<sql id="pageVisitorSQL">
|
||||
SELECT COUNT(ct.CLICK_ID)
|
||||
FROM click_track_info ct
|
||||
WHERE
|
||||
ct.ARTICLE_ID = #{articleId,jdbcType=VARCHAR}
|
||||
</sql>
|
||||
|
||||
<sql id="sharedSQL">
|
||||
<sql id="sharedSQL">
|
||||
SELECT COUNT(FORWARD_ID)
|
||||
FROM article_forward_track aft
|
||||
WHERE aft.ARTICLE_ID = #{articleId,jdbcType=VARCHAR}
|
||||
</sql>
|
||||
<resultMap id="PublishedDetailsMap"
|
||||
type="com.ruoyi.content.domain.ArticeClickInfo">
|
||||
<result column="CLICK_USER_NICKNAME" property="clickUserNickname"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="CLICK_USER_HEADIMGURL" property="clickUserHeadimgurl"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="SHARE_STATE" property="shareState" jdbcType="VARCHAR" />
|
||||
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR" />
|
||||
<result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR" />
|
||||
<result column="WATCH_TIME" property="watchTime" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="PublishedDetailsMap"
|
||||
type="com.ruoyi.content.domain.ArticeClickInfo">
|
||||
<result column="CLICK_USER_NICKNAME" property="clickUserNickname"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="CLICK_USER_HEADIMGURL" property="clickUserHeadimgurl"
|
||||
jdbcType="VARCHAR"/>
|
||||
<result column="SHARE_STATE" property="shareState" jdbcType="VARCHAR"/>
|
||||
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR"/>
|
||||
<result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR"/>
|
||||
<result column="WATCH_TIME" property="watchTime" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 查询我的发布列表 -->
|
||||
<!-- <select id="queryAllPublishedArticles" resultMap="PublishedArticlesMap"
|
||||
parameterType="java.lang.String"> SELECT ap.PUBLISH_ID,ap.ARTICLE_ID,ai.ARTICLE_NAME,ai.LIST_PIC_URL,ap.CREATE_DATE
|
||||
, ( <include refid="countVisitorSQL" /> ) as VISITOR_COUNT, ( <include refid="countSharedSQL"
|
||||
/> ) as SHARED_COUNT FROM article_publish_track ap, article_info ai WHERE
|
||||
ap.USER_ID = #{userId,jdbcType=VARCHAR} AND ap.ARTICLE_ID = ai.ARTICLE_ID
|
||||
ORDER BY ap.CREATE_DATE,ap.CREATE_TIME </select> -->
|
||||
<!-- 查询我的发布列表 -->
|
||||
<!-- <select id="queryAllPublishedArticles" resultMap="PublishedArticlesMap"
|
||||
parameterType="java.lang.String"> SELECT ap.PUBLISH_ID,ap.ARTICLE_ID,ai.ARTICLE_NAME,ai.LIST_PIC_URL,ap.CREATE_DATE
|
||||
, ( <include refid="countVisitorSQL" /> ) as VISITOR_COUNT, ( <include refid="countSharedSQL"
|
||||
/> ) as SHARED_COUNT FROM article_publish_track ap, article_info ai WHERE
|
||||
ap.USER_ID = #{userId,jdbcType=VARCHAR} AND ap.ARTICLE_ID = ai.ARTICLE_ID
|
||||
ORDER BY ap.CREATE_DATE,ap.CREATE_TIME </select> -->
|
||||
|
||||
<!-- 查询单条文章浏览详情 -->
|
||||
<select id="queryPublishedById" resultMap="PublishedArticlesMap"
|
||||
parameterType="java.lang.String">
|
||||
SELECT
|
||||
ap.PUBLISH_ID,ap.ARTICLE_ID,ai.ARTICLE_NAME,ai.LIST_PIC_URL,ap.CREATE_DATE
|
||||
,
|
||||
(
|
||||
<include refid="countVisitorSQL" />
|
||||
) as VISITOR_COUNT,
|
||||
(
|
||||
<include refid="countSharedSQL" />
|
||||
) as SHARED_COUNT
|
||||
FROM article_publish_track ap, article_info ai
|
||||
WHERE
|
||||
ap.USER_ID = #{userId,jdbcType=VARCHAR}
|
||||
AND ap.ARTICLE_ID =
|
||||
#{articleId,jdbcType=VARCHAR}
|
||||
AND ai.ARTICLE_ID =
|
||||
#{articleId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<!-- 查询单条文章浏览详情 -->
|
||||
<select id="queryPublishedById" resultMap="PublishedArticlesMap"
|
||||
parameterType="java.lang.String">
|
||||
SELECT
|
||||
ap.PUBLISH_ID,ap.ARTICLE_ID,ai.ARTICLE_NAME,ai.LIST_PIC_URL,ap.CREATE_DATE
|
||||
,
|
||||
(
|
||||
<include refid="countVisitorSQL"/>
|
||||
) as VISITOR_COUNT,
|
||||
(
|
||||
<include refid="countSharedSQL"/>
|
||||
) as SHARED_COUNT
|
||||
FROM article_publish_track ap, article_info ai
|
||||
WHERE
|
||||
ap.USER_ID = #{userId,jdbcType=VARCHAR}
|
||||
AND ap.ARTICLE_ID =
|
||||
#{articleId,jdbcType=VARCHAR}
|
||||
AND ai.ARTICLE_ID =
|
||||
#{articleId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<!-- 查询浏览详情 -->
|
||||
<select id="queryPublishedDetails" resultMap="PublishedDetailsMap"
|
||||
parameterType="java.lang.String">
|
||||
<!-- 查询浏览详情 -->
|
||||
<select id="queryPublishedDetails" resultMap="PublishedDetailsMap"
|
||||
parameterType="java.lang.String">
|
||||
SELECT
|
||||
ct.CLICK_USER_NICKNAME,ct.WATCH_TIME,ct.CREATE_DATE,ct.CREATE_TIME,ct.SHARE_STATE,
|
||||
CLICK_USER_HEADIMGURL
|
||||
|
|
@ -161,17 +161,17 @@
|
|||
=#{articleId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<!-- 根据连接查询文章是否存在 -->
|
||||
<select id="queryArticleByUrl" resultType="java.lang.Integer"
|
||||
parameterType="java.lang.String">
|
||||
<!-- 根据连接查询文章是否存在 -->
|
||||
<select id="queryArticleByUrl" resultType="java.lang.Integer"
|
||||
parameterType="java.lang.String">
|
||||
SELECT COUNT(1) FROM article_info
|
||||
WHERE ORIGINAL_URL =
|
||||
#{originalUrl,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<!-- 根据文章的url和创建人查该条数据 -->
|
||||
<select id="queryArticleInfoByCompanyId" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.String">
|
||||
<!-- 根据文章的url和创建人查该条数据 -->
|
||||
<select id="queryArticleInfoByCompanyId" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.String">
|
||||
SELECT ARTICLE_ID, ARTICLE_NAME, PUSH_DATE,
|
||||
ARTICLE_AUTHOR, ARTICLE_EDIT_URL, ARTICLE_VIEW_URL,
|
||||
LIST_PIC_URL,
|
||||
|
|
@ -190,92 +190,90 @@
|
|||
#{originalUrl,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<!-- 更新个人已经发布过的文章 -->
|
||||
<update id="updatePublishedArticle" parameterType="java.util.Map">
|
||||
UPDATE article_info ai,article_publish_track ap
|
||||
set ap.UPDATE_DATE =
|
||||
#{updateDate,jdbcType=VARCHAR},ap.UPDATE_TIME =
|
||||
#{updateTime,jdbcType=VARCHAR}
|
||||
<if test="companyId == null or companyId == ''">
|
||||
,ai.ARTICLE_CONTENT =
|
||||
#{articleContent,jdbcType=LONGVARCHAR}
|
||||
</if>
|
||||
<if test="shareTitle != null and shareTitle != ''">
|
||||
,ai.SHARE_TITLE = #{shareTitle,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="articleName != null and articleName != ''">
|
||||
,ai.ARTICLE_NAME = #{articleName,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="adId != null and adId != ''">
|
||||
,ap.AD_ID = #{adId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="cardId != null and adId != ''">
|
||||
,ap.CARD_ID = #{cardId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
WHERE ai.ARTICLE_ID=ap.ARTICLE_ID AND ap.PUBLISH_ID =
|
||||
#{publishId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<!-- 更新个人已经发布过的文章 -->
|
||||
<update id="updatePublishedArticle" parameterType="java.util.Map">
|
||||
UPDATE article_info ai,article_publish_track ap
|
||||
set ap.UPDATE_DATE =
|
||||
#{updateDate,jdbcType=VARCHAR},ap.UPDATE_TIME =
|
||||
#{updateTime,jdbcType=VARCHAR}
|
||||
<if test="companyId == null or companyId == ''">
|
||||
,ai.ARTICLE_CONTENT =
|
||||
#{articleContent,jdbcType=LONGVARCHAR}
|
||||
</if>
|
||||
<if test="shareTitle != null and shareTitle != ''">
|
||||
,ai.SHARE_TITLE = #{shareTitle,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="articleName != null and articleName != ''">
|
||||
,ai.ARTICLE_NAME = #{articleName,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="adId != null and adId != ''">
|
||||
,ap.AD_ID = #{adId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="cardId != null and adId != ''">
|
||||
,ap.CARD_ID = #{cardId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
WHERE ai.ARTICLE_ID=ap.ARTICLE_ID AND ap.PUBLISH_ID =
|
||||
#{publishId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
||||
<select id="selectAllWithLimit"
|
||||
parameterType="com.ruoyi.content.domain.PublishedArticleInfo"
|
||||
resultMap="PublishedArticlesMap">
|
||||
SELECT
|
||||
ai.ARTICLE_ID,
|
||||
ai.ARTICLE_NAME,
|
||||
ai.PUSH_DATE,
|
||||
ai.ARTICLE_AUTHOR,
|
||||
ai.LIST_PIC_URL,
|
||||
ai.SPECIAL,
|
||||
ai.CHANNEL_ID,
|
||||
ai.COMPANY_ID,
|
||||
ai.ORIGINAL_URL,
|
||||
ai.SHARE_IMG_URL,
|
||||
ai.SHARE_TITLE,
|
||||
ai.ARTICLE_STATE,
|
||||
ai.SHARE_DES,
|
||||
ai.CREATE_DATE,
|
||||
ai.CREATE_TIME,
|
||||
ai.CREATE_USER,
|
||||
ai.UPDATE_DATE,
|
||||
ai.UPDATE_TIME,
|
||||
ai.MODIFIED_EDIT_URL,
|
||||
ai.MODIFIED_VIEW_URL
|
||||
<!-- , ( <include refid="pageVisitorSQL" /> ) AS VISITOR_COUNT, ( <include
|
||||
refid="sharedSQL" /> ) AS SHARE_COUNT -->
|
||||
FROM
|
||||
article_info ai WHERE 1=1
|
||||
<if test="articelName != null and articelName!=''">
|
||||
and ai.ARTICLE_NAME like CONCAT(CONCAT('%', #{articelName,
|
||||
jdbcType=VARCHAR}), '%') </if>
|
||||
<if test="articelAuthor != null and articelAuthor!=''">
|
||||
and ai.ARTICLE_AUTHOR like CONCAT(CONCAT('%',
|
||||
#{articelAuthor,
|
||||
jdbcType=VARCHAR}), '%') </if>
|
||||
<if test="special != null and special!=''">
|
||||
and ai.SPECIAL = #{special,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="channelId != null and channelId !=''">
|
||||
and ai.CHANNEL_ID = #{channelId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="companyId != null and companyId !=''">
|
||||
and ai.COMPANY_ID = #{companyId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="articleState != null">
|
||||
and ai.ARTICLE_STATE in
|
||||
<foreach collection="articleState" item="articleState" index="index"
|
||||
open="(" close=")" separator=","> #{articleState} </foreach>
|
||||
</if>
|
||||
order by ai.CREATE_DATE DESC,ai.CREATE_TIME DESC, ai.UPDATE_DATE
|
||||
DESC,ai.UPDATE_TIME DESC
|
||||
limit
|
||||
#{startRow,jdbcType=DECIMAL},#{rows,jdbcType=DECIMAL}
|
||||
</select>
|
||||
<select id="selectAllWithLimit"
|
||||
parameterType="com.ruoyi.content.domain.PublishedArticleInfo"
|
||||
resultMap="PublishedArticlesMap">
|
||||
SELECT
|
||||
ai.ARTICLE_ID,
|
||||
ai.ARTICLE_NAME,
|
||||
ai.PUSH_DATE,
|
||||
ai.ARTICLE_AUTHOR,
|
||||
ai.LIST_PIC_URL,
|
||||
ai.SPECIAL,
|
||||
ai.CHANNEL_ID,
|
||||
ai.COMPANY_ID,
|
||||
ai.ORIGINAL_URL,
|
||||
ai.SHARE_IMG_URL,
|
||||
ai.SHARE_TITLE,
|
||||
ai.ARTICLE_STATE,
|
||||
ai.SHARE_DES,
|
||||
ai.CREATE_DATE,
|
||||
ai.CREATE_TIME,
|
||||
ai.CREATE_USER,
|
||||
ai.UPDATE_DATE,
|
||||
ai.UPDATE_TIME,
|
||||
ai.MODIFIED_EDIT_URL,
|
||||
ai.MODIFIED_VIEW_URL
|
||||
<!-- , ( <include refid="pageVisitorSQL" /> ) AS VISITOR_COUNT, ( <include
|
||||
refid="sharedSQL" /> ) AS SHARE_COUNT -->
|
||||
FROM
|
||||
article_info ai WHERE 1=1
|
||||
<if test="articelName != null and articelName!=''">
|
||||
and ai.ARTICLE_NAME like CONCAT(CONCAT('%', #{articelName,
|
||||
jdbcType=VARCHAR}), '%')
|
||||
</if>
|
||||
<if test="articelAuthor != null and articelAuthor!=''">
|
||||
and ai.ARTICLE_AUTHOR like CONCAT(CONCAT('%',
|
||||
#{articelAuthor,
|
||||
jdbcType=VARCHAR}), '%')
|
||||
</if>
|
||||
<if test="special != null and special!=''">
|
||||
and ai.SPECIAL = #{special,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="channelId != null and channelId !=''">
|
||||
and ai.CHANNEL_ID = #{channelId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="companyId != null and companyId !=''">
|
||||
and ai.COMPANY_ID = #{companyId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="articleState != null">
|
||||
and ai.ARTICLE_STATE in
|
||||
<foreach collection="articleState" item="articleState" index="index"
|
||||
open="(" close=")" separator=",">#{articleState}
|
||||
</foreach>
|
||||
</if>
|
||||
order by ai.CREATE_DATE DESC,ai.CREATE_TIME DESC, ai.UPDATE_DATE DESC,ai.UPDATE_TIME DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="queryModifiedEditUrlByArticleId" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.Integer">
|
||||
<select id="queryModifiedEditUrlByArticleId" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.Integer">
|
||||
select ARTICLE_ID, ARTICLE_NAME, PUSH_DATE,
|
||||
ARTICLE_AUTHOR, ARTICLE_EDIT_URL,
|
||||
ARTICLE_VIEW_URL,
|
||||
|
|
@ -290,89 +288,87 @@
|
|||
#{articleId,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<!-- 单条查询公司发布文章 -->
|
||||
<select id="queryCompanyArticleById" resultMap="CompanyArticlesMap">
|
||||
SELECT
|
||||
apt.PUBLISH_ID,apt.ARTICLE_ID,apt.PUBLISH_VIEW_URL,ai.ARTICLE_NAME,ai.LIST_PIC_URL,apt.CREATE_DATE
|
||||
,
|
||||
(
|
||||
<include refid="pageVisitorSQL" />
|
||||
) as VISITOR_COUNT,
|
||||
(
|
||||
<include refid="sharedSQL" />
|
||||
) as SHARED_COUNT
|
||||
FROM article_publish_track apt, article_info ai
|
||||
WHERE
|
||||
apt.PUBLISH_ID =#{publishId,jdbcType=VARCHAR}
|
||||
AND ai.ARTICLE_ID =
|
||||
#{articleId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<!-- 单条查询公司发布文章 -->
|
||||
<select id="queryCompanyArticleById" resultMap="CompanyArticlesMap">
|
||||
SELECT
|
||||
apt.PUBLISH_ID,apt.ARTICLE_ID,apt.PUBLISH_VIEW_URL,ai.ARTICLE_NAME,ai.LIST_PIC_URL,apt.CREATE_DATE
|
||||
,
|
||||
(
|
||||
<include refid="pageVisitorSQL"/>
|
||||
) as VISITOR_COUNT,
|
||||
(
|
||||
<include refid="sharedSQL"/>
|
||||
) as SHARED_COUNT
|
||||
FROM article_publish_track apt, article_info ai
|
||||
WHERE
|
||||
apt.PUBLISH_ID =#{publishId,jdbcType=VARCHAR}
|
||||
AND ai.ARTICLE_ID =
|
||||
#{articleId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<!-- 根据文章主键集合查询文章对应的所有标签集合 -->
|
||||
<select id="findArticleLabelRelByArticleIds" resultMap="ArticleLabelRelDTOMap"
|
||||
parameterType="java.util.ArrayList">
|
||||
SELECT
|
||||
r.ARTICLE_ID,lab.label_id,lab.LABEL_NAME
|
||||
FROM
|
||||
article_label_relationship r
|
||||
INNER JOIN article_label lab ON
|
||||
lab.LABEL_ID = r.LABEL_ID
|
||||
WHERE
|
||||
r.ARTICLE_ID IN
|
||||
<foreach collection="articelId" item="id" index="index" open="("
|
||||
close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<resultMap id="noSendResult" type="com.ruoyi.content.domain.ArticlePublishSend">
|
||||
<id column="ID" property="id" jdbcType="INTEGER" />
|
||||
<result column="ARTICLE_ID" property="articleId" jdbcType="INTEGER" />
|
||||
<result column="PUBLISH_ID" property="publishId" jdbcType="VARCHAR" />
|
||||
<result column="SEND_TYPE" property="sendType" jdbcType="VARCHAR" />
|
||||
<result column="GROUP_ID" property="groupId" jdbcType="VARCHAR" />
|
||||
<result column="GROUP_NAME" property="groupName" jdbcType="VARCHAR" />
|
||||
<result column="OPERATE_ID" property="operateId" jdbcType="VARCHAR" />
|
||||
<result column="OPERATE_NAME" property="operateName" jdbcType="VARCHAR" />
|
||||
<result column="PUBLISH_DATE" property="publishDate" jdbcType="VARCHAR" />
|
||||
<result column="PUBLISH_TIME" property="publishTime" jdbcType="VARCHAR" />
|
||||
<result column="OPERATE_DATE" property="operateDate" jdbcType="VARCHAR" />
|
||||
<result column="OPERATE_TIME" property="operateTime" jdbcType="VARCHAR" />
|
||||
<result column="SEND_STATE" property="sendState" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<select id="noSendPublishArticle" parameterType="map" resultMap="noSendResult">
|
||||
SELECT
|
||||
ID,
|
||||
ARTICLE_ID,
|
||||
PUBLISH_ID,
|
||||
SEND_TYPE,
|
||||
GROUP_ID,
|
||||
GROUP_NAME,
|
||||
OPERATE_ID,
|
||||
OPERATE_NAME,
|
||||
PUBLISH_DATE,
|
||||
PUBLISH_TIME,
|
||||
OPERATE_DATE,
|
||||
OPERATE_TIME,
|
||||
SEND_STATE
|
||||
FROM
|
||||
article_publish_send WHERE 1=1
|
||||
<if test="articleId != null and articleId !=''">
|
||||
and ARTICLE_ID = #{articleId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="publishId != null and publishId !=''">
|
||||
and PUBLISH_ID = #{publishId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="sendState != null and sendState !=''">
|
||||
and SEND_STATE = #{sendState,jdbcType=VARCHAR}
|
||||
</if>
|
||||
order by PUBLISH_DATE desc,PUBLISH_TIME desc
|
||||
limit
|
||||
#{startRow,jdbcType=DECIMAL},#{rows,jdbcType=DECIMAL}
|
||||
</select>
|
||||
<!-- 根据文章主键集合查询文章对应的所有标签集合 -->
|
||||
<select id="findArticleLabelRelByArticleIds" resultMap="ArticleLabelRelDTOMap"
|
||||
parameterType="java.util.ArrayList">
|
||||
SELECT
|
||||
r.ARTICLE_ID,lab.label_id,lab.LABEL_NAME
|
||||
FROM
|
||||
article_label_relationship r
|
||||
INNER JOIN article_label lab ON
|
||||
lab.LABEL_ID = r.LABEL_ID
|
||||
WHERE
|
||||
r.ARTICLE_ID IN
|
||||
<foreach collection="articelId" item="id" index="index" open="("
|
||||
close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<resultMap id="noSendResult" type="com.ruoyi.content.domain.ArticlePublishSend">
|
||||
<id column="ID" property="id" jdbcType="INTEGER"/>
|
||||
<result column="ARTICLE_ID" property="articleId" jdbcType="INTEGER"/>
|
||||
<result column="PUBLISH_ID" property="publishId" jdbcType="VARCHAR"/>
|
||||
<result column="SEND_TYPE" property="sendType" jdbcType="VARCHAR"/>
|
||||
<result column="GROUP_ID" property="groupId" jdbcType="VARCHAR"/>
|
||||
<result column="GROUP_NAME" property="groupName" jdbcType="VARCHAR"/>
|
||||
<result column="OPERATE_ID" property="operateId" jdbcType="VARCHAR"/>
|
||||
<result column="OPERATE_NAME" property="operateName" jdbcType="VARCHAR"/>
|
||||
<result column="PUBLISH_DATE" property="publishDate" jdbcType="VARCHAR"/>
|
||||
<result column="PUBLISH_TIME" property="publishTime" jdbcType="VARCHAR"/>
|
||||
<result column="OPERATE_DATE" property="operateDate" jdbcType="VARCHAR"/>
|
||||
<result column="OPERATE_TIME" property="operateTime" jdbcType="VARCHAR"/>
|
||||
<result column="SEND_STATE" property="sendState" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="noSendPublishArticle" parameterType="map" resultMap="noSendResult">
|
||||
SELECT
|
||||
ID,
|
||||
ARTICLE_ID,
|
||||
PUBLISH_ID,
|
||||
SEND_TYPE,
|
||||
GROUP_ID,
|
||||
GROUP_NAME,
|
||||
OPERATE_ID,
|
||||
OPERATE_NAME,
|
||||
PUBLISH_DATE,
|
||||
PUBLISH_TIME,
|
||||
OPERATE_DATE,
|
||||
OPERATE_TIME,
|
||||
SEND_STATE
|
||||
FROM
|
||||
article_publish_send WHERE 1=1
|
||||
<if test="articleId != null and articleId !=''">
|
||||
and ARTICLE_ID = #{articleId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="publishId != null and publishId !=''">
|
||||
and PUBLISH_ID = #{publishId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="sendState != null and sendState !=''">
|
||||
and SEND_STATE = #{sendState,jdbcType=VARCHAR}
|
||||
</if>
|
||||
order by PUBLISH_DATE desc,PUBLISH_TIME desc
|
||||
limit
|
||||
#{startRow,jdbcType=DECIMAL},#{rows,jdbcType=DECIMAL}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
|
|
@ -0,0 +1,571 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<th:block th:include="include :: header('文章列表')"/>
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>文章名称:</label>
|
||||
<input type="text" name="articleName"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||
class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
||||
class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal inmodal" id="myModal2" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" style="width: 500px;">
|
||||
<div class="modal-content animated fadeIn">
|
||||
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5; padding: 15px 15px;">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">Close</span>
|
||||
</button>
|
||||
<h5 class="modal-title" style="text-align: left; font-size: 23px;">添加标签</h5>
|
||||
</div>
|
||||
<div class="modal-body" style="background: #ffffff;">
|
||||
<form class="form-horizontal m" id="form-picAdverts-add">
|
||||
<div class="col-md-12" style="margin-top: -15px;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">添加标签:</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" th:id="labelChoice" name="labelChoice"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer" style="border-top: 0px solid #e5e5e5;">
|
||||
<button type="button" class="btn btn-white" data-dismiss="modal" th:id="modalColse">关闭</button>
|
||||
<button type="button" class="btn btn-primary" th:onclick="addArticleLabel()">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal inmodal" id="myModal3" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content animated fadeIn">
|
||||
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5; padding: 15px 15px;">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">Close</span>
|
||||
</button>
|
||||
<h5 class="modal-title" style="text-align: left; font-size: 23px;">业务员分享情况</h5>
|
||||
</div>
|
||||
<div class="modal-body" style="background: #ffffff; margin-top: -20px;">
|
||||
<form id="form2">
|
||||
<div class="select-list">
|
||||
<input type="text" th:hidden="true" name="articleId" th:id="articleId"/>
|
||||
<input type="text" th:hidden="true" name="userId" th:id="userId"/>
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table1"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="border-top: 0px solid #e5e5e5;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal inmodal" id="myModal4" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" style="width: 900px;">
|
||||
<div class="modal-content animated fadeIn">
|
||||
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5; padding: 15px 15px;">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">Close</span>
|
||||
</button>
|
||||
<h5 class="modal-title" style="text-align: left; font-size: 23px;">客户观看情况</h5>
|
||||
</div>
|
||||
<div class="modal-body" style="background: #ffffff; margin-top: -20px;">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table3"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="border-top: 0px solid #e5e5e5;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal inmodal" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content animated fadeIn">
|
||||
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5; padding: 15px 15px;">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">Close</span>
|
||||
</button>
|
||||
<h5 class="modal-title" style="text-align: left; font-size: 23px;">客户来源</h5>
|
||||
</div>
|
||||
<div class="modal-body" style="background: #ffffff; margin-top: -20px;">
|
||||
<form id="form5">
|
||||
<div class="select-list">
|
||||
<input type="text" th:hidden="true" name="clickId" th:id="clickId"/>
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table5"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="border-top: 0px solid #e5e5e5;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer"/>
|
||||
<script th:inline="javascript">
|
||||
var path = ctx;
|
||||
var prefix = ctx + "article";
|
||||
|
||||
var labelArticleId = "";
|
||||
var clickCount = 0;
|
||||
var publishCount = 0;
|
||||
var sharingCount = 0;
|
||||
|
||||
$(function () {
|
||||
var options = {
|
||||
id: "bootstrap-table",
|
||||
url: prefix + "/articleArry",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "文章信息",
|
||||
columns: [
|
||||
{
|
||||
field: 'articleId',
|
||||
title: 'id',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'articleName',
|
||||
title: '文章名称'
|
||||
},
|
||||
{
|
||||
field: 'pushDate',
|
||||
title: '发布时间',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'articleAuthor',
|
||||
title: '文章作者',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'SPECIAL',
|
||||
title: '专栏',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'channelId',
|
||||
title: '所属栏目id',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'articleState',
|
||||
title: '收录状态:0未被收录2已收录1删除',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'createUser',
|
||||
title: '创建人',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'originalUrl',
|
||||
title: '原文连接地址',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'shareTitle',
|
||||
title: '分享标题',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'shareDes',
|
||||
title: '分享描述',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'updateDate',
|
||||
title: '更新日期'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '更新时间'
|
||||
},
|
||||
{
|
||||
field: 'visitorCount',
|
||||
title: '浏览量'
|
||||
},
|
||||
{
|
||||
field: 'shareCount',
|
||||
title: '分享量'
|
||||
},
|
||||
{
|
||||
field: 'modifiedEditUrl',
|
||||
title: '预览路径',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'modifiedViewUrl',
|
||||
title: '编辑路径',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-primary btn-xs" data-toggle="modal" data-target="#myModal3" onclick="sharingTrack(\'' + row.articleId + '\')")"><i class="fa fa-eye"></i>分享与浏览情况</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs" data-toggle="modal" data-target="#myModal2" onclick="changeArticleId(\'' + row.articleId + '\')"><i class="fa fa-bookmark-o"></i>添加标签</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="delArticleInfo(\'' + row.articleId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
|
||||
articleLabelChoice();
|
||||
|
||||
sharingTrack();
|
||||
|
||||
publishInfoList();
|
||||
|
||||
sharingTrackList();
|
||||
});
|
||||
|
||||
function changeArticleId(id) {
|
||||
labelArticleId = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签信息
|
||||
*/
|
||||
function articleLabelChoice() {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: path + 'label/queryLabel',
|
||||
data: {},
|
||||
async: false,
|
||||
success: function (data) {
|
||||
if (data.result) {
|
||||
var obj = data.object.labelList;
|
||||
for (var i = 0; i < obj.length; i++) {
|
||||
$("#labelChoice").append(
|
||||
"<option value='" + obj[i].labelId + "'>"
|
||||
+ obj[i].labelName + "</option>");
|
||||
}
|
||||
} else {
|
||||
$.modal.alertError("网络异常,请稍后再试!");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delArticleInfo(id) {
|
||||
$.ajax({
|
||||
url: "delArticleInfo",
|
||||
data: {
|
||||
ids: id
|
||||
},
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
if (data.result) {
|
||||
const code = {
|
||||
'code': 0
|
||||
};
|
||||
$.operate.successCallback(code);
|
||||
} else {
|
||||
$.modal.alertError(data.info);
|
||||
}
|
||||
},
|
||||
error: function (textStatus, e) {
|
||||
$.modal.alertError('系统异常,请稍后重试!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章添加标签
|
||||
*/
|
||||
function addArticleLabel() {
|
||||
var labelIds = [];
|
||||
$("#labelChoice option:selected").each(function () {
|
||||
labelIds.push($(this).val())
|
||||
})
|
||||
$.ajax({
|
||||
url: path + "label/addlabel",
|
||||
data: {
|
||||
"labelIds": labelIds.join(','),
|
||||
"articleId": labelArticleId,
|
||||
},
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
if (data.result) {
|
||||
$.modal.alertSuccess(data.info);
|
||||
$('#modalColse').trigger("click");
|
||||
} else {
|
||||
$.modal.alertError(data.info);
|
||||
}
|
||||
},
|
||||
error: function (textStatus, e) {
|
||||
$.modal.alertError('系统异常,请稍后重试!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function sharingTrack(id) {
|
||||
$('#articleId').val(id);
|
||||
if (clickCount > 0) {
|
||||
$.table.search('form2', 'bootstrap-table1');
|
||||
} else {
|
||||
var options = {
|
||||
id: "bootstrap-table1",
|
||||
url: path + "article/articleSharingTrackList",
|
||||
createUrl: prefix + "/add",
|
||||
removeUrl: prefix + "/remove",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
modalName: "业务员分享情况",
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
columns: [
|
||||
{
|
||||
field: 'userId',
|
||||
title: '用户ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'articleId',
|
||||
title: '文章id',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'headImgUrl',
|
||||
title: '发布业务员头像',
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<img src="'
|
||||
+ decodeURIComponent(row.headImgUrl)
|
||||
+ '" id="img'
|
||||
+ row.userId
|
||||
+ '" style = "width:30;height:30px;border-radius:50px" />');
|
||||
return actions.join('');
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'nickName',
|
||||
title: '发布业务员昵称'
|
||||
},
|
||||
{
|
||||
field: 'createUser',
|
||||
title: '工号'
|
||||
},
|
||||
{
|
||||
field: 'createDate',
|
||||
title: '发布日期'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs" data-toggle="modal" data-target="#myModal4" onclick="publishInfoList(\'' + row.userId + '\')"><i class="fa fa-user"></i>有谁看了</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
clickCount++;
|
||||
}
|
||||
}
|
||||
|
||||
function publishInfoList(id) {
|
||||
$('#userId').val(id);
|
||||
if (publishCount > 0) {
|
||||
$.table.search('form2', 'bootstrap-table3');
|
||||
} else {
|
||||
var options = {
|
||||
id: "bootstrap-table3",
|
||||
url: path + "article/publishInfoList",
|
||||
createUrl: prefix + "/add",
|
||||
removeUrl: prefix + "/remove",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
modalName: "客户观看情况",
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
columns: [
|
||||
{
|
||||
field: 'clickId',
|
||||
title: '用户clickid',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'openId',
|
||||
title: '用户openId'
|
||||
},
|
||||
{
|
||||
field: 'clientHeadImgurl',
|
||||
title: '用户头像',
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<img src="'
|
||||
+ decodeURIComponent(row.clientHeadImgurl)
|
||||
+ '" id="img'
|
||||
+ row.userId
|
||||
+ '" style = "width:30;height:30px;border-radius:50px" />');
|
||||
return actions.join('');
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'clientNickName',
|
||||
title: '用户昵称',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.clientNickName == "") {
|
||||
return '匿名';
|
||||
}
|
||||
return row.clientNickName;
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
field: 'watchTime',
|
||||
title: '观看时长(s/秒)'
|
||||
},
|
||||
{
|
||||
field: 'clickDate',
|
||||
title: '观看日期'
|
||||
},
|
||||
{
|
||||
field: 'clickTime',
|
||||
title: '观看时间'
|
||||
},
|
||||
{
|
||||
field: 'shareState',
|
||||
title: '分享状态',
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
if (row.shareState === '0' || row.shareState === '' || row.shareState === null) {
|
||||
actions.push('未分享');
|
||||
}
|
||||
if (row.shareState === '1') {
|
||||
actions.push('对话框分享');
|
||||
}
|
||||
if (row.shareState === '2') {
|
||||
actions.push('朋友圈分享');
|
||||
}
|
||||
if (row.shareState === '5') {
|
||||
actions.push('对话框和朋友圈都分享');
|
||||
}
|
||||
return actions.join('');
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs" data-toggle="modal" data-target="#myModal5" onclick="sharingTrackList(\'' + row.clickId + '\')"><i class="fa fa-user"></i>客户来源</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
publishCount++;
|
||||
}
|
||||
}
|
||||
|
||||
function sharingTrackList(id) {
|
||||
$('#clickId').val(id);
|
||||
if (sharingCount > 0) {
|
||||
$.table.search('form5', 'bootstrap-table5');
|
||||
} else {
|
||||
var options = {
|
||||
id: "bootstrap-table5",
|
||||
url: path + "article/articleSharingTrackInfo",
|
||||
createUrl: prefix + "/add",
|
||||
removeUrl: prefix + "/remove",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
modalName: "客户来源",
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
columns: [
|
||||
{
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
return $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'headImgUrl',
|
||||
title: '用户头像',
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<img src="'
|
||||
+ decodeURIComponent(row.headImgUrl)
|
||||
+ '" style = "width:30;height:30px;border-radius:50px" />');
|
||||
return actions.join('');
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'nickName',
|
||||
title: '用户昵称',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.nickName == "") {
|
||||
return '匿名';
|
||||
}
|
||||
return row.nickName;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'toShareState',
|
||||
title: '点开方式',
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
if (row.toShareState == "groupmessage") {
|
||||
actions.push('群组');
|
||||
}
|
||||
if (row.toShareState == "timeline") {
|
||||
actions.push('朋友圈');
|
||||
}
|
||||
if (row.toShareState == "singlemessage") {
|
||||
actions.push('个人');
|
||||
}
|
||||
return actions.join('');
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'openId',
|
||||
title: '用户openId'
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
sharingCount++;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -28,7 +28,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-layout-center">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
|
|
@ -74,7 +73,7 @@
|
|||
</div>
|
||||
<div class="modal inmodal" id="myModal2" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content animated flipInY">
|
||||
<div class="modal-content animated fadeIn">
|
||||
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5;">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">Close</span>
|
||||
|
|
@ -168,7 +167,7 @@
|
|||
</div>
|
||||
<div class="modal inmodal" id="myModal3" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content animated flipInY">
|
||||
<div class="modal-content animated fadeIn">
|
||||
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5;">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">Close</span>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
<div class="modal inmodal" id="myModal2" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content animated flipInY">
|
||||
<div class="modal-content animated fadeIn">
|
||||
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5;">
|
||||
<input th:hidden="true" value="" th:id="pictureId"/>
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
|
|
|
|||
Loading…
Reference in New Issue