package com.ruoyi.system.service.md.impl;

import com.ruoyi.system.domain.md.JbWork;
import com.ruoyi.system.domain.md.JbWorkExample;
import com.ruoyi.system.listener.MyBaseService;
import com.ruoyi.system.mapper.md.JbWorkMapper;
import com.ruoyi.system.mapper.md.ext.ExtendJbWorkMapper;
import com.ruoyi.system.service.BaseServiceImpl;
import com.ruoyi.system.service.md.JbWorkService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
* JbWorkService实现
* Created by cesar.X on 2019/4/2.
*/
@Service
@MyBaseService
@Transactional
public class JbWorkServiceImpl extends BaseServiceImpl<JbWorkMapper, JbWork, JbWorkExample> implements JbWorkService {
    @Resource
    ExtendJbWorkMapper extendJbWorkMapper;

	@Override
    public int insertAndCreateId(JbWork jbWork){
        int i = extendJbWorkMapper.insertAndCreateId(jbWork);
        return i > 0 ? jbWork.getId() : i;
    }

}