Skip to content

Commit 92f5d91

Browse files
author
杨利兵
committed
解决配置信息中最后一行无法读取问题
1 parent 0926b39 commit 92f5d91

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/com/yanglb/utilitys/codegen/core/reader/impl/HashMapReaderImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class HashMapReaderImpl extends BaseReader<HashMap<String, String>> {
3939
protected HashMap<String, String> onReader(XSSFSheet sheet) {
4040
HashMap<String, String> result = new HashMap<String, String>();
4141

42-
for(int row=this.startRowNo; row < sheet.getLastRowNum(); row++) {
42+
for(int row=this.startRowNo; row <= sheet.getLastRowNum(); row++) {
4343
XSSFRow xssfRow = sheet.getRow(row);
4444
String key = this.getCellStringValue(xssfRow.getCell(this.startColNo));
4545
// key不为空时添加到Map中

src/com/yanglb/utilitys/codegen/core/translator/impl/MsgCSTranslatorImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ protected void onTranslate() throws CodeGenException {
4545
sb.append(this.settingMap.get("resheader"));
4646

4747
// 替换标记
48-
sb = new StringBuilder(this.replaceFlags(sb.toString(), null));
48+
String s = this.replaceFlags(sb.toString(), null);
49+
sb = new StringBuilder(s);
4950

5051
for(TableModel tblModel : this.model) {
5152
// 添加Sheet注释

src/conf/CodeGenerator.xlsx

-5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)