package com.newfiber.api.pc.service.impl; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.newfiber.api.pc.dao.TaskStateMapper; import com.newfiber.api.pc.model.entity.TaskState; import com.newfiber.api.pc.service.TaskStateService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * 任务 * @Author:zhz * @CreateDate:2020/12/1 14:50 * @Description: */ @Service @Transactional(rollbackFor = Exception.class) public class TaskStateServiceImpl extends ServiceImpl<TaskStateMapper, TaskState> implements TaskStateService { @Autowired private TaskStateMapper taskStateMapper; @Override public int updateTaskState(Long taskId, String user, int state) { return taskStateMapper.updateTaskState(taskId,user,state); } @Override public Boolean selectByTaskIdAndUserName(Long taskId, String nextUser) { TaskState taskState = taskStateMapper.selectByTaskIdAndUserName(taskId,nextUser); if(taskState!=null){ return true; } return false; } }