| | |
| | | <result column="branch_id" property="branchId" /> |
| | | <result column="salesperson_id" property="salespersonId" /> |
| | | <result column="warehouse_id" property="warehouseId" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="clinic_name" property="clinicName" /> |
| | | <result column="person_charge_name" property="personChargeName" /> |
| | | <result column="phone" property="phone" /> |
| | |
| | | <result column="clinic_address" property="clinicAddress" /> |
| | | <result column="qualification_picture" property="qualificationPicture" /> |
| | | <result column="status" property="status" /> |
| | | <result column="audit_remark" property="auditRemark" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, branch_id, salesperson_id, warehouse_id, clinic_name, person_charge_name, phone, low_procurement_money, clinic_address, qualification_picture, status, create_time, update_time, create_by, update_by, disabled |
| | | id, branch_id, salesperson_id, warehouse_id,user_id, clinic_name, person_charge_name, phone, low_procurement_money, |
| | | clinic_address, qualification_picture, status,audit_remark, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TCrmClinicVO"> |
| | | SELECT |
| | | tcc.id, tcc.branch_id, tcc.salesperson_id, tcc.warehouse_id,tcc.user_id, tcc.clinic_name, tcc.person_charge_name, |
| | | tcc.phone, tcc.low_procurement_money, tcc.clinic_address, tcc.qualification_picture, tcc.status,tcc.audit_remark, |
| | | tcc.create_time, tcc.update_time, tcc.create_by, tcc.update_by, tcc.disabled, |
| | | tcb.branch_name, tcs.salesperson_name, tcw.warehouse_name |
| | | from t_crm_clinic tcc |
| | | left join t_crm_branch tcb on tcc.branch_id = tcb.id |
| | | left join t_crm_salesperson tcs on tcc.salesperson_id = tcs.id |
| | | left join t_crm_warehouse tcw on tcc.warehouse_id = tcw.id |
| | | <where> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and tcc.clinic_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tcc.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tcc.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.branchId != null and query.branchId != ''"> |
| | | and tcc.branch_id = #{query.branchId} |
| | | </if> |
| | | <if test="query.salespersonId != null and query.salespersonId != ''"> |
| | | and tcc.salesperson_id = #{query.salespersonId} |
| | | </if> |
| | | <!-- <if test="query.performanceStatus != null">--> |
| | | <!-- and tcc.salesperson_id = #{query.performanceStatus}--> |
| | | <!-- </if>--> |
| | | <if test="query.status != null"> |
| | | and tcc.status = #{query.status} |
| | | </if> |
| | | AND tcc.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tcc.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |