| | |
| | | SELECT COUNT(*) AS recordCount |
| | | FROM rm_open_close_valve_history his |
| | | LEFT JOIN pr_intake inta ON inta.id = his.intake_id |
| | | WHERE op_type = 1 |
| | | <where> |
| | | AND op_type = 1 |
| | | <if test = "clientId != null"> |
| | | AND his.client_id = #{clientId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--获取物理卡开关阀记录,微信小程序使用--> |
| | |
| | | '刷卡开阀' AS openType |
| | | FROM rm_open_close_valve_history his |
| | | LEFT JOIN pr_intake inta ON inta.id = his.intake_id |
| | | WHERE op_type = 1 |
| | | <where> |
| | | AND op_type = 1 |
| | | <if test = "clientId != null"> |
| | | AND his.client_id = #{clientId} |
| | | </if> |
| | | </where> |
| | | ORDER BY open_dt DESC |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | |
| | | SELECT COUNT(*) AS recordCount |
| | | FROM rm_open_close_valve_history his |
| | | LEFT JOIN pr_intake inta ON inta.id = his.intake_id |
| | | WHERE op_type = 8 |
| | | <where> |
| | | AND op_type = 8 |
| | | <if test = "clientId != null"> |
| | | AND his.client_id = #{clientId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--获取虚拟卡开关阀记录,微信小程序使用--> |
| | |
| | | END AS openType |
| | | FROM rm_open_close_valve_history his |
| | | LEFT JOIN pr_intake inta ON inta.id = his.intake_id |
| | | WHERE op_type = 8 |
| | | <where> |
| | | AND op_type = 8 |
| | | <if test = "clientId != null"> |
| | | AND his.client_id = #{clientId} |
| | | </if> |
| | | </where> |
| | | ORDER BY open_dt DESC |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |