luoyb
2021-02-17 a7ca32e775e76b4e4667d9f9d76739a73fe68ba3
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
package ${basePackage}.${mapperPackage};
 
import ${basePackage}.${entityPackage}.${className};
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
 
import java.util.List;
 
/**
*
* name:${className}
* package:${basePackage}.${controllerPackage}
* description:${tableComment}实体Mapper
*
* @author ${author}
* @date ${date}
* @since JDK1.8
*/
public interface ${className}Mapper extends BaseMapper<${className}> {
/**
*
* 根据Id批量逻辑删除记录
*
* date ${author}
* @author: ${date}
* @param list 待删除Id
* @param operatorId 操作员Id
* @return void
*/
@Update("<script> " +
    " UPDATE ${tableName} SET delFlag = 1,\n" +
    " modifyTime = NOW(),\n" +
    " modifier = #{operatorId}, \n" +
    " version = version+1 \n" +
    " WHERE badId IN \n" +
    "        <foreach item=\"delId\" collection=\"list\" open=\"(\" close=\")\" separator=\",\">\n" +
    "            #{delId}\n" +
    "        </foreach>\n" +
    "</script>")
void logicDeleteByIds(@Param("list") List<String> list,@Param("operatorId") String operatorId);
}