Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datamanage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenjinzhu
datamanage
Commits
553eca9a
Commit
553eca9a
authored
Jan 09, 2018
by
shenjinzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新排序
parent
934e63d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
7 deletions
+5
-7
src/main/java/com/zhiwei/manage/dao/MessageDaoImpl.java
+1
-1
src/main/java/com/zhiwei/manage/dao/NewsDaoImpl.java
+2
-2
src/main/java/com/zhiwei/manage/handle/Task.java
+2
-1
src/main/java/com/zhiwei/manage/servlet/DataController.java
+0
-3
No files found.
src/main/java/com/zhiwei/manage/dao/MessageDaoImpl.java
View file @
553eca9a
...
@@ -73,7 +73,7 @@ public class MessageDaoImpl implements MessageDao {
...
@@ -73,7 +73,7 @@ public class MessageDaoImpl implements MessageDao {
return
null
;
return
null
;
}
}
DBCursor
cursor
=
con
.
find
(
new
BasicDBObject
(
"pt"
,
pt
).
append
(
"handle"
,
false
)).
skip
((
pageNo
-
1
)
*
pageSize
)
DBCursor
cursor
=
con
.
find
(
new
BasicDBObject
(
"pt"
,
pt
).
append
(
"handle"
,
false
)).
skip
((
pageNo
-
1
)
*
pageSize
)
.
limit
(
pageSize
).
sort
(
new
BasicDBObject
(
"createDate"
,
-
1
));
.
limit
(
pageSize
).
sort
(
new
BasicDBObject
(
"
templateLv"
,
1
).
append
(
"
createDate"
,
-
1
));
while
(
cursor
.
hasNext
())
{
while
(
cursor
.
hasNext
())
{
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
cursor
.
next
();
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
cursor
.
next
();
Message
msg
=
Change
.
toBean
(
Message
.
class
,
map
);
Message
msg
=
Change
.
toBean
(
Message
.
class
,
map
);
...
...
src/main/java/com/zhiwei/manage/dao/NewsDaoImpl.java
View file @
553eca9a
...
@@ -153,7 +153,7 @@ public class NewsDaoImpl implements NewsDao {
...
@@ -153,7 +153,7 @@ public class NewsDaoImpl implements NewsDao {
DbDepot
.
newsCol
.
put
(
pt
,
col
);
DbDepot
.
newsCol
.
put
(
pt
,
col
);
}
}
if
(
id
!=
null
&
id
.
length
()
>
5
)
{
if
(
id
!=
null
&
id
.
length
()
>
5
)
{
Bson
sort
=
new
BasicDBObject
(
"
rsid
"
,
-
1
);
Bson
sort
=
new
BasicDBObject
(
"
savetime
"
,
-
1
);
FindIterable
<
Document
>
doc
=
col
.
find
(
new
BasicDBObject
(
"spyderInfoId"
,
id
)).
sort
(
sort
).
limit
(
count
);
FindIterable
<
Document
>
doc
=
col
.
find
(
new
BasicDBObject
(
"spyderInfoId"
,
id
)).
sort
(
sort
).
limit
(
count
);
MongoCursor
<
Document
>
mongoCursor
=
doc
.
iterator
();
MongoCursor
<
Document
>
mongoCursor
=
doc
.
iterator
();
while
(
mongoCursor
.
hasNext
())
{
while
(
mongoCursor
.
hasNext
())
{
...
@@ -161,7 +161,7 @@ public class NewsDaoImpl implements NewsDao {
...
@@ -161,7 +161,7 @@ public class NewsDaoImpl implements NewsDao {
list
.
add
(
map
);
list
.
add
(
map
);
}
}
}
else
{
}
else
{
Bson
sort
=
new
BasicDBObject
(
"
rsid
"
,
-
1
);
Bson
sort
=
new
BasicDBObject
(
"
savetime
"
,
-
1
);
FindIterable
<
Document
>
doc
=
col
.
find
().
sort
(
sort
).
limit
(
count
);
FindIterable
<
Document
>
doc
=
col
.
find
().
sort
(
sort
).
limit
(
count
);
MongoCursor
<
Document
>
mongoCursor
=
doc
.
iterator
();
MongoCursor
<
Document
>
mongoCursor
=
doc
.
iterator
();
while
(
mongoCursor
.
hasNext
())
{
while
(
mongoCursor
.
hasNext
())
{
...
...
src/main/java/com/zhiwei/manage/handle/Task.java
View file @
553eca9a
...
@@ -120,7 +120,6 @@ public class Task implements Runnable {
...
@@ -120,7 +120,6 @@ public class Task implements Runnable {
}
}
String
[]
fields
=
field
.
getField
().
split
(
","
);
String
[]
fields
=
field
.
getField
().
split
(
","
);
int
count
=
list
.
size
();
int
count
=
list
.
size
();
for
(
String
fid
:
fields
)
{
for
(
String
fid
:
fields
)
{
String
str
=
""
;
String
str
=
""
;
int
num
=
count
;
int
num
=
count
;
...
@@ -194,10 +193,12 @@ public class Task implements Runnable {
...
@@ -194,10 +193,12 @@ public class Task implements Runnable {
}
}
}
}
Collections
.
sort
(
dNum
);
Collections
.
sort
(
dNum
);
System
.
out
.
println
(
sum
);
int
cutSize
=(
int
)
(
dNum
.
size
()*
0.8
/
1
);
int
cutSize
=(
int
)
(
dNum
.
size
()*
0.8
/
1
);
for
(
int
i
=
cutSize
;
i
<
dNum
.
size
();
i
++)
{
for
(
int
i
=
cutSize
;
i
<
dNum
.
size
();
i
++)
{
sum
-=
dNum
.
get
(
i
);
sum
-=
dNum
.
get
(
i
);
}
}
System
.
out
.
println
(
sum
);
if
(
sum
/
1.0
/
1000
/
60
/
cutSize
>
delayed
.
getNewsDelayed
())
{
if
(
sum
/
1.0
/
1000
/
60
/
cutSize
>
delayed
.
getNewsDelayed
())
{
Template
tp
=
MainThread
.
mainMap
.
get
(
delayed
.
getTemplateId
());
Template
tp
=
MainThread
.
mainMap
.
get
(
delayed
.
getTemplateId
());
Message
msg
=
new
Message
();
Message
msg
=
new
Message
();
...
...
src/main/java/com/zhiwei/manage/servlet/DataController.java
View file @
553eca9a
...
@@ -71,9 +71,6 @@ public class DataController {
...
@@ -71,9 +71,6 @@ public class DataController {
@ResponseBody
@ResponseBody
public
String
getDataByTempName
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@RequestBody
Map
<
String
,
Object
>
map
)
public
String
getDataByTempName
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@RequestBody
Map
<
String
,
Object
>
map
)
throws
UnsupportedEncodingException
{
throws
UnsupportedEncodingException
{
// Calendar c=Calendar.getInstance();
// c.setTimeInMillis((long) map.get("end"));
// System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:mm").format(c.getTime()));
long
start
=(
long
)
map
.
get
(
"start"
);
long
start
=(
long
)
map
.
get
(
"start"
);
long
end
=(
long
)
map
.
get
(
"end"
);
long
end
=(
long
)
map
.
get
(
"end"
);
String
timeType
=(
String
)
map
.
get
(
"timeType"
);
String
timeType
=(
String
)
map
.
get
(
"timeType"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment