{"id":6905,"date":"2022-08-12T11:14:56","date_gmt":"2022-08-12T03:14:56","guid":{"rendered":"http:\/\/123.57.164.21\/?p=6905"},"modified":"2022-08-12T11:14:56","modified_gmt":"2022-08-12T03:14:56","slug":"mybatis%e4%b8%ad-if-%e6%a0%87%e7%ad%be-test-%e7%ad%89%e4%ba%8e%e7%9a%84%e6%9d%a1%e4%bb%b6%e6%80%8e%e4%b9%88%e5%86%99","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=6905","title":{"rendered":"mybatis\u4e2d if \u6807\u7b7e test \u7b49\u4e8e\u7684\u6761\u4ef6\u600e\u4e48\u5199"},"content":{"rendered":"\n<p>\u7ecf\u5e38\u4e2d\u5728 mybatis \u4f7f\u7528&lt;if test=&#8221;aa != &#8216;\u503c&#8217; \u00a0&#8220;> \u5f53aa\u4e0d\u7b49\u4e8e\u67d0\u4e2a\u503c\u3002<\/p>\n\n\n\n<p>\u90a3\u4e48\u7b49\u4e8e\u600e\u4e48\u5199\u5462?<\/p>\n\n\n\n<p><strong>\u6ce8\u610f<\/strong> \u8981\u60f3\u4f7f\u7528 == \u00a0\u00a0<strong>\u4ec5\u4ec5\u9700\u8981\u5c06\u53cc\u5f15\u53f7\u548c\u5355\u5f15\u53f7\u7684\u4f4d\u7f6e\u6362\u4e00\u4e0b\u5373\u53ef!!!\u00a0<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;update id=\"updateGoodsShelf\" parameterType=\"java.lang.String\">\n        update\n        integral_goods\n        set\n        &lt;if test='shelfFlag == \"1\"'>\n            shelf_flag = ${@com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods@SHELF_ON}\n        &lt;\/if>\n        &lt;if test='shelfFlag == \"0\"'>\n            shelf_flag = ${@com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods@SHELF_OFF}\n        &lt;\/if>\n        where\n        uid\n        IN\n        &lt;foreach collection=\"list\" item=\"item\" index=\"index\" open=\"(\" separator=\",\" close=\")\">\n            #{item}\n        &lt;\/foreach>\n    &lt;\/update><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7ecf\u5e38\u4e2d\u5728 mybatis \u4f7f\u7528&lt;if test=&#8221;aa != &#8216;\u503c&#8217; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/6905"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6905"}],"version-history":[{"count":2,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/6905\/revisions"}],"predecessor-version":[{"id":6907,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/6905\/revisions\/6907"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}