1.修改批量更新员工主播的方式
2.JDBC连接添加allowMultiQueries=true参数
This commit is contained in:
@@ -28,4 +28,6 @@ public interface EmployeeHostsMapper extends BaseMapperX<EmployeeHostsDO> {
|
||||
IPage<EmployeeHostsDO> selectPageWithXMLWithSelf(IPage<EmployeeHostsDO> page, @Param("req") EmployeeHostsPageReqVO reqVO);
|
||||
|
||||
IPage<EmployeeHostsDO> selectPageWithXML(IPage<EmployeeHostsDO> page, @Param("req") EmployeeHostsPageReqVO reqVO);
|
||||
|
||||
void batchUpdate(ArrayList<EmployeeHostsDO> employeeHostsDOS);
|
||||
}
|
||||
@@ -154,7 +154,7 @@ public class EmployeeHostsServiceImpl implements EmployeeHostsService {
|
||||
EmployeeHostsDO updateObj = BeanUtils.toBean(employeeHostsSaveReqVO, EmployeeHostsDO.class);
|
||||
employeeHostsDOS.add(updateObj);
|
||||
}
|
||||
employeeHostsMapper.updateBatch(employeeHostsDOS);
|
||||
employeeHostsMapper.batchUpdate(employeeHostsDOS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -303,4 +303,15 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<update id="batchUpdate">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
UPDATE server_employee_hosts as seh
|
||||
SET
|
||||
user_id = #{item.userId,jdbcType=BIGINT},
|
||||
operation_status = #{item.operationStatus,jdbcType=INTEGER}
|
||||
WHERE
|
||||
seh.id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user