我添加了家庭理财系统

main
your-name 2 days ago
parent ea554bbe60
commit 8cec6bd532

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="spring-context-5.1.6.RELEASE">
<CLASSES>
<root url="jar://$PROJECT_DIR$/ffms-SpringProject/src/com/ssm/first/lib/spring-context-5.1.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- 用户信息维护 -->
<bean id="user" class="com.ssm.first.User">
<property name="userId" value="1"/>
<property name="username" value="zhangsan"/>
<property name="userPass" value="123456"/>
<property name="trueName" value="张三"/>
<property name="age" value="25"/>
<property name="phone" value="13800138000"/>
</bean>
<!-- 收入信息维护 -->
<bean id="income" class="com.ssm.first.Income">
<property name="incomeId" value="1"/>
<property name="userId" value="1"/>
<property name="typeId" value="101"/>
<property name="amount" value="8000.00"/>
<property name="remark" value="2026年4月工资"/>
<property name="incomeDate" value="#{new java.util.Date()}"/>
</bean>
<!-- 支出信息维护 -->
<bean id="expense" class="com.ssm.first.Expense">
<property name="expenseId" value="1"/>
<property name="userId" value="1"/>
<property name="typeId" value="201"/>
<property name="amount" value="1500.00"/>
<property name="remark" value="房租支出"/>
<property name="expenseDate" value="#{new java.util.Date()}"/>
</bean>
<!-- 证券账户管理 -->
<bean id="securitiesAccount" class="com.ssm.first.SecuritiesAccount">
<property name="accountId" value="1"/>
<property name="userId" value="1"/>
<property name="brokerId" value="301"/>
<property name="accountNo" value="666888999"/>
<property name="totalAssets" value="50000.00"/>
<property name="availableFunds" value="10000.00"/>
<property name="createDate" value="#{new java.util.Date()}"/>
</bean>
<!-- 持股管理 -->
<bean id="stockHolding" class="com.ssm.first.StockHolding">
<property name="holdingId" value="1"/>
<property name="accountId" value="1"/>
<property name="stockCode" value="000001"/>
<property name="goodsName" value="平安银行"/>
<property name="nums" value="1000"/>
<property name="costPrice" value="12.50"/>
<property name="buyDate" value="#{new java.util.Date()}"/>
</bean>
<!-- 预算管理 -->
<bean id="budget" class="com.ssm.first.Budget">
<property name="budgetId" value="1"/>
<property name="userId" value="1"/>
<property name="budgetType" value="生活费"/>
<property name="totalAmount" value="3000.00"/>
<property name="usedAmount" value="800.00"/>
<property name="startDate" value="#{new java.util.Date()}"/>
<property name="endDate" value="#{new java.util.Date()}"/>
</bean>
<!-- 通知管理 -->
<bean id="notification" class="com.ssm.first.Notification">
<property name="noticeId" value="1"/>
<property name="userId" value="1"/>
<property name="title" value="预算提醒"/>
<property name="content" value="您本月生活费预算已使用26.7%"/>
<property name="status" value="0"/>
<property name="createDate" value="#{new java.util.Date()}"/>
</bean>
<!-- 数据字典管理 -->
<bean id="dataDictionary" class="com.ssm.first.DataDictionary">
<property name="dictId" value="1"/>
<property name="dictType" value="income_type"/>
<property name="dictCode" value="101"/>
<property name="dictName" value="工资"/>
<property name="sort" value="1"/>
<property name="remark" value="收入类型字典"/>
</bean>
</beans>

@ -0,0 +1,43 @@
package com.ssm.first;
import java.util.Date;
public class Budget {
private Integer budgetId;
private Integer userId;
private String budgetType;
private Double totalAmount;
private Double usedAmount;
private Date startDate;
private Date endDate;
public Budget() {}
public Integer getBudgetId() { return budgetId; }
public void setBudgetId(Integer budgetId) { this.budgetId = budgetId; }
public Integer getUserId() { return userId; }
public void setUserId(Integer userId) { this.userId = userId; }
public String getBudgetType() { return budgetType; }
public void setBudgetType(String budgetType) { this.budgetType = budgetType; }
public Double getTotalAmount() { return totalAmount; }
public void setTotalAmount(Double totalAmount) { this.totalAmount = totalAmount; }
public Double getUsedAmount() { return usedAmount; }
public void setUsedAmount(Double usedAmount) { this.usedAmount = usedAmount; }
public Date getStartDate() { return startDate; }
public void setStartDate(Date startDate) { this.startDate = startDate; }
public Date getEndDate() { return endDate; }
public void setEndDate(Date endDate) { this.endDate = endDate; }
@Override
public String toString() {
return "Budget{" +
"budgetId=" + budgetId +
", userId=" + userId +
", budgetType='" + budgetType + '\'' +
", totalAmount=" + totalAmount +
", usedAmount=" + usedAmount +
", startDate=" + startDate +
", endDate=" + endDate +
'}';
}
}

@ -0,0 +1,37 @@
package com.ssm.first;
public class DataDictionary {
private Integer dictId;
private String dictType;
private String dictCode;
private String dictName;
private Integer sort;
private String remark;
public DataDictionary() {}
public Integer getDictId() { return dictId; }
public void setDictId(Integer dictId) { this.dictId = dictId; }
public String getDictType() { return dictType; }
public void setDictType(String dictType) { this.dictType = dictType; }
public String getDictCode() { return dictCode; }
public void setDictCode(String dictCode) { this.dictCode = dictCode; }
public String getDictName() { return dictName; }
public void setDictName(String dictName) { this.dictName = dictName; }
public Integer getSort() { return sort; }
public void setSort(Integer sort) { this.sort = sort; }
public String getRemark() { return remark; }
public void setRemark(String remark) { this.remark = remark; }
@Override
public String toString() {
return "DataDictionary{" +
"dictId=" + dictId +
", dictType='" + dictType + '\'' +
", dictCode='" + dictCode + '\'' +
", dictName='" + dictName + '\'' +
", sort=" + sort +
", remark='" + remark + '\'' +
'}';
}
}

@ -0,0 +1,39 @@
package com.ssm.first;
import java.util.Date;
public class Expense {
private Integer expenseId;
private Integer userId;
private Integer typeId;
private Double amount;
private String remark;
private Date expenseDate;
public Expense() {}
public Integer getExpenseId() { return expenseId; }
public void setExpenseId(Integer expenseId) { this.expenseId = expenseId; }
public Integer getUserId() { return userId; }
public void setUserId(Integer userId) { this.userId = userId; }
public Integer getTypeId() { return typeId; }
public void setTypeId(Integer typeId) { this.typeId = typeId; }
public Double getAmount() { return amount; }
public void setAmount(Double amount) { this.amount = amount; }
public String getRemark() { return remark; }
public void setRemark(String remark) { this.remark = remark; }
public Date getExpenseDate() { return expenseDate; }
public void setExpenseDate(Date expenseDate) { this.expenseDate = expenseDate; }
@Override
public String toString() {
return "Expense{" +
"expenseId=" + expenseId +
", userId=" + userId +
", typeId=" + typeId +
", amount=" + amount +
", remark='" + remark + '\'' +
", expenseDate=" + expenseDate +
'}';
}
}

@ -0,0 +1,39 @@
package com.ssm.first;
import java.util.Date;
public class Income {
private Integer incomeId;
private Integer userId;
private Integer typeId;
private Double amount;
private String remark;
private Date incomeDate;
public Income() {}
public Integer getIncomeId() { return incomeId; }
public void setIncomeId(Integer incomeId) { this.incomeId = incomeId; }
public Integer getUserId() { return userId; }
public void setUserId(Integer userId) { this.userId = userId; }
public Integer getTypeId() { return typeId; }
public void setTypeId(Integer typeId) { this.typeId = typeId; }
public Double getAmount() { return amount; }
public void setAmount(Double amount) { this.amount = amount; }
public String getRemark() { return remark; }
public void setRemark(String remark) { this.remark = remark; }
public Date getIncomeDate() { return incomeDate; }
public void setIncomeDate(Date incomeDate) { this.incomeDate = incomeDate; }
@Override
public String toString() {
return "Income{" +
"incomeId=" + incomeId +
", userId=" + userId +
", typeId=" + typeId +
", amount=" + amount +
", remark='" + remark + '\'' +
", incomeDate=" + incomeDate +
'}';
}
}

@ -0,0 +1,39 @@
package com.ssm.first;
import java.util.Date;
public class Notification {
private Integer noticeId;
private Integer userId;
private String title;
private String content;
private Integer status;
private Date createDate;
public Notification() {}
public Integer getNoticeId() { return noticeId; }
public void setNoticeId(Integer noticeId) { this.noticeId = noticeId; }
public Integer getUserId() { return userId; }
public void setUserId(Integer userId) { this.userId = userId; }
public String getTitle() { return title; }
public void setTitle(String title) { this.title = title; }
public String getContent() { return content; }
public void setContent(String content) { this.content = content; }
public Integer getStatus() { return status; }
public void setStatus(Integer status) { this.status = status; }
public Date getCreateDate() { return createDate; }
public void setCreateDate(Date createDate) { this.createDate = createDate; }
@Override
public String toString() {
return "Notification{" +
"noticeId=" + noticeId +
", userId=" + userId +
", title='" + title + '\'' +
", content='" + content + '\'' +
", status=" + status +
", createDate=" + createDate +
'}';
}
}

@ -0,0 +1,43 @@
package com.ssm.first;
import java.util.Date;
public class SecuritiesAccount {
private Integer accountId;
private Integer userId;
private Integer brokerId;
private String accountNo;
private Double totalAssets;
private Double availableFunds;
private Date createDate;
public SecuritiesAccount() {}
public Integer getAccountId() { return accountId; }
public void setAccountId(Integer accountId) { this.accountId = accountId; }
public Integer getUserId() { return userId; }
public void setUserId(Integer userId) { this.userId = userId; }
public Integer getBrokerId() { return brokerId; }
public void setBrokerId(Integer brokerId) { this.brokerId = brokerId; }
public String getAccountNo() { return accountNo; }
public void setAccountNo(String accountNo) { this.accountNo = accountNo; }
public Double getTotalAssets() { return totalAssets; }
public void setTotalAssets(Double totalAssets) { this.totalAssets = totalAssets; }
public Double getAvailableFunds() { return availableFunds; }
public void setAvailableFunds(Double availableFunds) { this.availableFunds = availableFunds; }
public Date getCreateDate() { return createDate; }
public void setCreateDate(Date createDate) { this.createDate = createDate; }
@Override
public String toString() {
return "SecuritiesAccount{" +
"accountId=" + accountId +
", userId=" + userId +
", brokerId=" + brokerId +
", accountNo='" + accountNo + '\'' +
", totalAssets=" + totalAssets +
", availableFunds=" + availableFunds +
", createDate=" + createDate +
'}';
}
}

@ -0,0 +1,43 @@
package com.ssm.first;
import java.util.Date;
public class StockHolding {
private Integer holdingId;
private Integer accountId;
private String stockCode;
private String goodsName;
private Integer nums;
private Double costPrice;
private Date buyDate;
public StockHolding() {}
public Integer getHoldingId() { return holdingId; }
public void setHoldingId(Integer holdingId) { this.holdingId = holdingId; }
public Integer getAccountId() { return accountId; }
public void setAccountId(Integer accountId) { this.accountId = accountId; }
public String getStockCode() { return stockCode; }
public void setStockCode(String stockCode) { this.stockCode = stockCode; }
public String getGoodsName() { return goodsName; }
public void setGoodsName(String goodsName) { this.goodsName = goodsName; }
public Integer getNums() { return nums; }
public void setNums(Integer nums) { this.nums = nums; }
public Double getCostPrice() { return costPrice; }
public void setCostPrice(Double costPrice) { this.costPrice = costPrice; }
public Date getBuyDate() { return buyDate; }
public void setBuyDate(Date buyDate) { this.buyDate = buyDate; }
@Override
public String toString() {
return "StockHolding{" +
"holdingId=" + holdingId +
", accountId=" + accountId +
", stockCode='" + stockCode + '\'' +
", goodsName='" + goodsName + '\'' +
", nums=" + nums +
", costPrice=" + costPrice +
", buyDate=" + buyDate +
'}';
}
}

@ -0,0 +1,19 @@
package com.ssm.first;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class TestIoc {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("bean-ioc.xml");
System.out.println("用户信息:" + context.getBean("user"));
System.out.println("收入信息:" + context.getBean("income"));
System.out.println("支出信息:" + context.getBean("expense"));
System.out.println("证券账户:" + context.getBean("securitiesAccount"));
System.out.println("持股信息:" + context.getBean("stockHolding"));
System.out.println("预算信息:" + context.getBean("budget"));
System.out.println("通知信息:" + context.getBean("notification"));
System.out.println("数据字典:" + context.getBean("dataDictionary"));
}
}

@ -0,0 +1,36 @@
package com.ssm.first;
public class User {
private Integer userId;
private String username;
private String userPass;
private String trueName;
private Integer age;
private String phone;
public User() {}
public Integer getUserId() { return userId; }
public void setUserId(Integer userId) { this.userId = userId; }
public String getUsername() { return username; }
public void setUsername(String username) { this.username = username; }
public String getUserPass() { return userPass; }
public void setUserPass(String userPass) { this.userPass = userPass; }
public String getTrueName() { return trueName; }
public void setTrueName(String trueName) { this.trueName = trueName; }
public Integer getAge() { return age; }
public void setAge(Integer age) { this.age = age; }
public String getPhone() { return phone; }
public void setPhone(String phone) { this.phone = phone; }
@Override
public String toString() {
return "User{" +
"userId=" + userId +
", username='" + username + '\'' +
", trueName='" + trueName + '\'' +
", age=" + age +
", phone='" + phone + '\'' +
'}';
}
}
Loading…
Cancel
Save