- 对象属性
public class ActiveSendPushValueConfig {
private Integer id;
private Integer sendPushId;
private String value;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getSendPushId() {
return sendPushId;
}
public void setSendPushId(Integer sendPushId) {
this.sendPushId = sendPushId;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value == null ? null : value.trim();
}
}
- xml文件
<insert id="insertList" parameterType="java.util.List">
insert into active_send_push_value_config (send_push_id, value)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.sendPushId,jdbcType=INTEGER},
#{item.value,jdbcType=VARCHAR}
)
</foreach>
</insert>
- mapper文件
@Mapper
public interface ActiveSendPushValueConfigMapper {
int insertList(List<ActiveSendPushValueConfig> list);
}