package com.bonus.sgzb.app.service.impl;

import com.bonus.sgzb.common.core.utils.DateUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.bonus.sgzb.base.api.domain.TmTask;
import com.bonus.sgzb.app.mapper.TmTaskMapper;
import com.bonus.sgzb.app.service.TmTaskService;
/**
* Description:
* @Author 阮世耀
* @Create 2023/12/13 15:14
* @Version 1.0
*/

@Service
public class TmTaskServiceImpl implements TmTaskService{

    @Resource
    private TmTaskMapper tmTaskMapper;

    @Override
    public String genderLeaseCode() {
        String code = "001";
        return "L" + DateUtils.getDate() + "-" + code;
    }

    @Override
    public int deleteByPrimaryKey(Long taskId) {
        return tmTaskMapper.deleteByPrimaryKey(taskId);
    }

    @Override
    public int createTask(TmTask record) {
        return tmTaskMapper.insert(record);
    }

    @Override
    public int insertOrUpdate(TmTask record) {
        return tmTaskMapper.insertOrUpdate(record);
    }

    @Override
    public int insertOrUpdateSelective(TmTask record) {
        return tmTaskMapper.insertOrUpdateSelective(record);
    }

    @Override
    public int insertSelective(TmTask record) {
        return tmTaskMapper.insertSelective(record);
    }

    @Override
    public TmTask selectByPrimaryKey(Long taskId) {
        return tmTaskMapper.selectByPrimaryKey(taskId);
    }

    @Override
    public int updateByPrimaryKeySelective(TmTask record) {
        return tmTaskMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TmTask record) {
        return tmTaskMapper.updateByPrimaryKey(record);
    }

    @Override
    public int updateBatch(List<TmTask> list) {
        return tmTaskMapper.updateBatch(list);
    }

    @Override
    public int updateBatchSelective(List<TmTask> list) {
        return tmTaskMapper.updateBatchSelective(list);
    }

    @Override
    public int batchInsert(List<TmTask> list) {
        return tmTaskMapper.batchInsert(list);
    }

}
