package org.jeecg.modules.apply.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.common.base.entity.BaseTaskEntity;

import java.util.Date;

/**
 * @Author: yll
 * @Date: 2019/7/24 11:07
 */
@Mapper
public interface ApplyProcessMapper extends BaseMapper<BaseTaskEntity> {

    int updateProcessResult(@Param("tableName") String tableName,
                             @Param("id") String id,
                             @Param("applyStatus") String applyStatus,
                             @Param("result") String result,
                             @Param("completeTime") Date completeTime,
                             @Param("opinionStr") String opinionStr);

    int updateContactProcessResult(@Param("tableName") String tableName,
                            @Param("id") String id,
                            @Param("state") int state,
                            @Param("applyStatus") String applyStatus,
                            @Param("result") String result,
                            @Param("completeTime") Date completeTime,
                            @Param("opinionStr") String opinionStr);

    /**
     * 根据问题状态修改主表状态
     * @param state
     * @param id
     * @return
     */
    int updateContactState(@Param("state") int state,  @Param("id") String id);
}
