文章列表
This commit is contained in:
parent
631870cbe8
commit
1c6f652642
|
|
@ -1,5 +1,7 @@
|
||||||
package com.ruoyi.content.controller;
|
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.common.utils.DateUtils;
|
||||||
import com.ruoyi.content.domain.ArticleInfo;
|
import com.ruoyi.content.domain.ArticleInfo;
|
||||||
import com.ruoyi.content.domain.PageDTO;
|
import com.ruoyi.content.domain.PageDTO;
|
||||||
|
|
@ -12,6 +14,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
|
@ -30,50 +33,39 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/article")
|
@RequestMapping("/article")
|
||||||
public class ArticleManageController {
|
public class ArticleManageController extends BaseController {
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(ArticleManageController.class);
|
private final static Logger logger = LoggerFactory.getLogger(ArticleManageController.class);
|
||||||
|
private String prefix = "content/article";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ArticleService articleService;
|
private ArticleService articleService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public String articleList() {
|
||||||
|
return prefix + "/articleList";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有公司发布的文章信息
|
* 查询所有公司发布的文章信息
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/articleArry")
|
@RequestMapping("/articleArry")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public PageDTO articleArry(HttpServletRequest request, HttpServletResponse response) {
|
public TableDataInfo articleArry(HttpServletRequest request) throws Exception {
|
||||||
logger.info("查询文章列表的控制层方法开始!");
|
logger.info("查询文章列表的控制层方法开始!");
|
||||||
Thread.currentThread().setName(UUID.randomUUID().toString());
|
String articelName = request.getParameter("articleName");
|
||||||
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 articelAuthor = request.getParameter("articelAuthor");
|
||||||
String channelId = request.getParameter("channelId");
|
String channelId = request.getParameter("channelId");
|
||||||
String special = request.getParameter("special");
|
String special = request.getParameter("special");
|
||||||
String articleState = request.getParameter("articleState");
|
String articleState = request.getParameter("articleState");
|
||||||
int rows = Integer.parseInt(rowsVal);
|
startPage();
|
||||||
int startRow = rows * (Integer.parseInt(page) - 1);
|
List<PublishedArticleInfo> list = articleService.queryArticle(articelName, articelAuthor,
|
||||||
List<PublishedArticleInfo> list = articleService.queryArticle(startRow, rows, articelName, articelAuthor,
|
|
||||||
special, channelId, articleState);
|
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();
|
|
||||||
}
|
|
||||||
logger.info("查询文章列表的控制层方法结束!");
|
logger.info("查询文章列表的控制层方法结束!");
|
||||||
return pageDTO;
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package com.ruoyi.content.controller;
|
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.ClickTrackInfo;
|
||||||
import com.ruoyi.content.domain.ClickUserInfo;
|
import com.ruoyi.content.domain.ClickUserInfo;
|
||||||
import com.ruoyi.content.domain.PageDTO;
|
import com.ruoyi.content.domain.PageDTO;
|
||||||
|
|
@ -42,24 +45,27 @@ public class StaffArticleManageController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/articleSharingTrackList")
|
@RequestMapping("/articleSharingTrackList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public PageDTO articleSharingTrack(HttpServletRequest request) {
|
public TableDataInfo articleSharingTrack(HttpServletRequest request) {
|
||||||
|
|
||||||
logger.info("查询文章分享阅读轨迹的控制层方法开始!");
|
logger.info("查询文章分享阅读轨迹的控制层方法开始!");
|
||||||
Thread.currentThread().setName(UUID.randomUUID().toString());
|
Thread.currentThread().setName(UUID.randomUUID().toString());
|
||||||
PageDTO pageDTO = new PageDTO();
|
TableDataInfo pageDTO = new TableDataInfo();
|
||||||
try {
|
try {
|
||||||
String rowsVal = request.getParameter("rows");
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||||
String page = request.getParameter("page");
|
Integer pageNum = pageDomain.getPageNum() - 1;
|
||||||
int rows = Integer.parseInt(rowsVal);
|
Integer pageSize = pageDomain.getPageSize();
|
||||||
int startRow = rows * (Integer.parseInt(page) - 1);
|
|
||||||
String articleId = request.getParameter("articleId");
|
String articleId = request.getParameter("articleId");
|
||||||
|
if (StringUtils.isBlank(articleId)) {
|
||||||
|
return pageDTO;
|
||||||
|
}
|
||||||
// 1.根据文章id去查publish表,找出该文章对应所有业务员
|
// 1.根据文章id去查publish表,找出该文章对应所有业务员
|
||||||
pageDTO = staffArticleManageService.querySalesmanByArticleId(articleId, startRow, rows);
|
pageDTO = staffArticleManageService.querySalesmanByArticleId(articleId, pageNum, pageSize);
|
||||||
pageDTO.setPage(Integer.parseInt(page));
|
|
||||||
|
|
||||||
return pageDTO;
|
return pageDTO;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info("系统异常!", e);
|
logger.info("系统异常!", e);
|
||||||
|
pageDTO.setCode(0);
|
||||||
|
pageDTO.setRows(new ArrayList<>());
|
||||||
|
pageDTO.setTotal(0);
|
||||||
return pageDTO;
|
return pageDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,29 +79,31 @@ public class StaffArticleManageController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/publishInfoList")
|
@RequestMapping("/publishInfoList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public PageDTO publishInfoList(HttpServletRequest request) {
|
public TableDataInfo publishInfoList(HttpServletRequest request) {
|
||||||
|
|
||||||
|
|
||||||
Thread.currentThread().setName(UUID.randomUUID().toString());
|
Thread.currentThread().setName(UUID.randomUUID().toString());
|
||||||
PageDTO pageDTO = new PageDTO();
|
TableDataInfo pageDTO = new TableDataInfo();
|
||||||
try {
|
try {
|
||||||
String rowsVal = request.getParameter("rows");
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||||
String page = request.getParameter("page");
|
Integer pageNum = pageDomain.getPageNum() - 1;
|
||||||
int rows = Integer.parseInt(rowsVal);
|
Integer pageSize = pageDomain.getPageSize();
|
||||||
int startRow = rows * (Integer.parseInt(page) - 1);
|
|
||||||
String userId = request.getParameter("userId");
|
String userId = request.getParameter("userId");
|
||||||
String articleId = request.getParameter("articleId");
|
String articleId = request.getParameter("articleId");
|
||||||
|
|
||||||
|
if (StringUtils.isAnyBlank(articleId, userId)) {
|
||||||
|
return pageDTO;
|
||||||
|
}
|
||||||
|
|
||||||
logger.info("查询该业务员userId[{}]的文章articleId[{}]发布情况开始!", userId, articleId);
|
logger.info("查询该业务员userId[{}]的文章articleId[{}]发布情况开始!", userId, articleId);
|
||||||
|
|
||||||
|
|
||||||
// 1.根据文章id去查publish表,找出该文章对应所有业务员
|
// 1.根据文章id去查publish表,找出该文章对应所有业务员
|
||||||
pageDTO = staffArticleManageService.queryClickInfoByUserId(userId, articleId, startRow, rows);
|
pageDTO = staffArticleManageService.queryClickInfoByUserId(userId, articleId, pageNum, pageSize);
|
||||||
pageDTO.setPage(Integer.parseInt(page));
|
|
||||||
|
|
||||||
return pageDTO;
|
return pageDTO;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info("系统异常!", e);
|
logger.info("系统异常!", e);
|
||||||
|
pageDTO.setCode(0);
|
||||||
|
pageDTO.setRows(new ArrayList<>());
|
||||||
|
pageDTO.setTotal(0);
|
||||||
return pageDTO;
|
return pageDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,16 +117,18 @@ public class StaffArticleManageController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/articleSharingTrackInfo")
|
@RequestMapping("/articleSharingTrackInfo")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Message articleSharingTrackInfo(HttpServletRequest request) {
|
public TableDataInfo articleSharingTrackInfo(HttpServletRequest request) {
|
||||||
Thread.currentThread().setName(UUID.randomUUID().toString());
|
Thread.currentThread().setName(UUID.randomUUID().toString());
|
||||||
Message msg = new Message();
|
Message msg = new Message();
|
||||||
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
||||||
List<ClickUserInfo> clickUserInfos = new ArrayList<ClickUserInfo>();
|
List<ClickUserInfo> clickUserInfos = new ArrayList<ClickUserInfo>();
|
||||||
ClickTrackInfo clickTrackInfo = new ClickTrackInfo();
|
ClickTrackInfo clickTrackInfo = new ClickTrackInfo();
|
||||||
logger.info("查询用户查看分享文章轨迹信息的控制层方法开始!");
|
logger.info("查询用户查看分享文章轨迹信息的控制层方法开始!");
|
||||||
String clickId = request.getParameter("clickId");
|
String clickId = request.getParameter("clickId");
|
||||||
|
TableDataInfo pageDTO = new TableDataInfo();
|
||||||
if (StringUtils.isBlank(clickId)) {
|
if (StringUtils.isBlank(clickId)) {
|
||||||
returnMap.put("ClickTrackInfo", clickTrackInfo);
|
pageDTO.setCode(0);
|
||||||
|
pageDTO.setRows(new ArrayList<>());
|
||||||
|
pageDTO.setTotal(0);
|
||||||
} else {
|
} else {
|
||||||
clickTrackInfo = staffArticleManageService.articleSharingTrackInfo(clickId);
|
clickTrackInfo = staffArticleManageService.articleSharingTrackInfo(clickId);
|
||||||
//发布人id
|
//发布人id
|
||||||
|
|
@ -135,41 +145,51 @@ public class StaffArticleManageController {
|
||||||
logger.info("转换后的用户昵称为:" + userInfo.getNickName());
|
logger.info("转换后的用户昵称为:" + userInfo.getNickName());
|
||||||
} else {
|
} else {
|
||||||
userInfo.setNickName("后台管理员");
|
userInfo.setNickName("后台管理员");
|
||||||
userInfo.setHeadImgUrl("/static/common/image/logo.png");
|
userInfo.setHeadImgUrl("/img/admin.png");
|
||||||
userInfo.setOpenid("");
|
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();
|
String clickUserInfo = clickTrackInfo.getClickUserInfo();
|
||||||
|
List<ClickUserInfo> c = new ArrayList<ClickUserInfo>();
|
||||||
if (StringUtils.isNotBlank(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 {
|
try {
|
||||||
clickUserInfo2.setNickName(
|
clickUserInfo2.setNickName(
|
||||||
new String(Base64.getDecoder().decode(clickUserInfo2.getNickName()), "UTF-8"));
|
new String(Base64.getDecoder().decode(clickUserInfo2.getNickName()), "UTF-8"));
|
||||||
|
clickUserInfos.add(clickUserInfo2);
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
throw new BusinessException("用户昵称解码异常[{" + e.getMessage() + "}]");
|
throw new BusinessException("用户昵称解码异常[{" + e.getMessage() + "}]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
returnMap.put("ClickUserInfoList", clickUserInfos);
|
|
||||||
|
|
||||||
String clickUserNickname = clickTrackInfo.getClickUserNickname();
|
String clickUserNickname = clickTrackInfo.getClickUserNickname();
|
||||||
if (StringUtils.isNotBlank(clickUserNickname)) {
|
if (StringUtils.isNotBlank(clickUserNickname)) {
|
||||||
try {
|
try {
|
||||||
clickTrackInfo.setClickUserNickname(
|
clickTrackInfo.setClickUserNickname(
|
||||||
new String(Base64.getDecoder().decode(clickUserNickname), "UTF-8"));
|
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) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
throw new BusinessException("用户昵称解码异常[{" + e.getMessage() + "}]");
|
throw new BusinessException("用户昵称解码异常[{" + e.getMessage() + "}]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
returnMap.put("ClickTrackInfo", clickTrackInfo);
|
pageDTO.setCode(0);
|
||||||
msg.setInfo("获取浏览详情查询成功");
|
pageDTO.setRows(clickUserInfos);
|
||||||
msg.setResult(true);
|
pageDTO.setTotal(clickUserInfos.size());
|
||||||
msg.setObject(returnMap);
|
|
||||||
}
|
}
|
||||||
logger.info("查询用户查看分享文章轨迹信息的控制层方法结束!");
|
logger.info("查询用户查看分享文章轨迹信息的控制层方法结束!");
|
||||||
return msg;
|
return pageDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 复制链路
|
// // 复制链路
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,7 @@ public interface ArticleQueryMapper {
|
||||||
int updatePublishedArticle(Map<String, String> articleMap);
|
int updatePublishedArticle(Map<String, String> articleMap);
|
||||||
|
|
||||||
public List<PublishedArticleInfo> selectAllWithLimit(@Param(value = "companyId") String companyId,
|
public List<PublishedArticleInfo> selectAllWithLimit(@Param(value = "companyId") String companyId,
|
||||||
@Param(value = "articleState") List<String> articleState, @Param(value = "startRow") int startRow,
|
@Param(value = "articleState") List<String> articleState, @Param(value = "articelName") String articelName,
|
||||||
@Param(value = "rows") int rows, @Param(value = "articelName") String articelName,
|
|
||||||
@Param(value = "articelAuthor") String articelAuthor, @Param(value = "special") String special, @Param(value = "channelId") String channelId);
|
@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);
|
ArticleInfo queryArticleInfoByCompanyId(@Param("companyId") String companyId, @Param("originalUrl") String originalUrl);
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public interface ArticleService {
|
||||||
*
|
*
|
||||||
* @return
|
* @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;
|
String special, String articelType, String articleState) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.content.service;
|
package com.ruoyi.content.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.content.domain.ArticleInfo;
|
import com.ruoyi.content.domain.ArticleInfo;
|
||||||
import com.ruoyi.content.domain.ClickTrackInfo;
|
import com.ruoyi.content.domain.ClickTrackInfo;
|
||||||
import com.ruoyi.content.domain.PageDTO;
|
import com.ruoyi.content.domain.PageDTO;
|
||||||
|
|
@ -34,7 +35,7 @@ public interface StaffArticleManageService {
|
||||||
* @param rows
|
* @param rows
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public PageDTO querySalesmanByArticleId(String articleId, int startRow, int rows);
|
public TableDataInfo querySalesmanByArticleId(String articleId, int startRow, int rows);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户id查询浏览表
|
* 根据用户id查询浏览表
|
||||||
|
|
@ -44,6 +45,6 @@ public interface StaffArticleManageService {
|
||||||
* @param rows
|
* @param rows
|
||||||
* @return
|
* @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
|
@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) {
|
String special, String channelId, String articleState) {
|
||||||
LOGGER.info("查询文章列表的业务层方法开始!");
|
LOGGER.info("查询文章列表的业务层方法开始!");
|
||||||
LOGGER.info("拿到的参数 startRow【{}】,rows【{}】,文章名称【{}】,文章作者【{}】,一级分类【{}】,二级分类【{}】,文章状态【{}】", startRow, rows,
|
LOGGER.info("拿到的参数 ,文章名称【{}】,文章作者【{}】,一级分类【{}】,二级分类【{}】,文章状态【{}】",
|
||||||
articelName, articelAuthor, special, channelId, articleState);
|
articelName, articelAuthor, special, channelId, articleState);
|
||||||
CmsSysUser userInfoDTO = (CmsSysUser) SecurityUtils.getSubject().getPrincipal();
|
String companyId = "1";// 公司id
|
||||||
String companyId = userInfoDTO.getCompanyId();// 公司id
|
|
||||||
|
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
if (StringUtils.isBlank(articleState)) {
|
if (StringUtils.isBlank(articleState)) {
|
||||||
|
|
@ -498,10 +497,10 @@ public class ArticleServiceImpl implements ArticleService {
|
||||||
if (StringUtils.isBlank(channelId)) {
|
if (StringUtils.isBlank(channelId)) {
|
||||||
channelId = "";
|
channelId = "";
|
||||||
}
|
}
|
||||||
List<PublishedArticleInfo> articleList = articleQueryMapper.selectAllWithLimit(companyId, list, startRow, rows,
|
List<PublishedArticleInfo> articleList = articleQueryMapper.selectAllWithLimit(companyId, list,
|
||||||
articelName, articelAuthor, special, channelId);
|
articelName, articelAuthor, special, channelId);
|
||||||
if (articleList == null || articleList.size() < 1) {
|
if (articleList == null || articleList.size() < 1) {
|
||||||
LOGGER.info("根据用户查询已发布的文章,未查询到数据【{}】", JsonUtil.objectToJackson(userInfoDTO));
|
LOGGER.info("根据用户查询已发布的文章,未查询到数据");
|
||||||
throw new BusinessException("您还没有发布过文章!");
|
throw new BusinessException("您还没有发布过文章!");
|
||||||
}
|
}
|
||||||
for (PublishedArticleInfo publishedArticleInfo : articleList) {
|
for (PublishedArticleInfo publishedArticleInfo : articleList) {
|
||||||
|
|
@ -916,8 +915,7 @@ public class ArticleServiceImpl implements ArticleService {
|
||||||
LOGGER.info("文章列表的删除功能的业务层方法开始!");
|
LOGGER.info("文章列表的删除功能的业务层方法开始!");
|
||||||
String updateDate = DateUtil.currentDate();
|
String updateDate = DateUtil.currentDate();
|
||||||
String updateTime = DateUtil.currentTime();
|
String updateTime = DateUtil.currentTime();
|
||||||
CmsSysUser userInfoDTO = (CmsSysUser) SecurityUtils.getSubject().getPrincipal();
|
String updateUser = "1";
|
||||||
String updateUser = userInfoDTO.getUserId();
|
|
||||||
LOGGER.info("管理员updateUser【{}】文章列表的删除功能的业务层方法中拿到的文章的id【{}】", updateUser, id);
|
LOGGER.info("管理员updateUser【{}】文章列表的删除功能的业务层方法中拿到的文章的id【{}】", updateUser, id);
|
||||||
Message msg = new Message();
|
Message msg = new Message();
|
||||||
if (StringUtils.isBlank(id)) {
|
if (StringUtils.isBlank(id)) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.content.service.impl;
|
package com.ruoyi.content.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.content.domain.*;
|
import com.ruoyi.content.domain.*;
|
||||||
import com.ruoyi.content.exception.BusinessException;
|
import com.ruoyi.content.exception.BusinessException;
|
||||||
import com.ruoyi.content.mapper.*;
|
import com.ruoyi.content.mapper.*;
|
||||||
|
|
@ -51,7 +52,7 @@ public class StaffArticleManageServiceimpl implements StaffArticleManageService
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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<ArticlePublishTrack> list = articlePublishTrackQueryMapper.queryPublishUserInfo(articleId, startRow, rows);
|
||||||
List<YwyForwardUserInfo> ywyList = new ArrayList<>();
|
List<YwyForwardUserInfo> ywyList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
@ -87,7 +88,7 @@ public class StaffArticleManageServiceimpl implements StaffArticleManageService
|
||||||
ywyForwardUserInfo.setNickName("后台管理员");
|
ywyForwardUserInfo.setNickName("后台管理员");
|
||||||
ywyForwardUserInfo.setArticleId(articleId);
|
ywyForwardUserInfo.setArticleId(articleId);
|
||||||
ywyForwardUserInfo.setCreateDate(apt.getCreateDate());
|
ywyForwardUserInfo.setCreateDate(apt.getCreateDate());
|
||||||
ywyForwardUserInfo.setHeadImgUrl("/static/common/image/logo.png");
|
ywyForwardUserInfo.setHeadImgUrl("/img/admin.png");
|
||||||
ywyForwardUserInfo.setUserId(publishUserId);
|
ywyForwardUserInfo.setUserId(publishUserId);
|
||||||
}
|
}
|
||||||
ywyList.add(ywyForwardUserInfo);
|
ywyList.add(ywyForwardUserInfo);
|
||||||
|
|
@ -99,16 +100,15 @@ public class StaffArticleManageServiceimpl implements StaffArticleManageService
|
||||||
ArticlePublishTrackExample.Criteria criteria = example.createCriteria();
|
ArticlePublishTrackExample.Criteria criteria = example.createCriteria();
|
||||||
criteria.andArticleIdEqualTo(articleId);
|
criteria.andArticleIdEqualTo(articleId);
|
||||||
int count = articlePublishTrackMapper.countByExample(example);
|
int count = articlePublishTrackMapper.countByExample(example);
|
||||||
PageDTO pageDTO = new PageDTO();
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
pageDTO.setStartRow(startRow);
|
rspData.setCode(0);
|
||||||
pageDTO.setDataRows(ywyList);
|
rspData.setRows(ywyList);
|
||||||
pageDTO.setTotal(count % rows == 0 ? count / rows : (count / rows + 1));
|
rspData.setTotal(count);
|
||||||
pageDTO.setRecords(count);
|
return rspData;
|
||||||
return pageDTO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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<ClickTrackInfo> list = clickTrackInfoQueryMapper.queryClickInfoByUserId(userId, articleId, startRow, rows);
|
||||||
List<YwyPublishInfo> YwyPublishInfolList = new ArrayList<>();
|
List<YwyPublishInfo> YwyPublishInfolList = new ArrayList<>();
|
||||||
|
|
@ -139,11 +139,10 @@ public class StaffArticleManageServiceimpl implements StaffArticleManageService
|
||||||
criteria.andPublishUserIdEqualTo(userId);
|
criteria.andPublishUserIdEqualTo(userId);
|
||||||
criteria.andArticleIdEqualTo(articleId);
|
criteria.andArticleIdEqualTo(articleId);
|
||||||
int count = clickTrackInfoMapper.countByExample(example);
|
int count = clickTrackInfoMapper.countByExample(example);
|
||||||
PageDTO pageDTO = new PageDTO();
|
TableDataInfo pageDTO = new TableDataInfo();
|
||||||
pageDTO.setStartRow(startRow);
|
pageDTO.setCode(0);
|
||||||
pageDTO.setDataRows(YwyPublishInfolList);
|
pageDTO.setRows(YwyPublishInfolList);
|
||||||
pageDTO.setTotal(count % rows == 0 ? count / rows : (count / rows + 1));
|
pageDTO.setTotal(count);
|
||||||
pageDTO.setRecords(count);
|
|
||||||
return pageDTO;
|
return pageDTO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,28 +3,28 @@
|
||||||
<mapper namespace="com.ruoyi.content.mapper.ArticleQueryMapper">
|
<mapper namespace="com.ruoyi.content.mapper.ArticleQueryMapper">
|
||||||
<resultMap id="PublishedArticlesMap"
|
<resultMap id="PublishedArticlesMap"
|
||||||
type="com.ruoyi.content.domain.PublishedArticleInfo">
|
type="com.ruoyi.content.domain.PublishedArticleInfo">
|
||||||
<result column="ARTICLE_ID" property="articleId" jdbcType="VARCHAR" />
|
<result column="ARTICLE_ID" property="articleId" jdbcType="VARCHAR"/>
|
||||||
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR" />
|
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR"/>
|
||||||
<result column="PUSH_DATE" property="pushDate" jdbcType="VARCHAR" />
|
<result column="PUSH_DATE" property="pushDate" jdbcType="VARCHAR"/>
|
||||||
<result column="ARTICLE_AUTHOR" property="articleAuthor"
|
<result column="ARTICLE_AUTHOR" property="articleAuthor"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="SPECIAL" property="special" jdbcType="VARCHAR" />
|
<result column="SPECIAL" property="special" jdbcType="VARCHAR"/>
|
||||||
<result column="CHANNEL_ID" property="channelId" jdbcType="VARCHAR" />
|
<result column="CHANNEL_ID" property="channelId" jdbcType="VARCHAR"/>
|
||||||
<result column="ARTICLE_STATE" property="articleState"
|
<result column="ARTICLE_STATE" property="articleState"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="CREATE_USER" property="createUser" jdbcType="VARCHAR" />
|
<result column="CREATE_USER" property="createUser" jdbcType="VARCHAR"/>
|
||||||
<result column="ORIGINAL_URL" property="originalUrl" jdbcType="VARCHAR" />
|
<result column="ORIGINAL_URL" property="originalUrl" jdbcType="VARCHAR"/>
|
||||||
<result column="SHARE_TITLE" property="shareTitle" jdbcType="VARCHAR" />
|
<result column="SHARE_TITLE" property="shareTitle" jdbcType="VARCHAR"/>
|
||||||
<result column="SHARE_DES" property="shareDes" jdbcType="VARCHAR" />
|
<result column="SHARE_DES" property="shareDes" jdbcType="VARCHAR"/>
|
||||||
<result column="UPDATE_DATE" property="updateDate" jdbcType="VARCHAR" />
|
<result column="UPDATE_DATE" property="updateDate" jdbcType="VARCHAR"/>
|
||||||
<result column="UPDATE_TIME" property="updateTime" jdbcType="VARCHAR" />
|
<result column="UPDATE_TIME" property="updateTime" jdbcType="VARCHAR"/>
|
||||||
<result column="MODIFIED_EDIT_URL" property="modifiedEditUrl"
|
<result column="MODIFIED_EDIT_URL" property="modifiedEditUrl"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="MODIFIED_VIEW_URL" property="modifiedViewUrl"
|
<result column="MODIFIED_VIEW_URL" property="modifiedViewUrl"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="VISITOR_COUNT" property="visitorCount"
|
<result column="VISITOR_COUNT" property="visitorCount"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="SHARE_COUNT" property="shareCount" jdbcType="VARCHAR" />
|
<result column="SHARE_COUNT" property="shareCount" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="BaseResultMap"
|
<resultMap id="BaseResultMap"
|
||||||
|
|
@ -32,54 +32,54 @@
|
||||||
<!-- WARNING - @mbggenerated This element is automatically generated by
|
<!-- WARNING - @mbggenerated This element is automatically generated by
|
||||||
MyBatis Generator, do not modify. This element was generated on Fri May 25
|
MyBatis Generator, do not modify. This element was generated on Fri May 25
|
||||||
15:02:37 CST 2018. -->
|
15:02:37 CST 2018. -->
|
||||||
<id column="ARTICLE_ID" property="articleId" jdbcType="INTEGER" />
|
<id column="ARTICLE_ID" property="articleId" jdbcType="INTEGER"/>
|
||||||
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR" />
|
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR"/>
|
||||||
<result column="PUSH_DATE" property="pushDate" jdbcType="VARCHAR" />
|
<result column="PUSH_DATE" property="pushDate" jdbcType="VARCHAR"/>
|
||||||
<result column="ARTICLE_AUTHOR" property="articleAuthor"
|
<result column="ARTICLE_AUTHOR" property="articleAuthor"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="ARTICLE_EDIT_URL" property="articleEditUrl"
|
<result column="ARTICLE_EDIT_URL" property="articleEditUrl"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="ARTICLE_VIEW_URL" property="articleViewUrl"
|
<result column="ARTICLE_VIEW_URL" property="articleViewUrl"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="LIST_PIC_URL" property="listPicUrl" jdbcType="VARCHAR" />
|
<result column="LIST_PIC_URL" property="listPicUrl" jdbcType="VARCHAR"/>
|
||||||
<result column="SPECIAL" property="special" jdbcType="VARCHAR" />
|
<result column="SPECIAL" property="special" jdbcType="VARCHAR"/>
|
||||||
<result column="CHANNEL_ID" property="channelId" jdbcType="VARCHAR" />
|
<result column="CHANNEL_ID" property="channelId" jdbcType="VARCHAR"/>
|
||||||
<result column="COMPANY_ID" property="companyId" jdbcType="VARCHAR" />
|
<result column="COMPANY_ID" property="companyId" jdbcType="VARCHAR"/>
|
||||||
<result column="ORIGINAL_URL" property="originalUrl" jdbcType="VARCHAR" />
|
<result column="ORIGINAL_URL" property="originalUrl" jdbcType="VARCHAR"/>
|
||||||
<result column="SHARE_IMG_URL" property="shareImgUrl" jdbcType="VARCHAR" />
|
<result column="SHARE_IMG_URL" property="shareImgUrl" jdbcType="VARCHAR"/>
|
||||||
<result column="SHARE_TITLE" property="shareTitle" jdbcType="VARCHAR" />
|
<result column="SHARE_TITLE" property="shareTitle" jdbcType="VARCHAR"/>
|
||||||
<result column="ARTICLE_STATE" property="articleState"
|
<result column="ARTICLE_STATE" property="articleState"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="SHARE_DES" property="shareDes" jdbcType="VARCHAR" />
|
<result column="SHARE_DES" property="shareDes" jdbcType="VARCHAR"/>
|
||||||
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR" />
|
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR"/>
|
||||||
<result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR" />
|
<result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR"/>
|
||||||
<result column="CREATE_USER" property="createUser" jdbcType="VARCHAR" />
|
<result column="CREATE_USER" property="createUser" jdbcType="VARCHAR"/>
|
||||||
<result column="UPDATE_DATE" property="updateDate" jdbcType="VARCHAR" />
|
<result column="UPDATE_DATE" property="updateDate" jdbcType="VARCHAR"/>
|
||||||
<result column="UPDATE_TIME" property="updateTime" jdbcType="VARCHAR" />
|
<result column="UPDATE_TIME" property="updateTime" jdbcType="VARCHAR"/>
|
||||||
<result column="MODIFIED_EDIT_URL" property="modifiedEditUrl"
|
<result column="MODIFIED_EDIT_URL" property="modifiedEditUrl"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="MODIFIED_VIEW_URL" property="modifiedViewUrl"
|
<result column="MODIFIED_VIEW_URL" property="modifiedViewUrl"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="CompanyArticlesMap"
|
<resultMap id="CompanyArticlesMap"
|
||||||
type="com.ruoyi.content.domain.CompanyArticleInfo">
|
type="com.ruoyi.content.domain.CompanyArticleInfo">
|
||||||
<result column="PUBLISH_ID" property="publishId" jdbcType="VARCHAR" />
|
<result column="PUBLISH_ID" property="publishId" jdbcType="VARCHAR"/>
|
||||||
<result column="ARTICLE_ID" property="articleId" jdbcType="VARCHAR" />
|
<result column="ARTICLE_ID" property="articleId" jdbcType="VARCHAR"/>
|
||||||
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR" />
|
<result column="ARTICLE_NAME" property="articleName" jdbcType="VARCHAR"/>
|
||||||
<result column="LIST_PIC_URL" property="listPicUrl" jdbcType="VARCHAR" />
|
<result column="LIST_PIC_URL" property="listPicUrl" jdbcType="VARCHAR"/>
|
||||||
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR" />
|
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR"/>
|
||||||
<result column="VISITOR_COUNT" property="visitorCount"
|
<result column="VISITOR_COUNT" property="visitorCount"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="SHARED_COUNT" property="sharedCount" jdbcType="VARCHAR" />
|
<result column="SHARED_COUNT" property="sharedCount" jdbcType="VARCHAR"/>
|
||||||
<result column="PUBLISH_VIEW_URL" property="publishViewUrl"
|
<result column="PUBLISH_VIEW_URL" property="publishViewUrl"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<!-- 根据文章主键集合查询文章对应的所有标签集合 -->
|
<!-- 根据文章主键集合查询文章对应的所有标签集合 -->
|
||||||
<resultMap id="ArticleLabelRelDTOMap"
|
<resultMap id="ArticleLabelRelDTOMap"
|
||||||
type="com.ruoyi.content.domain.ArticleLabelRelDTO">
|
type="com.ruoyi.content.domain.ArticleLabelRelDTO">
|
||||||
<result column="ARTICLE_ID" property="articleId" jdbcType="INTEGER" />
|
<result column="ARTICLE_ID" property="articleId" jdbcType="INTEGER"/>
|
||||||
<result column="LABEL_NAME" property="labelName" jdbcType="VARCHAR" />
|
<result column="LABEL_NAME" property="labelName" jdbcType="VARCHAR"/>
|
||||||
<result column="LABEL_ID" property="labelId" jdbcType="INTEGER" />
|
<result column="LABEL_ID" property="labelId" jdbcType="INTEGER"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<!-- 查询文章列表 -->
|
<!-- 查询文章列表 -->
|
||||||
<sql id="countVisitorSQL">
|
<sql id="countVisitorSQL">
|
||||||
|
|
@ -111,13 +111,13 @@
|
||||||
<resultMap id="PublishedDetailsMap"
|
<resultMap id="PublishedDetailsMap"
|
||||||
type="com.ruoyi.content.domain.ArticeClickInfo">
|
type="com.ruoyi.content.domain.ArticeClickInfo">
|
||||||
<result column="CLICK_USER_NICKNAME" property="clickUserNickname"
|
<result column="CLICK_USER_NICKNAME" property="clickUserNickname"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="CLICK_USER_HEADIMGURL" property="clickUserHeadimgurl"
|
<result column="CLICK_USER_HEADIMGURL" property="clickUserHeadimgurl"
|
||||||
jdbcType="VARCHAR" />
|
jdbcType="VARCHAR"/>
|
||||||
<result column="SHARE_STATE" property="shareState" jdbcType="VARCHAR" />
|
<result column="SHARE_STATE" property="shareState" jdbcType="VARCHAR"/>
|
||||||
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR" />
|
<result column="CREATE_DATE" property="createDate" jdbcType="VARCHAR"/>
|
||||||
<result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR" />
|
<result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR"/>
|
||||||
<result column="WATCH_TIME" property="watchTime" jdbcType="VARCHAR" />
|
<result column="WATCH_TIME" property="watchTime" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 查询我的发布列表 -->
|
<!-- 查询我的发布列表 -->
|
||||||
|
|
@ -135,10 +135,10 @@
|
||||||
ap.PUBLISH_ID,ap.ARTICLE_ID,ai.ARTICLE_NAME,ai.LIST_PIC_URL,ap.CREATE_DATE
|
ap.PUBLISH_ID,ap.ARTICLE_ID,ai.ARTICLE_NAME,ai.LIST_PIC_URL,ap.CREATE_DATE
|
||||||
,
|
,
|
||||||
(
|
(
|
||||||
<include refid="countVisitorSQL" />
|
<include refid="countVisitorSQL"/>
|
||||||
) as VISITOR_COUNT,
|
) as VISITOR_COUNT,
|
||||||
(
|
(
|
||||||
<include refid="countSharedSQL" />
|
<include refid="countSharedSQL"/>
|
||||||
) as SHARED_COUNT
|
) as SHARED_COUNT
|
||||||
FROM article_publish_track ap, article_info ai
|
FROM article_publish_track ap, article_info ai
|
||||||
WHERE
|
WHERE
|
||||||
|
|
@ -246,11 +246,13 @@
|
||||||
article_info ai WHERE 1=1
|
article_info ai WHERE 1=1
|
||||||
<if test="articelName != null and articelName!=''">
|
<if test="articelName != null and articelName!=''">
|
||||||
and ai.ARTICLE_NAME like CONCAT(CONCAT('%', #{articelName,
|
and ai.ARTICLE_NAME like CONCAT(CONCAT('%', #{articelName,
|
||||||
jdbcType=VARCHAR}), '%') </if>
|
jdbcType=VARCHAR}), '%')
|
||||||
|
</if>
|
||||||
<if test="articelAuthor != null and articelAuthor!=''">
|
<if test="articelAuthor != null and articelAuthor!=''">
|
||||||
and ai.ARTICLE_AUTHOR like CONCAT(CONCAT('%',
|
and ai.ARTICLE_AUTHOR like CONCAT(CONCAT('%',
|
||||||
#{articelAuthor,
|
#{articelAuthor,
|
||||||
jdbcType=VARCHAR}), '%') </if>
|
jdbcType=VARCHAR}), '%')
|
||||||
|
</if>
|
||||||
<if test="special != null and special!=''">
|
<if test="special != null and special!=''">
|
||||||
and ai.SPECIAL = #{special,jdbcType=VARCHAR}
|
and ai.SPECIAL = #{special,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -263,17 +265,13 @@
|
||||||
<if test="articleState != null">
|
<if test="articleState != null">
|
||||||
and ai.ARTICLE_STATE in
|
and ai.ARTICLE_STATE in
|
||||||
<foreach collection="articleState" item="articleState" index="index"
|
<foreach collection="articleState" item="articleState" index="index"
|
||||||
open="(" close=")" separator=","> #{articleState} </foreach>
|
open="(" close=")" separator=",">#{articleState}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
order by ai.CREATE_DATE DESC,ai.CREATE_TIME DESC, ai.UPDATE_DATE
|
order by ai.CREATE_DATE DESC,ai.CREATE_TIME DESC, ai.UPDATE_DATE DESC,ai.UPDATE_TIME DESC
|
||||||
DESC,ai.UPDATE_TIME DESC
|
|
||||||
limit
|
|
||||||
#{startRow,jdbcType=DECIMAL},#{rows,jdbcType=DECIMAL}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="queryModifiedEditUrlByArticleId" resultMap="BaseResultMap"
|
<select id="queryModifiedEditUrlByArticleId" resultMap="BaseResultMap"
|
||||||
parameterType="java.lang.Integer">
|
parameterType="java.lang.Integer">
|
||||||
select ARTICLE_ID, ARTICLE_NAME, PUSH_DATE,
|
select ARTICLE_ID, ARTICLE_NAME, PUSH_DATE,
|
||||||
|
|
@ -296,10 +294,10 @@
|
||||||
apt.PUBLISH_ID,apt.ARTICLE_ID,apt.PUBLISH_VIEW_URL,ai.ARTICLE_NAME,ai.LIST_PIC_URL,apt.CREATE_DATE
|
apt.PUBLISH_ID,apt.ARTICLE_ID,apt.PUBLISH_VIEW_URL,ai.ARTICLE_NAME,ai.LIST_PIC_URL,apt.CREATE_DATE
|
||||||
,
|
,
|
||||||
(
|
(
|
||||||
<include refid="pageVisitorSQL" />
|
<include refid="pageVisitorSQL"/>
|
||||||
) as VISITOR_COUNT,
|
) as VISITOR_COUNT,
|
||||||
(
|
(
|
||||||
<include refid="sharedSQL" />
|
<include refid="sharedSQL"/>
|
||||||
) as SHARED_COUNT
|
) as SHARED_COUNT
|
||||||
FROM article_publish_track apt, article_info ai
|
FROM article_publish_track apt, article_info ai
|
||||||
WHERE
|
WHERE
|
||||||
|
|
@ -326,19 +324,19 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<resultMap id="noSendResult" type="com.ruoyi.content.domain.ArticlePublishSend">
|
<resultMap id="noSendResult" type="com.ruoyi.content.domain.ArticlePublishSend">
|
||||||
<id column="ID" property="id" jdbcType="INTEGER" />
|
<id column="ID" property="id" jdbcType="INTEGER"/>
|
||||||
<result column="ARTICLE_ID" property="articleId" jdbcType="INTEGER" />
|
<result column="ARTICLE_ID" property="articleId" jdbcType="INTEGER"/>
|
||||||
<result column="PUBLISH_ID" property="publishId" jdbcType="VARCHAR" />
|
<result column="PUBLISH_ID" property="publishId" jdbcType="VARCHAR"/>
|
||||||
<result column="SEND_TYPE" property="sendType" jdbcType="VARCHAR" />
|
<result column="SEND_TYPE" property="sendType" jdbcType="VARCHAR"/>
|
||||||
<result column="GROUP_ID" property="groupId" jdbcType="VARCHAR" />
|
<result column="GROUP_ID" property="groupId" jdbcType="VARCHAR"/>
|
||||||
<result column="GROUP_NAME" property="groupName" jdbcType="VARCHAR" />
|
<result column="GROUP_NAME" property="groupName" jdbcType="VARCHAR"/>
|
||||||
<result column="OPERATE_ID" property="operateId" jdbcType="VARCHAR" />
|
<result column="OPERATE_ID" property="operateId" jdbcType="VARCHAR"/>
|
||||||
<result column="OPERATE_NAME" property="operateName" jdbcType="VARCHAR" />
|
<result column="OPERATE_NAME" property="operateName" jdbcType="VARCHAR"/>
|
||||||
<result column="PUBLISH_DATE" property="publishDate" jdbcType="VARCHAR" />
|
<result column="PUBLISH_DATE" property="publishDate" jdbcType="VARCHAR"/>
|
||||||
<result column="PUBLISH_TIME" property="publishTime" jdbcType="VARCHAR" />
|
<result column="PUBLISH_TIME" property="publishTime" jdbcType="VARCHAR"/>
|
||||||
<result column="OPERATE_DATE" property="operateDate" jdbcType="VARCHAR" />
|
<result column="OPERATE_DATE" property="operateDate" jdbcType="VARCHAR"/>
|
||||||
<result column="OPERATE_TIME" property="operateTime" jdbcType="VARCHAR" />
|
<result column="OPERATE_TIME" property="operateTime" jdbcType="VARCHAR"/>
|
||||||
<result column="SEND_STATE" property="sendState" jdbcType="VARCHAR" />
|
<result column="SEND_STATE" property="sendState" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="noSendPublishArticle" parameterType="map" resultMap="noSendResult">
|
<select id="noSendPublishArticle" parameterType="map" resultMap="noSendResult">
|
||||||
|
|
@ -373,6 +371,4 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui-layout-center">
|
<div class="ui-layout-center">
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -74,7 +73,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal inmodal" id="myModal2" tabindex="-1" role="dialog" aria-hidden="true">
|
<div class="modal inmodal" id="myModal2" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<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;">
|
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5;">
|
||||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||||
class="sr-only">Close</span>
|
class="sr-only">Close</span>
|
||||||
|
|
@ -168,7 +167,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal inmodal" id="myModal3" tabindex="-1" role="dialog" aria-hidden="true">
|
<div class="modal inmodal" id="myModal3" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<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;">
|
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5;">
|
||||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||||
class="sr-only">Close</span>
|
class="sr-only">Close</span>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal inmodal" id="myModal2" tabindex="-1" role="dialog" aria-hidden="true">
|
<div class="modal inmodal" id="myModal2" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<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;">
|
<div class="modal-header" style="border-bottom: 0px solid #e5e5e5;">
|
||||||
<input th:hidden="true" value="" th:id="pictureId"/>
|
<input th:hidden="true" value="" th:id="pictureId"/>
|
||||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue