市场活动增加类型
This commit is contained in:
parent
4298b83f94
commit
b68c0e772a
|
|
@ -138,6 +138,7 @@ public class ViewMeetingApi extends BaseController {
|
|||
@ApiParam(required = false, value = "客户id") @RequestParam(required = false) String dealersId,
|
||||
@ApiParam(required = false, value = "客户名称") @RequestParam(required = false) String distributorName,
|
||||
@ApiParam(required = false, value = "业务员id") @RequestParam(required = false) String staffId,
|
||||
@ApiParam(required = false, value = "客户档案来源 1.经销商档案 2.种植户档案") @RequestParam(required = false) String sourceType,
|
||||
@ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(required = true) String page,
|
||||
@ApiParam(required = true, value = "显示数量", defaultValue = "10") @RequestParam(required = true) String pageSize,
|
||||
HttpServletRequest request) {
|
||||
|
|
@ -161,6 +162,7 @@ public class ViewMeetingApi extends BaseController {
|
|||
paramsMap.put("dealersId", dealersId);
|
||||
paramsMap.put("distributorName", distributorName);
|
||||
paramsMap.put("staffId", staffId);
|
||||
paramsMap.put("sourceType", sourceType);
|
||||
paramsMap.put("page", page);
|
||||
paramsMap.put("pageSize", pageSize);
|
||||
return toPage(viewMeetingService.pageList(paramsMap, ".pageList"));
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public class ViewMeetingController extends BaseController {
|
|||
@ApiParam(required = false, value = "经销商id") @RequestParam(required = false) String dealersId,
|
||||
@ApiParam(required = false, value = "客户名称") @RequestParam(required = false) String distributorName,
|
||||
@ApiParam(required = false, value = "业务员id") @RequestParam(required = false) String staffId,
|
||||
@ApiParam(required = false, value = "客户档案来源 1.经销商档案 2.种植户档案") @RequestParam(required = false) String sourceType,
|
||||
@ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(required = true) String page,
|
||||
@ApiParam(required = true, value = "显示数量", defaultValue = "10") @RequestParam(required = true) String pageSize,
|
||||
HttpServletRequest request) {
|
||||
|
|
@ -79,6 +80,7 @@ public class ViewMeetingController extends BaseController {
|
|||
paramsMap.put("dealersId", dealersId);
|
||||
paramsMap.put("distributorName", distributorName);
|
||||
paramsMap.put("staffId", staffId);
|
||||
paramsMap.put("sourceType", sourceType);
|
||||
paramsMap.put("page", page);
|
||||
paramsMap.put("pageSize", pageSize);
|
||||
return toPage(viewMeetingService.pageList(paramsMap, ".pageList"));
|
||||
|
|
|
|||
|
|
@ -6,40 +6,41 @@
|
|||
|
||||
<!-- 字段映射 -->
|
||||
<resultMap id="crmMarketingActivityMap" type="com.yb.lb.webapp.view.view.entity.ViewMeeting">
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="type_id" property="typeId" jdbcType="VARCHAR" />
|
||||
<result column="type_code" property="typeCode" jdbcType="VARCHAR" />
|
||||
<result column="typeName" property="typeName" jdbcType="VARCHAR" />
|
||||
<result column="activity_content" property="activityContent" jdbcType="VARCHAR" />
|
||||
<result column="activity_date" property="activityDate" jdbcType="VARCHAR" />
|
||||
<result column="area_name" property="areaName" jdbcType="VARCHAR" />
|
||||
<result column="sem_id" property="semId" jdbcType="VARCHAR" />
|
||||
<result column="ancestors" property="ancestors" jdbcType="VARCHAR" />
|
||||
<result column="staff_id" property="staffId" jdbcType="VARCHAR" />
|
||||
<result column="staff_name" property="staffName" jdbcType="VARCHAR" />
|
||||
<result column="distributor_name" property="distributorName" jdbcType="VARCHAR" />
|
||||
<result column="dealers_id" property="dealersId" jdbcType="VARCHAR" />
|
||||
<result column="client_type" property="clientType" jdbcType="VARCHAR" />
|
||||
<result column="region" property="region" jdbcType="VARCHAR" />
|
||||
<result column="company_id" property="companyId" jdbcType="VARCHAR" />
|
||||
<result column="create_user" property="createUser" jdbcType="VARCHAR" />
|
||||
<result column="staff_size" property="staffSize" jdbcType="VARCHAR" />
|
||||
<result column="site" property="site" jdbcType="VARCHAR" />
|
||||
<result column="longitude" property="longitude" jdbcType="VARCHAR" />
|
||||
<result column="latitude" property="latitude" jdbcType="VARCHAR" />
|
||||
<result column="activity_img" property="activityImg" jdbcType="VARCHAR" />
|
||||
<result column="videos" property="videos" jdbcType="VARCHAR" />
|
||||
<result column="create_time" property="createTime" jdbcType="VARCHAR" />
|
||||
<result column="view_no" property="viewNo" jdbcType="VARCHAR" />
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
||||
<result column="status" property="status" jdbcType="VARCHAR" />
|
||||
<result column="auditor" property="auditor" jdbcType="VARCHAR" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="VARCHAR" />
|
||||
<result column="audit_content" property="auditContent" jdbcType="VARCHAR" />
|
||||
<result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
|
||||
<result column="menu_code" property="menuCode" jdbcType="VARCHAR" />
|
||||
<result column="area_code" property="areaCode" jdbcType="VARCHAR" />
|
||||
<result column="clientTypeName" property="clientTypeName" jdbcType="VARCHAR" />
|
||||
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||
<result column="type_id" property="typeId" jdbcType="VARCHAR"/>
|
||||
<result column="type_code" property="typeCode" jdbcType="VARCHAR"/>
|
||||
<result column="typeName" property="typeName" jdbcType="VARCHAR"/>
|
||||
<result column="activity_content" property="activityContent" jdbcType="VARCHAR"/>
|
||||
<result column="activity_date" property="activityDate" jdbcType="VARCHAR"/>
|
||||
<result column="area_name" property="areaName" jdbcType="VARCHAR"/>
|
||||
<result column="sem_id" property="semId" jdbcType="VARCHAR"/>
|
||||
<result column="ancestors" property="ancestors" jdbcType="VARCHAR"/>
|
||||
<result column="staff_id" property="staffId" jdbcType="VARCHAR"/>
|
||||
<result column="staff_name" property="staffName" jdbcType="VARCHAR"/>
|
||||
<result column="distributor_name" property="distributorName" jdbcType="VARCHAR"/>
|
||||
<result column="dealers_id" property="dealersId" jdbcType="VARCHAR"/>
|
||||
<result column="client_type" property="clientType" jdbcType="VARCHAR"/>
|
||||
<result column="region" property="region" jdbcType="VARCHAR"/>
|
||||
<result column="company_id" property="companyId" jdbcType="VARCHAR"/>
|
||||
<result column="create_user" property="createUser" jdbcType="VARCHAR"/>
|
||||
<result column="staff_size" property="staffSize" jdbcType="VARCHAR"/>
|
||||
<result column="site" property="site" jdbcType="VARCHAR"/>
|
||||
<result column="longitude" property="longitude" jdbcType="VARCHAR"/>
|
||||
<result column="latitude" property="latitude" jdbcType="VARCHAR"/>
|
||||
<result column="activity_img" property="activityImg" jdbcType="VARCHAR"/>
|
||||
<result column="videos" property="videos" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="VARCHAR"/>
|
||||
<result column="view_no" property="viewNo" jdbcType="VARCHAR"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
<result column="status" property="status" jdbcType="VARCHAR"/>
|
||||
<result column="auditor" property="auditor" jdbcType="VARCHAR"/>
|
||||
<result column="audit_time" property="auditTime" jdbcType="VARCHAR"/>
|
||||
<result column="audit_content" property="auditContent" jdbcType="VARCHAR"/>
|
||||
<result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR"/>
|
||||
<result column="menu_code" property="menuCode" jdbcType="VARCHAR"/>
|
||||
<result column="area_code" property="areaCode" jdbcType="VARCHAR"/>
|
||||
<result column="clientTypeName" property="clientTypeName" jdbcType="VARCHAR"/>
|
||||
<result column="source_type" property="sourceType" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
|
@ -138,15 +139,17 @@
|
|||
<select id="pageList" resultMap="crmMarketingActivityMap" parameterType="map">
|
||||
SELECT
|
||||
a.id, a.type_id, a.type_code, a.activity_content, a.activity_date, a.sem_id, a.ancestors, a.staff_id,
|
||||
a.dealers_id, a.client_type, a.region, a.company_id, a.create_user, a.staff_size, a.site, a.longitude, a.latitude, a.activity_img, a.videos,
|
||||
a.create_time, a.view_no, a.remark, a.status, a.auditor, a.audit_time, a.audit_content, a.process_instance_id, a.menu_code, a.area_code,
|
||||
a.distributor_name, c.area_name, d.dict_name typeName, e.name staff_name, f.dict_name clientTypeName
|
||||
a.dealers_id, a.client_type, a.region, a.company_id, a.create_user, a.staff_size, a.site, a.longitude,
|
||||
a.latitude, a.activity_img, a.videos,
|
||||
a.create_time, a.view_no, a.remark, a.status, a.auditor, a.audit_time, a.audit_content, a.process_instance_id,
|
||||
a.menu_code, a.area_code,a.source_type,
|
||||
b.client_name distributor_name, c.area_name, d.dict_name typeName, e.name staff_name, f.dict_name clientTypeName
|
||||
FROM crm_marketing_activity a
|
||||
left join crm_distributor_user_info b on a.dealers_id = b.id
|
||||
left join crm_viewmeeting_client b on a.dealers_id = b.id
|
||||
left join crm_marketing_area_info c on a.sem_id = c.id
|
||||
left join crm_dict_data d on a.type_id = d.dict_code
|
||||
left join crm_servicer_user_info e on a.staff_id = e.id
|
||||
left join crm_dict_data f on b.distributor_level = f.dict_code
|
||||
left join crm_dict_data f on b.client_type = f.dict_code
|
||||
<where>
|
||||
<if test="id !=null and id !=''">
|
||||
and a.id = #{id}
|
||||
|
|
@ -172,11 +175,14 @@
|
|||
and a.dealers_id = #{dealersId}
|
||||
</if>
|
||||
<if test="distributorName != null and distributorName != ''">
|
||||
and a.distributor_name = #{distributorName}
|
||||
and b.distributor_name = #{distributorName}
|
||||
</if>
|
||||
<if test="staffId != null and staffId != ''">
|
||||
and a.staff_id = #{staffId}
|
||||
</if>
|
||||
<if test="sourceType != null and sourceType != ''">
|
||||
and a.source_type = #{sourceType}
|
||||
</if>
|
||||
<include refid="selectSql"/>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
|
|
@ -186,7 +192,7 @@
|
|||
<insert id="addView" parameterType="map">
|
||||
INSERT INTO crm_marketing_activity (
|
||||
id, type_id, type_code, type_name, activity_content, activity_date, area_name, sem_id, ancestors, staff_id, staff_name, distributor_name, dealers_id, client_type,
|
||||
region, company_id, create_user, staff_size, site, longitude, latitude, activity_img, videos, create_time, view_no, remark, status, area_code
|
||||
region, company_id, create_user, staff_size, site, longitude, latitude, activity_img, videos, create_time, view_no, remark, status, area_code,source_type
|
||||
) VALUES (
|
||||
#{id,jdbcType=VARCHAR},
|
||||
#{typeId,jdbcType=VARCHAR},
|
||||
|
|
@ -215,7 +221,8 @@
|
|||
#{viewNo,jdbcType=VARCHAR},
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR},
|
||||
#{areaCode,jdbcType=VARCHAR}
|
||||
#{areaCode,jdbcType=VARCHAR},
|
||||
#{sourceType,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
|
@ -401,7 +408,8 @@
|
|||
TO_CHAR(TO_DATE(SUBSTR(#{createEndDate},1,10),'yyyy-MM-dd'),'yyyy-MM-dd')
|
||||
</if>
|
||||
<include refid="selectSql"/>
|
||||
</where>) info
|
||||
</where>
|
||||
) info
|
||||
GROUP BY
|
||||
info.sem_id,
|
||||
info.type_id
|
||||
|
|
@ -437,7 +445,7 @@
|
|||
MAX(info.sem_id) sem_id
|
||||
FROM
|
||||
( SELECT a.type_id, a.staff_id, a.sem_id FROM crm_marketing_activity a
|
||||
LEFT JOIN crm_dict_data dict ON a.type_id = dict.dict_code
|
||||
LEFT JOIN crm_dict_data dict ON a.type_id = dict.dict_code
|
||||
<where>
|
||||
AND dict.status = 1
|
||||
<if test="staffId != null and staffId != ''">
|
||||
|
|
@ -460,7 +468,8 @@
|
|||
TO_CHAR(TO_DATE(SUBSTR(#{createEndDate},1,10),'yyyy-MM-dd'),'yyyy-MM-dd')
|
||||
</if>
|
||||
<include refid="selectSql"/>
|
||||
</where>) info
|
||||
</where>
|
||||
) info
|
||||
GROUP BY
|
||||
info.staff_id,
|
||||
info.type_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue