Skip to content

Commit 346e39f

Browse files
修改获取的记账式的字段信息
1 parent eb9aa26 commit 346e39f

File tree

11 files changed

+95
-76
lines changed

11 files changed

+95
-76
lines changed

.idea/workspace.xml

Lines changed: 88 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/com/yjz/notepad/bean/UserBookkeepingBean.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
public class UserBookkeepingBean {
1212

1313
// 用户ID
14-
private Long userId;
14+
private Long id;
1515
// 账本名称
1616
private String name;
1717
// 0收入 1支出
@@ -22,5 +22,6 @@ public class UserBookkeepingBean {
2222
private float money;
2323
// 真实日期
2424
private String exactTime;
25-
25+
// 类型
26+
private Long classificationId;
2627
}

src/main/java/com/yjz/notepad/controller/BookkeepingController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public Map<String, Object> getUserMonthDate(Long userId, Long bookType, String y
8181
String exactTimes = "";
8282
boolean isChange = true;
8383
for (UserBookkeepingBean userBookkeepingBean : userBookkeepingBeans) {
84+
System.out.println(userBookkeepingBean.toString());
8485
if (userBookkeepingBean.getMoneyType() == 0) {
8586
// 当天总支出
8687
allOut += userBookkeepingBean.getMoney();

src/main/resource/mapper/BookkeepingDao.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<!-- 查询用户一个月中所有的记账记录 -->
2424
<select id="queryAllBookkeeping" resultType="UserBookkeepingBean">
25-
SELECT b.user_id,b.content,b.money,b.money_type,t.name,b.exact_time
25+
SELECT b.id,b.content,b.money,b.money_type,t.name,b.exact_time,b.classification_id
2626
FROM bookkeeping b
2727
LEFT JOIN user u on u.id = b.user_id
2828
LEFT JOIN bookkeeping_type t on t.id = b.type_id
470 Bytes
Binary file not shown.
Binary file not shown.

target/classes/mapper/BookkeepingDao.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<!-- 查询用户一个月中所有的记账记录 -->
2424
<select id="queryAllBookkeeping" resultType="UserBookkeepingBean">
25-
SELECT b.user_id,b.content,b.money,b.money_type,t.name,b.exact_time
25+
SELECT b.id,b.content,b.money,b.money_type,t.name,b.exact_time,b.classification_id
2626
FROM bookkeeping b
2727
LEFT JOIN user u on u.id = b.user_id
2828
LEFT JOIN bookkeeping_type t on t.id = b.type_id

target/notepad.war

167 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)