Commit 020cb085 authored by 赵啸非's avatar 赵啸非

添加文档接口设备统计

parent e09aecae
......@@ -39,4 +39,10 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '应用主题 ', 'App', 'appThemeN
2023-4-12
-- ----------------------------
ALTER TABLE mortals_sys_site_matter ADD COLUMN `hot` tinyint(2) DEFAULT '0' COMMENT '热门(0.否,1.是)' AFTER eventTypeShow;
ALTER TABLE mortals_sys_site_matter ADD COLUMN `display` tinyint(2) DEFAULT '0' COMMENT '显示(0.否,1.是)' AFTER hot;
ALTER TABLE mortals_sys_site_matter ADD COLUMN `display` tinyint(2) DEFAULT '1' COMMENT '显示(0.否,1.是)' AFTER hot;
-- ----------------------------
2023-4-23
-- ----------------------------
ALTER TABLE mortals_sys_site_theme_matter ADD COLUMN `hot` tinyint(2) DEFAULT '0' COMMENT '热门(0.否,1.是)' AFTER userType;
ALTER TABLE mortals_sys_site_theme_matter ADD COLUMN `display` tinyint(2) DEFAULT '1' COMMENT '显示(0.否,1.是)' AFTER hot;
......@@ -36,7 +36,7 @@
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<profiles.log.level>INFO</profiles.log.level>
<profiles.log.level>debug</profiles.log.level>
<package.environment>test</package.environment>
<skipUi>false</skipUi>
</properties>
......@@ -119,6 +119,11 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<version>3.1.2</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
......
package com.mortals.xhx.base.framework.filter;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.spi.FilterReply;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SampleFilter extends Filter<ILoggingEvent> {
@Override
public FilterReply decide(ILoggingEvent event) {
System.out.println("message==>"+event.getMessage());
if (event.getMessage().contains("sample")) {
return FilterReply.ACCEPT;
} else {
return FilterReply.NEUTRAL;
}
}
}
/**
* 文件:ResourceDao.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
* 文件:ResourceDao.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.resource.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.base.system.resource.model.ResourceEntity;
import com.mortals.xhx.module.matter.model.MatterEntity;
import java.util.List;
......@@ -23,8 +24,9 @@ import java.util.List;
* @version 1.0.0
*/
public interface ResourceDao extends ICRUDDao<ResourceEntity,Long> {
public List<ResourceEntity> getListByUserId(Long userId);
public interface ResourceDao extends ICRUDDao<ResourceEntity, Long> {
List<ResourceEntity> getListByUserId(Long userId);
List<ResourceEntity> getAll(int userType);
}
\ No newline at end of file
......@@ -70,7 +70,7 @@ public class SyncGovMatterDetailThread implements Runnable {
@Override
public void run() {
log.info("同步站点事项开始.....");
Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context);
// Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context);
//log.info("同步站点部门:" + JSON.toJSONString(deptRest));
Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context);
//Rest<String> rest = Rest.ok();
......
......@@ -125,7 +125,9 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
for (Map.Entry<String, String> item : data.entrySet()) {
String deptCode = item.getKey();
String deptName = item.getValue();
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
DeptEntity deptEntity = deptService.getExtCache(deptCode);
// DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
if (ObjectUtils.isEmpty(deptEntity)) {
deptEntity = new DeptEntity();
deptEntity.initAttrValue();
......
......@@ -20,5 +20,8 @@ public interface MatterDao extends ICRUDDao<MatterEntity, Long> {
String SQLID_SUB_LIST = "getSubList";
String SQLID_SUB_COUNT = "getSubListCount";
Result<MatterEntity> getSubList(MatterEntity matterQuery, PageInfo pageInfo);
List<MatterEntity> getMatterListByAreaCode(MatterEntity matterQuery);
}
......@@ -26,6 +26,7 @@ import java.util.List;
public class MatterDaoImpl extends BaseCRUDDaoMybatis<MatterEntity, Long> implements MatterDao {
@Override
public Result<MatterEntity> getSubList(MatterEntity matterQuery, PageInfo pageInfo) {
Result<MatterEntity> result = new Result();
......@@ -49,4 +50,13 @@ public class MatterDaoImpl extends BaseCRUDDaoMybatis<MatterEntity, Long> implem
public int getSubCount(ParamDto paramDto) {
return this.getSqlSession().selectOne(this.getSqlId(SQLID_SUB_COUNT), this.cpyQueryParamDto(paramDto));
}
@Override
public List<MatterEntity> getMatterListByAreaCode(MatterEntity matterQuery) {
ParamDto param = new ParamDto();
param.getCondition().put("areaCode", matterQuery.getAreaCode());
return this.getSqlSession().selectList(this.getSqlId("getMatterListByAreaCode"), param);
}
}
......@@ -6,6 +6,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.dao.MatterDao;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.model.vo.MatterInfo;
......@@ -25,6 +26,7 @@ import java.util.Map;
public interface MatterService extends ICRUDService<MatterEntity, Long> {
MatterDao getDao();
/**
* 添加业务到站点
*
......
package com.mortals.xhx.module.site.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.site.model.vo.SiteThemeMatterVo;
import lombok.Data;
/**
* 站点主题事项实体对象
*
* @author zxfei
* @date 2022-11-23
*/
* 站点主题事项实体对象
*
* @author zxfei
* @date 2023-04-23
*/
@Data
public class SiteThemeMatterEntity extends SiteThemeMatterVo {
private static final long serialVersionUID = 1L;
......@@ -52,140 +52,14 @@ public class SiteThemeMatterEntity extends SiteThemeMatterVo {
* 事项来源
*/
private Integer source;
public SiteThemeMatterEntity(){}
/**
* 获取 站点ID
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点ID
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 站点名称
* @return String
*/
public String getSiteName(){
return siteName;
}
/**
* 设置 站点名称
* @param siteName
*/
public void setSiteName(String siteName){
this.siteName = siteName;
}
/**
* 获取 事项ID
* @return Long
*/
public Long getMatterId(){
return matterId;
}
/**
* 设置 事项ID
* @param matterId
*/
public void setMatterId(Long matterId){
this.matterId = matterId;
}
/**
* 获取 事项名称
* @return String
*/
public String getMatterName(){
return matterName;
}
/**
* 设置 事项名称
* @param matterName
*/
public void setMatterName(String matterName){
this.matterName = matterName;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 服务类型(1.公共服务,2.个人服务,3.法人服务)
* @return String
*/
public String getUserType(){
return userType;
}
/**
* 设置 服务类型(1.公共服务,2.个人服务,3.法人服务)
* @param userType
*/
public void setUserType(String userType){
this.userType = userType;
}
/**
* 获取 主题编码
* @return String
*/
public String getThemeCode(){
return themeCode;
}
/**
* 设置 主题编码
* @param themeCode
*/
public void setThemeCode(String themeCode){
this.themeCode = themeCode;
}
/**
* 获取 主题名称
* @return String
* 热门(0.否,1.是)
*/
public String getThemeName(){
return themeName;
}
/**
* 设置 主题名称
* @param themeName
*/
public void setThemeName(String themeName){
this.themeName = themeName;
}
private Integer hot;
/**
* 获取 事项来源
* @return Integer
* 显示(0.否,1.是)
*/
public Integer getSource(){
return source;
}
/**
* 设置 事项来源
* @param source
*/
public void setSource(Integer source){
this.source = source;
}
private Integer display;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -202,38 +76,28 @@ public class SiteThemeMatterEntity extends SiteThemeMatterVo {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",siteId:").append(getSiteId());
sb.append(",siteName:").append(getSiteName());
sb.append(",matterId:").append(getMatterId());
sb.append(",matterName:").append(getMatterName());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",userType:").append(getUserType());
sb.append(",themeCode:").append(getThemeCode());
sb.append(",themeName:").append(getThemeName());
sb.append(",source:").append(getSource());
return sb.toString();
}
public void initAttrValue(){
this.siteId = null;
this.siteName = null;
this.siteName = "";
this.matterId = null;
this.matterName = null;
this.matterName = "";
this.matterCode = null;
this.userType = null;
this.themeCode = null;
this.themeCode = "";
this.themeName = "";
this.source = 1;
this.themeName = null;
this.hot = 0;
this.source = null;
this.display = 1;
}
}
\ No newline at end of file
......@@ -3,11 +3,11 @@ package com.mortals.xhx.module.site.model;
import java.util.List;
import com.mortals.xhx.module.site.model.SiteThemeMatterEntity;
/**
* 站点主题事项查询对象
*
* @author zxfei
* @date 2022-11-23
*/
* 站点主题事项查询对象
*
* @author zxfei
* @date 2023-04-23
*/
public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
/** 开始 序号,主键,自增长 */
private Long idStart;
......@@ -21,6 +21,9 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
/** 序号,主键,自增长列表 */
private List <Long> idList;
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
/** 开始 站点ID */
private Long siteIdStart;
......@@ -33,9 +36,14 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
/** 站点ID列表 */
private List <Long> siteIdList;
/** 站点ID排除列表 */
private List <Long> siteIdNotList;
/** 站点名称 */
private List<String> siteNameList;
/** 站点名称排除列表 */
private List <String> siteNameNotList;
/** 开始 事项ID */
private Long matterIdStart;
......@@ -48,21 +56,34 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
/** 事项ID列表 */
private List <Long> matterIdList;
/** 事项ID排除列表 */
private List <Long> matterIdNotList;
/** 事项名称 */
private List<String> matterNameList;
/** 事项名称排除列表 */
private List <String> matterNameNotList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项编码排除列表 */
private List <String> matterCodeNotList;
/** 服务类型(1.公共服务,2.个人服务,3.法人服务) */
private List<String> userTypeList;
/** 服务类型(1.公共服务,2.个人服务,3.法人服务)排除列表 */
private List <String> userTypeNotList;
/** 主题编码 */
private List<String> themeCodeList;
/** 主题编码排除列表 */
private List <String> themeCodeNotList;
/** 主题名称 */
private List<String> themeNameList;
/** 主题名称排除列表 */
private List <String> themeNameNotList;
/** 开始 事项来源 */
private Integer sourceStart;
......@@ -75,6 +96,9 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
/** 事项来源列表 */
private List <Integer> sourceList;
/** 事项来源排除列表 */
private List <Integer> sourceNotList;
/** 开始 创建时间 */
private String createTimeStart;
......@@ -93,12 +117,45 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 开始 修改时间 */
private String updateTimeStart;
/** 结束 修改时间 */
private String updateTimeEnd;
/** 开始 热门(0.否,1.是) */
private Integer hotStart;
/** 结束 热门(0.否,1.是) */
private Integer hotEnd;
/** 增加 热门(0.否,1.是) */
private Integer hotIncrement;
/** 热门(0.否,1.是)列表 */
private List <Integer> hotList;
/** 热门(0.否,1.是)排除列表 */
private List <Integer> hotNotList;
/** 开始 显示(0.否,1.是) */
private Integer displayStart;
/** 结束 显示(0.否,1.是) */
private Integer displayEnd;
/** 增加 显示(0.否,1.是) */
private Integer displayIncrement;
/** 显示(0.否,1.是)列表 */
private List <Integer> displayList;
/** 显示(0.否,1.是)排除列表 */
private List <Integer> displayNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<SiteThemeMatterQuery> orConditionList;
......@@ -171,6 +228,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
this.idList = idList;
}
/**
* 获取 序号,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 开始 站点ID
* @return siteIdStart
......@@ -235,6 +309,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
this.siteIdList = siteIdList;
}
/**
* 获取 站点ID
* @return siteIdNotList
*/
public List<Long> getSiteIdNotList(){
return this.siteIdNotList;
}
/**
* 设置 站点ID
* @param siteIdNotList
*/
public void setSiteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
}
/**
* 获取 站点名称
* @return siteNameList
......@@ -250,6 +341,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
public void setSiteNameList(List<String> siteNameList){
this.siteNameList = siteNameList;
}
/**
* 获取 站点名称
* @return siteNameNotList
*/
public List<String> getSiteNameNotList(){
return this.siteNameNotList;
}
/**
* 设置 站点名称
* @param siteNameNotList
*/
public void setSiteNameNotList(List<String> siteNameNotList){
this.siteNameNotList = siteNameNotList;
}
/**
* 获取 开始 事项ID
* @return matterIdStart
......@@ -314,6 +422,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
this.matterIdList = matterIdList;
}
/**
* 获取 事项ID
* @return matterIdNotList
*/
public List<Long> getMatterIdNotList(){
return this.matterIdNotList;
}
/**
* 设置 事项ID
* @param matterIdNotList
*/
public void setMatterIdNotList(List<Long> matterIdNotList){
this.matterIdNotList = matterIdNotList;
}
/**
* 获取 事项名称
* @return matterNameList
......@@ -329,6 +454,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
public void setMatterNameList(List<String> matterNameList){
this.matterNameList = matterNameList;
}
/**
* 获取 事项名称
* @return matterNameNotList
*/
public List<String> getMatterNameNotList(){
return this.matterNameNotList;
}
/**
* 设置 事项名称
* @param matterNameNotList
*/
public void setMatterNameNotList(List<String> matterNameNotList){
this.matterNameNotList = matterNameNotList;
}
/**
* 获取 事项编码
* @return matterCodeList
......@@ -344,6 +486,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 事项编码
* @return matterCodeNotList
*/
public List<String> getMatterCodeNotList(){
return this.matterCodeNotList;
}
/**
* 设置 事项编码
* @param matterCodeNotList
*/
public void setMatterCodeNotList(List<String> matterCodeNotList){
this.matterCodeNotList = matterCodeNotList;
}
/**
* 获取 服务类型(1.公共服务,2.个人服务,3.法人服务)
* @return userTypeList
......@@ -359,6 +518,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
public void setUserTypeList(List<String> userTypeList){
this.userTypeList = userTypeList;
}
/**
* 获取 服务类型(1.公共服务,2.个人服务,3.法人服务)
* @return userTypeNotList
*/
public List<String> getUserTypeNotList(){
return this.userTypeNotList;
}
/**
* 设置 服务类型(1.公共服务,2.个人服务,3.法人服务)
* @param userTypeNotList
*/
public void setUserTypeNotList(List<String> userTypeNotList){
this.userTypeNotList = userTypeNotList;
}
/**
* 获取 主题编码
* @return themeCodeList
......@@ -374,6 +550,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
public void setThemeCodeList(List<String> themeCodeList){
this.themeCodeList = themeCodeList;
}
/**
* 获取 主题编码
* @return themeCodeNotList
*/
public List<String> getThemeCodeNotList(){
return this.themeCodeNotList;
}
/**
* 设置 主题编码
* @param themeCodeNotList
*/
public void setThemeCodeNotList(List<String> themeCodeNotList){
this.themeCodeNotList = themeCodeNotList;
}
/**
* 获取 主题名称
* @return themeNameList
......@@ -389,6 +582,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
public void setThemeNameList(List<String> themeNameList){
this.themeNameList = themeNameList;
}
/**
* 获取 主题名称
* @return themeNameNotList
*/
public List<String> getThemeNameNotList(){
return this.themeNameNotList;
}
/**
* 设置 主题名称
* @param themeNameNotList
*/
public void setThemeNameNotList(List<String> themeNameNotList){
this.themeNameNotList = themeNameNotList;
}
/**
* 获取 开始 事项来源
* @return sourceStart
......@@ -453,6 +663,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
this.sourceList = sourceList;
}
/**
* 获取 事项来源
* @return sourceNotList
*/
public List<Integer> getSourceNotList(){
return this.sourceNotList;
}
/**
* 设置 事项来源
* @param sourceNotList
*/
public void setSourceNotList(List<Integer> sourceNotList){
this.sourceNotList = sourceNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
......@@ -549,6 +776,23 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/**
* 获取 开始 修改时间
* @return updateTimeStart
......@@ -581,6 +825,168 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 开始 热门(0.否,1.是)
* @return hotStart
*/
public Integer getHotStart(){
return this.hotStart;
}
/**
* 设置 开始 热门(0.否,1.是)
* @param hotStart
*/
public void setHotStart(Integer hotStart){
this.hotStart = hotStart;
}
/**
* 获取 结束 热门(0.否,1.是)
* @return $hotEnd
*/
public Integer getHotEnd(){
return this.hotEnd;
}
/**
* 设置 结束 热门(0.否,1.是)
* @param hotEnd
*/
public void setHotEnd(Integer hotEnd){
this.hotEnd = hotEnd;
}
/**
* 获取 增加 热门(0.否,1.是)
* @return hotIncrement
*/
public Integer getHotIncrement(){
return this.hotIncrement;
}
/**
* 设置 增加 热门(0.否,1.是)
* @param hotIncrement
*/
public void setHotIncrement(Integer hotIncrement){
this.hotIncrement = hotIncrement;
}
/**
* 获取 热门(0.否,1.是)
* @return hotList
*/
public List<Integer> getHotList(){
return this.hotList;
}
/**
* 设置 热门(0.否,1.是)
* @param hotList
*/
public void setHotList(List<Integer> hotList){
this.hotList = hotList;
}
/**
* 获取 热门(0.否,1.是)
* @return hotNotList
*/
public List<Integer> getHotNotList(){
return this.hotNotList;
}
/**
* 设置 热门(0.否,1.是)
* @param hotNotList
*/
public void setHotNotList(List<Integer> hotNotList){
this.hotNotList = hotNotList;
}
/**
* 获取 开始 显示(0.否,1.是)
* @return displayStart
*/
public Integer getDisplayStart(){
return this.displayStart;
}
/**
* 设置 开始 显示(0.否,1.是)
* @param displayStart
*/
public void setDisplayStart(Integer displayStart){
this.displayStart = displayStart;
}
/**
* 获取 结束 显示(0.否,1.是)
* @return $displayEnd
*/
public Integer getDisplayEnd(){
return this.displayEnd;
}
/**
* 设置 结束 显示(0.否,1.是)
* @param displayEnd
*/
public void setDisplayEnd(Integer displayEnd){
this.displayEnd = displayEnd;
}
/**
* 获取 增加 显示(0.否,1.是)
* @return displayIncrement
*/
public Integer getDisplayIncrement(){
return this.displayIncrement;
}
/**
* 设置 增加 显示(0.否,1.是)
* @param displayIncrement
*/
public void setDisplayIncrement(Integer displayIncrement){
this.displayIncrement = displayIncrement;
}
/**
* 获取 显示(0.否,1.是)
* @return displayList
*/
public List<Integer> getDisplayList(){
return this.displayList;
}
/**
* 设置 显示(0.否,1.是)
* @param displayList
*/
public void setDisplayList(List<Integer> displayList){
this.displayList = displayList;
}
/**
* 获取 显示(0.否,1.是)
* @return displayNotList
*/
public List<Integer> getDisplayNotList(){
return this.displayNotList;
}
/**
* 设置 显示(0.否,1.是)
* @param displayNotList
*/
public void setDisplayNotList(List<Integer> displayNotList){
this.displayNotList = displayNotList;
}
/**
* 设置 序号,主键,自增长
* @param id
......@@ -626,6 +1032,15 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
return this;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public SiteThemeMatterQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 站点ID
* @param siteId
......@@ -671,6 +1086,15 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
return this;
}
/**
* 设置 站点ID
* @param siteIdNotList
*/
public SiteThemeMatterQuery siteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
return this;
}
/**
* 设置 站点名称
......@@ -735,6 +1159,15 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
return this;
}
/**
* 设置 事项ID
* @param matterIdNotList
*/
public SiteThemeMatterQuery matterIdNotList(List<Long> matterIdNotList){
this.matterIdNotList = matterIdNotList;
return this;
}
/**
* 设置 事项名称
......@@ -875,6 +1308,15 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
return this;
}
/**
* 设置 事项来源
* @param sourceNotList
*/
public SiteThemeMatterQuery sourceNotList(List<Integer> sourceNotList){
this.sourceNotList = sourceNotList;
return this;
}
/**
* 设置 创建用户
......@@ -921,6 +1363,123 @@ public class SiteThemeMatterQuery extends SiteThemeMatterEntity {
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public SiteThemeMatterQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/**
* 设置 热门(0.否,1.是)
* @param hot
*/
public SiteThemeMatterQuery hot(Integer hot){
setHot(hot);
return this;
}
/**
* 设置 开始 热门(0.否,1.是)
* @param hotStart
*/
public SiteThemeMatterQuery hotStart(Integer hotStart){
this.hotStart = hotStart;
return this;
}
/**
* 设置 结束 热门(0.否,1.是)
* @param hotEnd
*/
public SiteThemeMatterQuery hotEnd(Integer hotEnd){
this.hotEnd = hotEnd;
return this;
}
/**
* 设置 增加 热门(0.否,1.是)
* @param hotIncrement
*/
public SiteThemeMatterQuery hotIncrement(Integer hotIncrement){
this.hotIncrement = hotIncrement;
return this;
}
/**
* 设置 热门(0.否,1.是)
* @param hotList
*/
public SiteThemeMatterQuery hotList(List<Integer> hotList){
this.hotList = hotList;
return this;
}
/**
* 设置 热门(0.否,1.是)
* @param hotNotList
*/
public SiteThemeMatterQuery hotNotList(List<Integer> hotNotList){
this.hotNotList = hotNotList;
return this;
}
/**
* 设置 显示(0.否,1.是)
* @param display
*/
public SiteThemeMatterQuery display(Integer display){
setDisplay(display);
return this;
}
/**
* 设置 开始 显示(0.否,1.是)
* @param displayStart
*/
public SiteThemeMatterQuery displayStart(Integer displayStart){
this.displayStart = displayStart;
return this;
}
/**
* 设置 结束 显示(0.否,1.是)
* @param displayEnd
*/
public SiteThemeMatterQuery displayEnd(Integer displayEnd){
this.displayEnd = displayEnd;
return this;
}
/**
* 设置 增加 显示(0.否,1.是)
* @param displayIncrement
*/
public SiteThemeMatterQuery displayIncrement(Integer displayIncrement){
this.displayIncrement = displayIncrement;
return this;
}
/**
* 设置 显示(0.否,1.是)
* @param displayList
*/
public SiteThemeMatterQuery displayList(List<Integer> displayList){
this.displayList = displayList;
return this;
}
/**
* 设置 显示(0.否,1.是)
* @param displayNotList
*/
public SiteThemeMatterQuery displayNotList(List<Integer> displayNotList){
this.displayNotList = displayNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
......
......@@ -6,6 +6,10 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.site.model.SiteThemeMatterEntity;
import com.mortals.xhx.module.site.model.SiteThemeMatterQuery;
import com.mortals.xhx.module.site.service.SiteThemeMatterService;
import com.mortals.xhx.module.site.service.SiteThemeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
......@@ -31,6 +35,8 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
@Autowired
private MatterService matterService;
@Autowired
private SiteThemeMatterService siteThemeMatterService;
@Override
protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException {
......@@ -69,6 +75,28 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
matterService.update(matterEntity, context);
}
}
SiteThemeMatterEntity siteThemeMatterEntity = siteThemeMatterService.selectOne(new SiteThemeMatterQuery().matterId(entity.getMatterId()));
if (!ObjectUtils.isEmpty(siteThemeMatterEntity)) {
siteThemeMatterEntity.setHot(entity.getHot());
siteThemeMatterEntity.setDisplay(entity.getDisplay());
}
}
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void saveBefore(SiteMatterEntity entity, Context context) throws AppException {
super.saveBefore(entity, context);
SiteThemeMatterEntity siteThemeMatterEntity = siteThemeMatterService.selectOne(new SiteThemeMatterQuery().matterId(entity.getMatterId()));
if (!ObjectUtils.isEmpty(siteThemeMatterEntity)) {
siteThemeMatterEntity.setHot(entity.getHot());
siteThemeMatterEntity.setDisplay(entity.getDisplay());
}
}
@Override
......
......@@ -405,7 +405,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
pageInfo.setPrePageResult(10);
return siteEntities;
}
......@@ -480,7 +479,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
if (!ObjectUtils.isEmpty(siteEntities)) {
siteAreaVo.setSiteList(siteEntities);
//map.put(child.getName(), siteEntities);
}else{
} else {
//没有站点
siteAreaVo.setSiteList(Collections.EMPTY_LIST);
}
......@@ -509,7 +508,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
for (AreaEntity areaEntity : areaEntities) {
List<SiteEntity> siteEntityList = this.find(new SiteQuery().areaCode(areaEntity.getAreaCode()));
if(!ObjectUtils.isEmpty(siteEntityList)){
if (!ObjectUtils.isEmpty(siteEntityList)) {
list.addAll(siteEntityList);
}
}
......@@ -628,6 +627,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
//String dxType = AreaLevelDxTypeEnum.getByValue(areaEntity == null ? 2 : areaEntity.getAreaLevel()).getDesc();
// String dxType="2";
//String dxType = "3";
log.info("抓取事项开始");
List<MatterEntity> govMatterList = new ArrayList<>();
List<DeptEntity> deptEntities = deptService.find(new DeptQuery().siteId(siteEntity.getId()).source(0));
for (DeptEntity deptEntity : deptEntities) {
......@@ -643,6 +643,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
govMatterList.addAll(deptMatterList);
}
}
log.info("抓取事项结束");
/* HashMap<String, String> params = new HashMap<>();
params.put("dxType", dxType);
params.put("areaCode", siteEntity.getAreaCode());
......@@ -666,11 +667,40 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
List<MatterEntity> mattersTwo = this.getMatters(params, context);
govMatterList.addAll(mattersTwo);*/
List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()));
List<MatterEntity> subList = this.subList(govMatterList, localMatterList);
// new MatterQuery().setMatterNoNotList();
// List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()));
//HashSet<String> matterNoSet = new HashSet<>();
Set<String> matterNoSet = matterService.getDao().getMatterListByAreaCode(new MatterQuery().areaCode(siteEntity.getAreaCode())).parallelStream().map(i->i.getMatterNo()).collect(Collectors.toSet());
/* Integer page = 1;
Integer size = 200;
PageInfo pageInfo = new PageInfo();
pageInfo.setCountPage(false);
while (true) {
pageInfo.setCurrPage(page);
pageInfo.setPrePageResult(size);
Result<MatterEntity> matterEntityResult = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()), pageInfo, context);
if (ObjectUtils.isEmpty(matterEntityResult.getList())) {
break;
}
Set<String> collect = matterEntityResult.getList().parallelStream().map(i -> i.getMatterNo()).collect(Collectors.toSet());
matterNoSet.addAll(collect);
page++;
log.info("page:{},size:{}", page, collect.size());
}*/
log.info("计算差集");
// List<MatterEntity> subList = this.subList(govMatterList, localMatterList);
List<MatterEntity> subList = this.subListSet(govMatterList, matterNoSet);
log.info("抓取事项总数:{}需要添加事项数量:{}", govMatterList.size(), subList.size());
subList = subList.stream().distinct().collect(Collectors.toList());
log.info("需要添加事项过滤后数量:{}" , subList.size());
log.info("需要添加事项过滤后数量:{}", subList.size());
//差集进行插入并更新详细数据
if (!ObjectUtils.isEmpty(subList)) {
for (MatterEntity matterEntity : subList) {
......@@ -736,5 +766,10 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
return firstList.parallelStream().filter(item -> !secondSet.contains(item.getMatterNo())).collect(Collectors.toList());
}
public List<MatterEntity> subListSet(List<MatterEntity> firstList, Set<String> secondSet) {
// Set<String> secondSet = secondList.parallelStream().map(e -> e.getMatterNo()).collect(Collectors.toSet());
return firstList.parallelStream().filter(item -> !secondSet.contains(item.getMatterNo())).collect(Collectors.toList());
}
}
\ No newline at end of file
......@@ -9,7 +9,8 @@
<setting name="useGeneratedKeys" value="false" />
<setting name="defaultExecutorType" value="REUSE" />
<!-- 是否开始sql日志控制台打印 -->
<!-- <setting name="logImpl" value="STDOUT_LOGGING" />-->
<setting name="logPrefix" value="com.mapper"/>
<!-- <setting name="logImpl" value="SLF4J" />-->
</settings>
<plugins>
<plugin interceptor="com.mortals.framework.thirty.mybatis.MortalsPagePlugin">
......
......@@ -9,13 +9,47 @@
<!-- appender用来格式化日志输出节点,有俩个属性name和class,class用来指定哪种输出策略,常用就是控制台输出策略和文件输出策略 -->
<!-- 控制台输出策略-->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<!-- 添加过滤器 -->
<!-- <filter class="com.mortals.xhx.base.framework.filter.SampleFilter" />-->
<!-- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator>
<expression>
return false;
</expression>
</evaluator>
<OnMatch>ACCEPT</OnMatch>
<OnMismatch>DENY</OnMismatch>
</filter>-->
<encoder>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%X{traceId}] [%thread] [%.50c\(%L\)] - %msg%n</pattern>
</encoder>
</appender>
<!-- 文件输出策略-->
<appender name="fileInfo" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 添加过滤器 -->
<!--<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator>
<expression>
// 判断 SQL 语句是否包含 "&lt;!&ndash; no log &ndash;&gt;" 注释
return !message.contains("&lt;!&ndash; no log &ndash;&gt;");
</expression>
</evaluator>
<OnMismatch>DENY</OnMismatch>
</filter>-->
<!-- 添加过滤器 -->
<!-- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator>
<expression>
return false;
</expression>
</evaluator>
<OnMatch>ACCEPT</OnMatch>
<OnMismatch>DENY</OnMismatch>
</filter>-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%X{traceId}] [%thread] [%.50c\(%L\)] - %msg%n</pattern>
</encoder>
......@@ -27,6 +61,7 @@
<!--日志文件保留天数-->
<MaxHistory>15</MaxHistory>
</rollingPolicy>
</appender>
<!-- 异常文件输出策略-->
<appender name="fileError" class="ch.qos.logback.core.rolling.RollingFileAppender">
......@@ -57,6 +92,10 @@
<!-- level 用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。如果未设置此属性,那么当前logger将会继承上级的级别-->
<!-- additivity 是否向上级logger传递打印信息。默认是true。false:表示只用当前logger的appender-ref。true:表示当前logger的appender-ref和rootLogger的appender-ref都有效。-->
<logger name="com.mapper" level="debug" additivity="false">
<appender-ref ref="console"/>
</logger>
<logger name="com.mortals" level="${logLevel}" additivity="false">
<appender-ref ref="console"/>
<appender-ref ref="fileInfo"/>
......
......@@ -189,6 +189,7 @@
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="TaskEntity-Map">
<!-- no log -->
select <include refid="_columns"/>
from mortals_xhx_task as a
where a.id=#{condition.id}
......@@ -216,6 +217,7 @@
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="TaskEntity-Map">
<!-- no log -->
select <include refid="_columns"/>
from mortals_xhx_task as a
<trim suffixOverrides="where" suffix="">
......
......@@ -64,4 +64,18 @@
</trim>
</trim>
</select>
<select id="getMatterListByAreaCode" parameterType="paramDto" resultMap="MatterEntity-Map">
select
a.matterNo
FROM
mortals_sys_matter AS a
where
<trim prefixOverrides="and" prefix="">
<if test="condition.areaCode!=null and condition.areaCode!=''">
and a.areaCode = #{condition.areaCode,jdbcType=VARCHAR}
</if>
</trim>
</select>
</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.site.dao.ibatis.SiteThemeMatterDaoImpl">
<!-- 字段和属性映射 -->
......@@ -18,6 +18,8 @@
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" />
<result property="hot" column="hot" />
<result property="display" column="display" />
</resultMap>
......@@ -64,23 +66,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hot') or colPickMode == 1 and data.containsKey('hot')))">
a.hot,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('display') or colPickMode == 1 and data.containsKey('display')))">
a.display,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="SiteThemeMatterEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_site_theme_matter
(siteId,siteName,matterId,matterName,matterCode,userType,themeCode,themeName,source,createTime,createUserId,updateTime)
(siteId,siteName,matterId,matterName,matterCode,userType,themeCode,themeName,source,createTime,createUserId,updateTime,hot,display)
VALUES
(#{siteId},#{siteName},#{matterId},#{matterName},#{matterCode},#{userType},#{themeCode},#{themeName},#{source},#{createTime},#{createUserId},#{updateTime})
(#{siteId},#{siteName},#{matterId},#{matterName},#{matterCode},#{userType},#{themeCode},#{themeName},#{source},#{createTime},#{createUserId},#{updateTime},#{hot},#{display})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_site_theme_matter
(siteId,siteName,matterId,matterName,matterCode,userType,themeCode,themeName,source,createTime,createUserId,updateTime)
(siteId,siteName,matterId,matterName,matterCode,userType,themeCode,themeName,source,createTime,createUserId,updateTime,hot,display)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.siteName},#{item.matterId},#{item.matterName},#{item.matterCode},#{item.userType},#{item.themeCode},#{item.themeName},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
(#{item.siteId},#{item.siteName},#{item.matterId},#{item.matterName},#{item.matterCode},#{item.userType},#{item.themeCode},#{item.themeName},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.hot},#{item.display})
</foreach>
</insert>
......@@ -138,6 +146,18 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('hot')) or (colPickMode==1 and !data.containsKey('hot'))">
a.hot=#{data.hot},
</if>
<if test="(colPickMode==0 and data.containsKey('hotIncrement')) or (colPickMode==1 and !data.containsKey('hotIncrement'))">
a.hot=ifnull(a.hot,0) + #{data.hotIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('display')) or (colPickMode==1 and !data.containsKey('display'))">
a.display=#{data.display},
</if>
<if test="(colPickMode==0 and data.containsKey('displayIncrement')) or (colPickMode==1 and !data.containsKey('displayIncrement'))">
a.display=ifnull(a.display,0) + #{data.displayIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -254,6 +274,30 @@
</if>
</foreach>
</trim>
<trim prefix="hot=(case" suffix="ELSE hot end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('hot')) or (colPickMode==1 and !item.containsKey('hot'))">
when a.id=#{item.id} then #{item.hot}
</when>
<when test="(colPickMode==0 and item.containsKey('hotIncrement')) or (colPickMode==1 and !item.containsKey('hotIncrement'))">
when a.id=#{item.id} then ifnull(a.hot,0) + #{item.hotIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="display=(case" suffix="ELSE display end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('display')) or (colPickMode==1 and !item.containsKey('display'))">
when a.id=#{item.id} then #{item.display}
</when>
<when test="(colPickMode==0 and item.containsKey('displayIncrement')) or (colPickMode==1 and !item.containsKey('displayIncrement'))">
when a.id=#{item.id} then ifnull(a.display,0) + #{item.displayIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -378,12 +422,18 @@
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" 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>
......@@ -399,12 +449,18 @@
${_conditionType_} a.siteId is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteIdList')">
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
${_conditionType_} a.siteId in
<foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0">
${_conditionType_} a.siteId not in
<foreach collection="conditionParamRef.siteIdNotList" 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>
......@@ -421,12 +477,18 @@
${_conditionType_} a.siteName is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteNameList')">
<if test="conditionParamRef.containsKey('siteNameList') and conditionParamRef.siteNameList.size() > 0">
${_conditionType_} a.siteName in
<foreach collection="conditionParamRef.siteNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteNameNotList') and conditionParamRef.siteNameNotList.size() > 0">
${_conditionType_} a.siteName not in
<foreach collection="conditionParamRef.siteNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterId')">
<if test="conditionParamRef.matterId != null ">
${_conditionType_} a.matterId = #{${_conditionParam_}.matterId}
......@@ -435,12 +497,18 @@
${_conditionType_} a.matterId is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterIdList')">
<if test="conditionParamRef.containsKey('matterIdList') and conditionParamRef.matterIdList.size() > 0">
${_conditionType_} a.matterId in
<foreach collection="conditionParamRef.matterIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterIdNotList') and conditionParamRef.matterIdNotList.size() > 0">
${_conditionType_} a.matterId not in
<foreach collection="conditionParamRef.matterIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterIdStart') and conditionParamRef.matterIdStart != null">
${_conditionType_} a.matterId <![CDATA[ >= ]]> #{${_conditionParam_}.matterIdStart}
</if>
......@@ -457,12 +525,18 @@
${_conditionType_} a.matterName is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterNameList')">
<if test="conditionParamRef.containsKey('matterNameList') and conditionParamRef.matterNameList.size() > 0">
${_conditionType_} a.matterName in
<foreach collection="conditionParamRef.matterNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterNameNotList') and conditionParamRef.matterNameNotList.size() > 0">
${_conditionType_} a.matterName not in
<foreach collection="conditionParamRef.matterNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
......@@ -472,12 +546,18 @@
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
<if test="conditionParamRef.containsKey('matterCodeList') and conditionParamRef.matterCodeList.size() > 0">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterCodeNotList') and conditionParamRef.matterCodeNotList.size() > 0">
${_conditionType_} a.matterCode not in
<foreach collection="conditionParamRef.matterCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('userType')">
<if test="conditionParamRef.userType != null and conditionParamRef.userType != ''">
......@@ -487,12 +567,18 @@
${_conditionType_} a.userType is null
</if>
</if>
<if test="conditionParamRef.containsKey('userTypeList')">
<if test="conditionParamRef.containsKey('userTypeList') and conditionParamRef.userTypeList.size() > 0">
${_conditionType_} a.userType in
<foreach collection="conditionParamRef.userTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('userTypeNotList') and conditionParamRef.userTypeNotList.size() > 0">
${_conditionType_} a.userType not in
<foreach collection="conditionParamRef.userTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('themeCode')">
<if test="conditionParamRef.themeCode != null and conditionParamRef.themeCode != ''">
......@@ -502,12 +588,18 @@
${_conditionType_} a.themeCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('themeCodeList')">
<if test="conditionParamRef.containsKey('themeCodeList') and conditionParamRef.themeCodeList.size() > 0">
${_conditionType_} a.themeCode in
<foreach collection="conditionParamRef.themeCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('themeCodeNotList') and conditionParamRef.themeCodeNotList.size() > 0">
${_conditionType_} a.themeCode not in
<foreach collection="conditionParamRef.themeCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('themeName')">
<if test="conditionParamRef.themeName != null and conditionParamRef.themeName != ''">
......@@ -517,12 +609,18 @@
${_conditionType_} a.themeName is null
</if>
</if>
<if test="conditionParamRef.containsKey('themeNameList')">
<if test="conditionParamRef.containsKey('themeNameList') and conditionParamRef.themeNameList.size() > 0">
${_conditionType_} a.themeName in
<foreach collection="conditionParamRef.themeNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('themeNameNotList') and conditionParamRef.themeNameNotList.size() > 0">
${_conditionType_} a.themeName not in
<foreach collection="conditionParamRef.themeNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('source')">
<if test="conditionParamRef.source != null ">
${_conditionType_} a.source = #{${_conditionParam_}.source}
......@@ -531,12 +629,18 @@
${_conditionType_} a.source is null
</if>
</if>
<if test="conditionParamRef.containsKey('sourceList')">
<if test="conditionParamRef.containsKey('sourceList') and conditionParamRef.sourceList.size() > 0">
${_conditionType_} a.source in
<foreach collection="conditionParamRef.sourceList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sourceNotList') and conditionParamRef.sourceNotList.size() > 0">
${_conditionType_} a.source not in
<foreach collection="conditionParamRef.sourceNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sourceStart') and conditionParamRef.sourceStart != null">
${_conditionType_} a.source <![CDATA[ >= ]]> #{${_conditionParam_}.sourceStart}
</if>
......@@ -567,12 +671,18 @@
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList')">
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" 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>
......@@ -595,6 +705,60 @@
<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>
<if test="conditionParamRef.containsKey('hot')">
<if test="conditionParamRef.hot != null ">
${_conditionType_} a.hot = #{${_conditionParam_}.hot}
</if>
<if test="conditionParamRef.hot == null">
${_conditionType_} a.hot is null
</if>
</if>
<if test="conditionParamRef.containsKey('hotList') and conditionParamRef.hotList.size() > 0">
${_conditionType_} a.hot in
<foreach collection="conditionParamRef.hotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hotNotList') and conditionParamRef.hotNotList.size() > 0">
${_conditionType_} a.hot not in
<foreach collection="conditionParamRef.hotNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hotStart') and conditionParamRef.hotStart != null">
${_conditionType_} a.hot <![CDATA[ >= ]]> #{${_conditionParam_}.hotStart}
</if>
<if test="conditionParamRef.containsKey('hotEnd') and conditionParamRef.hotEnd != null">
${_conditionType_} a.hot <![CDATA[ <= ]]> #{${_conditionParam_}.hotEnd}
</if>
<if test="conditionParamRef.containsKey('display')">
<if test="conditionParamRef.display != null ">
${_conditionType_} a.display = #{${_conditionParam_}.display}
</if>
<if test="conditionParamRef.display == null">
${_conditionType_} a.display is null
</if>
</if>
<if test="conditionParamRef.containsKey('displayList') and conditionParamRef.displayList.size() > 0">
${_conditionType_} a.display in
<foreach collection="conditionParamRef.displayList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('displayNotList') and conditionParamRef.displayNotList.size() > 0">
${_conditionType_} a.display not in
<foreach collection="conditionParamRef.displayNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('displayStart') and conditionParamRef.displayStart != null">
${_conditionType_} a.display <![CDATA[ >= ]]> #{${_conditionParam_}.displayStart}
</if>
<if test="conditionParamRef.containsKey('displayEnd') and conditionParamRef.displayEnd != null">
${_conditionType_} a.display <![CDATA[ <= ]]> #{${_conditionParam_}.displayEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -673,6 +837,16 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('hot')">
a.hot
<if test='orderCol.hot != null and "DESC".equalsIgnoreCase(orderCol.hot)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('display')">
a.display
<if test='orderCol.display != null and "DESC".equalsIgnoreCase(orderCol.display)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
......
......@@ -104,7 +104,7 @@ POST {{baseUrl}}/site/syncGovMatterBySiteId
Content-Type: application/json
{
"id":3
"id":1
}
......
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