| | |
| | | <result property="discountExplain" column="discount_explain" /> |
| | | <result property="discountAmount" column="discount_amount" /> |
| | | <result property="payType" column="pay_type" /> |
| | | <result property="scoreCount" column="score_count" /> |
| | | <result property="totalScoreCount" column="total_score_count" /> |
| | | </resultMap> |
| | | |
| | | <!-- 定义ShopOrderDetails 的复杂map --> |
| | |
| | | <result property="discountExplain" column="discount_explain" /> |
| | | <result property="discountAmount" column="discount_amount" /> |
| | | <result property="payType" column="pay_type" /> |
| | | <result property="scoreCount" column="score_count" /> |
| | | <result property="totalScoreCount" column="total_score_count" /> |
| | | |
| | | <!--产品信息--> |
| | | <association property="shopProduct" column="p_id" |
| | | select="com.matrix.system.shopXcx.dao.ShopProductDao.selectById"/> |
| | |
| | | s_title, |
| | | discount_explain, |
| | | discount_amount, |
| | | pay_type |
| | | pay_type, |
| | | score_count, |
| | | total_score_count |
| | | </sql> |
| | | |
| | | <!-- 属性sql --> |
| | |
| | | #{item.sTitle}, |
| | | #{item.discountExplain}, |
| | | #{item.discountAmount}, |
| | | #{item.payType} |
| | | #{item.payType}, |
| | | #{item.scoreCount}, |
| | | #{item.totalScoreCount} |
| | | </sql> |
| | | |
| | | <!-- where sql --> |
| | |
| | | </if> |
| | | <if test="(record.payType!=null and record.payType!='') or (record.payType!='' and record.payType==0) "> |
| | | and pay_type = #{record.payType} |
| | | </if> |
| | | |
| | | <if test="(record.scoreCount!=null and record.scoreCount!='') or (record.scoreCount!='' and record.scoreCount==0) "> |
| | | and score_count = #{record.scoreCount} |
| | | </if> |
| | | |
| | | <if test="(record.totalScoreCount!=null and record.totalScoreCount!='') or (record.totalScoreCount!='' and record.totalScoreCount==0) "> |
| | | and total_score_count = #{record.totalScoreCount} |
| | | </if> |
| | | </if> |
| | | |
| | |
| | | <if test="_parameter.containsKey('discountAmount')"> |
| | | discount_amount = #{discountAmount}, |
| | | </if> |
| | | |
| | | <if test="_parameter.containsKey('payType')"> |
| | | pay_type = #{payType}, |
| | | </if> |
| | | |
| | | <if test="_parameter.containsKey('scoreCount')"> |
| | | score_count = #{scoreCount}, |
| | | </if> |
| | | |
| | | <if test="_parameter.containsKey('totalScoreCount')"> |
| | | total_score_count = #{totalScoreCount}, |
| | | </if> |
| | | |
| | | </set> |
| | | WHERE id=#{id} |
| | | </update> |
| | |
| | | <if test="record.discountAmount != null "> |
| | | discount_amount = #{record.discountAmount}, |
| | | </if> |
| | | <if test="record.payType != null "> |
| | | pay_type = #{record.payType}, |
| | | </if> |
| | | <if test="record.scoreCount != null "> |
| | | score_count = #{record.scoreCount}, |
| | | </if> |
| | | <if test="record.totalScoreCount != null "> |
| | | total_score_count = #{record.totalScoreCount}, |
| | | </if> |
| | | </set> |
| | | WHERE id=#{record.id} |
| | | </update> |
| | | |
| | | <!-- 批量删除 --> |
| | | <delete id="deleteByIds" parameterType="java.util.List"> |
| | | delete from shop_order_details where id in |