package com.usoftchina.uas.office.qywx.service;

import com.usoftchina.uas.office.qywx.entity.CardLog;
import com.usoftchina.uas.office.service.AbstractService;
import org.springframework.jdbc.core.namedparam.BeanPropertySqlParameterSource;
import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
import org.springframework.stereotype.Service;

/**
 * @author yingp
 * @date 2020/2/17
 */
@Service
public class UasCardLogService extends AbstractService {

    public void save(CardLog log) {
        log.setCl_id(generateId("CARDLOG_SEQ"));
        SimpleJdbcInsert insert = new SimpleJdbcInsert(jdbcTemplate);
        insert.withTableName("CardLog").execute(new BeanPropertySqlParameterSource(log));
    }
}
