SSH应用总结–插入

理赔综合满意度

Created with Raphaël 2.1.0 clmpayCallbackAction.save clmpayCallbackAction.save clmpayCallbackService.save clmpayCallbackService.save ClmpayCallbackJdbcDAO.save ClmpayCallbackJdbcDAO.save clmpayCallbackForm clmpayCallbackForm
    ConnectionCallback conCallback = new ConnectionCallback() {};
    return Integer.parseInt(this.getJdbcTemplate().execute(conCallback).toString());
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

ConnectionCallback conCallback = new ConnectionCallback() {
    public Object doInConnection(Connection con) throws SQLException {
        PreparedStatement ps1 = null;
        sql1 ="UPDATE t_clmpay_new_callback SET Cb_Status=?,...WHERE Cb_Id=?"
        ps1 = con.prepareStatement(sql1);
        ps1.setString(++index, InsDicHelper.CbStatus_0); // 已回访
        result1 = ps1.executeUpdate();

关于this.getJdbcTemplate()的使用


证件失效回访

Created with Raphaël 2.1.0 dealInvalidDocumentAction.save dealInvalidDocumentAction.save dealInvalidDocumentService.save dealInvalidDocumentService.save DealInvalidDocumentDAO.save DealInvalidDocumentDAO.save Entity final Entity
    this.getHibernateTemplate().saveOrUpdate(newInvalidDocumentCallbackEntity);
    this.getHibernateTemplate().saveOrUpdate(tInvalidDocumentCbmainEntity);
    this.getHibernateTemplate().saveOrUpdate(tInvalidDocumentCallbackEntity);

spring中getHibernateTemplate用法

寿险app工单下发接口

Created with Raphaël 2.1.0 queryLhSheetNewplyAction.toApp queryLhSheetNewplyAction.toApp lhSheetNewplyService.toApp lhSheetNewplyService.toApp LhSheetNewplyJdbcDAO.toapp LhSheetNewplyJdbcDAO.toapp lhSheetSendLogEntity final LhSheetSendLogEntity lhSheetSendLogEntity
    ConnectionCallback conCallback = new ConnectionCallback() {};
    return Integer.parseInt(this.getJdbcTemplate().execute(conCallback)
                .toString());
public Object doInConnection(Connection con) throws SQLException {
    PreparedStatement ps2 = null;
    String sql2 = "INSERT INTO LH_SHEET_SEND_LOG(ID," +..)")" +
                            "VALUES " +
                            "(LH_SHEET_SEND_LOG_SEQ.nextval," +
                            "?,..." ;
    ps2 = con.prepareStatement(sql2);
    ps2.setString(++index2, lhSheetSendLogEntity.getMethod());
    ...
    result2=ps2.executeUpdate();

你可能感兴趣的:(ssh,ssh,插入,避免sql注入)