| | |
| | | <where> |
| | | <!--查询条件自行添加--> |
| | | 1=1 |
| | | <if test="p.recordId != null and p.recordId !=''"> |
| | | and record_id = #{p.recordId} |
| | | <if test="p.id != null and p.id !=''"> |
| | | and id = #{p.id} |
| | | </if> |
| | | <if test="p.lastRecordId != null and p.lastRecordId !=''"> |
| | | and last_record_id = #{p.lastRecordId} |
| | |
| | | <include refid="Column_List"/> |
| | | from consumption_record |
| | | <include refid="where"/> |
| | | order by record_id desc |
| | | order by id desc |
| | | limit 1 |
| | | </select> |
| | | |
| | |
| | | <include refid="Column_List"/> |
| | | from consumption_record |
| | | <include refid="where"/> |
| | | order by record_id desc |
| | | order by id desc |
| | | </select> |
| | | <!--定义根据-ConsumptionRecord当作查询条件返回对象集合--> |
| | | <select id="findDetailList" resultType="com.kidgrow.oprationcenter.model.ConsumptionRecord"> |
| | | SELECT * FROM `consumption_record` |
| | | where record_type=1 |
| | | and update_time is null |
| | | <if test="DetailList!=null and DetailList.size()>0"> |
| | | and pro_order_detail_id in |
| | | <foreach item="item" index="index" collection="DetailList" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | </mapper> |