Skip to content

Commit 8deaae8

Browse files
authored
Merge pull request #856 from support-project/issue853_initial_value
Issue853 initial value
2 parents 80af29f + 48dc8d7 commit 8deaae8

22 files changed

Lines changed: 137 additions & 22 deletions
504 Bytes
Binary file not shown.

document/database/knowledge.a5er

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ LName=認証トークン
360360
Comment=
361361
TableOption=
362362
Page=MAIN
363-
Left=1600
364-
Top=50
363+
Left=3050
364+
Top=900
365365
Field="TOKEN","TOKEN","@VARCHAR(128)","NOT NULL",0,"","",$FFFFFFFF,""
366366
Field="ユーザID","USER_ID","@INT","NOT NULL",,"","",$FFFFFFFF,""
367367
Field="有効期限","EXPIRES","@DATETIME","NOT NULL",,"","",$FFFFFFFF,""
@@ -370,7 +370,7 @@ EffectMode=None
370370
Color=$000000
371371
BkColor=$FFFFFF
372372
ModifiedDateTime=20170620125822
373-
Position="MAIN",1600,50
373+
Position="MAIN",3050,900
374374

375375
[Relation]
376376
Entity1=MAIL_HOOKS
@@ -823,15 +823,15 @@ Comment=
823823
TableOption=
824824
Page=MAIN
825825
Left=1600
826-
Top=400
826+
Top=350
827827
Field="サービス名","SERVICE_NAME","@VARCHAR(64)","NOT NULL",0,"","",$FFFFFFFF,""
828828
Field="ロケールキー","LOCALE_KEY","@VARCHAR(12)","NOT NULL",1,"","",$FFFFFFFF,""
829829
Field="トップページのHTML","PAGE_HTML","text",,,"","",$FFFFFFFF,""
830830
EffectMode=None
831831
Color=$000000
832832
BkColor=$FFFFFF
833833
ModifiedDateTime=20170130131057
834-
Position="MAIN",1600,400
834+
Position="MAIN",1600,350
835835

836836
[Entity]
837837
PName=SERVICE_CONFIGS
@@ -840,7 +840,7 @@ Comment=
840840
TableOption=
841841
Page=MAIN
842842
Left=1600
843-
Top=200
843+
Top=100
844844
Field="サービス名","SERVICE_NAME","@VARCHAR(64)","NOT NULL",0,"","",$FFFFFFFF,""
845845
Field="表示名","SERVICE_LABEL","@VARCHAR(24)","NOT NULL",,"","",$FFFFFFFF,""
846846
Field="アイコン文字列","SERVICE_ICON","@VARCHAR(24)","NOT NULL",,"","",$FFFFFFFF,""
@@ -849,7 +849,7 @@ EffectMode=None
849849
Color=$000000
850850
BkColor=$FFFFFF
851851
ModifiedDateTime=20170131001923
852-
Position="MAIN",1600,200
852+
Position="MAIN",1600,100
853853

854854
[Entity]
855855
PName=PINS
@@ -1243,7 +1243,7 @@ Comment=
12431243
TableOption=
12441244
Page=MAIN
12451245
Left=950
1246-
Top=300
1246+
Top=200
12471247
Field="テンプレートの種類ID","TYPE_ID","@INT","NOT NULL",0,"","",$FFFFFFFF,""
12481248
Field="項目NO","ITEM_NO","@INT","NOT NULL",1,"","",$FFFFFFFF,""
12491249
Field="選択肢番号","CHOICE_NO","@INT","NOT NULL",2,"","",$FFFFFFFF,""
@@ -1253,7 +1253,7 @@ EffectMode=None
12531253
Color=$000000
12541254
BkColor=$FFFFFF
12551255
ModifiedDateTime=20150910041119
1256-
Position="MAIN",950,300,542,135
1256+
Position="MAIN",950,200,542,135
12571257

12581258
[Relation]
12591259
Entity1=TEMPLATE_MASTERS
@@ -1264,15 +1264,15 @@ Fields1=TYPE_ID
12641264
Fields2=TYPE_ID
12651265
Cardinarity1=
12661266
Cardinarity2=
1267-
Position="MAIN",0,4460,6903,3568,R,R
1267+
Position="MAIN",0,4460,6903,3717,R,R
12681268
Dependence=1
12691269
Caption=
12701270
PName=
12711271
ModifiedDateTime=20150910034230
12721272
LineMode=0
12731273
Bar1=446
12741274
Bar2=690
1275-
Bar3=357
1275+
Bar3=372
12761276
TermPos1=R
12771277
TermPos2=R
12781278

@@ -1285,14 +1285,14 @@ Fields1=TYPE_ID
12851285
Fields2=TYPE_ID
12861286
Cardinarity1=
12871287
Cardinarity2=
1288-
Position="MAIN",0,3334,5475,2219,R,R
1288+
Position="MAIN",0,3334,5475,2295,R,R
12891289
Dependence=0
12901290
Caption=
12911291
PName=
12921292
LineMode=0
12931293
Bar1=333
12941294
Bar2=548
1295-
Bar3=222
1295+
Bar3=230
12961296
TermPos1=R
12971297
TermPos2=R
12981298

@@ -1308,10 +1308,11 @@ Field="テンプレートの種類ID","TYPE_ID","serial","NOT NULL",0,"","",$FFF
13081308
Field="テンプレート名","TYPE_NAME","@VARCHAR(256)","NOT NULL",,"","",$FFFFFFFF,""
13091309
Field="アイコン","TYPE_ICON","@VARCHAR(64)",,,"","",$FFFFFFFF,""
13101310
Field="説明","DESCRIPTION","@VARCHAR(1024)",,,"","",$FFFFFFFF,""
1311+
Field="本文の初期値","INITIAL_VALUE","text",,,"","",$FFFFFFFF,""
13111312
EffectMode=None
13121313
Color=$000000
13131314
BkColor=$FFFFFF
1314-
ModifiedDateTime=20150912014311
1315+
ModifiedDateTime=20170915171119
13151316
Position="MAIN",650,550
13161317

13171318
[Entity]
@@ -1321,17 +1322,18 @@ Comment=
13211322
TableOption=
13221323
Page=MAIN
13231324
Left=1350
1324-
Top=550
1325+
Top=500
13251326
Field="テンプレートの種類ID","TYPE_ID","@INT","NOT NULL",0,"","",$FFFFFFFF,""
13261327
Field="項目NO","ITEM_NO","@INT","NOT NULL",1,"","",$FFFFFFFF,""
13271328
Field="項目名","ITEM_NAME","@VARCHAR(32)","NOT NULL",,"","",$FFFFFFFF,""
13281329
Field="項目の種類","ITEM_TYPE","@INT","NOT NULL",,"","",$FFFFFFFF,""
13291330
Field="説明","DESCRIPTION","@VARCHAR(1024)",,,"","",$FFFFFFFF,""
1331+
Field="初期値","INITIAL_VALUE","text",,,"","",$FFFFFFFF,""
13301332
EffectMode=None
13311333
Color=$000000
13321334
BkColor=$FFFFFF
1333-
ModifiedDateTime=20151027035632
1334-
Position="MAIN",1350,550
1335+
ModifiedDateTime=20170915171315
1336+
Position="MAIN",1350,500
13351337

13361338
[Relation]
13371339
Entity1=KNOWLEDGES
@@ -1519,8 +1521,8 @@ LName=アカウントの画像
15191521
Comment=
15201522
TableOption=
15211523
Page=MAIN
1522-
Left=900
1523-
Top=50
1524+
Left=3550
1525+
Top=1250
15241526
Field="IMAGE_ID","IMAGE_ID","BIGSERIAL","NOT NULL",0,"","",$FFFFFFFF,""
15251527
Field="ユーザID","USER_ID","@INT",,,"","",$FFFFFFFF,""
15261528
Field="ファイル名","FILE_NAME","@VARCHAR(256)",,,"","",$FFFFFFFF,""
@@ -1533,7 +1535,7 @@ EffectMode=None
15331535
Color=$000000
15341536
BkColor=$FFFFFF
15351537
ModifiedDateTime=20150416234339
1536-
Position="MAIN",900,50
1538+
Position="MAIN",3550,1250
15371539

15381540
[Relation]
15391541
Entity1=KNOWLEDGES

src/main/java/org/support/project/knowledge/dao/gen/GenTemplateItemsDao.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ public TemplateItemsEntity rawPhysicalInsert(TemplateItemsEntity entity) {
219219
entity.getItemName(),
220220
entity.getItemType(),
221221
entity.getDescription(),
222+
entity.getInitialValue(),
222223
entity.getInsertUser(),
223224
entity.getInsertDatetime(),
224225
entity.getUpdateUser(),
@@ -241,6 +242,7 @@ public TemplateItemsEntity physicalInsert(TemplateItemsEntity entity) {
241242
entity.getItemName(),
242243
entity.getItemType(),
243244
entity.getDescription(),
245+
entity.getInitialValue(),
244246
entity.getInsertUser(),
245247
entity.getInsertDatetime(),
246248
entity.getUpdateUser(),
@@ -288,6 +290,7 @@ public TemplateItemsEntity physicalUpdate(TemplateItemsEntity entity) {
288290
entity.getItemName(),
289291
entity.getItemType(),
290292
entity.getDescription(),
293+
entity.getInitialValue(),
291294
entity.getInsertUser(),
292295
entity.getInsertDatetime(),
293296
entity.getUpdateUser(),

src/main/java/org/support/project/knowledge/dao/gen/GenTemplateMastersDao.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ public TemplateMastersEntity rawPhysicalInsert(TemplateMastersEntity entity) {
176176
entity.getTypeName(),
177177
entity.getTypeIcon(),
178178
entity.getDescription(),
179+
entity.getInitialValue(),
179180
entity.getInsertUser(),
180181
entity.getInsertDatetime(),
181182
entity.getUpdateUser(),
@@ -207,6 +208,7 @@ public TemplateMastersEntity physicalInsert(TemplateMastersEntity entity) {
207208
entity.getTypeName(),
208209
entity.getTypeIcon(),
209210
entity.getDescription(),
211+
entity.getInitialValue(),
210212
entity.getInsertUser(),
211213
entity.getInsertDatetime(),
212214
entity.getUpdateUser(),
@@ -255,6 +257,7 @@ public TemplateMastersEntity physicalUpdate(TemplateMastersEntity entity) {
255257
entity.getTypeName(),
256258
entity.getTypeIcon(),
257259
entity.getDescription(),
260+
entity.getInitialValue(),
258261
entity.getInsertUser(),
259262
entity.getInsertDatetime(),
260263
entity.getUpdateUser(),

src/main/java/org/support/project/knowledge/deploy/InitDB.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_0;
2626
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_1;
2727
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_2;
28+
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_3;
2829
import org.support.project.knowledge.deploy.v1_1_0pre1.Migrate_1_1_0pre1;
2930
import org.support.project.knowledge.deploy.v1_4_0.Migrate_1_4_0;
3031
import org.support.project.knowledge.deploy.v1_5_0.Migrate_1_5_0;
@@ -50,7 +51,7 @@ public class InitDB {
5051
private static final Map<String, Migrate> MAP = new LinkedHashMap<>();
5152

5253
private static final Migrate INIT = InitializeSystem.get();
53-
public static final String CURRENT = "1.11.2";
54+
public static final String CURRENT = "1.11.3";
5455

5556
public InitDB() {
5657
super();
@@ -83,6 +84,7 @@ public InitDB() {
8384
MAP.put("1.11.0", Migrate_1_11_0.get());
8485
MAP.put("1.11.1", Migrate_1_11_1.get());
8586
MAP.put("1.11.2", Migrate_1_11_2.get());
87+
MAP.put("1.11.3", Migrate_1_11_3.get());
8688
}
8789

8890
public static void main(String[] args) throws Exception {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package org.support.project.knowledge.deploy.v1_11_0;
2+
3+
import org.support.project.knowledge.deploy.Migrate;
4+
import org.support.project.ormapping.tool.dao.InitializeDao;
5+
6+
public class Migrate_1_11_3 implements Migrate {
7+
8+
public static Migrate_1_11_3 get() {
9+
return org.support.project.di.Container.getComp(Migrate_1_11_3.class);
10+
}
11+
12+
@Override
13+
public boolean doMigrate() throws Exception {
14+
InitializeDao initializeDao = InitializeDao.get();
15+
String[] sqlpaths = {
16+
"/org/support/project/knowledge/deploy/v1_12/migrate_v1_12_0.sql",
17+
};
18+
initializeDao.initializeDatabase(sqlpaths);
19+
return true;
20+
}
21+
}

src/main/java/org/support/project/knowledge/entity/gen/GenTemplateItemsEntity.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public GenTemplateItemsEntity(Integer itemNo, Integer typeId) {
6161
private Integer itemType;
6262
/** 説明 */
6363
private String description;
64+
/** 初期値 */
65+
private String initialValue;
6466
/** 登録ユーザ */
6567
private Integer insertUser;
6668
/** 登録日時 */
@@ -152,6 +154,22 @@ public GenTemplateItemsEntity setDescription(String description) {
152154
return this;
153155
}
154156

157+
/**
158+
* Get 初期値.
159+
* @return 初期値
160+
*/
161+
public String getInitialValue() {
162+
return this.initialValue;
163+
}
164+
/**
165+
* Set 初期値.
166+
* @param initialValue 初期値
167+
* @return this object */
168+
public GenTemplateItemsEntity setInitialValue(String initialValue) {
169+
this.initialValue = initialValue;
170+
return this;
171+
}
172+
155173
/**
156174
* Get 登録ユーザ.
157175
* @return 登録ユーザ
@@ -288,6 +306,7 @@ public String toString() {
288306
builder.append("itemName = ").append(itemName).append("\n");
289307
builder.append("itemType = ").append(itemType).append("\n");
290308
builder.append("description = ").append(description).append("\n");
309+
builder.append("initialValue = ").append(initialValue).append("\n");
291310
builder.append("insertUser = ").append(insertUser).append("\n");
292311
builder.append("insertDatetime = ").append(insertDatetime).append("\n");
293312
builder.append("updateUser = ").append(updateUser).append("\n");

src/main/java/org/support/project/knowledge/entity/gen/GenTemplateMastersEntity.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public GenTemplateMastersEntity(Integer typeId) {
5757
private String typeIcon;
5858
/** 説明 */
5959
private String description;
60+
/** 本文の初期値 */
61+
private String initialValue;
6062
/** 登録ユーザ */
6163
private Integer insertUser;
6264
/** 登録日時 */
@@ -132,6 +134,22 @@ public GenTemplateMastersEntity setDescription(String description) {
132134
return this;
133135
}
134136

137+
/**
138+
* Get 本文の初期値.
139+
* @return 本文の初期値
140+
*/
141+
public String getInitialValue() {
142+
return this.initialValue;
143+
}
144+
/**
145+
* Set 本文の初期値.
146+
* @param initialValue 本文の初期値
147+
* @return this object */
148+
public GenTemplateMastersEntity setInitialValue(String initialValue) {
149+
this.initialValue = initialValue;
150+
return this;
151+
}
152+
135153
/**
136154
* Get 登録ユーザ.
137155
* @return 登録ユーザ
@@ -264,6 +282,7 @@ public String toString() {
264282
builder.append("typeName = ").append(typeName).append("\n");
265283
builder.append("typeIcon = ").append(typeIcon).append("\n");
266284
builder.append("description = ").append(description).append("\n");
285+
builder.append("initialValue = ").append(initialValue).append("\n");
267286
builder.append("insertUser = ").append(insertUser).append("\n");
268287
builder.append("insertDatetime = ").append(insertDatetime).append("\n");
269288
builder.append("updateUser = ").append(updateUser).append("\n");

src/main/java/org/support/project/knowledge/logic/TemplateLogic.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ public TemplateMastersEntity updateTemplate(TemplateMastersEntity template, Logi
155155
db.setTypeName(template.getTypeName());
156156
db.setTypeIcon(template.getTypeIcon());
157157
db.setDescription(template.getDescription());
158+
db.setInitialValue(template.getInitialValue());
158159
templateDao.update(db);
159160

160161
Integer typeId = template.getTypeId();

src/main/resources/appresource.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ knowledge.template.label.name=Name
694694
knowledge.template.label.icon=Icon
695695
knowledge.template.label.icon.msg=(Choice from 'Font Awesome'.[<a href="http://fontawesome.io/icons/" target="_blank">http://fontawesome.io/icons/</a>] e.g. fa-book)
696696
knowledge.template.label.description=Description
697+
knowledge.template.label.initial.value=Initial value
697698
knowledge.template.label.not.editable=This template is the default template of the system. you can edit only description.
698699
knowledge.template.msg.not.delete=The default template (knowledge, bookmark) can not be deleted.
699700
knowledge.template.label.item=Item

0 commit comments

Comments
 (0)