Commit 49dcc6e0 authored by gaoyuan's avatar gaoyuan

4.9.3需求

parent e7df3614
...@@ -245,6 +245,11 @@ public class CustomerEntity extends DomainObject { ...@@ -245,6 +245,11 @@ public class CustomerEntity extends DomainObject {
@Length(max = 45, message = "长度需要大于0且小于45") @Length(max = 45, message = "长度需要大于0且小于45")
private String creater; private String creater;
/**
* 创建人Id
*/
private Integer createrId;
/** /**
* 购房意向-CRM * 购房意向-CRM
*/ */
...@@ -381,6 +386,9 @@ public class CustomerEntity extends DomainObject { ...@@ -381,6 +386,9 @@ public class CustomerEntity extends DomainObject {
// 是否星标客户 // 是否星标客户
private int starCustomer; private int starCustomer;
// 是否标星平台用户
private int starPtCustomer;
private int isActive; private int isActive;
private Date activeTime; private Date activeTime;
...@@ -469,6 +477,23 @@ public class CustomerEntity extends DomainObject { ...@@ -469,6 +477,23 @@ public class CustomerEntity extends DomainObject {
return createTimeStr; return createTimeStr;
} }
public int getStarPtCustomer() {
return starPtCustomer;
}
public void setStarPtCustomer(int starPtCustomer) {
this.starPtCustomer = starPtCustomer;
}
public Integer getCreaterId() {
return createrId;
}
public void setCreaterId(Integer createrId) {
this.createrId = createrId;
}
/** /**
* 设置创建日期字符串格式 * 设置创建日期字符串格式
* *
......
...@@ -88,6 +88,8 @@ public class CustomerListVO extends DomainObject { ...@@ -88,6 +88,8 @@ public class CustomerListVO extends DomainObject {
private String creater; private String creater;
private Integer createrId;
private Integer hasReport; private Integer hasReport;
private String createSource; private String createSource;
...@@ -196,6 +198,14 @@ public class CustomerListVO extends DomainObject { ...@@ -196,6 +198,14 @@ public class CustomerListVO extends DomainObject {
this.platCustomerStatus = platCustomerStatus; this.platCustomerStatus = platCustomerStatus;
} }
public Integer getCreaterId() {
return createrId;
}
public void setCreaterId(Integer createrId) {
this.createrId = createrId;
}
public CustomerListVO( public CustomerListVO(
Integer id, String name, String phone, Integer sex, String actSource, Integer status, Date createTime, Integer id, String name, String phone, Integer sex, String actSource, Integer status, Date createTime,
String buyIntention, Date lastVisitTime, Date lastCallTime, Integer managerId, String managerName, String buyIntention, Date lastVisitTime, Date lastCallTime, Integer managerId, String managerName,
......
...@@ -3094,4 +3094,57 @@ public class CustomerController extends BaseController { ...@@ -3094,4 +3094,57 @@ public class CustomerController extends BaseController {
return getAutoUrl("seaCustomerInfo"); return getAutoUrl("seaCustomerInfo");
} }
/**
* 获取批量转移客户人员列表
* @param model
* @param request
* @return
*/
@RequestMapping(value = "transferCreator", method = RequestMethod.GET)
public String transferCreator(Model model, HttpServletRequest request) {
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
String customerCount = request.getParameter("customerCount") == null ? "0" : request.getParameter(
"customerCount");
String deptUrlPath = userEntity.getDeptUrlPath();
//重写查询用户列表提升性能
Map<String, Object> searchMap = new HashMap<>(10);
searchMap.put("order", 1);
List<UserEntity> userList = user.queryByConditions(searchMap);
//当前操作人所在用户分组的所有用户以及所在用户分组的所有子用户
List<UserEntity> transferUsers = new ArrayList<>();
for (UserEntity userTmp:userList) {
if(userTmp.getDeptUrlPath().startsWith(deptUrlPath))
transferUsers.add(userTmp);
}
model.addAttribute("users", deptUrlPath.split( "/" ).length == 2 ? userList : transferUsers);
model.addAttribute("customerCount", customerCount);
return getAutoUrl("transferCreator");
}
/**
* 批量转移平台客户创建人
* @param request
* @return
*/
@RequestMapping(value = "batchTransferCreator", method = RequestMethod.GET)
@ResponseBody
public House365RestResponse batchTransferCreator(HttpServletRequest request){
House365RestResponse restResponse = new House365RestResponse();
restResponse.setResult("1");
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
String type = request.getParameter("type") == null ? "" : request.getParameter("type");
String userIds = request.getParameter("userIds");
String customerIds = request.getParameter("customerIds") == null ? "" : request.getParameter("customerIds");
String[] customerIdArray = customerIds.split(",");
String[] userIdArray = userIds.split(",");
try {
} catch (Exception e) {
restResponse.setResult("0");
restResponse.setMsg(e.getMessage());
logger.error(e.getMessage(), e);
}
return restResponse;
}
} }
...@@ -5,12 +5,16 @@ import com.house365.beans.entity.*; ...@@ -5,12 +5,16 @@ import com.house365.beans.entity.*;
import com.house365.beans.system.Page; import com.house365.beans.system.Page;
import com.house365.beans.vo.CustomerListVO; import com.house365.beans.vo.CustomerListVO;
import com.house365.beans.vo.CustomerVo; import com.house365.beans.vo.CustomerVo;
import com.house365.rest.exception.ServiceRunException;
import com.house365.rest.parameter.House365RestResponse;
import com.house365.web.system.controller.BaseController; import com.house365.web.system.controller.BaseController;
import com.house365.web.util.*; import com.house365.web.util.*;
import com.house365.ws.beans.request.*; import com.house365.ws.beans.request.*;
import com.house365.ws.beans.response.*; import com.house365.ws.beans.response.*;
import com.house365.ws.beans.util.HResult; import com.house365.ws.beans.util.HResult;
import com.house365.ws.interfaces.server.*; import com.house365.ws.interfaces.server.*;
import com.house365.ws.system.ReturnAppResult;
import net.sf.json.JSONObject;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -136,7 +140,19 @@ public class PlatformManagementController extends BaseController { ...@@ -136,7 +140,19 @@ public class PlatformManagementController extends BaseController {
searchParams.put("EQ_customTimeTypeSix", "1"); searchParams.put("EQ_customTimeTypeSix", "1");
} }
} }
// 星标
String isStar = String.valueOf(searchParams.get("EQ_isPtStar"));
if ("2".equals(isStar)) {
// 有星标
searchParams.remove("EQ_isNotPtStar");
} else if ("3".equals(isStar)) {
// 无星标
searchParams.remove("EQ_isPtStar");
searchParams.put("EQ_isNotPtStar", "3");
} else {
searchParams.remove("EQ_isPtStar");
searchParams.remove("EQ_isNotPtStar");
}
StringBuilder sortColumn = new StringBuilder(); StringBuilder sortColumn = new StringBuilder();
//时间排序 //时间排序
boolean daoxuFlag = false; boolean daoxuFlag = false;
...@@ -319,6 +335,10 @@ public class PlatformManagementController extends BaseController { ...@@ -319,6 +335,10 @@ public class PlatformManagementController extends BaseController {
UserUtil.showPlatCustomerStatus(customerEntity, cpMap); UserUtil.showPlatCustomerStatus(customerEntity, cpMap);
} }
//客户标新
String star = "off";
//获取star
star = customerEntity.getStarPtCustomer() ==1 ? "on" : "off";
CustomerListVO customerListVO = new CustomerListVO(customerEntity.getId(), customerEntity.getName(), CustomerListVO customerListVO = new CustomerListVO(customerEntity.getId(), customerEntity.getName(),
customerEntity.getPhone(), customerEntity.getSex(), customerEntity.getPhone(), customerEntity.getSex(),
customerEntity.getActSource(), customerEntity.getActSource(),
...@@ -329,7 +349,7 @@ public class PlatformManagementController extends BaseController { ...@@ -329,7 +349,7 @@ public class PlatformManagementController extends BaseController {
customerEntity.getLastCallTime(), customerEntity.getLastCallTime(),
customerEntity.getManagerId(), customerEntity.getManagerId(),
customerEntity.getManagerName(), customerEntity.getManagerName(),
customerEntity.getTraceStatus(), null, userId4Star, customerEntity.getTraceStatus(), star, userId4Star,
hasCustomerProjects, hasNewCustomerProjects, hasCustomerProjects, hasNewCustomerProjects,
customerEntity.getBelongToday(), customerEntity.getBelongToday(),
customerEntity.getBelongYestoday(), customerEntity.getBelongYestoday(),
...@@ -341,6 +361,7 @@ public class PlatformManagementController extends BaseController { ...@@ -341,6 +361,7 @@ public class PlatformManagementController extends BaseController {
customerEntity.getSingupTime(), countdownTime, customerEntity.getIsPeer(), isPrivate, customerEntity.getSingupTime(), countdownTime, customerEntity.getIsPeer(), isPrivate,
customerEntity.getStarCustomer(), customerEntity.getMarkedLabelId(), null, "", customerEntity.getPlatCustomerStatus(), customerEntity.getCreater() customerEntity.getStarCustomer(), customerEntity.getMarkedLabelId(), null, "", customerEntity.getPlatCustomerStatus(), customerEntity.getCreater()
); );
customerListVO.setCreaterId(customerEntity.getCreaterId());
customers.add(customerListVO); customers.add(customerListVO);
} }
} }
...@@ -985,4 +1006,31 @@ public class PlatformManagementController extends BaseController { ...@@ -985,4 +1006,31 @@ public class PlatformManagementController extends BaseController {
return result; return result;
} }
/**
* 平台客户标星
* @param request
* @param flag
* @return
* @throws ServiceRunException
*/
@RequestMapping(value = "starToggle", method = RequestMethod.GET)
@ResponseBody
public Object starToggle(HttpServletRequest request, String flag,Integer customerId) throws ServiceRunException {
// 取得所需参数
House365RestResponse<CustomerEntity> response = new House365RestResponse<>();
try {
int star = "on".equalsIgnoreCase(flag) ? 1 : 0;
customer.updatePtCustomerStar(customerId,star);
response.setResult( ReturnAppResult.APP_SUCCESS.getResultCode());
response.setMsg(ReturnAppResult.APP_SUCCESS.getResultMessage());
} catch (Exception e) {
logger.error(e.getMessage());
response.setResult(ReturnAppResult.APP_FAIL.getResultCode());
response.setMsg((ReturnAppResult.APP_FAIL.getResultMessage() + ":" + e.getMessage()));
}
String result = JSONObject.fromObject(response).toString();
logger.debug("===starToggle==result===:{}", result);
return result;
}
} }
...@@ -432,9 +432,9 @@ ...@@ -432,9 +432,9 @@
</option> </option>
</select> </select>
平台人:<input style="width: 8rem;border: 1px solid #d5d5d5;" type="text" id="search_LIKE_creater" <%-- 平台人:<input style="width: 8rem;border: 1px solid #d5d5d5;" type="text" id="search_LIKE_createrName"--%>
name="search_LIKE_creater" value="${param['search_LIKE_creater']}" <%-- name="search_LIKE_createrName" value="${param['search_LIKE_createrName']}"--%>
class="m-wrap small" placeholder="请输入添加人姓名">&nbsp; <%-- class="m-wrap small" placeholder="请输入添加人姓名">&nbsp;--%>
<div style="float: right"> <div style="float: right">
<button type="button" class="btn btn-default" <button type="button" class="btn btn-default"
onclick="$('#filterForm').submit();">搜索 onclick="$('#filterForm').submit();">搜索
...@@ -635,7 +635,7 @@ ...@@ -635,7 +635,7 @@
<div class="mangerItem__border"></div> <div class="mangerItem__border"></div>
</td> </td>
<td class="mangerItem mangerCollect ${customer.star}" <td class="mangerItem mangerCollect ${customer.star}"
onclick="toggleCollect(this,'${customer.id}', '${customer.starUserId}', '${customer.star}', '${customer.managerId}')"> onclick="toggleCollect(this,'${customer.id}','${customer.createrId}','${customer.star}')">
<div class="mangerItem__border"></div> <div class="mangerItem__border"></div>
</td> </td>
<td class="mangerItem mangerOperate" style="display: table;padding: 0;overflow:visible;"> <td class="mangerItem mangerOperate" style="display: table;padding: 0;overflow:visible;">
...@@ -990,16 +990,15 @@ ...@@ -990,16 +990,15 @@
/** /**
* 客户标星 * 客户标星
* @param _this * @param _this
* @param _customerId * @param userId 创建人id
* @param userId
* @param star * @param star
* @param managerId
* @returns {boolean} * @returns {boolean}
*/ */
function toggleCollect(_this, _customerId, userId, star, managerId) { function toggleCollect(_this, _customerId,userId, star) {
debugger;
setCookie("lastChoseCustomerId", _customerId); setCookie("lastChoseCustomerId", _customerId);
var currentUserId = $("#currentUserId").val(); var currentUserId = $("#currentUserId").val();
if (star == 'on' && managerId != currentUserId) { if (star == 'on' && userId != currentUserId) {
alert("其他人的星标客户不能取消哦"); alert("其他人的星标客户不能取消哦");
return false; return false;
} }
...@@ -1007,10 +1006,6 @@ ...@@ -1007,10 +1006,6 @@
alert("不能为其他客户添加星标哦"); alert("不能为其他客户添加星标哦");
return false; return false;
} }
if (star == 'off' && userId == '' && managerId != currentUserId) {
alert("不能为其他客户添加星标哦");
return false;
}
//收藏 //收藏
var flag = "off"; var flag = "off";
if ($(_this).hasClass('on')) { if ($(_this).hasClass('on')) {
...@@ -1022,13 +1017,13 @@ ...@@ -1022,13 +1017,13 @@
$(_this).parents("tr").addClass("table-star"); $(_this).parents("tr").addClass("table-star");
} }
/*$.ajax({ $.ajax({
url: "${ctx}/customermanagement/starToggle", url: "${ctx}/platformmanagement/starToggle",
data: {flag: flag, 'customerId': _customerId}, data: {flag: flag,customerId:_customerId},
success: function (data) { success: function (data) {
window.location.reload(); window.location.reload();
} }
});*/ });
} }
...@@ -1146,6 +1141,7 @@ ...@@ -1146,6 +1141,7 @@
$("#search_GTE_createTimeStart").val(''); $("#search_GTE_createTimeStart").val('');
$("#search_LTE_createTimeEnd").val(''); $("#search_LTE_createTimeEnd").val('');
$("#search_LIKE_sourceName").val(''); $("#search_LIKE_sourceName").val('');
$("#search_LIKE_createrName").val('');
// 下拉框自定义时间 // 下拉框自定义时间
$("#search_EQ_customTimeType").val('1'); $("#search_EQ_customTimeType").val('1');
$("#search_GTE_customTimeStart").val(''); $("#search_GTE_customTimeStart").val('');
...@@ -1167,8 +1163,8 @@ ...@@ -1167,8 +1163,8 @@
$("#search_EQ_buyIntention").val("all"); $("#search_EQ_buyIntention").val("all");
$("#search_EQ_buyIntention").trigger('chosen:updated'); $("#search_EQ_buyIntention").trigger('chosen:updated');
// 重置是否星标下拉框 // 重置是否星标下拉框
$("#search_EQ_isStar").val("1"); $("#search_EQ_isPtStar").val("1");
$("#search_EQ_isStar").trigger('chosen:updated'); $("#search_EQ_isPtStar").trigger('chosen:updated');
// 重置添加时间 近7天 开始时间结束时间 // 重置添加时间 近7天 开始时间结束时间
createTimeClick('0'); createTimeClick('0');
......
...@@ -242,6 +242,8 @@ public interface ICustomer extends IService { ...@@ -242,6 +242,8 @@ public interface ICustomer extends IService {
void updateOldCustomerStar(int customerId, int starCustomer); void updateOldCustomerStar(int customerId, int starCustomer);
void updatePtCustomerStar(int customerId,int starPtCustomer);
int queryCount(Map<String, Object> map); int queryCount(Map<String, Object> map);
MapListResponse successList(MapListRequest listRequest, UserEntity userEntity); MapListResponse successList(MapListRequest listRequest, UserEntity userEntity);
......
...@@ -94,4 +94,5 @@ public interface CustomerMapper { ...@@ -94,4 +94,5 @@ public interface CustomerMapper {
int updateIdList(List<Integer> idList); int updateIdList(List<Integer> idList);
void updatePtCustomerStar(Map<String, Object> map);
} }
...@@ -2683,6 +2683,14 @@ public class CustomerImpl implements ICustomer { ...@@ -2683,6 +2683,14 @@ public class CustomerImpl implements ICustomer {
customerMapper.updateOldCustomerStar(map); customerMapper.updateOldCustomerStar(map);
} }
@Override
public void updatePtCustomerStar(int customerId, int starPtCustomer) {
Map<String, Object> map = new HashMap<>(10);
map.put("id", customerId);
map.put("star", starPtCustomer);
customerMapper.updatePtCustomerStar(map);
}
@Override @Override
public void updateOldCustomers(String phone, Integer managerId, Integer operId) { public void updateOldCustomers(String phone, Integer managerId, Integer operId) {
Map<String, Object> map = new HashMap<>(10); Map<String, Object> map = new HashMap<>(10);
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<result property="isHandover" column="isHandover"/> <result property="isHandover" column="isHandover"/>
<result property="isRecycled" column="isRecycled"/> <result property="isRecycled" column="isRecycled"/>
<result property="isActive" column="is_active"/> <result property="isActive" column="is_active"/>
<result property="starPtCustomer" column="star_pt_customer"/>
</resultMap> </resultMap>
<!-- 用于select查询公用抽取的列 --> <!-- 用于select查询公用抽取的列 -->
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
create_time, creater, buy_intention, last_visit_time, last_call_time, manager_id, manager_name, create_time, creater, buy_intention, last_visit_time, last_call_time, manager_id, manager_name,
update_time, updater, cityCode,cityName, biz_port,crmId,act_source_id, trace_status, remark, crm_sync, update_time, updater, cityCode,cityName, biz_port,crmId,act_source_id, trace_status, remark, crm_sync,
hotline_call_time,hotline_call_spend,ocean_date,is_delete,last_manager,bind_time, customer_source_type, hotline_call_time,hotline_call_spend,ocean_date,is_delete,last_manager,bind_time, customer_source_type,
customer_rel_id, isWaitCall, singupTime,marketActId, marketActName,is_peer, starCustomer, isHandover, isRecycled,is_active customer_rel_id, isWaitCall, singupTime,marketActId, marketActName,is_peer, starCustomer, isHandover, isRecycled,is_active,star_pt_customer
]]> ]]>
</sql> </sql>
...@@ -1530,6 +1531,17 @@ ...@@ -1530,6 +1531,17 @@
starCustomer = 0 starCustomer = 0
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.isPtStar">
<![CDATA[
star_pt_customer = 1
]]>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.isNotPtStar">
<![CDATA[
star_pt_customer = 0
]]>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.starCustomer"> <isNotEmpty prepend="AND" property="searchFilters.starCustomer">
<![CDATA[ <![CDATA[
starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value# starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value#
...@@ -1650,6 +1662,8 @@ ...@@ -1650,6 +1662,8 @@
( SELECT ct.NAME FROM customer ct WHERE ct.id = c.id ))) NAME, ( SELECT ct.NAME FROM customer ct WHERE ct.id = c.id ))) NAME,
c.phone, c.phone,
(select u2.realName from user u2 where u2.id = c.creater) creater, (select u2.realName from user u2 where u2.id = c.creater) creater,
c.creater AS createrId,
c.star_pt_customer AS starPtCustomer,
( (
IFNULL((SELECT min( ct.create_time ) FROM customer ct WHERE ct.phone = c.phone AND ct.manager_id = c.manager_id AND ct.cityCode = #searchFilters.cityCode.value# AND ct.is_delete = 0 AND ct.STATUS IN ( 11, 0, 99 )), IFNULL((SELECT min( ct.create_time ) FROM customer ct WHERE ct.phone = c.phone AND ct.manager_id = c.manager_id AND ct.cityCode = #searchFilters.cityCode.value# AND ct.is_delete = 0 AND ct.STATUS IN ( 11, 0, 99 )),
(SELECT ct.create_time FROM customer ct WHERE ct.id = c.id)) (SELECT ct.create_time FROM customer ct WHERE ct.id = c.id))
...@@ -1684,7 +1698,6 @@ ...@@ -1684,7 +1698,6 @@
) bindTime ) bindTime
FROM customer c FROM customer c
<include refid="customer.queryManagementPage"/>
group by c.manager_id, c.phone group by c.manager_id, c.phone
<isNotEmpty prepend="ORDER BY" property="searchFilters.orderBy"> <isNotEmpty prepend="ORDER BY" property="searchFilters.orderBy">
<![CDATA[ <![CDATA[
......
...@@ -720,6 +720,13 @@ ...@@ -720,6 +720,13 @@
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<update id="updatePtCustomerStar" parameterType="map">
UPDATE customer
SET
star_pt_customer = #{star}
WHERE id = #{id}
</update>
<select id="queryForAddHot" resultMap="infoMap" parameterType="map"> <select id="queryForAddHot" resultMap="infoMap" parameterType="map">
SELECT id,phone FROM ( SELECT id,phone FROM (
SELECT SELECT
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<result property="isHandover" column="isHandover"/> <result property="isHandover" column="isHandover"/>
<result property="isRecycled" column="isRecycled"/> <result property="isRecycled" column="isRecycled"/>
<result property="isActive" column="is_active"/> <result property="isActive" column="is_active"/>
<result property="starPtCustomer" column="star_pt_customer"/>
</resultMap> </resultMap>
<!-- 用于select查询公用抽取的列 --> <!-- 用于select查询公用抽取的列 -->
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
create_time, creater, buy_intention, last_visit_time, last_call_time, manager_id, manager_name, create_time, creater, buy_intention, last_visit_time, last_call_time, manager_id, manager_name,
update_time, updater, cityCode,cityName, biz_port,crmId,act_source_id, trace_status, remark, crm_sync, update_time, updater, cityCode,cityName, biz_port,crmId,act_source_id, trace_status, remark, crm_sync,
hotline_call_time,hotline_call_spend,ocean_date,is_delete,last_manager,bind_time, customer_source_type, hotline_call_time,hotline_call_spend,ocean_date,is_delete,last_manager,bind_time, customer_source_type,
customer_rel_id, isWaitCall, singupTime,marketActId, marketActName,is_peer, starCustomer, isHandover, isRecycled,is_active customer_rel_id, isWaitCall, singupTime,marketActId, marketActName,is_peer, starCustomer, isHandover, isRecycled,is_active,star_pt_customer
]]> ]]>
</sql> </sql>
...@@ -1530,6 +1531,17 @@ ...@@ -1530,6 +1531,17 @@
starCustomer = 0 starCustomer = 0
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.isPtStar">
<![CDATA[
star_pt_customer = 1
]]>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.isNotPtStar">
<![CDATA[
star_pt_customer = 0
]]>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.starCustomer"> <isNotEmpty prepend="AND" property="searchFilters.starCustomer">
<![CDATA[ <![CDATA[
starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value# starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value#
...@@ -1650,6 +1662,8 @@ ...@@ -1650,6 +1662,8 @@
( SELECT ct.NAME FROM customer ct WHERE ct.id = c.id ))) NAME, ( SELECT ct.NAME FROM customer ct WHERE ct.id = c.id ))) NAME,
c.phone, c.phone,
(select u2.realName from user u2 where u2.id = c.creater) creater, (select u2.realName from user u2 where u2.id = c.creater) creater,
c.creater AS createrId,
c.star_pt_customer AS starPtCustomer,
( (
IFNULL((SELECT min( ct.create_time ) FROM customer ct WHERE ct.phone = c.phone AND ct.manager_id = c.manager_id AND ct.cityCode = #searchFilters.cityCode.value# AND ct.is_delete = 0 AND ct.STATUS IN ( 11, 0, 99 )), IFNULL((SELECT min( ct.create_time ) FROM customer ct WHERE ct.phone = c.phone AND ct.manager_id = c.manager_id AND ct.cityCode = #searchFilters.cityCode.value# AND ct.is_delete = 0 AND ct.STATUS IN ( 11, 0, 99 )),
(SELECT ct.create_time FROM customer ct WHERE ct.id = c.id)) (SELECT ct.create_time FROM customer ct WHERE ct.id = c.id))
...@@ -1684,7 +1698,6 @@ ...@@ -1684,7 +1698,6 @@
) bindTime ) bindTime
FROM customer c FROM customer c
<include refid="customer.queryManagementPage"/>
group by c.manager_id, c.phone group by c.manager_id, c.phone
<isNotEmpty prepend="ORDER BY" property="searchFilters.orderBy"> <isNotEmpty prepend="ORDER BY" property="searchFilters.orderBy">
<![CDATA[ <![CDATA[
......
...@@ -720,6 +720,13 @@ ...@@ -720,6 +720,13 @@
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<update id="updatePtCustomerStar" parameterType="map">
UPDATE customer
SET
star_pt_customer = #{star}
WHERE id = #{id}
</update>
<select id="queryForAddHot" resultMap="infoMap" parameterType="map"> <select id="queryForAddHot" resultMap="infoMap" parameterType="map">
SELECT id,phone FROM ( SELECT id,phone FROM (
SELECT SELECT
......
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