Skip to content

Commit 8bfee7d

Browse files
authored
Merge pull request #3 from W-B-S/develop
Develop
2 parents e2240bd + d240f99 commit 8bfee7d

File tree

121 files changed

+5603
-423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+5603
-423
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ target
2424
out
2525
profile
2626
.nbs
27+
#conf/nbs.db
2728
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2829
hs_err_pid*
2930

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ First make sure maven is properly installed
55
command :
66
mvn clean package appassembler:assemble -Dmaven.test.skip=true -X
77

8+
## IPFS SERVER FAST
9+
ipfs daemon --routing=dhtclient --enable-pubsub-experiment
810
ipfs pubsub peers bmJzaW8ubmV0
911
# Version History
1012
## Version 2.0.1

conf/nbs-conf.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ nbs.client.merkle.root=.merkleroot
44
nbs.client.merkle.add.log.name=.merkle
55
nbs.client.profile.root=profile
66
nbs.client.files.root=nbs
7-
nbs.client.im.topic.subworld=enabled
7+
nbs.ui.panel.about.label.ver-value=v2.0.2
8+
nbs.client.im.topic.subworld=false
89
nbs.client.heart.monitor.seconds=300
910
nbs.client.im.replay-open=false
1011
nbs.client.i18n.home=zh_cn
@@ -14,8 +15,12 @@ nbs.server.address.gateway-url=http://127.0.0.1:8080
1415
nbs.server.address.host=127.0.0.1
1516
nbs.server.address.api-port=5001
1617
nbs.server.address.gateway-port=8080
18+
nbs.server.exit.stop=false
19+
nbs.server.integrated.enabled=false
1720

1821
# IP CHECKED
1922
nbs.server.ip.checked-url=http://www.net.cn/static/customercare/yourip.asp
2023
nbs.server.ip.checked-locations-url=http://ip.taobao.com/service/getIpInfo.php?ip=
2124

25+
# NBS site
26+
nbs.site.home.url=http://nbsio.net

conf/nbs.db

0 Bytes
Binary file not shown.

conf/zh-cn.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ nbs.ui.panel.file.label=NBS FILE DATA
2020
nbs.ui.panel.data.label=\u6570\u636E\u7BA1\u7406
2121
nbs.ui.panel.im.label=NBS World IM
2222
nbs.ui.panel.setting.label=\u914D\u7F6E
23-
23+
nbs.ui.panel.media.label=MultiMedia
2424
### panel label
2525
#### status
2626
nbs.ui.panel.status.label.peer-id=PeerID:
@@ -31,7 +31,7 @@ nbs.ui.panel.status.default-nickname= NBSChain_9527
3131
#### about
3232
nbs.ui.panel.about.label.version-title=The Next Block chain System
3333
nbs.ui.panel.about.label.ver-name=\u5F53\u524D\u7248\u672C
34-
nbs.ui.panel.about.label.ver-value=v0.2.2
34+
nbs.ui.panel.about.label.ver-value=v2.0.2
3535
nbs.ui.panel.about.html.ver-log=http://nbs.lanbery.cn/nbs/client4j/update.log.html
3636

3737
#### File

nbssvr/ipfs.exe

28.7 MB
Binary file not shown.

pom.xml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,25 @@
4646
<artifactId>fastjson</artifactId>
4747
<version>1.2.47</version>
4848
</dependency>
49-
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
49+
5050
<dependency>
5151
<groupId>org.mybatis</groupId>
5252
<artifactId>mybatis</artifactId>
5353
<version>3.4.5</version>
5454
</dependency>
55-
<!-- https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc -->
55+
5656
<dependency>
5757
<groupId>org.xerial</groupId>
5858
<artifactId>sqlite-jdbc</artifactId>
5959
<version>3.20.1</version>
6060
</dependency>
61-
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
61+
6262
<dependency>
6363
<groupId>commons-codec</groupId>
6464
<artifactId>commons-codec</artifactId>
6565
<version>1.11</version>
6666
</dependency>
67-
<!-- https://mvnrepository.com/artifact/com.melloware/jintellitype -->
67+
6868
<dependency>
6969
<groupId>com.melloware</groupId>
7070
<artifactId>jintellitype</artifactId>
@@ -77,8 +77,8 @@
7777
<version>4.0.0</version>
7878
</dependency>
7979
<dependency>
80-
<groupId>nine-patch</groupId>
81-
<artifactId>android.nine.patch</artifactId>
80+
<groupId>android.nine.patch</groupId>
81+
<artifactId>nine-patch</artifactId>
8282
<version>1.0</version>
8383
</dependency>
8484
<!-- https://mvnrepository.com/artifact/com.miglayout/miglayout-swing -->
@@ -98,6 +98,14 @@
9898
<artifactId>okhttp</artifactId>
9999
<version>3.10.0</version>
100100
</dependency>
101+
<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
102+
<!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
103+
<dependency>
104+
<groupId>org.springframework</groupId>
105+
<artifactId>spring-beans</artifactId>
106+
<version>5.0.7.RELEASE</version>
107+
</dependency>
108+
101109
</dependencies>
102110

103111
<build>
@@ -135,7 +143,7 @@
135143
<goal>copy-resources</goal>
136144
</goals>
137145
<configuration>
138-
<outputDirectory>${basedir}/out/bin/conf</outputDirectory>
146+
<outputDirectory>${basedir}/out/conf</outputDirectory>
139147
<resources>
140148
<resource>
141149
<directory>${basedir}/conf</directory>
@@ -222,7 +230,7 @@
222230
<encoding>UTF-8</encoding>
223231
<logsDirectory>logs</logsDirectory>
224232
<tempDirectory>tmp</tempDirectory>
225-
<extraJvmArguments>-Xms256m</extraJvmArguments>
233+
<extraJvmArguments>-Xms512m</extraJvmArguments>
226234
<binFileExtensions><unix>.sh</unix></binFileExtensions>
227235
<platforms>
228236
<platform>windows</platform>
@@ -237,7 +245,7 @@
237245
<extraArguments>
238246
<extraArgument>-Dfile.encoding=utf-8</extraArgument>
239247
<extraArgument>-server</extraArgument>
240-
<extraArgument>-Xms256m</extraArgument>
248+
<extraArgument>-Xms512m</extraArgument>
241249
</extraArguments>
242250
</jvmSettings>
243251
</program>

src/main/java/com/nbs/biz/data/dao/AttachmentInfoDao.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
package com.nbs.biz.data.dao;
22

3+
import com.nbs.biz.data.entity.AttachmentInfoEntity;
4+
import io.nbs.sdk.page.PageCondition;
35
import org.apache.ibatis.session.SqlSession;
46

7+
import java.util.HashMap;
8+
import java.util.List;
9+
import java.util.Map;
10+
511
/**
612
* @Package : com.nbs.biz.data.dao
713
* @Description : <p></p>
@@ -15,4 +21,14 @@ public class AttachmentInfoDao extends BasicDao {
1521
public AttachmentInfoDao(SqlSession session) {
1622
super(session, AttachmentInfoDao.class);
1723
}
24+
25+
public List<AttachmentInfoEntity> pageList(PageCondition condition){
26+
List list = session.selectList("pageList",condition);
27+
return list;
28+
}
29+
30+
public int pageTotal(PageCondition condition){
31+
Integer total = session.selectOne("pageTotal",condition);
32+
return total;
33+
}
1834
}

src/main/java/com/nbs/biz/data/dao/BasicDao.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Copyright (c) 2018, NBS , lambor.c<[email protected]>.
1919
* All rights reserved.
2020
*/
21-
public class BasicDao {
21+
public class BasicDao<E> {
2222
private Logger logger = LoggerFactory.getLogger(BasicDao.class);
2323
protected SqlSession session;
2424
private String className;
@@ -35,13 +35,13 @@ public int insert(BasicEntity model)
3535
return session.insert(className + ".insert", model);
3636
}
3737

38-
public List findAll()
38+
public List<E> findAll()
3939
{
4040
//return session.selectList(className + ".findAll");
4141
return _findAll(0);
4242
}
4343

44-
private List _findAll(int time)
44+
private List<E> _findAll(int time)
4545
{
4646
if (time > 10)
4747
{
@@ -69,7 +69,7 @@ private BasicEntity _findById(String id, int time)
6969
{
7070
if (time > 10)
7171
{
72-
System.out.println("查询到 BasicModel 对象失败次数>10,放弃查询");
72+
System.out.println("查询到 BasicModel 对象失败次数>10,放弃查询 id:"+id);
7373
return null;
7474
}
7575

@@ -78,12 +78,12 @@ private BasicEntity _findById(String id, int time)
7878
return (BasicEntity) session.selectOne(className + ".findById", id);
7979
} catch (PersistenceException exception)
8080
{
81-
System.out.println("没有查询到 BasicModel 对象,继续查询");
81+
System.out.println("没有查询到 BasicModel 对象,继续查询:"+className+".findById");
8282
return _findById(id, ++time);
8383
}
8484
}
8585

86-
public List find(String field, Object val)
86+
public List<E> find(String field, Object val)
8787
{
8888
Map map = new HashMap();
8989
map.put("field", field);

src/main/java/com/nbs/biz/data/dao/NBSTableDao.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ public void createUploadInfo(){
6464
public void createAttachmentInfo(){
6565
session.update("createAttachmentInfo");
6666
}
67+
68+
public void createHashLinks(){
69+
session.update("createHashLinks");
70+
}
6771
public List<NBSTest> findAll(){
6872
return session.selectList("findAll");
6973
}

0 commit comments

Comments
 (0)