qq_35972589
qq_35972589
2017-09-26 08:12

save方法不执行,求大神解惑

  • hibernate

package cn.com.gpic.cfr.inCaseCheck.pojo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="CFRINCASELOCKLOG")
public class CfrincaseLockLog implements java.io.Serializable {
private static final long serialVersionUID = 1L;

private String accidnentno;
private String typeno;
private String typename;
private String responseflag;
private Date insertdate;

@Column(name="insertdate")
public Date getInsertdate() {
    return insertdate;
}
public void setInsertdate(Date insertdate) {
    this.insertdate = insertdate;
}
@Id
@Column(name="accidnentno")
public String getAccidnentno() {
    return accidnentno;
}
public void setAccidnentno(String accidnentno) {
    this.accidnentno = accidnentno;
}
@Column(name="typeno")
public String getTypeno() {
    return typeno;
}
public void setTypeno(String typeno) {
    this.typeno = typeno;
}
@Column(name="typename")
public String getTypename() {
    return typename;
}
public void setTypename(String typename) {
    this.typename = typename;
}
@Column(name="responseflag")
public String getResponseflag() {
    return responseflag;
}
public void setResponseflag(String responseflag) {
    this.responseflag = responseflag;
}

}




 package cn.com.gpic.cfr.inCaseCheck.service.facade;

import cn.com.gpic.cfr.inCaseCheck.pojo.CfrincaseLockLog;

public interface SaveLockLogService {
    public void saveincaseLockLog(CfrincaseLockLog cfrincaseLockLog);
}

package cn.com.gpic.cfr.inCaseCheck.service.spring;

import ins.framework.dao.GenericDaoHibernate;
import cn.com.gpic.cfr.inCaseCheck.pojo.CfrincaseLockLog;
import cn.com.gpic.cfr.inCaseCheck.service.facade.SaveLockLogService;

public class SaveLockLogServiceImpl extends GenericDaoHibernate implements SaveLockLogService{

//存储操作日志
//@org.springframework.transaction.annotation.Transactional(propagation = Propagation.REQUIRED)
public void saveincaseLockLog(CfrincaseLockLog cfrincaseLockLog) {

    super.save(cfrincaseLockLog);

}

}

 try{
                        cfrincaseLockLog.setAccidnentno(accidentNo);
                        cfrincaseLockLog.setTypeno("1");
                        cfrincaseLockLog.setTypename("锁定核赔");
                        cfrincaseLockLog.setTypename("操作成功");
                        cfrincaseLockLog.setInsertdate(date);
                        saveLockLogService.saveincaseLockLog(cfrincaseLockLog);
                        } catch (Exception e) {
                            e.printStackTrace();
                        }



  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答