| | |
| | | <!-- 保存访客信息信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessVisitInfo" parameterType="Map"> |
| | | insert into business_visit_info( |
| | | departure_time,v_name,visit_gender,owner_id,user_id,v_id,visit_time,phone_number,operate,visit_case,community_id,b_id |
| | | departure_time,v_name,visit_gender,owner_id,user_id,v_id,phone_number,operate,visit_case,community_id,b_id |
| | | ) values ( |
| | | #{departureTime},#{vName},#{visitGender},#{ownerId},#{userId},#{vId},NOW(),#{phoneNumber},#{operate},#{visitCase},#{communityId},#{bId} |
| | | #{departureTime},#{vName},#{visitGender},#{ownerId},#{userId},#{vId},#{phoneNumber},#{operate},#{visitCase},#{communityId},#{bId} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | from business_visit_info t |
| | | where 1 =1 |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | <if test="departureTime !=null "> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | |
| | | <if test="vId !=null and vId != ''"> |
| | | and t.v_id= #{vId} |
| | | </if> |
| | | <if test="visitTime !=null and visitTime != ''"> |
| | | <if test="visitTime !=null "> |
| | | and t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | |
| | | ) select |
| | | t.departure_time,t.v_name,'0',t.visit_gender,t.owner_id,t.user_id,t.v_id,t.visit_time,t.phone_number,t.visit_case,t.community_id,t.b_id |
| | | from business_visit_info t where 1=1 |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | <if test="departureTime !=null "> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | |
| | | <if test="vId !=null and vId != ''"> |
| | | and t.v_id= #{vId} |
| | | </if> |
| | | <if test="visitTime !=null and visitTime != ''"> |
| | | <if test="visitTime !=null "> |
| | | and t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | |
| | | phoneNumber,t.visit_case,t.visit_case visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | from s_visit_info t |
| | | where 1 =1 |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | <if test="departureTime !=null "> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | |
| | | <if test="vId !=null and vId != ''"> |
| | | and t.v_id= #{vId} |
| | | </if> |
| | | <if test="visitTime !=null and visitTime != ''"> |
| | | <if test="visitTime !=null "> |
| | | and t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | <if test="departureTime !=null "> |
| | | , t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | |
| | | <if test="userId !=null and userId != ''"> |
| | | , t.user_id= #{userId} |
| | | </if> |
| | | <if test="visitTime !=null and visitTime != ''"> |
| | | <if test="visitTime !=null "> |
| | | , t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | |
| | | select count(1) count |
| | | from s_visit_info t |
| | | where 1 =1 |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | <if test="departureTime !=null "> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | |
| | | <if test="vId !=null and vId != ''"> |
| | | and t.v_id= #{vId} |
| | | </if> |
| | | <if test="visitTime !=null and visitTime != ''"> |
| | | <if test="visitTime !=null "> |
| | | and t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |