delete from t_enterprise_output_value where output_id IN #{outputId}
批量插入
功能:单个或批量插入数据,若数据已存在,则忽略
<insert id="saveBatchIgnoreInto" parameterType="java.util.List">
insert ignore into user(`user_Id`, `user_name`, `email`)
values
<foreach collection="userList" item="item" index="index"
separator=",">
(
#{item.userId,jdbcType=VARCHAR},
#{item.userName,jdbcType=VARCHAR},
#{item.eEmail,jdbcType=VARCHAR}
)
</foreach>
</insert>
查询用户表id的列表
<select id="queryIds" resultType="java.lang.String">
SELECT id
FROM user
</select>
查询不同的值的List
<select id="getIdByState" parameterType="java.lang.Integer" resultType="java.lang.String">
select distinct id
from student
where state=#{state}
</select>
更新语句
```java
LambdaUpdateWrapper<Student> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(Student::getId, id)
.set(Student::getState, state);
this.update(wrapper);
```rust
<update id="updateById" parameterType="cn.test.testDto">
update student
<set>
<if test="name != null">
stu_name = #{name},
</if>
<if test="age != null">
stu_age = #{age},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
and address in
<foreach item="addressitem" collection="addressList" open="(" separator="," close=")">
#{addressitem}
</foreach>
</update>