@Update({
"<script>",
"UPDATE service SET",
"`gateway_port`=#{gatewayPort}, ",
"`actor_url`=#{actorUrl}, ",
"`backend_config`=#{backendConfig}, ",
"`ace_config`=#{aceConfig}, ",
"`service_url`=#{serviceUrl}, ",
"`debug_port`=#{debugPort}, ",
"`debug_url`=#{debugUrl}",
"<if test='service.lsPort != null'>",
",`ls_port` = #{lsPort}",
"</if>",
"WHERE id=#{id}",
"</script>"
})
int updateResource(ServerPO service);
解决措施:
加上@Param注解
@Update({
"<script>",
"UPDATE service SET",
"`gateway_port`=#{gatewayPort}, ",
"`actor_url`=#{actorUrl}, ",
"`backend_config`=#{backendConfig}, ",
"`ace_config`=#{aceConfig}, ",
"`service_url`=#{serviceUrl}, ",
"`debug_port`=#{debugPort}, ",
"`debug_url`=#{debugUrl}",
"<if test='service.lsPort != null'>",
",`ls_port` = #{lsPort}",
"</if>",
"WHERE id=#{id}",
"</script>"
})
int updateResource(@Param("service") ServerPO service);