Commit ba6517fa authored by jay's avatar jay

4.9.2版本提交

parent 0d9e75e9
......@@ -34,9 +34,6 @@ import java.util.Date;
*/
public class MarketingActivityEntity extends DomainObject {
/**
*
*/
private static final long serialVersionUID = 1L;
//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
......@@ -49,14 +46,6 @@ public class MarketingActivityEntity extends DomainObject {
private String activityName;
public String getActivityName() {
return activityName;
}
public void setActivityName(String activityName) {
this.activityName = activityName;
}
/**
* 活动类型
*/
......@@ -64,14 +53,6 @@ public class MarketingActivityEntity extends DomainObject {
private Integer activityId;
public Integer getActivityId() {
return activityId;
}
public void setActivityId(Integer activityId) {
this.activityId = activityId;
}
/**
* 周期(天)
*/
......@@ -84,38 +65,6 @@ public class MarketingActivityEntity extends DomainObject {
private String browseProjectId;
private String browseProject;
public String getBrowseProjectId() {
return browseProjectId;
}
public void setBrowseProjectId(String browseProjectId) {
this.browseProjectId = browseProjectId;
}
public String getBrowseProject() {
return browseProject;
}
public void setBrowseProject(String browseProject) {
this.browseProject = browseProject;
}
public String getBuildingId() {
return buildingId;
}
public void setBuildingId(String buildingId) {
this.buildingId = buildingId;
}
public String getBuildingName() {
return buildingName;
}
public void setBuildingName(String buildingName) {
this.buildingName = buildingName;
}
/**
* 希望提取数
*/
......@@ -198,14 +147,6 @@ public class MarketingActivityEntity extends DomainObject {
private String reVisitResult;
public String getReVisitResult() {
return reVisitResult;
}
public void setReVisitResult(String reVisitResult) {
this.reVisitResult = reVisitResult;
}
/**
* createBy
*/
......@@ -251,7 +192,6 @@ public class MarketingActivityEntity extends DomainObject {
*/
private Integer waitVisitCount;
//show not assign
private Integer notAssign;
/**
......@@ -1097,6 +1037,14 @@ public class MarketingActivityEntity extends DomainObject {
return this.returnVisitStatusName;
}
public String getActivityName() {
return activityName;
}
public void setActivityName(String activityName) {
this.activityName = activityName;
}
/**
* 实体的toString方法
*
......@@ -1216,5 +1164,53 @@ public class MarketingActivityEntity extends DomainObject {
public void setDescSub(String descSub) {
this.descSub = descSub;
}
public String getBrowseProjectId() {
return browseProjectId;
}
public void setBrowseProjectId(String browseProjectId) {
this.browseProjectId = browseProjectId;
}
public String getBrowseProject() {
return browseProject;
}
public void setBrowseProject(String browseProject) {
this.browseProject = browseProject;
}
public String getBuildingId() {
return buildingId;
}
public void setBuildingId(String buildingId) {
this.buildingId = buildingId;
}
public String getBuildingName() {
return buildingName;
}
public void setBuildingName(String buildingName) {
this.buildingName = buildingName;
}
public Integer getActivityId() {
return activityId;
}
public void setActivityId(Integer activityId) {
this.activityId = activityId;
}
public String getReVisitResult() {
return reVisitResult;
}
public void setReVisitResult(String reVisitResult) {
this.reVisitResult = reVisitResult;
}
}
......@@ -140,6 +140,13 @@ public class CloudActivityController extends BaseController {
return "----------updateDutyStaff success---------";
}
@RequestMapping(value = "/addMarketActivity")
@ResponseBody
public String addMarketActivity() {
activityInterface.addMarketActivity();
System.out.println("----------addMarketActivity成功---------");
return "----------addMarketActivity success---------";
}
/**
......
......@@ -29,7 +29,7 @@ import java.util.*;
@RequestMapping("/platformmanagement")
public class PlatformManagementController extends BaseController {
Logger logger = LoggerFactory.getLogger(getClass());
private Logger logger = LoggerFactory.getLogger(getClass());
/**
* 自动注入客户信息WS实现
......@@ -181,12 +181,10 @@ public class PlatformManagementController extends BaseController {
searchParams.put("EQ_customerSourceType", "8");
searchParams.put("EQ_platformCreateSource", "PT");
//过滤公海、跟进中
boolean seaDel = false;
String eqPlatProjectStatus = String.valueOf(searchParams.get("EQ_platProjectStatus"));
if (eqPlatProjectStatus != null && "7".equals(eqPlatProjectStatus)) {//跟进中
searchParams.remove("EQ_platProjectStatus");
searchParams.put("EQ_platProjectStatus7", "7");
seaDel = true;
}
if (eqPlatProjectStatus != null && "8".equals(eqPlatProjectStatus)) {//回公海
searchParams.remove("EQ_platProjectStatus");
......@@ -200,17 +198,7 @@ public class PlatformManagementController extends BaseController {
if (response != null && response.getObjectList() != null) {
List<CustomerEntity> resultList = response.getObjectList();
logger.info("***********查询结果集************" + resultList.size());
Iterator<CustomerEntity> iterator = resultList.iterator();
//删除跟进中回公海的数据
// if (seaDel) {
// while (iterator.hasNext()) {
// CustomerEntity tmpce = iterator.next();
// if (StringUtils.isEmpty(String.valueOf(tmpce.getManagerId()))) {
// iterator.remove();
// }
// }
// }
logger.info("***********展示结果集大小************" + resultList.size());
// 按objectList大小初始化list
customers = new ArrayList<>(response.getObjectList().size());
// customerId集合
......
......@@ -319,7 +319,7 @@ public class UserController extends BaseController {
saveUnbindLog(userEntity, delUser);
}
}
user.deleteUserById(Integer.valueOf(ids[i]),userEntity.getId());
user.deleteUserById(Integer.valueOf(ids[i]), userEntity.getId());
}
}
} else {
......@@ -334,7 +334,7 @@ public class UserController extends BaseController {
saveUnbindLog(userEntity, delUser);
}
}
user.deleteUserById(Integer.valueOf(id),userEntity.getId());
user.deleteUserById(Integer.valueOf(id), userEntity.getId());
}
}
}
......@@ -572,7 +572,6 @@ public class UserController extends BaseController {
SessionConstants.SESSION_CURRNET_DEPT_KEY);
String cityId = departmentEntity.getCityID();
DepartmentResponse departmentResponse = department.getDepartmentById(Integer.valueOf(cityId));
DepartmentEntity city = departmentResponse.getEntity();
searchParams.put("EQ_deptUrlPath3", ue.getDeptUrlPath());
searchParams.put("LIKE_deptUrlPath2", ue.getDeptUrlPath());
......@@ -608,6 +607,7 @@ public class UserController extends BaseController {
} else {
model.addAttribute("showIm", 0);
}
// model.addAttribute("showIm", 1);
model.addAttribute("page", response.getPaging());
model.addAttribute("users", lstUserVo);
......@@ -1008,4 +1008,15 @@ public class UserController extends BaseController {
return result;
}
@RequestMapping(value = "/judgeAdmin/{id}")
@ResponseBody
public HResult judgeAdmin(@PathVariable int id) {
HResult result = new HResult();
UserEntity userEntity = user.getById(id);
if(userEntity.getDeptId() != 1){
result.setStatus(200);
}
return result;
}
}
......@@ -84,6 +84,23 @@
</option>
</select>
</c:if>
<c:if test="${'assigned' eq type}">
回访状态:
<select style="width: 6rem" name="search_backStatus" id="search_backStatus">
<option value="0"
<c:if test="${'0' eq param['search_backStatus']}">selected="selected"</c:if>>
全部
</option>
<option value="1"
<c:if test="${'1' eq param['search_backStatus']}">selected="selected"</c:if>>
已回访
</option>
<option value="2"
<c:if test="${'2' eq param['search_backStatus']}">selected="selected"</c:if>>
未回访
</option>
</select>
</c:if>
<i class="icon-search icon-2x pointer" onclick="$('#filterForm').submit();" title="搜索"></i>
</div>
......
......@@ -29,7 +29,6 @@
<ul class="breadcrumb">
<li><a href="/house365-hgs-web/">首页</a>
<span class="divider" style="color:#26a0da;font-weight:bold;"> > </span>
<%--<a href="/house365-hgs-web/customer/myCustomer">我的客户</a>--%>
<a href="/house365-hgs-web/platformmanagement/myPlatformCustomer">平台客户</a>
<span class="divider" style="color:#26a0da;font-weight:bold;"> > </span>
客户信息
......
......@@ -250,6 +250,7 @@
<c:if test="${user.entity.identityType eq '7'}"> <c:out value="客服"/></c:if>
<c:if test="${user.entity.identityType eq '20'}"> <c:out value="平台人员"/></c:if>
<c:if test="${user.entity.identityType eq '13'}"> <c:out value="房博士测试"/></c:if>
<c:if test="${user.entity.identityType eq '14'}"> <c:out value="其他房博士"/></c:if>
<c:if test="${null eq user.entity.identityType || '' eq user.entity.identityType}">
<c:out value=""/>
</c:if>
......@@ -297,19 +298,21 @@
</div>
<div id="choosemask" class="choosemask" style="display: none">
<div class="choosemask-wrap" style="width: 400px;height: 200px;">
<div class="choosemask-wrap" style="width: 500px;height: 200px;">
<div class="choosemask-top">
<span id="choosemask_2" class="choosemask-close" onclick="hiddenChoosemask()" style="">×</span>
</div>
<div class="choosemask-bottom" style="width: 350px;">
<div class="choosemask-bottom" style="width: 400px;">
<div class="choosemask-title">请选择身份:</div>
<ul class="choosemask-twobtn clearfix">
<ul class="choosemask-twobtn clearfix" id="fbs">
<li class="choosemask-fbs" onclick="saveIM(3)">新房房博士</li>
<li class="choosemask-fbs" onclick="saveIM(6)" style="margin-left: 10px;">二手房房博士</li>
<li class="choosemask-fbs" onclick="saveIM(10)" style="margin-left: 10px;">租房房博士</li>
<li class="choosemask-fbs" onclick="saveIM(14)" style="margin-left: 10px;">其他房博士</li>
</ul>
<ul class="choosemask-twobtn clearfix">
<li class="choosemask-fbs" onclick="saveIM(7)">客服</li>
<li class="choosemask-fbs" onclick="saveIM(7)" id="kefu">客服</li>
<li class="choosemask-fbs" onclick="saveIM(1)" style="margin-left: 10px;">安家顾问</li>
<li class="choosemask-fbs" onclick="saveIM(20)" style="margin-left: 10px;">平台人员</li>
</ul>
......@@ -326,11 +329,27 @@
$('#filterForm').submit();
}
});
function identityIM(uid, mobile) {
var choosemask = document.getElementById("choosemask");
choosemask.style.display = "block";
$("#uid").val(uid);
$("#mobile").val(mobile);
$.ajax({
url: '${ctx}/user/judgeAdmin/' + uid,
type: 'GET',
contentType: 'application/json',
dataType: 'json',
cache: false,
success: function (result) {
debugger;
if (result.status != 0) {
$("#kefu").css("display", "none");
$("#fbs").css("display", "none");
}
var choosemask = document.getElementById("choosemask");
choosemask.style.display = "block";
$("#uid").val(uid);
$("#mobile").val(mobile);
}
});
}
function saveIM(identityType) {
......@@ -366,6 +385,7 @@
}
});
}
function unlock(obj) {
$.ajax({
url: '${ctx}/user/unlock/' + obj,
......@@ -459,7 +479,7 @@
} else {
House365Util.createModal("删除员工", "删除后将无法恢复员工账号,请确认是否继续?", function () {
debugger;
if (selectedId.includes("257") == true) {
if (selectedId.includes("257") == true) {
alert("appstore账户,请勿操作");
return;
}
......
......@@ -34,4 +34,6 @@ public interface ICloudActivityInterface {
void updateStatus();
void updateDutyStaff();
void addMarketActivity();
}
......@@ -2,10 +2,11 @@
* Description: MarketBuildingRelWS接口
* Copyright: Copyright (c)2017
* Company: 江苏三六五网络股份有限公司
* @author: 江苏三六五网络股份有限公司
* @version: 1.0
*
* @author: 江苏三六五网络股份有限公司
* @version: 1.0
* Create at: 2017-12-05 下午 19:20:56
*
* <p>
* Modification History:
* Date Author Version Description
* ------------------------------------------------------------------
......@@ -22,65 +23,55 @@ import com.house365.ws.beans.response.MarketBuildingRelResponse;
/**
* MarketBuildingRelWS接口<br>
*
*
* @author 江苏三六五网络股份有限公司
* @version 1.0, 2017-12-05
* @see
* @since 1.0
*/
public interface IMarketBuildingRel extends IService{
public interface IMarketBuildingRel extends IService {
/**
* MarketBuildingRel列表查询
*
* @param request
* MarketBuildingRel列表查询请求
*
* @param request MarketBuildingRel列表查询请求
* @return MarketBuildingRel列表查询响应
*/
MarketBuildingRelListResponse getMarketBuildingRelList(
MarketBuildingRelListRequest request
MarketBuildingRelListResponse getMarketBuildingRelList(MarketBuildingRelListRequest request
);
/**
* 保存MarketBuildingRel
*
* @param request
* MarketBuildingRel请求
*
* @param request MarketBuildingRel请求
* @return 保存MarketBuildingRel响应
*/
MarketBuildingRelResponse addMarketBuildingRel(MarketBuildingRelRequest request);
/**
* 删除MarketBuildingRel通过唯一标识
*
* @param id
* 唯一标识
*
* @param id 唯一标识
* @return 删除MarketBuildingRel响应
*/
MarketBuildingRelResponse deleteMarketBuildingRelById(Integer id);
/**
* 修改MarketBuildingRel
*
* @param request
* 修改MarketBuildingRel请求
*
* @param request 修改MarketBuildingRel请求
* @return 修改MarketBuildingRel响应
*/
MarketBuildingRelResponse updateMarketBuildingRel(
MarketBuildingRelRequest request
);
MarketBuildingRelResponse updateMarketBuildingRel(MarketBuildingRelRequest request);
/**
* 通过ID获取MarketBuildingRel
*
* @param id
* 唯一标识
*
* @param id 唯一标识
* @return 通过ID获取MarketBuildingRel响应
*/
MarketBuildingRelResponse getMarketBuildingRelById(Integer id);
void deleteByActiveId(Integer id);
}
......@@ -377,6 +377,11 @@ public class CloudActivityImpl implements ICloudActivityInterface {
staffDuty.updateDutyStaff();
}
@Override
public void addMarketActivity() {
staffDuty.addMarketActivity();
}
private String dealRate(int count1, int count2) {
String rate = "";
if (count1 > 0 && count2 > 0) {
......
......@@ -57,9 +57,10 @@ public class CloudCustomerImpl implements ICloudCustomerInterface {
List<Map<String, Object>> list;
int count = 0;
//todo 添加状态查询
if (null != searchParams.get("status")) {
int status = Integer.parseInt(searchParams.get("status").toString());
int backStatus = Integer.parseInt(searchParams.get("backStatus").toString());
String backIdKey = "cloud_back_id" + activeId;
String seeIdKey = "cloud_see_Id" + activeId;
String daoIdKey = "cloud_dao_Id" + activeId;
String buyIdKey = "cloud_buy_Id" + activeId;
......@@ -67,6 +68,13 @@ public class CloudCustomerImpl implements ICloudCustomerInterface {
String cancelIdKey = "cloud_cancel_Id" + activeId;
String renIdKey = "cloud_ren_Id" + activeId;
list = mapper.queryList(map);
if (backStatus == 1) {
String value = redisUtil.getValByKey(backIdKey);
dealList(list, value);
} else if (backStatus == 2) {
String value = redisUtil.getValByKey(backIdKey);
list.removeIf(l -> value.contains(l.get("phone").toString()));
}
if (status == 1) {
String value = redisUtil.getValByKey(seeIdKey);
dealList(list, value);
......
......@@ -142,6 +142,8 @@ public class CustomerImpl implements ICustomer {
private CloudActivityMapper activityMapper;
@Autowired
private CloudCustomerMapper cloudCustomerMapper;
@Autowired
private UserMapper userMapper;
@Value("${crm.sync.url}")
......@@ -243,6 +245,32 @@ public class CustomerImpl implements ICustomer {
restObject.setParaMap(result);
return restObject;
}
UserEntity userEntity = userMapper.getById(userId);
Map<String, Object> queryMap = new HashMap<>(10);
queryMap.put("deptId", userEntity.getDeptId());
List<UserEntity> userList = userMapper.queryByConditions(queryMap);
if (CollectionUtils.isNotEmpty(userList)) {
List<String> createList = new ArrayList<>();
userList.forEach(u -> createList.add(String.valueOf(u.getId())));
//3天内添加人当前所在分组所有添加过的客户手机号(15天内);
Date date = new Date();
date = DateTimeUtils.getDaysAgo(date, 15);
Map<String, Object> map = new HashMap<>(10);
map.put("isPrivate", 1);
map.put("createTime", date);
map.put("phone", customerPhone);
map.put("createIdList", createList);
queryManagerMap.put("customerSourceType", 8);
List<CustomerEntity> mergeList = mergeMapper.queryByConditions(map);
if (CollectionUtils.isNotEmpty(mergeList)) {
result.put("result", "0");
result.put("msg", "该号码已由其他人上报,请勿重复操作");
restObject.setParaMap(result);
return restObject;
}
}
result.put("result", "1");
restObject.setParaMap(result);
}
......
......@@ -339,7 +339,6 @@ public class MarketingActivityImpl implements IMarketingActivity {
String confirmresult = HttpClientUtil.doPost(confirmUrl, inParam);
LOGGER.info("******通知CRM营销拉取客户信息返回结果:" + confirmresult);
}
// marketCustomer.updateSignupSourceName();
MarketingActivityRequest request = new MarketingActivityRequest();
MarketingActivityEntity entity = marketingActivityService.getById(activeId);
......
......@@ -35,4 +35,6 @@ public interface IStaffDuty {
void setCloudReportCountJi();
void setCloudReportCountBn();
void addMarketActivity();
}
......@@ -71,9 +71,9 @@
order by create_time desc
</select>
<select id="queryCloudBackCount" resultMap="infoMap" parameterType="map">
<select id="queryCloudBackCount" resultType="map" parameterType="map">
SELECT
DISTINCT c.phone
DISTINCT c.phone AS phone
FROM customer_callback_log ccl
left JOIN customer c on c.id = ccl.customer_id
where c.is_delete = 0
......
......@@ -846,6 +846,18 @@
AND (isWaitCall = 0 OR isWaitCall IS NULL)
AND (STATUS = 0 OR STATUS = 11 OR status = 99)
</if>
<if test="createTime != null and createTime != ''">
AND create_time > #{createTime}
</if>
<if test="customerSourceType != null and customerSourceType >=0">
AND customer_source_type = #{customerSourceType}
</if>
<if test="createIdList != null and createIdList.size() > 0 ">
AND creater IN
<foreach collection="createIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="limit != null and limit > 0 ">
limit 10
</if>
......
......@@ -147,6 +147,9 @@
<if test="onlineStatus != null and onlineStatus >= 0">
AND online_status = #{onlineStatus}
</if>
<if test="deptId != null and deptId >= 0 ">
AND deptId = #{deptId}
</if>
<if test="order != null and order > 0 ">
ORDER BY name ASC
</if>
......
......@@ -761,4 +761,30 @@
</bean>
<!--设置云迹年度报表定时结束-->
<!--定时创建营销活动拉取客户开始-->
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="addMarketActivity"/>
</list>
</property>
</bean>
<bean id="addMarketActivity" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="addMarketCus"/>
<property name="cronExpression" value="0 10 0 * * ? *"/>
</bean>
<bean id="addMarketCus" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<!--调用的类-->
<property name="targetObject">
<ref bean="staffDuty"/>
</property>
<!--调用类中的方法-->
<property name="targetMethod">
<value>addMarketActivity</value>
</property>
</bean>
<!--定时创建营销活动拉取客户结束-->
</beans>
......@@ -71,7 +71,7 @@
order by create_time desc
</select>
<select id="queryCloudBackCount" resultMap="infoMap" parameterType="map">
<select id="queryCloudBackCount" resultType="map" parameterType="map">
SELECT
DISTINCT c.phone
FROM customer_callback_log ccl
......
......@@ -855,6 +855,18 @@
AND (isWaitCall = 0 OR isWaitCall IS NULL)
AND (STATUS = 0 OR STATUS = 11 OR status = 99)
</if>
<if test="createTime != null and createTime != ''">
AND create_time > #{createTime}
</if>
<if test="customerSourceType != null and customerSourceType >=0">
AND customer_source_type = #{customerSourceType}
</if>
<if test="createIdList != null and createIdList.size() > 0 ">
AND creater IN
<foreach collection="createIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="limit != null and limit > 0 ">
limit 10
</if>
......
......@@ -147,6 +147,9 @@
<if test="onlineStatus != null and onlineStatus >= 0">
AND online_status = #{onlineStatus}
</if>
<if test="deptId != null and deptId >= 0 ">
AND deptId = #{deptId}
</if>
<if test="order != null and order > 0 ">
ORDER BY name ASC
</if>
......
......@@ -71,7 +71,7 @@
order by create_time desc
</select>
<select id="queryCloudBackCount" resultMap="infoMap" parameterType="map">
<select id="queryCloudBackCount" resultType="map" parameterType="map">
SELECT
DISTINCT c.phone
FROM customer_callback_log ccl
......
......@@ -855,6 +855,18 @@
AND (isWaitCall = 0 OR isWaitCall IS NULL)
AND (STATUS = 0 OR STATUS = 11 OR status = 99)
</if>
<if test="createTime != null and createTime != ''">
AND create_time > #{createTime}
</if>
<if test="customerSourceType != null and customerSourceType >=0">
AND customer_source_type = #{customerSourceType}
</if>
<if test="createIdList != null and createIdList.size() > 0 ">
AND creater IN
<foreach collection="createIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="limit != null and limit > 0 ">
limit 10
</if>
......
......@@ -147,6 +147,9 @@
<if test="onlineStatus != null and onlineStatus >= 0">
AND online_status = #{onlineStatus}
</if>
<if test="deptId != null and deptId >= 0 ">
AND deptId = #{deptId}
</if>
<if test="order != null and order > 0 ">
ORDER BY name ASC
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment