|
|
|
|
@ -0,0 +1,51 @@
|
|
|
|
|
package com.ssm.di.annotation;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 组员B:支出信息维护模块(注解版)
|
|
|
|
|
* 功能与XML配置完全一致
|
|
|
|
|
*/
|
|
|
|
|
@Component("expense")
|
|
|
|
|
public class Expense {
|
|
|
|
|
@Value("2001")
|
|
|
|
|
private Integer id;
|
|
|
|
|
@Value("1")
|
|
|
|
|
private Integer userId;
|
|
|
|
|
@Value("餐饮")
|
|
|
|
|
private String type;
|
|
|
|
|
@Value("1200.00")
|
|
|
|
|
private BigDecimal amount;
|
|
|
|
|
@Value("2024-04-15")
|
|
|
|
|
private String expenseDate;
|
|
|
|
|
@Value("日常餐饮消费")
|
|
|
|
|
private String remark;
|
|
|
|
|
|
|
|
|
|
public Expense() {}
|
|
|
|
|
|
|
|
|
|
public void printInfo() {
|
|
|
|
|
System.out.println("\n===== 组员赵晋鹤-支出信息 =====");
|
|
|
|
|
System.out.println("支出ID:" + id);
|
|
|
|
|
System.out.println("用户ID:" + userId);
|
|
|
|
|
System.out.println("支出类型:" + type);
|
|
|
|
|
System.out.println("支出金额:" + amount);
|
|
|
|
|
System.out.println("支出日期:" + expenseDate);
|
|
|
|
|
System.out.println("备注:" + remark);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Getter & Setter
|
|
|
|
|
public Integer getId() { return id; }
|
|
|
|
|
public void setId(Integer id) { this.id = id; }
|
|
|
|
|
public Integer getUserId() { return userId; }
|
|
|
|
|
public void setUserId(Integer userId) { this.userId = userId; }
|
|
|
|
|
public String getType() { return type; }
|
|
|
|
|
public void setType(String type) { this.type = type; }
|
|
|
|
|
public BigDecimal getAmount() { return amount; }
|
|
|
|
|
public void setAmount(BigDecimal amount) { this.amount = amount; }
|
|
|
|
|
public String getExpenseDate() { return expenseDate; }
|
|
|
|
|
public void setExpenseDate(String expenseDate) { this.expenseDate = expenseDate; }
|
|
|
|
|
public String getRemark() { return remark; }
|
|
|
|
|
public void setRemark(String remark) { this.remark = remark; }
|
|
|
|
|
}
|