运营角色增加,以及权限过滤

This commit is contained in:
kuang.yife 2024-05-29 13:44:51 +08:00
commit 057e19109a
32 changed files with 317 additions and 46 deletions

View File

@ -8,14 +8,19 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpUtils;
import com.ruoyi.common.utils.security.Md5Utils;
import com.ruoyi.system.domain.ClewPhone;
import com.ruoyi.system.domain.CompanyApp;
import com.ruoyi.system.domain.OppoCheck;
import com.ruoyi.system.service.IClewPhoneService;
import com.ruoyi.system.service.ICompanyAppService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.core.config.GlobalLogHelper;
import lombok.extern.slf4j.Slf4j;
@ -64,6 +69,9 @@ public class ClewController extends BaseController
@Autowired
private IClewPhoneService clewPhoneService;
@Autowired
private ICompanyAppService companyAppService;
@RequiresPermissions("system:clew:view")
@GetMapping()
public String clew(ModelMap modelMap)
@ -85,6 +93,11 @@ public class ClewController extends BaseController
if(!"admin".equals(getSysUser().getLoginName())){
clew.setSaleId(getSysUser().getUserId());
}
long isSubAdmin = getSysUser().getRoles().stream().map(x->x.getRoleKey().equals("subAdmin")).count();
if(isSubAdmin > 0 && !"admin".equals(getSysUser().getLoginName())){
clew.setSaleId(null);
clew.setRemark("baidu");
}
List<Clew> list = clewService.selectClewList(clew);
list.forEach(model->{
if(model.getSaleId() != null){
@ -93,6 +106,14 @@ public class ClewController extends BaseController
model.setSaleName(user.getUserName());
}
}
if(model.getSourceApp() != null){
CompanyApp param = new CompanyApp();
param.setCompanyId(model.getSourceApp());
List<CompanyApp> result = companyAppService.selectCompanyAppList(param);
model.setSourceAppName(result.get(0).getAppName());
}else {
model.setSourceAppName("黑猫APP");
}
});
return getDataTable(list);
}
@ -153,6 +174,7 @@ public class ClewController extends BaseController
List<ClewPhone> clewPhoneList = clewPhoneService.selectClewPhoneList(model);
clewPhoneList.forEach(x->{
x.setStatus("1");
x.setSourceApp(clew.getSourceApp());
clewPhoneService.updateClewPhone(x);
});
// 调用oppo的统计接口
@ -183,6 +205,9 @@ public class ClewController extends BaseController
String notice = "VIVO"+ (long)((Math.random()+1) * 10000000);
String url = "https://marketing-api.vivo.com.cn/openapi/v1/advertiser/behavior/upload?access_token="+token+"&timestamp="+timeStamp+"&nonce="+notice;
String content = "{\"dataList\":[{\"cvTime\":"+timeStamp+",\"cvType\":\"PAY\",\"userId\":\""+ clew.getOaid() +"\",\"userIdType\":\"OAID\"}],\"pkgName\":\"com.yinliu.loan\",\"srcId\":\"ds-202310270565\",\"srcType\":\"app\"}";
if(clew.getSourceApp() != null && clew.getSourceApp() == 2L){
content = "{\"dataList\":[{\"cvTime\":"+timeStamp+",\"cvType\":\"PAY\",\"userId\":\""+ clew.getOaid() +"\",\"userIdType\":\"OAID\"}],\"pkgName\":\"com.zh.gdyq\",\"srcId\":\"ds-202404185034\",\"srcType\":\"app\"}";
}
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Content-Type", "application/json");
log.info("请求{}的属性{}", url, content);
@ -200,6 +225,12 @@ public class ClewController extends BaseController
int customerId = 445972;
String singKey = "FkqMqeKVbCaeSGBI";
String encryptKey = "IIUWoEaMXlzctOqk";
if(clew.getSourceApp() != null && clew.getSourceApp() == 2L){
customerId = 593022;
appId = 1585622;
singKey = "lNebrbVaMMubMqUr";
encryptKey = "hZdCGTMvrOAdVeUq";
}
GlobalLogHelper.UploadInfo uploadInfo = GlobalLogHelper.UploadInfo.builder()
// .imei(imei)
.oaid(oaid)
@ -297,6 +328,11 @@ public class ClewController extends BaseController
@ResponseBody
public AjaxResult changeUser(Clew clew)
{
Clew sourceClew = clewService.selectClewById(clew.getId());
if(!ObjectUtil.equals(sourceClew.getSaleId(), 1L)){
clew.setAssignTimes("02");
}
clew.setUpdateTime(DateUtils.getNowDate());
return toAjax(clewService.updateClew(clew));
}
@ -315,6 +351,11 @@ public class ClewController extends BaseController
if(StringUtils.isEmpty(clew.getIds())){
return AjaxResult.error("请选择线索!");
}
Clew sourceClew = clewService.selectClewById(Long.parseLong(clew.getIds().split(",")[0]));
if(!ObjectUtil.equals(sourceClew.getSaleId(), 1L)){
clew.setAssignTimes("02");
}
clew.setUpdateTime(DateUtils.getNowDate());
clew.setIdList(Arrays.stream(clew.getIds().split(",")).map(Long::parseLong).collect(Collectors.toList()));
return toAjax(clewService.updateBatchClew(clew));
}

View File

@ -7,11 +7,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.ClewImg;
@ -58,9 +54,14 @@ public class ClewImgController extends BaseController
@GetMapping("/app/list")
@ResponseBody
public AjaxResult getAppList()
public AjaxResult getAppList(@RequestParam(value = "sourceApp", required = false) Long sourceApp)
{
List<ClewImg> list = clewImgService.selectClewImgList(new ClewImg());
if(sourceApp == null){
sourceApp = 1L;
}
ClewImg param = new ClewImg();
param.setSourceApp(sourceApp);
List<ClewImg> list = clewImgService.selectClewImgList(param);
List<String> imgList = list.stream().map(ClewImg::getImgUrl).collect(Collectors.toList());
return AjaxResult.success(imgList);
}

View File

@ -5,11 +5,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.ClewMaterial;
@ -56,9 +52,12 @@ public class ClewMaterialController extends BaseController
@PostMapping("/app/list")
@ResponseBody
public TableDataInfo appList(ClewMaterial clewMaterial)
public TableDataInfo appList(@RequestParam(value = "sourceApp", required = false) Long sourceApp, ClewMaterial clewMaterial)
{
startPage();
if(sourceApp == null){
clewMaterial.setSourceApp(1L);
}
List<ClewMaterial> list = clewMaterialService.selectClewMaterialList(clewMaterial);
return getDataTable(list);
}

View File

@ -51,6 +51,13 @@ public class ClewPhoneController extends BaseController
{
startPage();
List<ClewPhone> list = clewPhoneService.selectClewPhoneList(clewPhone);
list.forEach(model->{
if(model.getSourceApp() != null && model.getSourceApp() == 2L){
model.setSourceAppName("大象处理逾期");
}else {
model.setSourceAppName("黑猫搞定逾期");
}
});
return getDataTable(list);
}

View File

@ -5,11 +5,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.ClewVideo;
@ -56,9 +52,14 @@ public class ClewVideoController extends BaseController
@GetMapping("/app/list")
@ResponseBody
public AjaxResult getAppList()
public AjaxResult getAppList(@RequestParam(value = "sourceApp", required = false) Long sourceApp)
{
List<ClewVideo> list = clewVideoService.selectClewVideoList(new ClewVideo());
if(sourceApp == null){
sourceApp = 1L;
}
ClewVideo param = new ClewVideo();
param.setSourceApp(sourceApp);
List<ClewVideo> list = clewVideoService.selectClewVideoList(param);
return AjaxResult.success(list);
}

View File

@ -13,7 +13,6 @@ import com.ruoyi.common.utils.ExceptionUtil;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpUtils;
import com.ruoyi.common.utils.security.Md5Utils;
import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.system.domain.ClewPhone;
import com.ruoyi.system.domain.NoticeRequest;
import com.ruoyi.system.domain.OppoCheck;
@ -23,10 +22,8 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import java.security.GeneralSecurityException;
import java.security.Key;
import javax.crypto.Cipher;
@ -61,6 +58,34 @@ public class NoticeController {
return AjaxResult.success("注销成功!");
}
@GetMapping("/exposure")
@ResponseBody
public AjaxResult exposure(){
return AjaxResult.success("曝光成功!");
}
@GetMapping("/click")
@ResponseBody
public AjaxResult click(){
return AjaxResult.success("点击成功!");
}
@GetMapping("/download")
@ResponseBody
public AjaxResult download(){
return AjaxResult.success("下载成功!");
}
@GetMapping("/install")
@ResponseBody
public AjaxResult install(){
return AjaxResult.success("安装成功!");
}
@PostMapping("/getLocation")
@ResponseBody
public AjaxResult getLocationByLot(@RequestBody JSONObject jsonObject){
@ -112,6 +137,11 @@ public class NoticeController {
model.setPhone(request.getPhone());
model.setCreateTime(new Date());
model.setRemark(request.getFrom());
if(StringUtils.isNotEmpty(request.getSourceApp())){
model.setSourceApp(Long.valueOf(request.getSourceApp()));
}else {
model.setSourceApp(1L);
}
clewPhoneService.insertClewPhone(model);
}
}catch (Exception e){
@ -159,10 +189,16 @@ public class NoticeController {
String clientIp = "58.49.150.163";
long convTime = System.currentTimeMillis();
String convType = "APP_REGISTER";
long appId = 1545362;
int customerId = 445972;
long appId = 1545362;
String singKey = "rEQNdyVQxHlayYzw";
String encryptKey = "RPeKBIdybnbMAVlK";
if(request.getSourceApp() != null && "2".equals(request.getSourceApp())){
customerId = 593022;
appId = 1585622;
singKey = "WJzbmmPPufjyKESi";
encryptKey = "sTrlawivcqdHzUDB";
}
GlobalLogHelper.UploadInfo uploadInfo = GlobalLogHelper.UploadInfo.builder()
// .imei(imei)
.oaid(oaid)

View File

@ -1,6 +1,6 @@
package com.ruoyi.web.core.config;
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import cn.hutool.core.codec.Base64;
import lombok.Builder;
import lombok.Data;
import lombok.SneakyThrows;

View File

@ -10,19 +10,19 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">广告主:</label>
<div class="col-sm-8">
<input name="company" class="form-control" type="text" required>
<input name="company" class="form-control" type="text" value="1" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">销售:</label>
<div class="col-sm-8">
<input name="saleId" class="form-control" type="text" required>
<input name="saleId" class="form-control" type="text" value="1" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">信息流:</label>
<div class="col-sm-8">
<input name="infoFlow" class="form-control" type="text" required>
<input name="infoFlow" class="form-control" type="text" value="0" readonly>
</div>
</div>
<div class="form-group">
@ -55,7 +55,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">App来源</label>
<div class="col-sm-8">
<input name="sourceApp" class="form-control" type="text">
<input name="sourceApp" class="form-control" value="01" type="text" readonly>
</div>
</div>
<div class="form-group">
@ -148,7 +148,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
<input name="remark" class="form-control" value="baidu" type="text" readonly>
</div>
</div>
</form>

View File

@ -28,17 +28,48 @@
</select>
</li>
<li>
状态:<select name="searchStatus" th:with="type=${@dict.getType('follow_status')}">
加微:<select name="isAddWx" th:with="type=${@dict.getType('is_add_wx')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
有效:<select name="isEffective" th:with="type=${@dict.getType('is_effective')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
意向:<select name="isPlan" th:with="type=${@dict.getType('is_plan')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
成交:<select name="isDeal" th:with="type=${@dict.getType('is_deal')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
来源应用:<select name="sourceApp">
<option value="">所有</option>
<option value="1">黑猫搞定逾期</option>
<option value="2">大象债务处理</option>
</select>
</li>
<li class="select-time">
<label>创建时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li class="select-time">
<label>分配时间: </label>
<input type="text" class="time-input" id="updateStartTime" placeholder="开始时间" name="params[updateStartTime]"/>
<span>-</span>
<input type="text" class="time-input" id="updateEndTime" placeholder="结束时间" name="params[updateEndTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -80,6 +111,7 @@
var isPlan = [[${@dict.getType('is_plan')}]];
var isDeal = [[${@dict.getType('is_deal')}]];
var customerStatus = [[${@dict.getType('customer_status')}]];
var assignStatus = [[${@dict.getType('assign_status')}]];
var prefix = ctx + "system/clew";
@ -99,6 +131,10 @@
title: '主键',
visible: false
},
{
field: 'sourceAppName',
title: '来源App'
},
{
field: 'phone',
title: '手机号'
@ -115,7 +151,8 @@
},
{
field: 'debtType',
title: '债务类型'
title: '债务类型',
visible: false
},
{
field: 'debtMoney',
@ -129,10 +166,25 @@
field: 'customerRemark',
title: '客户情况备注'
},
{
field: 'twoCustomerRemark',
title: '二次跟进情况'
},
{
field: 'createTime',
title: '创建时间'
},
{
field: 'updateTime',
title: '分配时间'
},
{
field: 'assignTimes',
title: '二次分配',
formatter: function(value, row, index) {
return $.table.selectDictLabel(assignStatus, value);
}
},
{
field: 'sourceType',
title: '推广来源',
@ -208,15 +260,18 @@
},
{
field: 'cityName',
title: '城市'
title: '城市',
visible: false
},
{
field: 'contactTime',
title: '方便接电话时间'
title: '方便接电话时间',
visible: false
},
{
field: 'otherPhone',
title: '其他联系方式'
title: '其他联系方式',
visible: false
},
{
field: 'company',

View File

@ -127,6 +127,12 @@
<input name="remark" th:field="*{customerRemark}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户二次情况备注:</label>
<div class="col-sm-8">
<input name="twoCustomerRemark" th:field="*{twoCustomerRemark}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">

View File

@ -14,6 +14,12 @@
<input type="file" name="imgUrlImg" id="imgUrlImg" multiple class="file" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">来源app</label>
<div class="col-sm-8">
<input name="sourceApp" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">

View File

@ -13,6 +13,12 @@
<input name="imgUrl" th:field="*{imgUrl}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">来源APP</label>
<div class="col-sm-8">
<input name="sourceApp" th:field="*{sourceApp}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">

View File

@ -68,6 +68,10 @@
field: 'imgUrl',
title: '图片链接'
},
{
field: 'sourceApp',
title: '来源APP'
},
{
field: 'remark',
title: '备注'

View File

@ -46,6 +46,12 @@
<input name="applyNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">来源App</label>
<div class="col-sm-8">
<input name="sourceApp" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">线索提交内容:</label>
<div class="col-sm-8">

View File

@ -38,6 +38,12 @@
<input name="applyNum" th:field="*{applyNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">来源APP</label>
<div class="col-sm-8">
<input name="sourceApp" th:field="*{sourceApp}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">线索提交内容:</label>
<div class="col-sm-8">

View File

@ -104,6 +104,10 @@
field: 'clewContent',
title: '线索提交内容'
},
{
field: 'sourceApp',
title: '来源APP'
},
{
title: '操作',
align: 'center',

View File

@ -20,6 +20,12 @@
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
来源应用:<select name="sourceApp">
<option value="">所有</option>
<option value="1">黑猫搞定逾期</option>
<option value="2">大象债务处理</option>
</select>
<li class="select-time">
<label>创建时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
@ -78,6 +84,10 @@
title: '主键',
visible: false
},
{
field: 'sourceAppName',
title: '来源App'
},
{
field: 'phone',
title: '手机号'

View File

@ -33,6 +33,12 @@
<input name="videoShowDate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">来源APP</label>
<div class="col-sm-8">
<input name="sourceApp" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">

View File

@ -19,6 +19,12 @@
<input name="videoTitle" th:field="*{videoTitle}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">来源APP</label>
<div class="col-sm-8">
<input name="sourceApp" th:field="*{sourceApp}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">显示时间:</label>
<div class="col-sm-8">

View File

@ -88,6 +88,10 @@
field: 'videoShowDate',
title: '显示时间'
},
{
field: 'sourceApp',
title: '来源APP'
},
{
field: 'remark',
title: '备注'

View File

@ -69,6 +69,9 @@ public class Clew extends BaseEntity
@Excel(name = "App来源")
private Long sourceApp;
@Excel(name = "来源APP名称")
private String sourceAppName;
/** 微信号 */
@Excel(name = "微信号")
private String wxAccount;
@ -121,6 +124,8 @@ public class Clew extends BaseEntity
@Excel(name = "姓名")
private String customerName;
private String assignTimes;
/** 方便接电话时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "方便接电话时间", width = 30, dateFormat = "yyyy-MM-dd")
@ -133,6 +138,9 @@ public class Clew extends BaseEntity
@Excel(name = "客户情况备注")
private String customerRemark;
@Excel(name = "客户二次情况备注")
private String twoCustomerRemark;
private String searchStatus;
private String imei;

View File

@ -22,5 +22,7 @@ public class ClewImg extends BaseEntity
@Excel(name = "图片链接")
private String imgUrl;
private Long sourceApp;
}

View File

@ -45,4 +45,6 @@ public class ClewMaterial extends BaseEntity
@Excel(name = "线索提交内容")
private String clewContent;
private Long sourceApp;
}

View File

@ -27,4 +27,10 @@ public class ClewPhone extends BaseEntity
private String status;
private Long sourceApp;
@Excel(name = "来源APP名称")
private String sourceAppName;
}

View File

@ -33,4 +33,6 @@ public class ClewVideo extends BaseEntity
@Excel(name = "显示时间")
private String videoShowDate;
private Long sourceApp;
}

View File

@ -27,4 +27,7 @@ public class NoticeRequest {
private String oaid;
private String from;
private String sourceApp;
}

View File

@ -65,7 +65,11 @@ public class ClewServiceImpl implements IClewService
smsContent.put("uid", "12347");
smsContent.put("pwd", "wJgzaC0u");
smsContent.put("mobile", "18580868339");
if(clew.getSourceApp() != null && clew.getSourceApp() == 2L){
smsContent.put("content", "你有一条来自大象,新线索生成,客户电话:" + clew.getPhone() + "(请注意及时跟进)");
}else {
smsContent.put("content", "你有一条来自黑猫,新线索生成,客户电话:" + clew.getPhone() + "(请注意及时跟进)");
}
log.info("请求傲众短信入参:{}", smsContent.toJSONString());
String s = HttpUtils.sendPost("http://www.aozhongyun.com/Admin/index.php/Message/send", smsContent.toJSONString());
log.info("请求傲众短信url:{}, 响应:{}", "http://www.aozhongyun.com/Admin/index.php/Message/send", s);
@ -85,14 +89,12 @@ public class ClewServiceImpl implements IClewService
@Override
public int updateClew(Clew clew)
{
clew.setUpdateTime(DateUtils.getNowDate());
return clewMapper.updateClew(clew);
}
@Override
public int updateBatchClew(Clew clew)
{
clew.setUpdateTime(DateUtils.getNowDate());
return clewMapper.updateBatchClew(clew);
}

View File

@ -7,6 +7,7 @@
<resultMap type="ClewImg" id="ClewImgResult">
<result property="id" column="id" />
<result property="imgUrl" column="img_url" />
<result property="sourceApp" column="source_app" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
@ -15,13 +16,14 @@
</resultMap>
<sql id="selectClewImgVo">
select id, img_url, create_time, create_by, update_time, update_by, remark from clew_img
select id, img_url, source_app, create_time, create_by, update_time, update_by, remark from clew_img
</sql>
<select id="selectClewImgList" parameterType="ClewImg" resultMap="ClewImgResult">
<include refid="selectClewImgVo"/>
<where>
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
<if test="sourceApp != null"> and source_app = #{sourceApp}</if>
</where>
</select>
@ -34,6 +36,7 @@
insert into clew_img
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imgUrl != null">img_url,</if>
<if test="sourceApp != null">source_app,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
@ -42,6 +45,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imgUrl != null">#{imgUrl},</if>
<if test="sourceApp != null">#{sourceApp},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
@ -54,6 +58,7 @@
update clew_img
<trim prefix="SET" suffixOverrides=",">
<if test="imgUrl != null">img_url = #{imgUrl},</if>
<if test="sourceApp != null">source_app = #{sourceApp},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>

View File

@ -37,6 +37,8 @@
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="customerRemark" column="customer_remark" />
<result property="twoCustomerRemark" column="two_customer_remark"/>
<result property="assignTimes" column="assign_times" />
</resultMap>
<sql id="selectClewVo">
@ -45,7 +47,7 @@
source_app, wx_account, customer_status, customer_level, touch_qrcode,
contact_number, is_touch, is_add_wx, is_effective, is_plan, is_deal,
province_name, city_name, customer_name, contact_time, other_phone,
create_time, create_by, update_by, update_time, remark, customer_remark from clew
create_time, create_by, update_by, update_time, remark, customer_remark,two_customer_remark,assign_times from clew
</sql>
<select id="selectClewList" parameterType="Clew" resultMap="ClewResult">
@ -89,14 +91,30 @@
<if test="searchStatus == '04'">
and is_deal = '1'
</if>
<if test="searchStatus == '05'">
and is_add_wx != '1'
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<if test="params.updateStartTime != null and params.updateStartTime != ''"><!-- 开始时间检索 -->
AND date_format(update_time,'%y%m%d') &gt;= date_format(#{params.updateStartTime},'%y%m%d')
</if>
<if test="params.updateEndTime != null and params.updateEndTime != ''"><!-- 结束时间检索 -->
AND date_format(update_time,'%y%m%d') &lt;= date_format(#{params.updateEndTime},'%y%m%d')
</if>
</where>
<choose>
<when test="saleId != null ">
order by update_time desc
</when>
<otherwise>
order by create_time desc
</otherwise>
</choose>
</select>
<select id="selectClewById" parameterType="Long" resultMap="ClewResult">
@ -206,6 +224,8 @@
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="customerRemark != null">customer_remark = #{customerRemark},</if>
<if test="twoCustomerRemark != null">two_customer_remark = #{twoCustomerRemark},</if>
<if test="assignTimes != null">assign_times = #{assignTimes},</if>
</trim>
where id = #{id}
</update>
@ -214,6 +234,8 @@
update clew
<trim prefix="SET" suffixOverrides=",">
<if test="saleId != null">sale_id = #{saleId},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="assignTimes != null">assign_times = #{assignTimes},</if>
</trim>
<where>
<if test="idList != null and idList.size() > 0">

View File

@ -13,6 +13,7 @@
<result property="detail" column="detail" />
<result property="applyNum" column="apply_num" />
<result property="clewContent" column="clew_content" />
<result property="sourceApp" column="source_app" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
@ -20,7 +21,7 @@
</resultMap>
<sql id="selectClewMaterialVo">
select id, title, img_url, video_img, labels, detail, apply_num, clew_content, create_by, create_time, update_by, update_time from clew_material
select id, title, img_url, video_img, labels, detail, apply_num, clew_content, source_app, create_by, create_time, update_by, update_time from clew_material
</sql>
<select id="selectClewMaterialList" parameterType="ClewMaterial" resultMap="ClewMaterialResult">
@ -32,6 +33,7 @@
<if test="labels != null and labels != ''"> and labels = #{labels}</if>
<if test="applyNum != null and applyNum != ''"> and apply_num = #{applyNum}</if>
<if test="clewContent != null and clewContent != ''"> and clew_content = #{clewContent}</if>
<if test="sourceApp != null "> and source_app = #{sourceApp}</if>
</where>
</select>
@ -50,6 +52,7 @@
<if test="detail != null">detail,</if>
<if test="applyNum != null">apply_num,</if>
<if test="clewContent != null">clew_content,</if>
<if test="sourceApp != null">source_app,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
@ -63,6 +66,7 @@
<if test="detail != null">#{detail},</if>
<if test="applyNum != null">#{applyNum},</if>
<if test="clewContent != null">#{clewContent},</if>
<if test="sourceApp != null">#{sourceApp},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
@ -80,6 +84,7 @@
<if test="detail != null">detail = #{detail},</if>
<if test="applyNum != null">apply_num = #{applyNum},</if>
<if test="clewContent != null">clew_content = #{clewContent},</if>
<if test="sourceApp != null">source_app = #{sourceApp},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>

View File

@ -7,6 +7,7 @@
<resultMap type="ClewPhone" id="ClewPhoneResult">
<result property="id" column="id" />
<result property="phone" column="phone" />
<result property="sourceApp" column="source_app" />
<result property="status" column="status" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
@ -16,13 +17,14 @@
</resultMap>
<sql id="selectClewPhoneVo">
select id, phone,status, create_time, create_by, update_by, update_time, remark from clew_phone
select id, phone,status,source_app, create_time, create_by, update_by, update_time, remark from clew_phone
</sql>
<select id="selectClewPhoneList" parameterType="ClewPhone" resultMap="ClewPhoneResult">
<include refid="selectClewPhoneVo"/>
<where>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="sourceApp != null"> and source_app = #{sourceApp}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
@ -45,6 +47,7 @@
insert into clew_phone
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="phone != null">phone,</if>
<if test="sourceApp != null">source_app,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
@ -53,6 +56,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="phone != null">#{phone},</if>
<if test="sourceApp != null">#{sourceApp},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
@ -65,6 +69,7 @@
update clew_phone
<trim prefix="SET" suffixOverrides=",">
<if test="phone != null">phone = #{phone},</if>
<if test="sourceApp != null">source_app = #{sourceApp},</if>
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>

View File

@ -10,6 +10,7 @@
<result property="videoImg" column="video_img" />
<result property="videoTitle" column="video_title" />
<result property="videoShowDate" column="video_show_date" />
<result property="sourceApp" column="source_app" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
@ -18,13 +19,14 @@
</resultMap>
<sql id="selectClewVideoVo">
select id, video_url, video_img, video_title, video_show_date, create_time, create_by, update_time, update_by, remark from clew_video
select id, video_url, video_img, video_title, video_show_date,source_app, create_time, create_by, update_time, update_by, remark from clew_video
</sql>
<select id="selectClewVideoList" parameterType="ClewVideo" resultMap="ClewVideoResult">
<include refid="selectClewVideoVo"/>
<where>
<if test="videoUrl != null and videoUrl != ''"> and video_url = #{videoUrl}</if>
<if test="sourceApp != null"> and source_app = #{sourceApp}</if>
<if test="videoTitle != null and videoTitle != ''"> and video_title = #{videoTitle}</if>
<if test="videoShowDate != null and videoShowDate != ''"> and video_show_date = #{videoShowDate}</if>
</where>
@ -42,6 +44,7 @@
<if test="videoImg != null">video_img,</if>
<if test="videoTitle != null">video_title,</if>
<if test="videoShowDate != null">video_show_date,</if>
<if test="sourceApp != null">source_app,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
@ -53,6 +56,7 @@
<if test="videoImg != null">#{videoImg},</if>
<if test="videoTitle != null">#{videoTitle},</if>
<if test="videoShowDate != null">#{videoShowDate},</if>
<if test="sourceApp != null">#{sourceApp},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
@ -68,6 +72,7 @@
<if test="videoImg != null">video_img = #{videoImg},</if>
<if test="videoTitle != null">video_title = #{videoTitle},</if>
<if test="videoShowDate != null">video_show_date = #{videoShowDate},</if>
<if test="sourceApp != null">source_app = #{sourceApp},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>