package cn.stylefeng.guns.zjxl.service;

import cn.stylefeng.guns.zjxl.dao.ZjxlBasicInfoDao;
import cn.stylefeng.guns.zjxl.model.ZjxlBasicInfo;
import cn.stylefeng.guns.zjxlUtil.BaseService;
import com.sun.org.apache.regexp.internal.RE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/***
 * @ClassName: ZjxlBasicInfoService
 * @Description:
 * @Auther: shi kejing
 * @Date: 2020/11/3 15:57
 */
@Component
@Transactional(rollbackFor = Exception.class)
public class ZjxlBasicInfoService extends BaseService {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Autowired
    private ZjxlBasicInfoDao basicInfoDao;

    public String addBasicInfo(ZjxlBasicInfo basicInfo){
        basicInfo.setBasicInfoId(getCode());
        ZjxlBasicInfo info = basicInfoDao.save(basicInfo);
        return info.getBasicInfoId();
    }
}
