qq_30709109 2017-06-21 07:45 采纳率: 0%
浏览 957

update时 bad sql 的语句错误

图片说明
图片说明

 ma.setMember_id(member_id);
                    ma.setAfter_fund(Double.valueOf(final_money.split(",")[5]));
                    ma.setMember_bonus(Double.valueOf(final_money.split(",")[0]));
                    ma.setGeneral_income(Double.valueOf(final_money.split(",")[0]));
                    ma.setReal_income(Double.valueOf(final_money.split(",")[1]));
                    ma.setRisk_fund(Double.valueOf(final_money.split(",")[4]));
                    ma.setSupport_fund(Double.valueOf(final_money.split(",")[3]));
                    ma.setMall_points(Double.valueOf(final_money.split(",")[6]));
                    ma.setTotal_deduction(Double.valueOf(final_money.split(",")[8]));
                    accountService.updateAccount(ma);
 <update id="update" parameterType="_acc">
        UPDATE member_account
        <set>
            <if test="member_name != null and member_name != ''">
                member_name = #{member_name},
            </if>
            <if test="member_grade != null and member_grade != ''">
                member_grade = #{member_grade},
            </if>
            <if test="registered_amount != null and registered_amount != ''">
                registered_amount = #{registered_amount},
            </if>
            <if test="member_bonus != null and member_bonus != ''">
                member_bonus = #{member_bonus},
            </if>
            <if test="after_fund != null and after_fund != ''">
                after_fund = #{after_fund},
            </if>
            <if test="risk_fund != null and risk_fund != ''">
                risk_fund = #{risk_fund},
            </if>
            <if test="support_fund != null and support_fund != ''">
                support_fund = #{support_fund},
            </if>
            <if test="cash_withdrawal1 != null and cash_withdrawal1 != ''">
                cash_withdrawal1 = #{cash_withdrawal1},
            </if>
            <if test="cash_withdrawal2 != null and cash_withdrawal2 != ''">
                cash_withdrawal2 = #{cash_withdrawal2},
            </if>
            <if test="general_income != null and general_income != ''">
                general_income = #{general_income},
            </if>
            <if test="real_income != null and real_income != ''">
                real_income = #{real_income},
            </if>
            <if test="total_deduction != null and total_deduction != ''">
                total_deduction = #{total_deduction},
            </if>
            <if test="mall_points != null and mall_points != ''">
                mall_points = #{mall_points},
            </if>
            <if test="billing_time != null and billing_time != ''">
                billing_time = #{billing_time},
            </if>
            <if test="the_actual_withdrawal != null and the_actual_withdrawal != ''">
                the_actual_withdrawal = #{the_actual_withdrawal},
            </if>
            <if test="registration_time != null and registration_time != ''">
                registration_time = #{registration_time},
            </if>
            <if test="zc_money != null and zc_money != ''">
                zc_money = #{zc_money},
            </if>
        </set>
        where member_id = #{member_id}
    </update>

  • 写回答

1条回答 默认 最新

  • m0_37288948 2017-06-22 03:35
    关注

    所有字段都为空? 导致语法错误?

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料