新增报表管理

This commit is contained in:
459816669@qq.com 2021-05-01 12:08:35 +08:00
parent 5d08d9c8d9
commit cd4a7be7f5
18 changed files with 254 additions and 92 deletions

View File

@ -27,7 +27,7 @@
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.10</version> <version>3.10</version>
</dependency> </dependency>
<!--jimureport--> <!--积木报表-->
<dependency> <dependency>
<groupId>org.jeecgframework.jimureport</groupId> <groupId>org.jeecgframework.jimureport</groupId>
<artifactId>spring-boot-starter-jimureport</artifactId> <artifactId>spring-boot-starter-jimureport</artifactId>

View File

@ -0,0 +1,52 @@
/*
package com.snow.web.controller.system;
import com.snow.common.core.controller.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
*/
/**
* @program: snow
* @description
* @author: 没用的阿吉
* @create: 2021-04-27 20:31
**//*
@Controller
@RequestMapping("/report")
@Slf4j
public class ReportController extends BaseController
{
private String prefix = "/jmreport";
*/
/**
* 报表设计器
* @return
*//*
@RequiresPermissions("system:jmreport:design")
@GetMapping("/list")
public String reportDesign()
{
return redirect(prefix+"/list");
}
@RequiresPermissions("system:jmreport:design")
@GetMapping()
public String flow()
{
return redirect(prefix+"/list");
}
}
*/

View File

@ -1,5 +1,6 @@
package com.snow.web.controller.system; package com.snow.web.controller.system;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.snow.common.config.Global; import com.snow.common.config.Global;
import com.snow.common.constant.ShiroConstants; import com.snow.common.constant.ShiroConstants;
@ -7,6 +8,7 @@ import com.snow.common.core.controller.BaseController;
import com.snow.common.core.domain.AjaxResult; import com.snow.common.core.domain.AjaxResult;
import com.snow.common.core.text.Convert; import com.snow.common.core.text.Convert;
import com.snow.common.enums.DingFlowTaskType; import com.snow.common.enums.DingFlowTaskType;
import com.snow.common.enums.MessageEventType;
import com.snow.common.utils.CookieUtils; import com.snow.common.utils.CookieUtils;
import com.snow.common.utils.DateUtils; import com.snow.common.utils.DateUtils;
import com.snow.common.utils.ServletUtils; import com.snow.common.utils.ServletUtils;
@ -25,6 +27,7 @@ import com.snow.system.service.impl.SysNoticeServiceImpl;
import com.snow.system.service.impl.SysOaEmailServiceImpl; import com.snow.system.service.impl.SysOaEmailServiceImpl;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -37,6 +40,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 首页 业务处理 * 首页 业务处理
@ -69,7 +73,7 @@ public class SysIndexController extends BaseController
private ISysOperLogService operLogService; private ISysOperLogService operLogService;
@Autowired @Autowired
private ISysDingHiTaskService iSysDingHiTaskService; private ISysMessageTransitionService sysMessageTransitionService;
@Autowired @Autowired
private ISysDingRuTaskService sysDingRuTaskService; private ISysDingRuTaskService sysDingRuTaskService;
@ -81,6 +85,10 @@ public class SysIndexController extends BaseController
@Autowired @Autowired
private SysNoticeServiceImpl sysNoticeService; private SysNoticeServiceImpl sysNoticeService;
@Value("${is.notice}")
private Boolean isNotice;
// 系统首页 // 系统首页
@GetMapping("/index") @GetMapping("/index")
public String index(ModelMap mmap) public String index(ModelMap mmap)
@ -101,13 +109,30 @@ public class SysIndexController extends BaseController
mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate())); mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
mmap.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate())); mmap.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
mmap.put("isNewNotice",isNotice);
List<SysOaEmail> myNoReadOaEmailList = sysOaEmailService.getMyNoReadOaEmailList(String.valueOf(user.getUserId())); List<SysOaEmail> myNoReadOaEmailList = sysOaEmailService.getMyNoReadOaEmailList(String.valueOf(user.getUserId()));
mmap.put("emailListSize",myNoReadOaEmailList.size()); mmap.put("emailListSize",myNoReadOaEmailList.size());
//如果大于三条只取前三条记录 //如果大于三条只取前三条记录
if(CollectionUtils.isNotEmpty(myNoReadOaEmailList)&&myNoReadOaEmailList.size()>3){ if(CollectionUtils.isNotEmpty(myNoReadOaEmailList)&&myNoReadOaEmailList.size()>3){
myNoReadOaEmailList=myNoReadOaEmailList.subList(0,3); myNoReadOaEmailList=myNoReadOaEmailList.subList(0,3);
} }
mmap.put("emailList",myNoReadOaEmailList); mmap.put("emailList",myNoReadOaEmailList);
SysMessageTransition sysMessageTransition=new SysMessageTransition();
sysMessageTransition.setConsumerId(String.valueOf(user.getUserId()));
sysMessageTransition.setMessageStatus(0L);
sysMessageTransition.setMessageReadStatus(0L);
List<SysMessageTransition> sysMessageTransitions = sysMessageTransitionService.selectSysMessageTransitionList(sysMessageTransition);
//如果大于三条只取前三条记录
if(CollectionUtils.isNotEmpty(sysMessageTransitions)&&sysMessageTransitions.size()>5){
sysMessageTransitions=sysMessageTransitions.subList(0,5);
}
SysMessageTransition.init(sysMessageTransitions);
mmap.put("sysMessageList",sysMessageTransitions);
mmap.put("sysMessageSize",sysMessageTransitions.size());
// 菜单导航显示风格 // 菜单导航显示风格
String menuStyle = configService.selectConfigByKey("sys.index.menuStyle"); String menuStyle = configService.selectConfigByKey("sys.index.menuStyle");
// 移动端默认使左侧导航菜单否则取默认配置 // 移动端默认使左侧导航菜单否则取默认配置

View File

@ -1,11 +1,13 @@
package com.snow.web.controller.system; package com.snow.web.controller.system;
import cn.hutool.core.collection.CollectionUtil;
import com.snow.common.annotation.Log; import com.snow.common.annotation.Log;
import com.snow.common.annotation.RepeatSubmit; import com.snow.common.annotation.RepeatSubmit;
import com.snow.common.core.controller.BaseController; import com.snow.common.core.controller.BaseController;
import com.snow.common.core.domain.AjaxResult; import com.snow.common.core.domain.AjaxResult;
import com.snow.common.core.page.TableDataInfo; import com.snow.common.core.page.TableDataInfo;
import com.snow.common.enums.BusinessType; import com.snow.common.enums.BusinessType;
import com.snow.common.enums.MessageEventType;
import com.snow.common.utils.poi.ExcelUtil; import com.snow.common.utils.poi.ExcelUtil;
import com.snow.flowable.config.FlowIdGenerator; import com.snow.flowable.config.FlowIdGenerator;
import com.snow.framework.util.ShiroUtils; import com.snow.framework.util.ShiroUtils;
@ -21,7 +23,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 消息模板Controller * 消息模板Controller
@ -43,13 +47,26 @@ public class SysMessageCenterController extends BaseController
@RequiresPermissions("system:messageCenter:view") @RequiresPermissions("system:messageCenter:view")
@GetMapping() @GetMapping()
public String messageCenter() public String messageCenter(ModelMap mmap)
{ {
SysUser sysUser = ShiroUtils.getSysUser(); SysUser sysUser = ShiroUtils.getSysUser();
SysMessageTransition sysMessageTransition=new SysMessageTransition(); SysMessageTransition sysMessageTransition=new SysMessageTransition();
sysMessageTransition.setConsumerId(String.valueOf(sysUser.getUserId())); sysMessageTransition.setConsumerId(String.valueOf(sysUser.getUserId()));
sysMessageTransition.setMessageStatus(0L); sysMessageTransition.setMessageStatus(0L);
List<SysMessageTransition> sysMessageTransitions = sysMessageTransitionService.selectSysMessageTransitionList(sysMessageTransition); List<SysMessageTransition> sysMessageTransitions = sysMessageTransitionService.selectSysMessageTransitionList(sysMessageTransition);
if(CollectionUtil.isNotEmpty(sysMessageTransitions)){
List<SysMessageTransition> visitLogsList = sysMessageTransitions.stream().filter(t -> t.getMessageType().equals(MessageEventType.SEND_VISIT_LOG.getCode())).collect(Collectors.toList());
SysMessageTransition.init(visitLogsList);
mmap.put("visitLogs",visitLogsList);
}
if(CollectionUtil.isNotEmpty(sysMessageTransitions)){
List<SysMessageTransition> emailList = sysMessageTransitions.stream().filter(t -> t.getMessageType().equals(MessageEventType.SEND_EMAIL.getCode())).collect(Collectors.toList());
SysMessageTransition.init(emailList);
mmap.put("emailList",emailList);
}
return prefix + "/messageCenter"; return prefix + "/messageCenter";
} }

View File

@ -349,4 +349,19 @@ public class SysOaCustomerController extends BaseController
{ {
return toAjax(sysOaCustomerVisitLogService.deleteSysOaCustomerVisitLogByIds(ids)); return toAjax(sysOaCustomerVisitLogService.deleteSysOaCustomerVisitLogByIds(ids));
} }
/**
* 消息详情页
*/
@GetMapping("/messageDetail/{id}")
public String messageDetail(@PathVariable("id") Long id)
{
SysOaCustomerVisitLog sysOaCustomerVisitLog=sysOaCustomerVisitLogService.selectSysOaCustomerVisitLogById(id);
SysOaCustomer sysOaCustomer = sysOaCustomerService.selectSysOaCustomerByCustomerNo(sysOaCustomerVisitLog.getCustomerNo());
return redirect("/system/customer/detail/"+ sysOaCustomer.getId()) ;
}
} }

View File

@ -1,5 +1,6 @@
package com.snow.web.controller.system; package com.snow.web.controller.system;
import cn.hutool.core.util.NumberUtil;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.snow.common.annotation.Log; import com.snow.common.annotation.Log;
@ -312,7 +313,13 @@ public class SysOaEmailController extends BaseController
public String mailDetail(@PathVariable("id") Long id,ModelMap mmap) public String mailDetail(@PathVariable("id") Long id,ModelMap mmap)
{ {
SysUser sysUser = ShiroUtils.getSysUser(); SysUser sysUser = ShiroUtils.getSysUser();
SysOaEmail sysOaEmail = sysOaEmailService.selectSysOaEmailById(id); SysOaEmail sysOaEmail;
if(NumberUtil.isInteger(String.valueOf(id))){
sysOaEmail = sysOaEmailService.selectSysOaEmailById(id);
}else {
sysOaEmail = sysOaEmailService.selectSysOaEmailByEmailNo(String.valueOf(id));
}
SysMessageTransition sysMessageTransition=new SysMessageTransition(); SysMessageTransition sysMessageTransition=new SysMessageTransition();
sysMessageTransition.setMessageOutsideId(sysOaEmail.getEmailNo()); sysMessageTransition.setMessageOutsideId(sysOaEmail.getEmailNo());
sysMessageTransition.setMessageType(MessageEventType.SEND_EMAIL.getCode()); sysMessageTransition.setMessageType(MessageEventType.SEND_EMAIL.getCode());
@ -332,6 +339,8 @@ public class SysOaEmailController extends BaseController
} }
/** /**
* 获取邮件读取情况 * 获取邮件读取情况
* @return * @return

View File

@ -146,6 +146,10 @@ swagger:
# 是否开启swagger # 是否开启swagger
enabled: true enabled: true
#登录后是否显示最新的公告
is:
notice: true
flowable: flowable:
#关闭定时任务JOB #关闭定时任务JOB
async-executor-activate: false async-executor-activate: false

View File

@ -119,44 +119,17 @@
<li class="dropdown"> <li class="dropdown">
<a class="dropdown-toggle count-info" data-toggle="dropdown" href="#"> <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
<i class="fa fa-bell"></i> <span class="label label-primary">8</span> <i class="fa fa-bell"></i> <span class="label label-primary">[[${sysMessageSize}]]</span>
</a> </a>
<ul class="dropdown-menu dropdown-alerts"> <ul class="dropdown-menu dropdown-alerts">
<li> <li th:each="sysMessages,iterStat:${sysMessageList}" class="mt5">
<a href="mailbox.html"> <a th:href="${sysMessages.redirectUrl}" class="menuItem">
<div> <div>
<i class="fa fa-envelope fa-fw"></i> You have 16 messages <i th:class="${sysMessages.iconClass}"></i>[[${sysMessages.producerUser.userName}]]发送来一条消息<span class="pull-right text-muted small">[[${sysMessages.spendTime}]]</span>
<span class="pull-right text-muted small">4 minutes ago</span>
</div> </div>
</a> </a>
</li> </li>
<li class="divider"></li> <li class="divider"></li>
<li>
<a href="profile.html">
<div>
<i class="fa fa-twitter fa-fw"></i> 3 New Followers
<span class="pull-right text-muted small">12 minutes ago</span>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="grid_options.html">
<div>
<i class="fa fa-upload fa-fw"></i> Server Rebooted
<span class="pull-right text-muted small">4 minutes ago</span>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<div class="text-center link-block">
<a href="notifications.html">
<strong>See All Alerts</strong>
<i class="fa fa-angle-right"></i>
</a>
</div>
</li>
</ul> </ul>
</li> </li>
@ -346,16 +319,17 @@ $(function() {
} }
$("[data-toggle='tooltip']").tooltip(); $("[data-toggle='tooltip']").tooltip();
/*公告停留半分钟*/ if([[${isNewNotice}]]){
layer.open({ /*公告停留半分钟*/
type : 2, layer.open({
shadeClose : true, type : 2,
time:30000, shadeClose : true,
title : "公告", time:30000,
area : ["70%", "80%"], title : "公告",
content : ["/system/notice/newNotice/"+1, 'yes'] area : ["70%", "80%"],
}) content : ["/system/notice/newNotice/"+1, 'yes']
})
}
}); });
</script> </script>
</body> </body>

View File

@ -13,7 +13,7 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#tab-1"> 拜访日志</a> <li class="active"><a data-toggle="tab" href="#tab-1"> 拜访日志</a>
</li> </li>
<li class=""><a data-toggle="tab" href="#tab-2"> 第二个选项卡</a> <li class=""><a data-toggle="tab" href="#tab-2"> 站内邮件</a>
</li> </li>
<li class=""><a data-toggle="tab" href="#tab-3"> 第二个选项卡</a> <li class=""><a data-toggle="tab" href="#tab-3"> 第二个选项卡</a>
</li> </li>
@ -23,53 +23,42 @@
<div class="tab-content "> <div class="tab-content ">
<div id="tab-1" class="tab-pane active"> <div id="tab-1" class="tab-pane active">
<div class="panel-body"> <div class="panel-body">
<div class="ibox float-e-margins"> <h3>拜访日志</h3>
<div class="ibox-title"> <div id="vertical-timeline" class="vertical-container light-timeline" th:each="visitLog,iterStat : ${visitLogs}">
<h5>拜访日志</h5> <div class="vertical-timeline-block">
</div> <div class="vertical-timeline-icon blue-bg">
<div class="ibox-content"> <i class="fa fa-file-text"></i>
<table class="table table-striped"> </div>
<thead>
<tr> <div class="vertical-timeline-content">
<th>#</th> <label class="badge badge-primary" > <i class="fa fa-user danger"></i> [[${visitLog.producerUser.userName}]] </label>
<th>数据</th> <label > 添加一条拜访日志,请及时查看。</label>
<th>用户</th> <label class="badge badge-warning"> <i class="fa fa-clock-o"></i>[[${visitLog.spendTime}]]</label>
<th></th> <a class="btn btn-sm btn-success"> 查看详情 </a>
</tr> </div>
</thead> <hr>
<tbody>
<tr>
<td>1</td>
<td><span class="line">5,3,2,-1,-3,-2,2,3,5,2</span>
</td>
<td>张三</td>
<td class="text-navy"> <i class="fa fa-level-up"></i> 40%</td>
</tr>
<tr>
<td>2</td>
<td><span class="line">5,3,9,6,5,9,7,3,5,2</span>
</td>
<td>李四</td>
<td class="text-warning"> <i class="fa fa-level-down"></i> -20%</td>
</tr>
<tr>
<td>3</td>
<td><span class="line">1,6,3,9,5,9,5,3,9,6,4</span>
</td>
<td>王麻子</td>
<td class="text-navy"> <i class="fa fa-level-up"></i> 26%</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div id="tab-2" class="tab-pane"> <div id="tab-2" class="tab-pane">
<div class="panel-body"> <div class="panel-body">
<strong>栅格系统</strong> <h3>站内邮件</h3>
<div id="vertical-timeline1" class="vertical-container light-timeline" th:each="email,iterStat : ${emailList}">
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon blue-bg">
<i class="fa fa-file-text"></i>
</div>
<p>Bootstrap 提供了一套响应式、移动设备优先的流式栅格系统随着屏幕或视口viewport尺寸的增加系统会自动分为最多12列。它包含了易于使用的预定义类还有强大的mixin 用于生成更具语义的布局。</p> <div class="vertical-timeline-content">
<label class="badge badge-primary" > <i class="fa fa-user danger"></i> [[${email.producerUser.userName}]] </label>
<label > 发来一条站内邮件,请及时查看。</label>
<label class="badge badge-warning"> <i class="fa fa-clock-o"></i>[[${email.spendTime}]]</label>
<a class="btn btn-sm btn-success"> 查看详情 </a>
</div>
<hr>
</div>
</div>
</div> </div>
</div> </div>
<div id="tab-3" class="tab-pane"> <div id="tab-3" class="tab-pane">

View File

@ -130,6 +130,12 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
<version>1.4</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -0,0 +1,15 @@
package com.snow.common.constant;
/**
* @program: snow
* @description 报表url
* @author: 没用的阿吉
* @create: 2021-04-27 20:46
**/
public class ReportConstants {
/**
* 操作日志报表
*/
public static final String SYS_OPERATE_URL = "/view/546676819120545792";
}

View File

@ -285,9 +285,9 @@ public class ShiroConfig
filterChainDefinitionMap.put("/third/oauth/**", "anon"); filterChainDefinitionMap.put("/third/oauth/**", "anon");
//积木报表排除 //积木报表排除
filterChainDefinitionMap.put("/jmreport/**", "anon"); // filterChainDefinitionMap.put("/jmreport/**", "anon");
filterChainDefinitionMap.put("/**/*.js.map", "anon"); //filterChainDefinitionMap.put("/**/*.js.map", "anon");
filterChainDefinitionMap.put("/**/*.css.map", "anon"); // filterChainDefinitionMap.put("/**/*.css.map", "anon");
filterChainDefinitionMap.put("/dingTalk/dingFlowRobot", "anon"); filterChainDefinitionMap.put("/dingTalk/dingFlowRobot", "anon");
// 退出 logout地址shiro去清除session // 退出 logout地址shiro去清除session

View File

@ -1,11 +1,10 @@
package com.snow.system.domain; package com.snow.system.domain;
import com.snow.common.annotation.Excel; import com.snow.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.snow.common.core.domain.BaseEntity; import com.snow.common.core.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import java.util.List;
/** /**
* 消息流转中心对象 sys_message_transition * 消息流转中心对象 sys_message_transition
@ -55,4 +54,39 @@ public class SysMessageTransition extends BaseEntity
private String producerOrConsumerId; private String producerOrConsumerId;
/**
* 跳转URL
*/
private String redirectUrl;
/**
* 图标样式
*/
private String iconClass="fa fa-envelope fa-fw";
/**
* 已用时
*/
private String spendTime;
public static void init(List<SysMessageTransition> sysMessageTransitions){
sysMessageTransitions.forEach((t)->{
switch (t.getMessageType()){
case "SEND_VISIT_LOG":
t.setIconClass("fa fa-twitter fa-fw");
t.setRedirectUrl("/system/customer/messageDetail/"+t.getMessageOutsideId());
break;
case "SEND_EMAIL":
t.setIconClass("fa fa-envelope fa-fw");
t.setRedirectUrl("/system/email/mailDetail/"+t.getMessageOutsideId());
break;
default:
t.setIconClass("fa fa-twitter fa-fw");
}
});
}
} }

View File

@ -21,6 +21,9 @@ public interface SysOaEmailMapper
*/ */
public SysOaEmail selectSysOaEmailById(Long id); public SysOaEmail selectSysOaEmailById(Long id);
public SysOaEmail selectSysOaEmailByEmailNo(String emailNo);
/** /**
* 查询邮件列表 * 查询邮件列表
* *

View File

@ -21,6 +21,8 @@ public interface ISysOaEmailService
*/ */
public SysOaEmail selectSysOaEmailById(Long id); public SysOaEmail selectSysOaEmailById(Long id);
public SysOaEmail selectSysOaEmailByEmailNo(String emailNo);
/** /**
* 获取我的收件未读消息 * 获取我的收件未读消息

View File

@ -1,6 +1,10 @@
package com.snow.system.service.impl; package com.snow.system.service.impl;
import java.util.Date;
import java.util.List; import java.util.List;
import cn.hutool.core.date.BetweenFormater;
import cn.hutool.core.date.DateUtil;
import com.snow.common.utils.DateUtils; import com.snow.common.utils.DateUtils;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -66,6 +70,7 @@ public class SysMessageTransitionServiceImpl implements ISysMessageTransitionSer
sysMessageTransitionList.forEach(t->{ sysMessageTransitionList.forEach(t->{
t.setProducerUser(sysUserService.selectUserById(Long.parseLong(t.getProducerId()))); t.setProducerUser(sysUserService.selectUserById(Long.parseLong(t.getProducerId())));
t.setConsumerUser(sysUserService.selectUserById(Long.parseLong(t.getConsumerId()))); t.setConsumerUser(sysUserService.selectUserById(Long.parseLong(t.getConsumerId())));
t.setSpendTime(DateUtil.formatBetween(t.getCreateTime(), new Date(), BetweenFormater.Level.SECOND)+"");
}); });
} }

View File

@ -54,6 +54,13 @@ public class SysOaEmailServiceImpl implements ISysOaEmailService
return sysOaEmail; return sysOaEmail;
} }
@Override
public SysOaEmail selectSysOaEmailByEmailNo(String emailNo) {
SysOaEmail sysOaEmail=sysOaEmailMapper.selectSysOaEmailByEmailNo(emailNo);
sysOaEmail.setBelongUser(sysUserService.selectUserById(Long.parseLong(sysOaEmail.getBelongUserId())));
return sysOaEmail;
}
@Override @Override
public List<SysOaEmail> getMyNoReadOaEmailList(String userId){ public List<SysOaEmail> getMyNoReadOaEmailList(String userId){

View File

@ -89,6 +89,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSysOaEmailVo"/> <include refid="selectSysOaEmailVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="selectSysOaEmailByEmailNo" parameterType="String" resultMap="SysOaEmailResult">
<include refid="selectSysOaEmailVo"/>
where email_no = #{EmailNo}
</select>
<insert id="insertSysOaEmail" parameterType="SysOaEmail" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSysOaEmail" parameterType="SysOaEmail" useGeneratedKeys="true" keyProperty="id">
insert into sys_oa_email insert into sys_oa_email