XMTT преди 6 години
родител
ревизия
86927e3770

+ 6 - 0
src/main/java/com/ekexiu/portal/platform/PlatformMsgService.java

@ -76,6 +76,12 @@ public class PlatformMsgService {
76 76
		return 1;
77 77
	}
78 78

79
	@Get
80
	@Path("/unread")
81
	public int unreadSum(@JdbcConn Connection con, String provider)throws SQLException {
82
		return this.platformMsgDao.unreadSum(con, provider);
83
	}
84

79 85
	@Post
80 86
	@Path("/frecv")
81 87
	public void frecv(@JdbcConn(true) Connection con, String provider, String pid, String requestor, String cnt, String time)

+ 10 - 0
src/main/java/com/ekexiu/portal/platform/msg/PlatformMsgDao.java

@ -1,5 +1,7 @@
1 1
package com.ekexiu.portal.platform.msg;
2 2

3
import org.jfw.apt.annotation.DefaultValue;
4
import org.jfw.apt.orm.annotation.dao.Column;
3 5
import org.jfw.apt.orm.annotation.dao.DAO;
4 6
import org.jfw.apt.orm.annotation.dao.method.From;
5 7
import org.jfw.apt.orm.annotation.dao.method.LimitColumn;
@ -8,12 +10,14 @@ import org.jfw.apt.orm.annotation.dao.method.SetSentence;
8 10
import org.jfw.apt.orm.annotation.dao.method.Where;
9 11
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
10 12
import org.jfw.apt.orm.annotation.dao.method.operator.LimitSelect;
13
import org.jfw.apt.orm.annotation.dao.method.operator.QueryVal;
11 14
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
12 15
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
13 16
import org.jfw.apt.orm.annotation.dao.param.Alias;
14 17
import org.jfw.apt.orm.annotation.dao.param.GtEq;
15 18
import org.jfw.apt.orm.annotation.dao.param.LessThan;
16 19
import org.jfw.apt.orm.annotation.dao.param.Set;
20
import org.jfw.apt.orm.core.defaultImpl.IntHandler;
17 21

18 22
import java.sql.Connection;
19 23
import java.sql.SQLException;
@ -70,5 +74,11 @@ public interface PlatformMsgDao {
70 74
	@From(PlatformMsgIdx.class)
71 75
	@SetSentence("ACTIVED='1' ,UNREAD=UNREAD+1")
72 76
	int updateIdxFull(Connection con,String provider,String pid,String requestor, @LessThan @Alias("opTime") String time,@Set String cnt,@Set String opTime)throws SQLException;
77

78
	@QueryVal
79
	@From(PlatformMsgIdx.class)
80
	@DefaultValue("0")
81
	@Column(value="SUM(UNREAD)",handlerClass= IntHandler.class)
82
	int unreadSum(Connection con,String provider) throws SQLException;
73 83
	
74 84
}