Dao:public Integer batchInsert(@Param(“list”) List list);
INSERT INTO td_tt_register( id, provincename, cityname, areaname, realname, idcard, phone, bankname, banknum, bankbranch, affiliatedcompany, rolename, update_time ) SELECT #{a.id}, #{a.provincename}, #{a.cityname}, #{a.areaname}, #{a.realname}, #{a.idcard}, #{a.phone}, #{a.bankname}, #{a.banknum}, #{a.bankbranch}, #{a.affiliatedcompany}, #{a.rolename}, now() from dualDao:int insertAllInfo(@Param(“tdPayInfoList”) List tdPayInfoList);
INSERT INTO td_pay_info(
id,
sysName,
sysCardNo,
sysMobile,
sysBankName,
sysBankCode,
sysCity,
sysCounty,
applyTime,
applyMoney,
orderCodes,
payState
) VALUES
(
#{a.id},
#{a.sysname},
#{a.syscardno},
#{a.sysmobile},
#{a.sysbankname},
#{a.sysbankcode},
#{a.syscity},
#{a.syscounty},
#{a.applytime},
#{a.applymoney},
#{a.orderCodes},
#{a.payState}
)
Dao:public int updateConfirm(@Param("idList") List<String> idList);
<update id="updateConfirm">
update td_order_cj SET yh_qrFlag = '1',update_date = now()
where id in
<foreach collection="idList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</update>
Dao: public List<TdOrderInfoNews> findAllListByIds(@Param("idList") List<String> idList);
<select id="findAllListByIds" resultType="TdOrderInfoNews">
SELECT
<include refid="tdOrderInfoNewColumns"/>
,b.money as money
,b.qrFlag AS qrFlag
,b.yh_qrFlag AS yhQrFlag
,b.cjtype as cjType
,b.id as cjid
,b.ycyy AS ycyy
,b.xf_time as xfTime
FROM `td_order_cj` b LEFT JOIN `td_order_info_new` a ON b.`order_no` = a.id
where b.id in
<foreach item="item" index="index" collection="idList"
open="(" separator="," close=")">
#{item}
</foreach>
</select>
Dao:int updateOrderMaterials(@Param(“wzOrderList”) List wzOrderList);
UPDATE wc_whlist_d SET
num = (num-#{item.number}),
update_date = now(),
update_by = #{item.updateBy.id}
WHERE orgid = #{item.orgPid}
AND s_id = #{item.lId}
AND price = #{item.price}