Commit 4b45c434 authored by 赵啸非's avatar 赵啸非

修改热门词汇

parent 56e64773
Pipeline #2405 failed with stages
......@@ -147,6 +147,21 @@ CREATE TABLE mortals_xhx_pubdatum(
-- ----------------------------
-- 填单服务基础设置表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_baseset`;
CREATE TABLE mortals_xhx_baseset(
`id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`siteId` bigint(20) COMMENT '站点ID',
`printDisplay` int(4) COMMENT '空白打印材料展示数量',
`newsSource` tinyint(4) COMMENT '新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='填单服务基础设置';
-- ----------------------------
-- 热门词汇业务表
-- ----------------------------
......@@ -155,8 +170,6 @@ CREATE TABLE mortals_xhx_hotword(
`id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`siteId` bigint(20) COMMENT '站点ID',
`hotwords` varchar(512) COMMENT '热门词汇',
`printDisplay` int(4) COMMENT '空白打印材料展示数量',
`newsSource` tinyint(4) COMMENT '新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)',
`searchCount` int(9) COMMENT '查询次数',
`wordsSource` tinyint(4) COMMENT '热门词汇来源(1.手动添加,2.查询添加)',
`createTime` datetime COMMENT '创建时间',
......
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 热门词汇来源(1.手动添加,2.查询添加)枚举类
*
* @author zxfei
*/
public enum WordsSourceEnum {
手动添加(1, "手动添加"),
查询添加(2, "查询添加");
private Integer value;
private String desc;
WordsSourceEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static WordsSourceEnum getByValue(Integer value) {
for (WordsSourceEnum wordsSourceEnum : WordsSourceEnum.values()) {
if (wordsSourceEnum.getValue() == value) {
return wordsSourceEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (WordsSourceEnum item : WordsSourceEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
......@@ -31,4 +31,7 @@ public final class Constant {
public final static String PARAMS_NOTICE_URL = "notice_url";
public final static String PARAMS_HOTWORDS_DEFAULT_NUM = "hotwords_default_num";
}
package com.mortals.xhx.module.baseset.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.baseset.model.BasesetEntity;
import java.util.List;
/**
* 填单服务基础设置Dao
* 填单服务基础设置 DAO接口
*
* @author zxfei
* @date 2022-12-08
*/
public interface BasesetDao extends ICRUDDao<BasesetEntity,Long>{
}
package com.mortals.xhx.module.baseset.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.baseset.dao.BasesetDao;
import com.mortals.xhx.module.baseset.model.BasesetEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 填单服务基础设置DaoImpl DAO接口
*
* @author zxfei
* @date 2022-12-08
*/
@Repository("basesetDao")
public class BasesetDaoImpl extends BaseCRUDDaoMybatis<BasesetEntity,Long> implements BasesetDao {
}
package com.mortals.xhx.module.baseset.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.baseset.model.vo.BasesetVo;
/**
* 填单服务基础设置实体对象
*
* @author zxfei
* @date 2022-12-08
*/
public class BasesetEntity extends BasesetVo {
private static final long serialVersionUID = 1L;
/**
* 站点ID
*/
private Long siteId;
/**
* 空白打印材料展示数量
*/
private Integer printDisplay;
/**
* 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
*/
private Integer newsSource;
public BasesetEntity(){}
/**
* 获取 站点ID
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点ID
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 空白打印材料展示数量
* @return Integer
*/
public Integer getPrintDisplay(){
return printDisplay;
}
/**
* 设置 空白打印材料展示数量
* @param printDisplay
*/
public void setPrintDisplay(Integer printDisplay){
this.printDisplay = printDisplay;
}
/**
* 获取 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return Integer
*/
public Integer getNewsSource(){
return newsSource;
}
/**
* 设置 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSource
*/
public void setNewsSource(Integer newsSource){
this.newsSource = newsSource;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof BasesetEntity) {
BasesetEntity tmp = (BasesetEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",siteId:").append(getSiteId());
sb.append(",printDisplay:").append(getPrintDisplay());
sb.append(",newsSource:").append(getNewsSource());
return sb.toString();
}
public void initAttrValue(){
this.siteId = null;
this.printDisplay = 0;
this.newsSource = 1;
}
}
\ No newline at end of file
package com.mortals.xhx.module.baseset.model;
import java.util.List;
import com.mortals.xhx.module.baseset.model.BasesetEntity;
/**
* 填单服务基础设置查询对象
*
* @author zxfei
* @date 2022-12-08
*/
public class BasesetQuery extends BasesetEntity {
/** 开始 主键,自增长 */
private Long idStart;
/** 结束 主键,自增长 */
private Long idEnd;
/** 增加 主键,自增长 */
private Long idIncrement;
/** 主键,自增长列表 */
private List <Long> idList;
/** 开始 站点ID */
private Long siteIdStart;
/** 结束 站点ID */
private Long siteIdEnd;
/** 增加 站点ID */
private Long siteIdIncrement;
/** 站点ID列表 */
private List <Long> siteIdList;
/** 开始 空白打印材料展示数量 */
private Integer printDisplayStart;
/** 结束 空白打印材料展示数量 */
private Integer printDisplayEnd;
/** 增加 空白打印材料展示数量 */
private Integer printDisplayIncrement;
/** 空白打印材料展示数量列表 */
private List <Integer> printDisplayList;
/** 开始 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告) */
private Integer newsSourceStart;
/** 结束 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告) */
private Integer newsSourceEnd;
/** 增加 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告) */
private Integer newsSourceIncrement;
/** 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)列表 */
private List <Integer> newsSourceList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 创建用户 */
private Long createUserIdStart;
/** 结束 创建用户 */
private Long createUserIdEnd;
/** 增加 创建用户 */
private Long createUserIdIncrement;
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 开始 修改时间 */
private String updateTimeStart;
/** 结束 修改时间 */
private String updateTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<BasesetQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<BasesetQuery> andConditionList;
public BasesetQuery(){}
/**
* 获取 开始 主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 开始 站点ID
* @return siteIdStart
*/
public Long getSiteIdStart(){
return this.siteIdStart;
}
/**
* 设置 开始 站点ID
* @param siteIdStart
*/
public void setSiteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
}
/**
* 获取 结束 站点ID
* @return $siteIdEnd
*/
public Long getSiteIdEnd(){
return this.siteIdEnd;
}
/**
* 设置 结束 站点ID
* @param siteIdEnd
*/
public void setSiteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
}
/**
* 获取 增加 站点ID
* @return siteIdIncrement
*/
public Long getSiteIdIncrement(){
return this.siteIdIncrement;
}
/**
* 设置 增加 站点ID
* @param siteIdIncrement
*/
public void setSiteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
}
/**
* 获取 站点ID
* @return siteIdList
*/
public List<Long> getSiteIdList(){
return this.siteIdList;
}
/**
* 设置 站点ID
* @param siteIdList
*/
public void setSiteIdList(List<Long> siteIdList){
this.siteIdList = siteIdList;
}
/**
* 获取 开始 空白打印材料展示数量
* @return printDisplayStart
*/
public Integer getPrintDisplayStart(){
return this.printDisplayStart;
}
/**
* 设置 开始 空白打印材料展示数量
* @param printDisplayStart
*/
public void setPrintDisplayStart(Integer printDisplayStart){
this.printDisplayStart = printDisplayStart;
}
/**
* 获取 结束 空白打印材料展示数量
* @return $printDisplayEnd
*/
public Integer getPrintDisplayEnd(){
return this.printDisplayEnd;
}
/**
* 设置 结束 空白打印材料展示数量
* @param printDisplayEnd
*/
public void setPrintDisplayEnd(Integer printDisplayEnd){
this.printDisplayEnd = printDisplayEnd;
}
/**
* 获取 增加 空白打印材料展示数量
* @return printDisplayIncrement
*/
public Integer getPrintDisplayIncrement(){
return this.printDisplayIncrement;
}
/**
* 设置 增加 空白打印材料展示数量
* @param printDisplayIncrement
*/
public void setPrintDisplayIncrement(Integer printDisplayIncrement){
this.printDisplayIncrement = printDisplayIncrement;
}
/**
* 获取 空白打印材料展示数量
* @return printDisplayList
*/
public List<Integer> getPrintDisplayList(){
return this.printDisplayList;
}
/**
* 设置 空白打印材料展示数量
* @param printDisplayList
*/
public void setPrintDisplayList(List<Integer> printDisplayList){
this.printDisplayList = printDisplayList;
}
/**
* 获取 开始 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return newsSourceStart
*/
public Integer getNewsSourceStart(){
return this.newsSourceStart;
}
/**
* 设置 开始 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceStart
*/
public void setNewsSourceStart(Integer newsSourceStart){
this.newsSourceStart = newsSourceStart;
}
/**
* 获取 结束 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return $newsSourceEnd
*/
public Integer getNewsSourceEnd(){
return this.newsSourceEnd;
}
/**
* 设置 结束 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceEnd
*/
public void setNewsSourceEnd(Integer newsSourceEnd){
this.newsSourceEnd = newsSourceEnd;
}
/**
* 获取 增加 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return newsSourceIncrement
*/
public Integer getNewsSourceIncrement(){
return this.newsSourceIncrement;
}
/**
* 设置 增加 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceIncrement
*/
public void setNewsSourceIncrement(Integer newsSourceIncrement){
this.newsSourceIncrement = newsSourceIncrement;
}
/**
* 获取 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return newsSourceList
*/
public List<Integer> getNewsSourceList(){
return this.newsSourceList;
}
/**
* 设置 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceList
*/
public void setNewsSourceList(List<Integer> newsSourceList){
this.newsSourceList = newsSourceList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 开始 修改时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 修改时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 修改时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 修改时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 主键,自增长
* @param id
*/
public BasesetQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 主键,自增长
* @param idStart
*/
public BasesetQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 主键,自增长
* @param idEnd
*/
public BasesetQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 主键,自增长
* @param idIncrement
*/
public BasesetQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 主键,自增长
* @param idList
*/
public BasesetQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 站点ID
* @param siteId
*/
public BasesetQuery siteId(Long siteId){
setSiteId(siteId);
return this;
}
/**
* 设置 开始 站点ID
* @param siteIdStart
*/
public BasesetQuery siteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
return this;
}
/**
* 设置 结束 站点ID
* @param siteIdEnd
*/
public BasesetQuery siteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
return this;
}
/**
* 设置 增加 站点ID
* @param siteIdIncrement
*/
public BasesetQuery siteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
return this;
}
/**
* 设置 站点ID
* @param siteIdList
*/
public BasesetQuery siteIdList(List<Long> siteIdList){
this.siteIdList = siteIdList;
return this;
}
/**
* 设置 空白打印材料展示数量
* @param printDisplay
*/
public BasesetQuery printDisplay(Integer printDisplay){
setPrintDisplay(printDisplay);
return this;
}
/**
* 设置 开始 空白打印材料展示数量
* @param printDisplayStart
*/
public BasesetQuery printDisplayStart(Integer printDisplayStart){
this.printDisplayStart = printDisplayStart;
return this;
}
/**
* 设置 结束 空白打印材料展示数量
* @param printDisplayEnd
*/
public BasesetQuery printDisplayEnd(Integer printDisplayEnd){
this.printDisplayEnd = printDisplayEnd;
return this;
}
/**
* 设置 增加 空白打印材料展示数量
* @param printDisplayIncrement
*/
public BasesetQuery printDisplayIncrement(Integer printDisplayIncrement){
this.printDisplayIncrement = printDisplayIncrement;
return this;
}
/**
* 设置 空白打印材料展示数量
* @param printDisplayList
*/
public BasesetQuery printDisplayList(List<Integer> printDisplayList){
this.printDisplayList = printDisplayList;
return this;
}
/**
* 设置 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSource
*/
public BasesetQuery newsSource(Integer newsSource){
setNewsSource(newsSource);
return this;
}
/**
* 设置 开始 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceStart
*/
public BasesetQuery newsSourceStart(Integer newsSourceStart){
this.newsSourceStart = newsSourceStart;
return this;
}
/**
* 设置 结束 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceEnd
*/
public BasesetQuery newsSourceEnd(Integer newsSourceEnd){
this.newsSourceEnd = newsSourceEnd;
return this;
}
/**
* 设置 增加 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceIncrement
*/
public BasesetQuery newsSourceIncrement(Integer newsSourceIncrement){
this.newsSourceIncrement = newsSourceIncrement;
return this;
}
/**
* 设置 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceList
*/
public BasesetQuery newsSourceList(List<Integer> newsSourceList){
this.newsSourceList = newsSourceList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public BasesetQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public BasesetQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public BasesetQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public BasesetQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public BasesetQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<BasesetQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<BasesetQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<BasesetQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<BasesetQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.baseset.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.baseset.model.BasesetEntity;
import com.mortals.xhx.module.hotword.model.HotwordEntity;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* 填单服务基础设置视图对象
*
* @author zxfei
* @date 2022-12-08
*/
@Data
public class BasesetVo extends BaseEntityLong {
private List<HotwordEntity> hotwordList;
}
\ No newline at end of file
package com.mortals.xhx.module.baseset.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.baseset.model.BasesetEntity;
/**
* BasesetService
*
* 填单服务基础设置 service接口
*
* @author zxfei
* @date 2022-12-08
*/
public interface BasesetService extends ICRUDService<BasesetEntity,Long>{
}
\ No newline at end of file
package com.mortals.xhx.module.baseset.service.impl;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.module.hotword.model.HotwordEntity;
import com.mortals.xhx.module.hotword.model.HotwordQuery;
import com.mortals.xhx.module.hotword.service.HotwordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.baseset.dao.BasesetDao;
import com.mortals.xhx.module.baseset.model.BasesetEntity;
import com.mortals.xhx.module.baseset.service.BasesetService;
import java.util.List;
/**
* BasesetService
* 填单服务基础设置 service实现
*
* @author zxfei
* @date 2022-12-08
*/
@Service("basesetService")
public class BasesetServiceImpl extends AbstractCRUDServiceImpl<BasesetDao, BasesetEntity, Long> implements BasesetService {
@Autowired
private HotwordService hotwordService;
@Override
protected void findAfter(BasesetEntity params, PageInfo pageInfo, Context context, List<BasesetEntity> list) throws AppException {
list.forEach(item -> {
List<HotwordEntity> hotwordEntities = hotwordService.find(new HotwordQuery().siteId(item.getSiteId()));
item.setHotwordList(hotwordEntities);
});
super.findAfter(params, pageInfo, context, list);
}
}
\ No newline at end of file
package com.mortals.xhx.module.baseset.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.baseset.model.BasesetEntity;
import com.mortals.xhx.module.baseset.service.BasesetService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 填单服务基础设置
*
* @author zxfei
* @date 2022-12-08
*/
@RestController
@RequestMapping("baseset")
public class BasesetController extends BaseCRUDJsonBodyMappingController<BasesetService,BasesetEntity,Long> {
@Autowired
private ParamService paramService;
public BasesetController(){
super.setModuleDesc( "填单服务基础设置");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "newsSource", paramService.getParamBySecondOrganize("Baseset","newsSource"));
super.init(model, context);
}
}
\ No newline at end of file
......@@ -27,6 +27,9 @@ import com.mortals.xhx.feign.base.pdu.DeptPdu;
import com.mortals.xhx.feign.base.pdu.SitePdu;
import com.mortals.xhx.feign.rsp.ApiResp;
import com.mortals.xhx.feign.site.ISiteFeign;
import com.mortals.xhx.module.baseset.model.BasesetEntity;
import com.mortals.xhx.module.baseset.model.BasesetQuery;
import com.mortals.xhx.module.baseset.service.BasesetService;
import com.mortals.xhx.module.home.pdu.HomeQueryPdu;
import com.mortals.xhx.module.home.pdu.NoticeQueryPdu;
import com.mortals.xhx.module.hotword.model.HotwordEntity;
......@@ -64,6 +67,8 @@ public class HomeController extends BaseJsonBodyController {
private HotwordService hotwordService;
@Autowired
private ISiteFeign siteFeign;
@Autowired
private BasesetService basesetService;
@PostMapping({"site/list"})
public Rest<Object> list() {
......@@ -248,21 +253,26 @@ public class HomeController extends BaseJsonBodyController {
String busiDesc = "获取首页数据";
int code = VALUE_RESULT_SUCCESS;
try {
HotwordQuery hotwordQuery = new HotwordQuery();
hotwordQuery.siteId(homeQueryPdu.getSiteId());
List<OrderCol> orderColList = new ArrayList<>();
orderColList.add(new OrderCol("searchCount", OrderCol.DESCENDING));
orderColList.add(new OrderCol("wordsSource", OrderCol.ASCENDING));
hotwordQuery.setOrderColList(orderColList);
List<String> hotwordEntities = hotwordService.find(hotwordQuery, new PageInfo(), null).getList().stream()
PageInfo pageInfo = new PageInfo();
int nums = GlobalSysInfo.getParamIntValue(Constant.PARAMS_HOTWORDS_DEFAULT_NUM, 10);
pageInfo.setPrePageResult(nums);
List<HotwordEntity> hotwordEntities = hotwordService.find(hotwordQuery, pageInfo, null).getList();
/* List<String> hotwordEntities = hotwordService.find(hotwordQuery, new PageInfo(), null).getList().stream()
.map(HotwordEntity::getHotwords)
.flatMap(item -> StrUtil.split(item, ",".charAt(0)).stream())
.collect(Collectors.toList());
.collect(Collectors.toList());*/
model.put("hotWords", hotwordEntities);
MatterQuery matterQuery = new MatterQuery();
matterQuery.setSiteId(homeQueryPdu.getSiteId());
int matterCont = matterService.count(matterQuery, this.getContext());
......@@ -285,9 +295,12 @@ public class HomeController extends BaseJsonBodyController {
Rest<com.mortals.xhx.common.pdu.site.SitePdu> info = siteFeign.info(homeQueryPdu.getSiteId());
model.put("title", info == null ? "" : info.getData().getSiteName()); //标题
HotwordEntity hotwordEntity = hotwordService.selectOne(hotwordQuery.siteId(homeQueryPdu.getSiteId()));
model.put("blankCount", hotwordEntity == null ? 20 : hotwordEntity.getPrintDisplay()); //空白样表数量
model.put("newsSource", hotwordEntity == null ? 1 : hotwordEntity.getNewsSource()); //新闻来源
//HotwordEntity hotwordEntity = hotwordService.selectOne(hotwordQuery.siteId(homeQueryPdu.getSiteId()));
BasesetEntity basesetEntity = basesetService.selectOne(new BasesetQuery().siteId(homeQueryPdu.getSiteId()));
model.put("blankCount", basesetEntity == null ? 20 : basesetEntity.getPrintDisplay()); //空白样表数量
model.put("newsSource", basesetEntity == null ? 1 : basesetEntity.getNewsSource()); //新闻来源
model.put("message_info", busiDesc + "成功");
this.addDict(model, "newsSource", NewsSourceEnum.getEnumMap());
this.recordSysLog(this.request, busiDesc + " 【成功】");
......
......@@ -8,7 +8,7 @@ import java.util.List;
* 热门词汇业务 DAO接口
*
* @author zxfei
* @date 2022-12-06
* @date 2022-12-08
*/
public interface HotwordDao extends ICRUDDao<HotwordEntity,Long>{
......
......@@ -11,7 +11,7 @@ import java.util.List;
* 热门词汇业务DaoImpl DAO接口
*
* @author zxfei
* @date 2022-12-06
* @date 2022-12-08
*/
@Repository("hotwordDao")
public class HotwordDaoImpl extends BaseCRUDDaoMybatis<HotwordEntity,Long> implements HotwordDao {
......
package com.mortals.xhx.module.hotword.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.hotword.model.vo.HotwordVo;
/**
* 热门词汇业务实体对象
*
* @author zxfei
* @date 2022-12-07
*/
* 热门词汇业务实体对象
*
* @author zxfei
* @date 2022-12-08
*/
public class HotwordEntity extends HotwordVo {
private static final long serialVersionUID = 1L;
......@@ -19,14 +24,6 @@ public class HotwordEntity extends HotwordVo {
* 热门词汇
*/
private String hotwords;
/**
* 空白打印材料展示数量
*/
private Integer printDisplay;
/**
* 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
*/
private Integer newsSource;
/**
* 查询次数
*/
......@@ -67,34 +64,6 @@ public class HotwordEntity extends HotwordVo {
public void setHotwords(String hotwords){
this.hotwords = hotwords;
}
/**
* 获取 空白打印材料展示数量
* @return Integer
*/
public Integer getPrintDisplay(){
return printDisplay;
}
/**
* 设置 空白打印材料展示数量
* @param printDisplay
*/
public void setPrintDisplay(Integer printDisplay){
this.printDisplay = printDisplay;
}
/**
* 获取 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return Integer
*/
public Integer getNewsSource(){
return newsSource;
}
/**
* 设置 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSource
*/
public void setNewsSource(Integer newsSource){
this.newsSource = newsSource;
}
/**
* 获取 查询次数
* @return Integer
......@@ -147,8 +116,6 @@ public class HotwordEntity extends HotwordVo {
StringBuilder sb = new StringBuilder("");
sb.append(",siteId:").append(getSiteId());
sb.append(",hotwords:").append(getHotwords());
sb.append(",printDisplay:").append(getPrintDisplay());
sb.append(",newsSource:").append(getNewsSource());
sb.append(",searchCount:").append(getSearchCount());
sb.append(",wordsSource:").append(getWordsSource());
return sb.toString();
......@@ -160,10 +127,6 @@ public class HotwordEntity extends HotwordVo {
this.hotwords = "";
this.printDisplay = 0;
this.newsSource = 1;
this.searchCount = 0;
this.wordsSource = 1;
......
......@@ -3,11 +3,11 @@ package com.mortals.xhx.module.hotword.model;
import java.util.List;
import com.mortals.xhx.module.hotword.model.HotwordEntity;
/**
* 热门词汇业务查询对象
*
* @author zxfei
* @date 2022-12-07
*/
* 热门词汇业务查询对象
*
* @author zxfei
* @date 2022-12-08
*/
public class HotwordQuery extends HotwordEntity {
/** 开始 主键,自增长 */
private Long idStart;
......@@ -36,30 +36,6 @@ public class HotwordQuery extends HotwordEntity {
/** 热门词汇 */
private List<String> hotwordsList;
/** 开始 空白打印材料展示数量 */
private Integer printDisplayStart;
/** 结束 空白打印材料展示数量 */
private Integer printDisplayEnd;
/** 增加 空白打印材料展示数量 */
private Integer printDisplayIncrement;
/** 空白打印材料展示数量列表 */
private List <Integer> printDisplayList;
/** 开始 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告) */
private Integer newsSourceStart;
/** 结束 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告) */
private Integer newsSourceEnd;
/** 增加 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告) */
private Integer newsSourceIncrement;
/** 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)列表 */
private List <Integer> newsSourceList;
/** 开始 查询次数 */
private Integer searchCountStart;
......@@ -259,134 +235,6 @@ public class HotwordQuery extends HotwordEntity {
public void setHotwordsList(List<String> hotwordsList){
this.hotwordsList = hotwordsList;
}
/**
* 获取 开始 空白打印材料展示数量
* @return printDisplayStart
*/
public Integer getPrintDisplayStart(){
return this.printDisplayStart;
}
/**
* 设置 开始 空白打印材料展示数量
* @param printDisplayStart
*/
public void setPrintDisplayStart(Integer printDisplayStart){
this.printDisplayStart = printDisplayStart;
}
/**
* 获取 结束 空白打印材料展示数量
* @return $printDisplayEnd
*/
public Integer getPrintDisplayEnd(){
return this.printDisplayEnd;
}
/**
* 设置 结束 空白打印材料展示数量
* @param printDisplayEnd
*/
public void setPrintDisplayEnd(Integer printDisplayEnd){
this.printDisplayEnd = printDisplayEnd;
}
/**
* 获取 增加 空白打印材料展示数量
* @return printDisplayIncrement
*/
public Integer getPrintDisplayIncrement(){
return this.printDisplayIncrement;
}
/**
* 设置 增加 空白打印材料展示数量
* @param printDisplayIncrement
*/
public void setPrintDisplayIncrement(Integer printDisplayIncrement){
this.printDisplayIncrement = printDisplayIncrement;
}
/**
* 获取 空白打印材料展示数量
* @return printDisplayList
*/
public List<Integer> getPrintDisplayList(){
return this.printDisplayList;
}
/**
* 设置 空白打印材料展示数量
* @param printDisplayList
*/
public void setPrintDisplayList(List<Integer> printDisplayList){
this.printDisplayList = printDisplayList;
}
/**
* 获取 开始 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return newsSourceStart
*/
public Integer getNewsSourceStart(){
return this.newsSourceStart;
}
/**
* 设置 开始 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceStart
*/
public void setNewsSourceStart(Integer newsSourceStart){
this.newsSourceStart = newsSourceStart;
}
/**
* 获取 结束 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return $newsSourceEnd
*/
public Integer getNewsSourceEnd(){
return this.newsSourceEnd;
}
/**
* 设置 结束 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceEnd
*/
public void setNewsSourceEnd(Integer newsSourceEnd){
this.newsSourceEnd = newsSourceEnd;
}
/**
* 获取 增加 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return newsSourceIncrement
*/
public Integer getNewsSourceIncrement(){
return this.newsSourceIncrement;
}
/**
* 设置 增加 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceIncrement
*/
public void setNewsSourceIncrement(Integer newsSourceIncrement){
this.newsSourceIncrement = newsSourceIncrement;
}
/**
* 获取 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @return newsSourceList
*/
public List<Integer> getNewsSourceList(){
return this.newsSourceList;
}
/**
* 设置 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceList
*/
public void setNewsSourceList(List<Integer> newsSourceList){
this.newsSourceList = newsSourceList;
}
/**
* 获取 开始 查询次数
* @return searchCountStart
......@@ -752,96 +600,6 @@ public class HotwordQuery extends HotwordEntity {
return this;
}
/**
* 设置 空白打印材料展示数量
* @param printDisplay
*/
public HotwordQuery printDisplay(Integer printDisplay){
setPrintDisplay(printDisplay);
return this;
}
/**
* 设置 开始 空白打印材料展示数量
* @param printDisplayStart
*/
public HotwordQuery printDisplayStart(Integer printDisplayStart){
this.printDisplayStart = printDisplayStart;
return this;
}
/**
* 设置 结束 空白打印材料展示数量
* @param printDisplayEnd
*/
public HotwordQuery printDisplayEnd(Integer printDisplayEnd){
this.printDisplayEnd = printDisplayEnd;
return this;
}
/**
* 设置 增加 空白打印材料展示数量
* @param printDisplayIncrement
*/
public HotwordQuery printDisplayIncrement(Integer printDisplayIncrement){
this.printDisplayIncrement = printDisplayIncrement;
return this;
}
/**
* 设置 空白打印材料展示数量
* @param printDisplayList
*/
public HotwordQuery printDisplayList(List<Integer> printDisplayList){
this.printDisplayList = printDisplayList;
return this;
}
/**
* 设置 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSource
*/
public HotwordQuery newsSource(Integer newsSource){
setNewsSource(newsSource);
return this;
}
/**
* 设置 开始 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceStart
*/
public HotwordQuery newsSourceStart(Integer newsSourceStart){
this.newsSourceStart = newsSourceStart;
return this;
}
/**
* 设置 结束 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceEnd
*/
public HotwordQuery newsSourceEnd(Integer newsSourceEnd){
this.newsSourceEnd = newsSourceEnd;
return this;
}
/**
* 设置 增加 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceIncrement
*/
public HotwordQuery newsSourceIncrement(Integer newsSourceIncrement){
this.newsSourceIncrement = newsSourceIncrement;
return this;
}
/**
* 设置 新闻来源(1.热点新闻,2.本地要闻,3.政策发布,4.通知公告)
* @param newsSourceList
*/
public HotwordQuery newsSourceList(List<Integer> newsSourceList){
this.newsSourceList = newsSourceList;
return this;
}
/**
* 设置 查询次数
* @param searchCount
......
......@@ -7,7 +7,7 @@ import java.util.List;
* 热门词汇业务视图对象
*
* @author zxfei
* @date 2022-12-06
* @date 2022-12-08
*/
public class HotwordVo extends BaseEntityLong {
......
......@@ -7,7 +7,7 @@ import com.mortals.xhx.module.hotword.model.HotwordEntity;
* 热门词汇业务 service接口
*
* @author zxfei
* @date 2022-12-06
* @date 2022-12-08
*/
public interface HotwordService extends ICRUDService<HotwordEntity,Long>{
......
package com.mortals.xhx.module.hotword.service.impl;
import com.mortals.xhx.module.hotword.model.HotwordQuery;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -7,14 +6,12 @@ import com.mortals.framework.model.Context;
import com.mortals.xhx.module.hotword.dao.HotwordDao;
import com.mortals.xhx.module.hotword.model.HotwordEntity;
import com.mortals.xhx.module.hotword.service.HotwordService;
import org.springframework.util.ObjectUtils;
/**
* HotwordService
* 热门词汇业务 service实现
*
* @author zxfei
* @date 2022-12-06
* @date 2022-12-08
*/
@Service("hotwordService")
public class HotwordServiceImpl extends AbstractCRUDServiceImpl<HotwordDao, HotwordEntity, Long> implements HotwordService {
......
package com.mortals.xhx.module.hotword.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.NewsSourceEnum;
import com.mortals.xhx.module.hotword.model.HotwordQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.hotword.model.HotwordEntity;
import com.mortals.xhx.module.hotword.service.HotwordService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
* 热门词汇业务
*
* @author zxfei
* @date 2022-12-06
*/
*
* 热门词汇业务
*
* @author zxfei
* @date 2022-12-08
*/
@RestController
@RequestMapping("hotword")
public class HotwordController extends BaseCRUDJsonBodyMappingController<HotwordService, HotwordEntity, Long> {
public class HotwordController extends BaseCRUDJsonBodyMappingController<HotwordService,HotwordEntity,Long> {
@Autowired
private ParamService paramService;
public HotwordController() {
super.setModuleDesc("热门词汇业务");
public HotwordController(){
super.setModuleDesc( "热门词汇业务");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "newsSource", NewsSourceEnum.getEnumMap());
this.addDict(model, "wordsSource", paramService.getParamBySecondOrganize("Hotword","wordsSource"));
super.init(model, context);
}
@Override
protected void saveBefore(HotwordEntity entity, Map<String, Object> model, Context context) throws AppException {
HotwordEntity hotwordEntity = this.service.selectOne(new HotwordQuery().siteId(entity.getSiteId()));
if(!ObjectUtils.isEmpty(hotwordEntity)){
entity.setId(hotwordEntity.getId());
}
super.saveBefore(entity, model, context);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.baseset.dao.ibatis.BasesetDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="BasesetEntity" id="BasesetEntity-Map">
<id property="id" column="id" />
<result property="siteId" column="siteId" />
<result property="printDisplay" column="printDisplay" />
<result property="newsSource" column="newsSource" />
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))">
a.siteId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('printDisplay') or colPickMode == 1 and data.containsKey('printDisplay')))">
a.printDisplay,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('newsSource') or colPickMode == 1 and data.containsKey('newsSource')))">
a.newsSource,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="BasesetEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_baseset
(siteId,printDisplay,newsSource,createTime,createUserId,updateTime)
VALUES
(#{siteId},#{printDisplay},#{newsSource},#{createTime},#{createUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_baseset
(siteId,printDisplay,newsSource,createTime,createUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.printDisplay},#{item.newsSource},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto">
update mortals_xhx_baseset as a
set
<trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('siteId')) or (colPickMode==1 and !data.containsKey('siteId'))">
a.siteId=#{data.siteId},
</if>
<if test="(colPickMode==0 and data.containsKey('siteIdIncrement')) or (colPickMode==1 and !data.containsKey('siteIdIncrement'))">
a.siteId=ifnull(a.siteId,0) + #{data.siteIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('printDisplay')) or (colPickMode==1 and !data.containsKey('printDisplay'))">
a.printDisplay=#{data.printDisplay},
</if>
<if test="(colPickMode==0 and data.containsKey('printDisplayIncrement')) or (colPickMode==1 and !data.containsKey('printDisplayIncrement'))">
a.printDisplay=ifnull(a.printDisplay,0) + #{data.printDisplayIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('newsSource')) or (colPickMode==1 and !data.containsKey('newsSource'))">
a.newsSource=#{data.newsSource},
</if>
<if test="(colPickMode==0 and data.containsKey('newsSourceIncrement')) or (colPickMode==1 and !data.containsKey('newsSourceIncrement'))">
a.newsSource=ifnull(a.newsSource,0) + #{data.newsSourceIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_baseset as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="siteId=(case" suffix="ELSE siteId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('siteId')) or (colPickMode==1 and !item.containsKey('siteId'))">
when a.id=#{item.id} then #{item.siteId}
</when>
<when test="(colPickMode==0 and item.containsKey('siteIdIncrement')) or (colPickMode==1 and !item.containsKey('siteIdIncrement'))">
when a.id=#{item.id} then ifnull(a.siteId,0) + #{item.siteIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="printDisplay=(case" suffix="ELSE printDisplay end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('printDisplay')) or (colPickMode==1 and !item.containsKey('printDisplay'))">
when a.id=#{item.id} then #{item.printDisplay}
</when>
<when test="(colPickMode==0 and item.containsKey('printDisplayIncrement')) or (colPickMode==1 and !item.containsKey('printDisplayIncrement'))">
when a.id=#{item.id} then ifnull(a.printDisplay,0) + #{item.printDisplayIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="newsSource=(case" suffix="ELSE newsSource end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('newsSource')) or (colPickMode==1 and !item.containsKey('newsSource'))">
when a.id=#{item.id} then #{item.newsSource}
</when>
<when test="(colPickMode==0 and item.containsKey('newsSourceIncrement')) or (colPickMode==1 and !item.containsKey('newsSourceIncrement'))">
when a.id=#{item.id} then ifnull(a.newsSource,0) + #{item.newsSourceIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="BasesetEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_baseset as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_baseset as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
delete from mortals_xhx_baseset where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_baseset where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_baseset where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_xhx_baseset as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="BasesetEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_baseset as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
from mortals_xhx_baseset as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql id="_condition_">
<if test="condition != null and !condition.isEmpty()">
<!-- 条件映射-普通条件 -->
<include refid="_condition_param_">
<property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('siteId')">
<if test="conditionParamRef.siteId != null ">
${_conditionType_} a.siteId = #{${_conditionParam_}.siteId}
</if>
<if test="conditionParamRef.siteId == null">
${_conditionType_} a.siteId is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteIdList')">
${_conditionType_} a.siteId in
<foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null">
${_conditionType_} a.siteId <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart}
</if>
<if test="conditionParamRef.containsKey('siteIdEnd') and conditionParamRef.siteIdEnd != null">
${_conditionType_} a.siteId <![CDATA[ <= ]]> #{${_conditionParam_}.siteIdEnd}
</if>
<if test="conditionParamRef.containsKey('printDisplay')">
<if test="conditionParamRef.printDisplay != null ">
${_conditionType_} a.printDisplay = #{${_conditionParam_}.printDisplay}
</if>
<if test="conditionParamRef.printDisplay == null">
${_conditionType_} a.printDisplay is null
</if>
</if>
<if test="conditionParamRef.containsKey('printDisplayList')">
${_conditionType_} a.printDisplay in
<foreach collection="conditionParamRef.printDisplayList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('printDisplayStart') and conditionParamRef.printDisplayStart != null">
${_conditionType_} a.printDisplay <![CDATA[ >= ]]> #{${_conditionParam_}.printDisplayStart}
</if>
<if test="conditionParamRef.containsKey('printDisplayEnd') and conditionParamRef.printDisplayEnd != null">
${_conditionType_} a.printDisplay <![CDATA[ <= ]]> #{${_conditionParam_}.printDisplayEnd}
</if>
<if test="conditionParamRef.containsKey('newsSource')">
<if test="conditionParamRef.newsSource != null ">
${_conditionType_} a.newsSource = #{${_conditionParam_}.newsSource}
</if>
<if test="conditionParamRef.newsSource == null">
${_conditionType_} a.newsSource is null
</if>
</if>
<if test="conditionParamRef.containsKey('newsSourceList')">
${_conditionType_} a.newsSource in
<foreach collection="conditionParamRef.newsSourceList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('newsSourceStart') and conditionParamRef.newsSourceStart != null">
${_conditionType_} a.newsSource <![CDATA[ >= ]]> #{${_conditionParam_}.newsSourceStart}
</if>
<if test="conditionParamRef.containsKey('newsSourceEnd') and conditionParamRef.newsSourceEnd != null">
${_conditionType_} a.newsSource <![CDATA[ <= ]]> #{${_conditionParam_}.newsSourceEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList')">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteId')">
a.siteId
<if test='orderCol.siteId != null and "DESC".equalsIgnoreCase(orderCol.siteId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('printDisplay')">
a.printDisplay
<if test='orderCol.printDisplay != null and "DESC".equalsIgnoreCase(orderCol.printDisplay)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('newsSource')">
a.newsSource
<if test='orderCol.newsSource != null and "DESC".equalsIgnoreCase(orderCol.newsSource)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
GROUP BY
<trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.hotword.dao.ibatis.HotwordDaoImpl">
<!-- 字段和属性映射 -->
......@@ -8,8 +8,6 @@
<id property="id" column="id" />
<result property="siteId" column="siteId" />
<result property="hotwords" column="hotwords" />
<result property="printDisplay" column="printDisplay" />
<result property="newsSource" column="newsSource" />
<result property="searchCount" column="searchCount" />
<result property="wordsSource" column="wordsSource" />
<result property="createTime" column="createTime" />
......@@ -31,12 +29,6 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hotwords') or colPickMode == 1 and data.containsKey('hotwords')))">
a.hotwords,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('printDisplay') or colPickMode == 1 and data.containsKey('printDisplay')))">
a.printDisplay,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('newsSource') or colPickMode == 1 and data.containsKey('newsSource')))">
a.newsSource,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('searchCount') or colPickMode == 1 and data.containsKey('searchCount')))">
a.searchCount,
</if>
......@@ -57,18 +49,18 @@
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="HotwordEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_hotword
(siteId,hotwords,printDisplay,newsSource,searchCount,wordsSource,createTime,createUserId,updateTime)
(siteId,hotwords,searchCount,wordsSource,createTime,createUserId,updateTime)
VALUES
(#{siteId},#{hotwords},#{printDisplay},#{newsSource},#{searchCount},#{wordsSource},#{createTime},#{createUserId},#{updateTime})
(#{siteId},#{hotwords},#{searchCount},#{wordsSource},#{createTime},#{createUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_hotword
(siteId,hotwords,printDisplay,newsSource,searchCount,wordsSource,createTime,createUserId,updateTime)
(siteId,hotwords,searchCount,wordsSource,createTime,createUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.hotwords},#{item.printDisplay},#{item.newsSource},#{item.searchCount},#{item.wordsSource},#{item.createTime},#{item.createUserId},#{item.updateTime})
(#{item.siteId},#{item.hotwords},#{item.searchCount},#{item.wordsSource},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach>
</insert>
......@@ -87,18 +79,6 @@
<if test="(colPickMode==0 and data.containsKey('hotwords')) or (colPickMode==1 and !data.containsKey('hotwords'))">
a.hotwords=#{data.hotwords},
</if>
<if test="(colPickMode==0 and data.containsKey('printDisplay')) or (colPickMode==1 and !data.containsKey('printDisplay'))">
a.printDisplay=#{data.printDisplay},
</if>
<if test="(colPickMode==0 and data.containsKey('printDisplayIncrement')) or (colPickMode==1 and !data.containsKey('printDisplayIncrement'))">
a.printDisplay=ifnull(a.printDisplay,0) + #{data.printDisplayIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('newsSource')) or (colPickMode==1 and !data.containsKey('newsSource'))">
a.newsSource=#{data.newsSource},
</if>
<if test="(colPickMode==0 and data.containsKey('newsSourceIncrement')) or (colPickMode==1 and !data.containsKey('newsSourceIncrement'))">
a.newsSource=ifnull(a.newsSource,0) + #{data.newsSourceIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('searchCount')) or (colPickMode==1 and !data.containsKey('searchCount'))">
a.searchCount=#{data.searchCount},
</if>
......@@ -154,30 +134,6 @@
</if>
</foreach>
</trim>
<trim prefix="printDisplay=(case" suffix="ELSE printDisplay end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('printDisplay')) or (colPickMode==1 and !item.containsKey('printDisplay'))">
when a.id=#{item.id} then #{item.printDisplay}
</when>
<when test="(colPickMode==0 and item.containsKey('printDisplayIncrement')) or (colPickMode==1 and !item.containsKey('printDisplayIncrement'))">
when a.id=#{item.id} then ifnull(a.printDisplay,0) + #{item.printDisplayIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="newsSource=(case" suffix="ELSE newsSource end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('newsSource')) or (colPickMode==1 and !item.containsKey('newsSource'))">
when a.id=#{item.id} then #{item.newsSource}
</when>
<when test="(colPickMode==0 and item.containsKey('newsSourceIncrement')) or (colPickMode==1 and !item.containsKey('newsSourceIncrement'))">
when a.id=#{item.id} then ifnull(a.newsSource,0) + #{item.newsSourceIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="searchCount=(case" suffix="ELSE searchCount end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
......@@ -401,48 +357,6 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('printDisplay')">
<if test="conditionParamRef.printDisplay != null ">
${_conditionType_} a.printDisplay = #{${_conditionParam_}.printDisplay}
</if>
<if test="conditionParamRef.printDisplay == null">
${_conditionType_} a.printDisplay is null
</if>
</if>
<if test="conditionParamRef.containsKey('printDisplayList')">
${_conditionType_} a.printDisplay in
<foreach collection="conditionParamRef.printDisplayList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('printDisplayStart') and conditionParamRef.printDisplayStart != null">
${_conditionType_} a.printDisplay <![CDATA[ >= ]]> #{${_conditionParam_}.printDisplayStart}
</if>
<if test="conditionParamRef.containsKey('printDisplayEnd') and conditionParamRef.printDisplayEnd != null">
${_conditionType_} a.printDisplay <![CDATA[ <= ]]> #{${_conditionParam_}.printDisplayEnd}
</if>
<if test="conditionParamRef.containsKey('newsSource')">
<if test="conditionParamRef.newsSource != null ">
${_conditionType_} a.newsSource = #{${_conditionParam_}.newsSource}
</if>
<if test="conditionParamRef.newsSource == null">
${_conditionType_} a.newsSource is null
</if>
</if>
<if test="conditionParamRef.containsKey('newsSourceList')">
${_conditionType_} a.newsSource in
<foreach collection="conditionParamRef.newsSourceList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('newsSourceStart') and conditionParamRef.newsSourceStart != null">
${_conditionType_} a.newsSource <![CDATA[ >= ]]> #{${_conditionParam_}.newsSourceStart}
</if>
<if test="conditionParamRef.containsKey('newsSourceEnd') and conditionParamRef.newsSourceEnd != null">
${_conditionType_} a.newsSource <![CDATA[ <= ]]> #{${_conditionParam_}.newsSourceEnd}
</if>
<if test="conditionParamRef.containsKey('searchCount')">
<if test="conditionParamRef.searchCount != null ">
${_conditionType_} a.searchCount = #{${_conditionParam_}.searchCount}
......@@ -564,16 +478,6 @@
<if test='orderCol.hotwords != null and "DESC".equalsIgnoreCase(orderCol.hotwords)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('printDisplay')">
a.printDisplay
<if test='orderCol.printDisplay != null and "DESC".equalsIgnoreCase(orderCol.printDisplay)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('newsSource')">
a.newsSource
<if test='orderCol.newsSource != null and "DESC".equalsIgnoreCase(orderCol.newsSource)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('searchCount')">
a.searchCount
<if test='orderCol.searchCount != null and "DESC".equalsIgnoreCase(orderCol.searchCount)'>DESC</if>
......
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###填单服务基础设置列表
POST {{baseUrl}}/baseset/list
Authorization: {{authToken}}
Content-Type: application/json
{
"siteId":824,
"printDisplay":0,
"newsSource":1,
"page":1,
"size":10
}
###填单服务基础设置更新与保存
POST {{baseUrl}}/baseset/save
Authorization: {{authToken}}
Content-Type: application/json
{
"siteId":564,
"printDisplay":0,
"newsSource":1,
}
> {%
client.global.set("Baseset_id", JSON.parse(response.body).data.id);
%}
###填单服务基础设置查看
GET {{baseUrl}}/baseset/info?id={{Baseset_id}}
Authorization: {{authToken}}
Accept: application/json
###填单服务基础设置编辑
GET {{baseUrl}}/baseset/edit?id={{Baseset_id}}
Authorization: {{authToken}}
Accept: application/json
###填单服务基础设置删除
GET {{baseUrl}}/baseset/delete?id={{Baseset_id}}
Authorization: {{authToken}}
Accept: application/json
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###热门词汇业务列表
POST {{baseUrl}}/hotword/list
Authorization: {{authToken}}
Content-Type: application/json
{
"siteId":889,
"hotwords":"jdjiit",
"searchCount":0,
"wordsSource":1,
"page":1,
"size":10
}
###热门词汇业务更新与保存
POST {{baseUrl}}/hotword/save
Authorization: {{authToken}}
Content-Type: application/json
{
"siteId":324,
"hotwords":"qxfiww",
"searchCount":0,
"wordsSource":1,
}
> {%
client.global.set("Hotword_id", JSON.parse(response.body).data.id);
%}
###热门词汇业务查看
GET {{baseUrl}}/hotword/info?id={{Hotword_id}}
Authorization: {{authToken}}
Accept: application/json
###热门词汇业务编辑
GET {{baseUrl}}/hotword/edit?id={{Hotword_id}}
Authorization: {{authToken}}
Accept: application/json
###热门词汇业务删除
GET {{baseUrl}}/hotword/delete?id={{Hotword_id}}
Authorization: {{authToken}}
Accept: application/json
......@@ -33,9 +33,8 @@ Content-Type: application/json
{
"siteId": 3,
"page": 1,
"size": 10,
"materiaFullName": "测试1"
"page": 2,
"size": 10
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment