{"id":660,"date":"2022-09-27T10:36:56","date_gmt":"2022-09-27T02:36:56","guid":{"rendered":"https:\/\/22pig.com\/?p=660"},"modified":"2022-09-27T10:36:56","modified_gmt":"2022-09-27T02:36:56","slug":"mybatis%e6%89%b9%e9%87%8f%e6%8f%92%e5%85%a5%e6%88%96%e6%9b%b4%e6%96%b0","status":"publish","type":"post","link":"http:\/\/22pig.com\/?p=660","title":{"rendered":"Mybatis\u6279\u91cf\u63d2\u5165\u6216\u66f4\u65b0"},"content":{"rendered":"<p>1 \u6279\u91cf\u66f4\u65b0<\/p>\n<p>&lt;foreach collection=&#8221;attendingUsrList&#8221; item=&#8221;model&#8221; separator=&#8221;;&#8221;&gt;<br \/>\nUPDATE parties SET attending_user_count = #{model.attending_count}<br \/>\nWHERE fb_party_id = #{model.eid}<br \/>\n&lt;\/foreach&gt;<br \/>\n2 \u6279\u91cf\u63d2\u5165<\/p>\n<p>&lt;insert id=&#8221;insertAccountabilityUsers&#8221; parameterType=&#8221;AccountabilityUsersModel&#8221; useGeneratedKeys=&#8221;false&#8221;&gt;<br \/>\nINSERT INTO accountability_users<br \/>\n(<br \/>\naccountability_user_id, accountability_id, to_username,<br \/>\nrecord_status, created_by, created_at, updated_by, updated_at<br \/>\n)<br \/>\nVALUES<br \/>\n&lt;foreach collection=&#8221;usersList&#8221; item=&#8221;model&#8221; separator=&#8221;,&#8221;&gt;<br \/>\n(<br \/>\n#{model.accountabilityUserId}, #{model.accountabilityId}, #{model.toUsername},<br \/>\n&#8216;A&#8217;, #{model.createdBy}, #{model.createdAt}, #{model.updatedBy}, #{model.updatedAt}<br \/>\n)<br \/>\n&lt;\/foreach&gt;<br \/>\n&lt;\/insert&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 \u6279\u91cf\u66f4\u65b0 &lt;foreach collection=&#8221;attendingUsrList&#8221; item=&#8221;model&#8221; separator=&#8221;;&#8221;&gt; UPDATE parties SET attending_user_count = #{model.attending_count} WHERE fb_party_id = #{model.eid} &lt;\/foreach&gt; 2 \u6279\u91cf\u63d2\u5165 &lt;insert id=&#8221;insertAccountabilityUsers&#8221; parameterType=&#8221;AccountabilityUsersModel&#8221; useGeneratedKeys=&#8221;false&#8221;&gt; INSERT INTO accountability_users ( accountability_user_id, accountability_id, to_username, record_status, created_by, created_at, updated_by, updated_at ) VALUES &lt;foreach collection=&#8221;usersList&#8221; item=&#8221;model&#8221; separator=&#8221;,&#8221;&gt; ( #{model.accountabilityUserId}, #{model.accountabilityId}, #{model.toUsername}, &#8216;A&#8217;, #{model.createdBy}, #{model.createdAt}, #{model.updatedBy}, #{model.updatedAt} ) &lt;\/foreach&gt; &lt;\/insert&gt;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-660","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts\/660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=660"}],"version-history":[{"count":0,"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts\/660\/revisions"}],"wp:attachment":[{"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=660"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}