| | |
| | | <!-- 保存物品次数信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveResourceStoreTimesInfo" parameterType="Map"> |
| | | insert into resource_store_times( |
| | | price,apply_order_id,store_id,stock,res_id,times_id |
| | | price,apply_order_id,store_id,stock,res_code,times_id |
| | | ) values ( |
| | | #{price},#{applyOrderId},#{storeId},#{stock},#{resId},#{timesId} |
| | | #{price},#{applyOrderId},#{storeId},#{stock},#{resCode},#{timesId} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <!-- 查询物品次数信息 add by wuxw 2018-07-03 --> |
| | | <select id="getResourceStoreTimesInfo" parameterType="Map" resultType="Map"> |
| | | select t.price,t.apply_order_id,t.apply_order_id applyOrderId,t.status_cd,t.status_cd |
| | | statusCd,t.store_id,t.store_id storeId,t.stock,t.res_id,t.res_id resId,t.times_id,t.times_id timesId |
| | | statusCd,t.store_id,t.store_id storeId,t.stock,t.res_code,t.res_code resCode,t.times_id, |
| | | t.times_id timesId,t.create_time createTime,(t.price * t.stock) totalPrice |
| | | from resource_store_times t |
| | | where 1 =1 |
| | | <if test="price !=null and price != ''"> |
| | |
| | | <if test="hasStock !=null and hasStock != ''"> |
| | | and t.stock > 0 |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | <if test="resCode !=null and resCode != ''"> |
| | | and t.res_code= #{resCode} |
| | | </if> |
| | | <if test="timesId !=null and timesId != ''"> |
| | | and t.times_id= #{timesId} |
| | |
| | | <if test="stock !=null and stock != ''"> |
| | | , t.stock= #{stock} |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | , t.res_id= #{resId} |
| | | <if test="resCode !=null and resCode != ''"> |
| | | , t.res_code= #{resCode} |
| | | </if> |
| | | where 1=1 |
| | | <if test="timesId !=null and timesId != ''"> |
| | |
| | | <if test="hasStock !=null and hasStock != ''"> |
| | | and t.stock > 0 |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | <if test="resCode !=null and resCode != ''"> |
| | | and t.res_code= #{resCode} |
| | | </if> |
| | | <if test="timesId !=null and timesId != ''"> |
| | | and t.times_id= #{timesId} |