Commit b417fc52 authored by 廖旭伟's avatar 廖旭伟

增加热门单事项

parent 03295d35
......@@ -146,6 +146,8 @@ public class MatterApplyServiceImpl extends AbstractCRUDServiceImpl<MatterApplyD
if(loginName.equals("admin")) {
params.setDeptCode(null);
}
}else {
throw new AppException("token无效");
}
MatterApplyQuery query = new MatterApplyQuery();
BeanUtils.copyProperties(params,query);
......
package com.mortals.xhx.module.single.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.single.model.vo.SingleMatterVo;
import lombok.Data;
/**
* 单事项实体对象
*
* @author zxfei
* @date 2023-03-21
*/
* 单事项实体对象
*
* @author zxfei
* @date 2025-03-25
*/
@Data
public class SingleMatterEntity extends SingleMatterVo {
private static final long serialVersionUID = 1L;
/**
* 站点id
*/
* 站点id
*/
private Long siteId;
/**
* 站点名称
*/
* 站点名称
*/
private String siteName;
/**
* 站点事项id
*/
* 站点事项id
*/
private Long siteMatterId;
/**
* 基础事项ID
*/
* 基础事项ID
*/
private Long matterId;
/**
* 事项名称
*/
* 事项名称
*/
private String matterName;
/**
* 事项编码
*/
* 事项编码
*/
private String matterCode;
/**
* 部门ID
*/
* 部门ID
*/
private Long deptId;
/**
* 部门名称
*/
* 部门名称
*/
private String deptName;
/**
* 部门编码
*/
* 部门编码
*/
private String deptCode;
/**
* 事项来源
*/
* 事项来源
*/
private Integer source;
/**
* 事项类型
*/
* 事项类型
*/
private String eventTypeShow;
/**
* 浏览次数
*/
* 浏览次数
*/
private Long viewsCount;
/**
* 是否生成本地附件
*/
* 是否生成本地附件
*/
private Integer isConvert;
/**
* 事项详情链接
*/
* 事项详情链接
*/
private String url;
public SingleMatterEntity(){}
/**
* 获取 站点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 getSiteMatterId(){
return siteMatterId;
}
/**
* 设置 站点事项id
* @param siteMatterId
*/
public void setSiteMatterId(Long siteMatterId){
this.siteMatterId = siteMatterId;
}
/**
* 获取 基础事项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;
}
/**
* 获取 部门ID
* @return Long
*/
public Long getDeptId(){
return deptId;
}
/**
* 设置 部门ID
* @param deptId
*/
public void setDeptId(Long deptId){
this.deptId = deptId;
}
/**
* 获取 部门名称
* @return String
*/
public String getDeptName(){
return deptName;
}
/**
* 设置 部门名称
* @param deptName
*/
public void setDeptName(String deptName){
this.deptName = deptName;
}
/**
* 获取 部门编码
* @return String
*/
public String getDeptCode(){
return deptCode;
}
/**
* 设置 部门编码
* @param deptCode
*/
public void setDeptCode(String deptCode){
this.deptCode = deptCode;
}
/**
* 获取 事项来源
* @return Integer
*/
public Integer getSource(){
return source;
}
/**
* 设置 事项来源
* @param source
*/
public void setSource(Integer source){
this.source = source;
}
/**
* 获取 事项类型
* @return String
*/
public String getEventTypeShow(){
return eventTypeShow;
}
/**
* 设置 事项类型
* @param eventTypeShow
*/
public void setEventTypeShow(String eventTypeShow){
this.eventTypeShow = eventTypeShow;
}
/**
* 获取 浏览次数
* @return Long
*/
public Long getViewsCount(){
return viewsCount;
}
/**
* 设置 浏览次数
* @param viewsCount
*/
public void setViewsCount(Long viewsCount){
this.viewsCount = viewsCount;
}
/**
* 获取 是否生成本地附件
* @return Integer
*/
public Integer getIsConvert(){
return isConvert;
}
/**
* 设置 是否生成本地附件
* @param isConvert
*/
public void setIsConvert(Integer isConvert){
this.isConvert = isConvert;
}
/**
* 获取 事项详情链接
* @return String
*/
public String getUrl(){
return url;
}
/**
* 设置 事项详情链接
* @param url
*/
public void setUrl(String url){
this.url = url;
}
* 热门事项
*/
private Integer hot;
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -286,59 +89,27 @@ public class SingleMatterEntity extends SingleMatterVo {
if (obj instanceof SingleMatterEntity) {
SingleMatterEntity tmp = (SingleMatterEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",siteId:").append(getSiteId());
sb.append(",siteName:").append(getSiteName());
sb.append(",siteMatterId:").append(getSiteMatterId());
sb.append(",matterId:").append(getMatterId());
sb.append(",matterName:").append(getMatterName());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",deptId:").append(getDeptId());
sb.append(",deptName:").append(getDeptName());
sb.append(",deptCode:").append(getDeptCode());
sb.append(",source:").append(getSource());
sb.append(",eventTypeShow:").append(getEventTypeShow());
sb.append(",viewsCount:").append(getViewsCount());
sb.append(",isConvert:").append(getIsConvert());
sb.append(",url:").append(getUrl());
return sb.toString();
}
public void initAttrValue(){
this.siteId = null;
this.siteName = "";
this.siteMatterId = null;
this.matterId = null;
this.matterName = "";
this.matterCode = "";
this.deptId = null;
this.deptName = "";
this.deptCode = "";
this.source = null;
this.eventTypeShow = "";
this.viewsCount = 0L;
this.isConvert = 0;
this.url = "";
this.siteId = null;
this.siteName = "";
this.siteMatterId = null;
this.matterId = null;
this.matterName = "";
this.matterCode = "";
this.deptId = null;
this.deptName = "";
this.deptCode = "";
this.source = 0;
this.eventTypeShow = "";
this.viewsCount = 0L;
this.isConvert = 0;
this.url = "";
this.hot = 0;
}
}
\ No newline at end of file
......@@ -45,7 +45,8 @@ public class SingleMatterController extends BaseCRUDJsonBodyMappingController<Si
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "source", paramService.getParamBySecondOrganize("SiteMatter","source"));
this.addDict(model, "isConvert", paramService.getParamBySecondOrganize("SingleMatter","isConvert"));
this.addDict(model, "isConvert", paramService.getParamBySecondOrganize("Matter","isOnline"));
this.addDict(model, "hot", paramService.getParamBySecondOrganize("Matter","isOnline"));
super.init(model, context);
}
......@@ -64,6 +65,7 @@ public class SingleMatterController extends BaseCRUDJsonBodyMappingController<Si
@Override
protected void doListBefore(SingleMatterEntity query, Map<String, Object> model, Context context) throws AppException {
List<OrderCol> orderColList = new ArrayList<>();
orderColList.add(new OrderCol("hot", "desc"));
orderColList.add(new OrderCol("viewsCount", "desc"));
orderColList.add(new OrderCol("createTime", "desc"));
query.setOrderColList(orderColList);
......
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