package com.aitiman.domain;
import java.text.SimpleDateFormat;
import java.util.Date;
public class SaleVisit {
/* `visit_id` varchar(36) NOT NULL,
`visit_cust_id` bigint(32) DEFAULT NULL COMMENT '客户id',
`visit_user_id` bigint(32) DEFAULT NULL COMMENT '负责人id',
`visit_time` date DEFAULT NULL COMMENT '拜访时间',
`visit_interviewee` varchar(32) DEFAULT NULL COMMENT '被拜访人',
`visit_addr` varchar(128) DEFAULT NULL COMMENT '拜访地点',
`visit_detail` varchar(256) DEFAULT NULL COMMENT '拜访详情',
`visit_nexttime` date DEFAULT NULL COMMENT '下次拜访时间',*/
private String visit_id ;
private String visit_interviewee ;
private String visit_addr ;
private String visit_detail ;
private Date visit_time;
private Date visit_nexttime;
private Customer customer;
private User user;
//-----------------------------------------------
//如果将当前bean的实例salevisit 转发到前台jsp,jsp页面直接用<s:property value="#salevisit.visit_time_s" > 即可获得转换后的数据
//将date格式数据转为string类型数据
public String getVisit_time_s() {
return transferDate(visit_time,"yyyy-MM-dd");
}
public String getVisit_nexttime_s() {
return transferDate(visit_nexttime,"yyyy-MM-dd");
}
//转换器方法
public static String transferDate(Date date,String format){
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.format(date);
}
//-----------------------------------------------
/**
* @return the visit_id
*/
public String getVisit_id() {
return visit_id;
}
public void setVisit_id(String visit_id) {
this.visit_id = visit_id;
}
/**
* @return the visit_interviewee
*/
public String getVisit_interviewee() {
return visit_interviewee;
}
public void setVisit_interviewee(String visit_interviewee) {
this.visit_interviewee = visit_interviewee;
}
/**
* @return the visit_addr
*/
public String getVisit_addr() {
return visit_addr;
}
public void setVisit_addr(String visit_addr) {
this.visit_addr = visit_addr;
}
/**
* @return the visit_detail
*/
public String getVisit_detail() {
return visit_detail;
}
public void setVisit_detail(String visit_detail) {
this.visit_detail = visit_detail;
}
/**
* @return the visit_time
*/
public Date getVisit_time() {
return visit_time;
}
public void setVisit_time(Date visit_time) {
this.visit_time = visit_time;
}
/**
* @return the visit_nexttime
*/
public Date getVisit_nexttime() {
return visit_nexttime;
}
public void setVisit_nexttime(Date visit_nexttime) {
this.visit_nexttime = visit_nexttime;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "SaleVisit [visit_id=" + visit_id + ", visit_interviewee=" + visit_interviewee + ", visit_addr="
+ visit_addr + ", visit_detail=" + visit_detail + ", visit_time=" + visit_time + ", visit_nexttime="
+ visit_nexttime + ", customer=" + customer + ", user=" + user + "]";
}
}
【SSH框架学习】前台获取Bean中的封装方法
最新推荐文章于 2021-02-16 02:12:22 发布