|
|
@@ -28,14 +28,18 @@
|
|
|
<result property="importMemberId" column="import_member_id" />
|
|
|
<result property="buyCount" column="buy_count" />
|
|
|
<result property="claimStatus" column="claim_status" />
|
|
|
+ <result property="completeStatus" column="complete_status" />
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsCompanyCustomerVo">
|
|
|
select id, customer_name, sex, age, address, phone, filing_time,
|
|
|
- company_user_id, company_user_name, appointment_time, doctor_id, doctor_name,
|
|
|
- present_illness, current_medication, allergy_history,
|
|
|
- create_by, create_time, update_by, update_time, remark, del_flag, import_member_id,
|
|
|
- buy_count,claim_status
|
|
|
+ company_user_id, company_user_name, appointment_time, doctor_id, doctor_name,
|
|
|
+ present_illness, current_medication, allergy_history,
|
|
|
+ create_by, create_time, update_by, update_time, remark, del_flag, import_member_id,
|
|
|
+ buy_count, claim_status,
|
|
|
+ complete_status, dept_id, dept_name
|
|
|
from fs_company_customer
|
|
|
</sql>
|
|
|
|
|
|
@@ -63,18 +67,15 @@
|
|
|
<if test="endTime != null and endTime != ''">
|
|
|
and filing_time <= #{endTime}
|
|
|
</if>
|
|
|
- <!-- 创建时间(新增) -->
|
|
|
<if test="beginCreateTime != null and beginCreateTime != ''">
|
|
|
and create_time >= #{beginCreateTime}
|
|
|
</if>
|
|
|
<if test="endCreateTime != null and endCreateTime != ''">
|
|
|
and create_time <= #{endCreateTime}
|
|
|
</if>
|
|
|
- <!-- 已购筛选 -->
|
|
|
<if test="purchased != null and purchased == true">
|
|
|
and buy_count > 0
|
|
|
</if>
|
|
|
- <!-- 购买次数范围 -->
|
|
|
<if test="minBuyCount != null">
|
|
|
and buy_count >= #{minBuyCount}
|
|
|
</if>
|
|
|
@@ -84,6 +85,9 @@
|
|
|
<if test="importMemberId != null">
|
|
|
and import_member_id = #{importMemberId}
|
|
|
</if>
|
|
|
+ <if test="completeStatus != null">
|
|
|
+ and complete_status = #{completeStatus}
|
|
|
+ </if>
|
|
|
order by filing_time desc
|
|
|
</select>
|
|
|
|
|
|
@@ -140,6 +144,9 @@
|
|
|
<if test="importMemberId != null">import_member_id,</if>
|
|
|
<if test="buyCount != null">buy_count,</if>
|
|
|
<if test="claimStatus != null">claim_status,</if>
|
|
|
+ <if test="completeStatus != null">complete_status,</if>
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="deptName != null">dept_name,</if>
|
|
|
create_time
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -162,13 +169,16 @@
|
|
|
<if test="importMemberId != null">#{importMemberId},</if>
|
|
|
<if test="buyCount != null">#{buyCount},</if>
|
|
|
<if test="claimStatus != null">#{claimStatus},</if>
|
|
|
+ <if test="completeStatus != null">#{completeStatus},</if>
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="deptName != null">#{deptName},</if>
|
|
|
sysdate()
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
- <!-- 批量插入,支持 buy_count,若未传入则默认 0 -->
|
|
|
+ <!-- 批量插入-->
|
|
|
<insert id="insertBatchFsCompanyCustomer">
|
|
|
- INSERT IGNORE INTO fs_company_customer (customer_name, address, phone, create_time, import_member_id,claim_status)
|
|
|
+ INSERT IGNORE INTO fs_company_customer (customer_name, address, phone, create_time, import_member_id, claim_status)
|
|
|
VALUES
|
|
|
<foreach collection="companyCustomers" item="item" separator=",">
|
|
|
(#{item.customerName}, #{item.address}, #{item.phone}, #{item.createTime}, #{item.importMemberId}, #{item.claimStatus})
|
|
|
@@ -196,6 +206,9 @@
|
|
|
<if test="importMemberId != null">import_member_id = #{importMemberId},</if>
|
|
|
<if test="buyCount != null">buy_count = #{buyCount},</if>
|
|
|
<if test="claimStatus != null">claim_status = #{claimStatus},</if>
|
|
|
+ <if test="completeStatus != null">complete_status = #{completeStatus},</if>
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
update_time = sysdate()
|
|
|
</set>
|