zoukankan      html  css  js  c++  java
  • 备忘代码

    用 Java正则中环视去移除JSON字符串中多余的”

    1     public static void main(String[] args) {
    2         String a = "{"color":"7.3"双耳汤盘-绿色","warename":"瓷彩美(CECEME)创意陶瓷盘子 个性双耳汤盘家用菜盘深盘西餐盘牛排盘早餐盘沙拉盘 7.3"双耳汤盘-绿色 盘子"}";
    3         JSONObject jsonObject = JSON.parseObject(a);
    4         System.out.println(jsonObject);
    5     }

    mybatis 中 批量插入更新语句

        <insert id="batchInsertOrUpdate" parameterType="com.report.entity.po.ReportPO">
            insert into report
            (
            column_1,
            column_2,
            column_3
            )
            values
            <foreach collection="list" item="item" index="index" separator="," >
                (
                #{item.column1},
                #{item.column2},
                #{item.column3}
            ON DUPLICATE KEY UPDATE
            column_1 = values(column_1)

    </insert>

     mybatis 更新语句

        <update id="update" parameterType="com.report.Update">
            update report
            set column_1 = #{condition.column1}
            where 1 = 1
            <if test="condition != null and condition.column2 != null">
                and column_2 = #{condition.column2}
            </if>
            <if test="condition != null and condition.column3 != null">
                and column_3 = #{condition.column3}
            </if>
        </update>
  • 相关阅读:
    ASP.NET MVC 动态加载图像
    ASP.NET:以域用户身份访问网络资源
    ASP.NET MVC 动态加载 *.ascx
    4月
    3月
    2月
    每天充点小能量
    每天进步一点点
    FreeMarker标签与使用
    eclipse启动tomcat, http://localhost:8080无法访问
  • 原文地址:https://www.cnblogs.com/sanmubird/p/11445033.html
Copyright © 2011-2022 走看看