Explorar el Código

首页通知代码数量展示修改

user5 hace 3 años
padre
commit
eab27f49ae

+ 1 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/dao/WorkProjectNotifyDao.java

@@ -33,6 +33,7 @@ public interface WorkProjectNotifyDao extends CrudDao<WorkProjectNotify> {
 
     //更新阅读状态
     boolean updateReadStateByNotifyId(WorkProjectNotify workProjectNotify);
+    void updateReadStateByUserAndTitle(WorkProjectNotify workProjectNotify);
     List<User> findReadStateByNotifyId(WorkProjectNotify workProjectNotify);
 
     //逻辑删除

+ 3 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/service/WorkProjectNotifyService.java

@@ -220,6 +220,9 @@ public class WorkProjectNotifyService extends CrudService<WorkProjectNotifyDao,
 			workProjectNotify.setOfficeId(user.getOffice().getId());
 		}
 		super.save(workProjectNotify);
+		if("待通知".equals(workProjectNotify.getRemarks()) && "2".equals(workProjectNotify.getStatus())){
+			dao.updateReadStateByUserAndTitle(workProjectNotify);
+		}
 	}
 	@Transactional(readOnly = false)
 	public void saveRelation(WorkProjectNotify workProjectNotify) {

+ 8 - 0
src/main/resources/mappings/modules/workprojectnotify/WorkProjectNotifyDao.xml

@@ -445,6 +445,14 @@
 		WHERE notify_id = #{notifyId} AND status != '1'
 	</update>
 
+	<update id="updateReadStateByUserAndTitle">
+		UPDATE work_project_notify SET
+									   update_by = #{updateBy.id},
+									   update_date = #{updateDate},
+									   status = #{status}
+		WHERE notify_user = #{user.id} AND title = #{title}
+	</update>
+
 	<!--物理删除-->
 	<update id="delete">
 		DELETE FROM work_project_notify

+ 23 - 23
src/main/webapp/static/common/css/style.css

@@ -1630,7 +1630,7 @@ button.dim:active:before {
     padding: 4px 6px;
     background-color: #1ab394;
     /* background color */
-    
+
     border-color: #1ab394;
     /* border color */
 }
@@ -1800,7 +1800,7 @@ a.list-group-item.active:focus {
     border-left: none;
     border-right: none;
     /*border-top: none;*/
-    
+
     padding: 15px 25px;
 }
 
@@ -1825,7 +1825,7 @@ a.list-group-item.active:focus {
     border-color: #e7eaec;
     /*border-bottom: 1px solid #e7eaec;*/
     /*border-top: 1px solid #e7eaec;*/
-    
+
     border-radius: 0;
 }
 
@@ -3014,7 +3014,7 @@ a.forum-item-title:hover {
     .forum-info {
         margin: 15px 0 10px 0px;
         /* Comment this is you want to show forum info in small devices */
-        
+
         display: none;
     }
     .forum-desc {
@@ -3025,7 +3025,7 @@ a.forum-item-title:hover {
 
 .vertical-container {
     /* this class is used to give a max-width to the element it is applied to, and center it horizontally when it reaches that max-width */
-    
+
     width: 90%;
     max-width: 1170px;
     margin: 0 auto;
@@ -3033,7 +3033,7 @@ a.forum-item-title:hover {
 
 .vertical-container::after {
     /* clearfix */
-    
+
     content: '';
     display: table;
     clear: both;
@@ -3544,7 +3544,7 @@ video {
 .fancybox img {
     margin-bottom: 5px;
     /* Only for demo */
-    
+
     width: 24%;
 }
 /* Summernote text editor  */
@@ -4999,13 +4999,13 @@ ul.notes li div {
     width: 140px;
     padding: 1em;
     /* Firefox */
-    
+
     -moz-box-shadow: 5px 5px 2px #212121;
     /* Safari+Chrome */
-    
+
     -webkit-box-shadow: 5px 5px 2px rgba(33, 33, 33, 0.7);
     /* Opera */
-    
+
     box-shadow: 5px 5px 2px rgba(33, 33, 33, 0.7);
 }
 
@@ -6075,7 +6075,7 @@ del {
     }
     50% {
         /* Hack to make FF rotate in the right direction */
-        
+
         -webkit-transform: translateX(42px) translateY(42px) rotate(-179deg);
         transform: translateX(42px) translateY(42px) rotate(-179deg);
     }
@@ -6100,7 +6100,7 @@ del {
     }
     50% {
         /* Hack to make FF rotate in the right direction */
-        
+
         -webkit-transform: translateX(42px) translateY(42px) rotate(-179deg);
         transform: translateX(42px) translateY(42px) rotate(-179deg);
     }
@@ -6258,7 +6258,7 @@ del {
     -webkit-animation: sk-threeBounceDelay 1.4s infinite ease-in-out;
     animation: sk-threeBounceDelay 1.4s infinite ease-in-out;
     /* Prevent first frame from flickering when animation starts */
-    
+
     -webkit-animation-fill-mode: both;
     animation-fill-mode: both;
 }
@@ -6340,7 +6340,7 @@ del {
     -webkit-animation: sk-circleBounceDelay 1.2s infinite ease-in-out;
     animation: sk-circleBounceDelay 1.2s infinite ease-in-out;
     /* Prevent first frame from flickering when animation starts */
-    
+
     -webkit-animation-fill-mode: both;
     animation-fill-mode: both;
 }
@@ -6692,7 +6692,7 @@ del {
     -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out;
     animation: sk-circleFadeDelay 1.2s infinite ease-in-out;
     /* Prevent first frame from flickering when animation starts */
-    
+
     -webkit-animation-fill-mode: both;
     animation-fill-mode: both;
 }
@@ -7400,7 +7400,7 @@ body.skin-1 {
 }
 /*
  *
- *   SKIN 3 - 
+ *   SKIN 3 -
  *   NAME - Yellow/purple
  *
 */
@@ -7619,7 +7619,7 @@ body.skin-3 {
 }
 .skin-1 .navbar-static-side {
     background: #336699 none repeat scroll 0 0;
-   
+
 }
 
 .nav-close {
@@ -7722,7 +7722,7 @@ body.skin-3 {
 
 .social-feed-box {
     /*padding: 15px;*/
-    
+
     border: 1px solid #e7eaec;
     background: #fff;
     margin-bottom: 15px;
@@ -7937,12 +7937,12 @@ body.skin-3 {
 }
 
 .width-15{
-	
+
 	width:15%;
-	
+
 }
 .width-35{
-	
+
 	width:35%
 }
 
@@ -8798,7 +8798,7 @@ th .layui-table-cell{
 .bord-right > .bord-contents > .slimScrollDiv > ul > li > a> span,
 .bord-right > .bord-contents > ul > li > a> span{
     font-size: 14px;
-    height:100%;
+    height:64%;
 }
 .bord-right > .bord-contents > .slimScrollDiv > ul > li > a> .bord-record,
 .bord-right > .bord-contents > ul > li > a> .bord-record{
@@ -10448,4 +10448,4 @@ table.reviews tbody tr td.input-td input{
 table.reviews tbody tr td.input-td input:active,
 table.reviews tbody tr td.input-td input:focus{
     border:solid 1px #0f92fb !important;
-}
+}

+ 6 - 2
src/main/webapp/webpage/modules/sys/sysHome.jsp

@@ -1176,8 +1176,12 @@
         </c:otherwise>
         </c:choose>
 
-        elem.append('<li>' + xml + "<span class=\"bord-record-type\" title=\"${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}\">${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}</span><span class=\"bord-record\" title=\"${workProjectNotify.title}\">${workProjectNotify.title}</span>" +
-            '<span class="bord-record-time">' + '<fmt:formatDate value="${workProjectNotify.updateDate}" pattern="yyyy-MM-dd"/>' + '</span></a></li>');
+        elem.append('<li>' + xml + "<span class=\"bord-record-type\" title=\"${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}\">${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}</span>"+
+            <c:if test="${workProjectNotify.countNum> 1}">
+            "<span class= \"label label-danger\" >${workProjectNotify.countNum}</span>"+
+            </c:if>
+            "<span class=\"bord-record\" title=\"${workProjectNotify.title}\">${workProjectNotify.title}</span>" +
+            '<span class="bord-record-time">' + '<fmt:formatDate value="${workProjectNotify.updateDate}" pattern="yyyy-MM-dd"/>' + '</span></ a></li>');
         </c:if>
         </c:forEach>