修改掉线与查看回访数据
This commit is contained in:
parent
9586707b28
commit
0362a14730
|
@ -1,6 +1,10 @@
|
||||||
package com.ruoyi.business.service.impl;
|
package com.ruoyi.business.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.business.domain.BusStoreInfo;
|
||||||
|
import com.ruoyi.business.mapper.BusStoreInfoMapper;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.business.mapper.BusReturnVisitInfoMapper;
|
import com.ruoyi.business.mapper.BusReturnVisitInfoMapper;
|
||||||
|
@ -18,6 +22,8 @@ public class BusReturnVisitInfoServiceImpl implements IBusReturnVisitInfoService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private BusReturnVisitInfoMapper busReturnVisitInfoMapper;
|
private BusReturnVisitInfoMapper busReturnVisitInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private BusStoreInfoMapper storeInfoMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询回访数据
|
* 查询回访数据
|
||||||
|
@ -40,6 +46,13 @@ public class BusReturnVisitInfoServiceImpl implements IBusReturnVisitInfoService
|
||||||
@Override
|
@Override
|
||||||
public List<BusReturnVisitInfo> selectBusReturnVisitInfoList(BusReturnVisitInfo busReturnVisitInfo)
|
public List<BusReturnVisitInfo> selectBusReturnVisitInfoList(BusReturnVisitInfo busReturnVisitInfo)
|
||||||
{
|
{
|
||||||
|
BusStoreInfo info = new BusStoreInfo();
|
||||||
|
info.setBindId(SecurityUtils.getLoginUser().getUserId());
|
||||||
|
List<BusStoreInfo> list = storeInfoMapper.selectBusStoreInfoList(info);
|
||||||
|
if (list.size() != 0){
|
||||||
|
String storeCode = list.get(0).getStoreCode();
|
||||||
|
busReturnVisitInfo.setStoreCode(storeCode);
|
||||||
|
}
|
||||||
return busReturnVisitInfoMapper.selectBusReturnVisitInfoList(busReturnVisitInfo);
|
return busReturnVisitInfoMapper.selectBusReturnVisitInfoList(busReturnVisitInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,11 +159,7 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
for (BusStoreInfo store : busStoreInfoList) {
|
for (BusStoreInfo store : busStoreInfoList) {
|
||||||
Boolean flag = getCommentsOne(store);
|
Boolean flag = getCommentsOne(store);
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
//掉线
|
System.out.println("获取好评信息返回错误...");
|
||||||
BusStoreInfo busStoreInfo1 = new BusStoreInfo();
|
|
||||||
busStoreInfo1.setId(store.getId());
|
|
||||||
busStoreInfo1.setGrantStatus("2");
|
|
||||||
busStoreInfoMapper.updateBusStoreInfo(busStoreInfo1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "ok";
|
return "ok";
|
||||||
|
@ -177,11 +173,7 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
for (BusStoreInfo store : busStoreInfoList) {
|
for (BusStoreInfo store : busStoreInfoList) {
|
||||||
Boolean flag = yesterdayCountOne(store);
|
Boolean flag = yesterdayCountOne(store);
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
//掉线
|
System.out.println("获取昨日统计信息返回错误...");
|
||||||
BusStoreInfo busStoreInfo1 = new BusStoreInfo();
|
|
||||||
busStoreInfo1.setId(store.getId());
|
|
||||||
busStoreInfo1.setGrantStatus("2");
|
|
||||||
busStoreInfoMapper.updateBusStoreInfo(busStoreInfo1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "ok";
|
return "ok";
|
||||||
|
@ -200,11 +192,7 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
for (BusStoreInfo store : busStoreInfoList) {
|
for (BusStoreInfo store : busStoreInfoList) {
|
||||||
Boolean flag = getScoreOne(store);
|
Boolean flag = getScoreOne(store);
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
//掉线
|
System.out.println("获取评分信息返回错误...");
|
||||||
BusStoreInfo busStoreInfo1 = new BusStoreInfo();
|
|
||||||
busStoreInfo1.setId(store.getId());
|
|
||||||
busStoreInfo1.setGrantStatus("2");
|
|
||||||
busStoreInfoMapper.updateBusStoreInfo(busStoreInfo1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "ok";
|
return "ok";
|
||||||
|
@ -225,11 +213,7 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
for (BusStoreInfo store : busStoreInfoList) {
|
for (BusStoreInfo store : busStoreInfoList) {
|
||||||
R flag = orderInfo(store.getStoreCode(),now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),store.getStoreCookie());
|
R flag = orderInfo(store.getStoreCode(),now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),store.getStoreCookie());
|
||||||
if (flag.getCode() != 200) {
|
if (flag.getCode() != 200) {
|
||||||
//掉线
|
System.out.println("获取订单信息返回错误...");
|
||||||
BusStoreInfo busStoreInfo1 = new BusStoreInfo();
|
|
||||||
busStoreInfo1.setId(store.getId());
|
|
||||||
busStoreInfo1.setGrantStatus("2");
|
|
||||||
busStoreInfoMapper.updateBusStoreInfo(busStoreInfo1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "ok";
|
return "ok";
|
||||||
|
@ -276,6 +260,9 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
busStoreDayInfoService.insertBusStoreDayInfo(dayInfo);
|
busStoreDayInfoService.insertBusStoreDayInfo(dayInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if ("1001".equals(code)) {
|
||||||
|
storeInfo.setGrantStatus("2");
|
||||||
|
busStoreInfoService.updateBusStoreInfo(storeInfo);
|
||||||
}
|
}
|
||||||
// System.out.println(jsonObject);
|
// System.out.println(jsonObject);
|
||||||
return true;
|
return true;
|
||||||
|
@ -389,12 +376,24 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
JSONObject jo = merchantOrders(pageNum, date, cookie);
|
JSONObject jo = merchantOrders(pageNum, date, cookie);
|
||||||
if ("0".equals(jo.getString("code"))) {
|
if ("0".equals(jo.getString("code"))) {
|
||||||
array = jo.getJSONObject("data").getJSONArray("wmOrderList");
|
array = jo.getJSONObject("data").getJSONArray("wmOrderList");
|
||||||
} else {
|
} else if ("1001".equals(jo.getString("code"))) {
|
||||||
|
BusStoreInfo storeInfo = new BusStoreInfo();
|
||||||
|
storeInfo.setStoreCode(wmPoiId);
|
||||||
|
BusStoreInfo storeInfo1 = busStoreInfoMapper.selectBusStoreInfoList(storeInfo).get(0);
|
||||||
|
storeInfo1.setGrantStatus("2");
|
||||||
|
busStoreInfoService.updateBusStoreInfo(storeInfo1);
|
||||||
|
|
||||||
System.out.println(jo.getString("msg"));
|
System.out.println(jo.getString("msg"));
|
||||||
return R.fail(jo.getString("msg"));
|
return R.fail(jo.getString("msg"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
} else if ("1001".equals(code)) {
|
||||||
|
BusStoreInfo storeInfo = new BusStoreInfo();
|
||||||
|
storeInfo.setStoreCode(wmPoiId);
|
||||||
|
BusStoreInfo storeInfo1 = busStoreInfoMapper.selectBusStoreInfoList(storeInfo).get(0);
|
||||||
|
storeInfo1.setGrantStatus("2");
|
||||||
|
busStoreInfoService.updateBusStoreInfo(storeInfo1);
|
||||||
}
|
}
|
||||||
return R.fail(jsonObject.getString("msg"));
|
return R.fail(jsonObject.getString("msg"));
|
||||||
}
|
}
|
||||||
|
@ -423,9 +422,6 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
httpPost.setHeader("Cookie", cookie);
|
httpPost.setHeader("Cookie", cookie);
|
||||||
|
|
||||||
CloseableHttpClient client = proxyHttpClient();
|
CloseableHttpClient client = proxyHttpClient();
|
||||||
// if(client1 == null){
|
|
||||||
// client1 = proxyHttpClient();
|
|
||||||
// }
|
|
||||||
// CloseableHttpClient client = HttpClientBuilder.create().build();
|
// CloseableHttpClient client = HttpClientBuilder.create().build();
|
||||||
HttpEntity responseEntity;
|
HttpEntity responseEntity;
|
||||||
String resp = null;
|
String resp = null;
|
||||||
|
@ -436,7 +432,7 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
jsonObject = JSONObject.parseObject(resp);
|
jsonObject = JSONObject.parseObject(resp);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
jsonObject.put("code","403");
|
// jsonObject.put("code","403");
|
||||||
}
|
}
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="phoneEndNumber != null and phoneEndNumber != ''"> and phone_end_number = #{phoneEndNumber}</if>
|
<if test="phoneEndNumber != null and phoneEndNumber != ''"> and phone_end_number = #{phoneEndNumber}</if>
|
||||||
<if test="returnVisitTime != null "> and return_visit_time = #{returnVisitTime}</if>
|
<if test="returnVisitTime != null "> and return_visit_time = #{returnVisitTime}</if>
|
||||||
<if test="finishTime != null "> and finish_time = #{finishTime}</if>
|
<if test="finishTime != null "> and finish_time = #{finishTime}</if>
|
||||||
|
and phone_number is not null
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue