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> selectPageWithXMLWithSelf(IPage<EmployeeHostsDO> page, @Param("req") EmployeeHostsPageReqVO reqVO);
|
||||||
|
|
||||||
IPage<EmployeeHostsDO> selectPageWithXML(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);
|
EmployeeHostsDO updateObj = BeanUtils.toBean(employeeHostsSaveReqVO, EmployeeHostsDO.class);
|
||||||
employeeHostsDOS.add(updateObj);
|
employeeHostsDOS.add(updateObj);
|
||||||
}
|
}
|
||||||
employeeHostsMapper.updateBatch(employeeHostsDOS);
|
employeeHostsMapper.batchUpdate(employeeHostsDOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -303,4 +303,15 @@
|
|||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
@@ -44,7 +44,7 @@ spring:
|
|||||||
primary: master
|
primary: master
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://47.79.98.113:3326/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://47.79.98.113:3326/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&allowMultiQueries=true # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: wfn53400
|
password: wfn53400
|
||||||
# slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
# slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ spring:
|
|||||||
primary: master
|
primary: master
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&allowMultiQueries=true # MySQL Connector/J 8.X 连接的示例
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
|
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
|
||||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||||
@@ -65,11 +65,11 @@ spring:
|
|||||||
# password: SYSDBA001 # DM 连接的示例
|
# password: SYSDBA001 # DM 连接的示例
|
||||||
# username: root # OpenGauss 连接的示例
|
# username: root # OpenGauss 连接的示例
|
||||||
# password: Yudao@2024 # OpenGauss 连接的示例
|
# password: Yudao@2024 # OpenGauss 连接的示例
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
# slave: # 模拟从库,可根据自己需要修改
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
# lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
# username: root
|
||||||
password: 123456
|
# password: 123456
|
||||||
# tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!)
|
# tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!)
|
||||||
# url: jdbc:TAOS-RS://127.0.0.1:6041/ruoyi_vue_pro
|
# url: jdbc:TAOS-RS://127.0.0.1:6041/ruoyi_vue_pro
|
||||||
# driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
|
# driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
|
||||||
|
|||||||
Reference in New Issue
Block a user