zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package org.jeecg.modules.activiti.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import org.jeecg.common.base.entity.ActBusiness;
import org.jeecg.common.system.vo.LoginUser;
 
import java.util.List;
import java.util.Map;
 
/**
 * @Description: 流程业务扩展表
 * @Author: pmc
 * @Date:   2020-03-30
 * @Version: V1.0
 */
public interface ActBusinessMapper extends BaseMapper<ActBusiness> {
    @Select("select * from ${tableName} where id = #{tableId}")
    Map<String,Object> getBusiData(@Param("tableId") String tableId, @Param("tableName") String tableName);
    @Select("select * from ${tableName} where id in (${tableIdsSql})")
    List<Map<String,Object>> getBusiDatas(@Param("tableIdsSql") String tableIdsSql, @Param("tableName") String tableName);
 
    @Insert("${sql}")
    int insertBusiData(@Param("sql") String sql);
 
    @Update("${sql}")
    int updateBusiData(@Param("sql") String sql);
 
    @Delete("delete from ${tableName} where id = #{tableId}")
    int deleteBusiData(@Param("tableId") String tableId, @Param("tableName") String tableName);
 
    @Select("SELECT ahi.USER_ID_ FROM ACT_HI_IDENTITYLINK ahi\n" +
            "      WHERE TYPE_ = #{type} AND TASK_ID_ = #{taskId}\n" +
            "      LIMIT 1")
    List<String> findUserIdByTypeAndTaskId(@Param("type") String type, @Param("taskId") String taskId);
 
    @Insert("INSERT INTO ACT_HI_IDENTITYLINK (ID_, TYPE_, USER_ID_, TASK_ID_, PROC_INST_ID_)\n" +
            "      VALUES (#{id}, #{type}, #{userId}, #{taskId}, #{procInstId})")
    int insertHI_IDENTITYLINK(@Param("id") String id, @Param("type")String type, @Param("userId")String userId, @Param("taskId")String taskId, @Param("procInstId")String procInstId);
 
    @Select("SELECT ari.ID_ FROM ACT_RU_IDENTITYLINK ari\n" +
            "      WHERE TYPE_ = #{type} AND TASK_ID_ = #{taskId}")
    List<String> selectIRunIdentity(@Param("taskId")String taskId,@Param("type") String type);
 
    @Update("update ${tableName} set act_status = #{actStatus} where id = #{tableId}")
    int updateBusinessStatus(@Param("tableName")String tableName, @Param("tableId")String tableId, @Param("actStatus")String actStatus);
 
    @Select("select id from act_z_business where proc_def_id in " +
            "(select id from act_z_process where type_id in" +
            "(select id from sys_category where code like '${type}%')" +
            ")")
    List<String> listByTypeApp(@Param("type")String type);
 
    @Select(
            "select id from act_z_process where type_id in" +
            "(select id from sys_category where code like '${type}%')")
    List<String> proc_def_idListByType(@Param("type")String type);
    @Select(
            "select deployment_id from act_z_process where type_id in" +
            "(select id from sys_category where code like '${type}%')")
    List<String> deployment_idListByType(@Param("type")String type);
 
    @Select("select * from  sys_user  where (realname like '%${searchVal}%' or username like '%${searchVal}%') and del_flag = 0")
    List<LoginUser> getUsersByName(@Param("searchVal") String searchVal);
}