mybatis动态sql循环插值和设值


  
  insert into pj_billstock
  
    
      GUID,
    
    
      F_REGICODE,
    
    
      F_SUBJECTNO,
    
    
      F_ENTEGUID,
    
    
      F_BISTGUID,
    
    
      USERGUID,
    
    
      USERNAME,
    
    
      F_BITYCODE,
    
    
      STARTNO,
    
    
      ENDNO,
    
    
      SHEETS,
    
    
      BINDING,
    
    
      COPIESPERSHEET,
    
    
      SHEETSPERBOOK,
    
    
      PRESSPRICE,
    
    
      WHOLESALEPRICE,
    
    
      RETAILPRICE,
    
    
      PRICE,
    
    
      PERMONEY,
    
    
      SYN_FLAG,
    
    
      flag,
    
    
      REMARK,
    
    
      ENTECODE,
    
    
      SEAL,
    
    
      DEADLINE,
    
  
  
    
      #{guid,jdbcType=BIGINT},
    
    
      #{fRegicode,jdbcType=VARCHAR},
    
    
      #{fSubjectno,jdbcType=VARCHAR},
    
    
      #{fEnteguid,jdbcType=VARCHAR},
    
    
      #{fBistguid,jdbcType=DECIMAL},
    
    
      #{userguid,jdbcType=DECIMAL},
    
    
      #{username,jdbcType=VARCHAR},
    
    
      #{fBitycode,jdbcType=VARCHAR},
    
    
      #{startno,jdbcType=VARCHAR},
    
    
      #{endno,jdbcType=VARCHAR},
    
    
      #{sheets,jdbcType=DECIMAL},
    
    
      #{binding,jdbcType=CHAR},
    
    
      #{copiespersheet,jdbcType=DECIMAL},
    
    
      #{sheetsperbook,jdbcType=DECIMAL},
    
    
      #{pressprice,jdbcType=DECIMAL},
    
    
      #{wholesaleprice,jdbcType=DECIMAL},
    
    
      #{retailprice,jdbcType=DECIMAL},
    
    
      #{price,jdbcType=DECIMAL},
    
    
      #{permoney,jdbcType=DECIMAL},
    
    
      #{synFlag,jdbcType=CHAR},
    
    
      #{flag,jdbcType=CHAR},
    
    
      #{remark,jdbcType=VARCHAR},
    
    
      #{entecode},
    
    
      #{seal},
    
    
      #{deadline},
    
  


  
  update pj_billstock
  
    
      F_REGICODE = #{fRegicode,jdbcType=VARCHAR},
    
    
      F_SUBJECTNO = #{fSubjectno,jdbcType=VARCHAR},
    
    
      F_ENTEGUID = #{fEnteguid,jdbcType=VARCHAR},
    
    
      F_BISTGUID = #{fBistguid,jdbcType=DECIMAL},
    
    
      USERGUID = #{userguid,jdbcType=DECIMAL},
    
    
      USERNAME = #{username,jdbcType=VARCHAR},
    
    
      F_BITYCODE = #{fBitycode,jdbcType=VARCHAR},
    
    
      STARTNO = #{startno,jdbcType=VARCHAR},
    
    
      ENDNO = #{endno,jdbcType=VARCHAR},
    
    
      SHEETS = #{sheets,jdbcType=DECIMAL},
    
    
      BINDING = #{binding,jdbcType=CHAR},
    
    
      COPIESPERSHEET = #{copiespersheet,jdbcType=DECIMAL},
    
    
      SHEETSPERBOOK = #{sheetsperbook,jdbcType=DECIMAL},
    
    
      PRESSPRICE = #{pressprice,jdbcType=DECIMAL},
    
    
      WHOLESALEPRICE = #{wholesaleprice,jdbcType=DECIMAL},
    
    
      RETAILPRICE = #{retailprice,jdbcType=DECIMAL},
    
    
      PRICE = #{price,jdbcType=DECIMAL},
    
    
      PERMONEY = #{permoney,jdbcType=DECIMAL},
    
    
      SYN_FLAG = #{synFlag,jdbcType=CHAR},
    
    
      flag = #{flag,jdbcType=CHAR},
    
    
      REMARK = #{remark,jdbcType=VARCHAR},
    
    
      ENTECODE = #{entecode},
    
    
      SEAL = #{seal},
    
    
      DEADLINE = #{deadline},
    
      VERSION = VERSION + 1
  
  where GUID = #{guid,jdbcType=BIGINT}

你可能感兴趣的:(mybatis,sql,数据库)