店铺评分、好评信息
This commit is contained in:
parent
83182686ad
commit
9cdc2838bb
|
@ -8,6 +8,7 @@ import com.ruoyi.business.domain.PriPhoneInfo;
|
||||||
import com.ruoyi.business.domain.SysCookie;
|
import com.ruoyi.business.domain.SysCookie;
|
||||||
import com.ruoyi.business.service.IBusCookieService;
|
import com.ruoyi.business.service.IBusCookieService;
|
||||||
import com.ruoyi.business.service.IBusStoreInfoService;
|
import com.ruoyi.business.service.IBusStoreInfoService;
|
||||||
|
import com.ruoyi.business.service.IMeituanService;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.utils.HttpClientUtilT;
|
import com.ruoyi.common.utils.HttpClientUtilT;
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
|
@ -38,6 +39,8 @@ public class MeituanController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBusCookieService cookieService;
|
private IBusCookieService cookieService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeituanService iMeituanService;
|
||||||
/**
|
/**
|
||||||
* 获取cookies
|
* 获取cookies
|
||||||
* @param cookie
|
* @param cookie
|
||||||
|
@ -131,25 +134,26 @@ public class MeituanController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getComments")
|
@GetMapping("/getComments")
|
||||||
public R comments() {
|
public R comments() {
|
||||||
|
String result = iMeituanService.getComments();
|
||||||
//commScore=1 好评;commScore=0 全部(即订单量);五星好评取返回结果orderCommentScore=5
|
//commScore=1 好评;commScore=0 全部(即订单量);五星好评取返回结果orderCommentScore=5
|
||||||
String url = "https://waimaieapp.meituan.com/gw/customer/comment/list";
|
// String url = "https://waimaieapp.meituan.com/gw/customer/comment/list";
|
||||||
Map<String,Object> params = new HashMap<>();
|
// Map<String,Object> params = new HashMap<>();
|
||||||
params.put("ignoreSetRouterProxy",true);
|
// params.put("ignoreSetRouterProxy",true);
|
||||||
params.put("acctId","196975850");
|
// params.put("acctId","196975850");
|
||||||
params.put("wmPoiId","21737990");
|
// params.put("wmPoiId","21737990");
|
||||||
params.put("token","08Y-B6R3RJh0vWW3sunjIls8g5ks282V0XDqw0_8uK2I*");
|
// params.put("token","08Y-B6R3RJh0vWW3sunjIls8g5ks282V0XDqw0_8uK2I*");
|
||||||
params.put("appType",3);
|
// params.put("appType",3);
|
||||||
params.put("commScore",1);
|
// params.put("commScore",1);
|
||||||
params.put("commType",-1);
|
// params.put("commType",-1);
|
||||||
params.put("hasContent",-1);
|
// params.put("hasContent",-1);
|
||||||
params.put("periodType",4);
|
// params.put("periodType",4);
|
||||||
params.put("beginTime",1719676800);
|
// params.put("beginTime",1719676800);
|
||||||
params.put("endTime",1719676800);
|
// params.put("endTime",1719676800);
|
||||||
params.put("onlyAuditNotPass",0);
|
// params.put("onlyAuditNotPass",0);
|
||||||
params.put("pageNum",1);
|
// params.put("pageNum",1);
|
||||||
params.put("pageSize",10);
|
// params.put("pageSize",10);
|
||||||
params.put("source",1);
|
// params.put("source",1);
|
||||||
String result = HttpClientUtilT.doGet(url,null,params);
|
// String result = HttpClientUtilT.doGet(url,null,params);
|
||||||
return R.ok(result);
|
return R.ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,15 +163,7 @@ public class MeituanController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getScore")
|
@GetMapping("/getScore")
|
||||||
public R score() {
|
public R score() {
|
||||||
String url = "https://waimaieapp.meituan.com/gw/customer/comment/scores";
|
String result = iMeituanService.getScore();
|
||||||
Map<String,Object> params = new HashMap<>();
|
|
||||||
params.put("ignoreSetRouterProxy",true);
|
|
||||||
params.put("acctId","196975850");
|
|
||||||
params.put("wmPoiId","21737990");
|
|
||||||
params.put("token","08Y-B6R3RJh0vWW3sunjIls8g5ks282V0XDqw0_8uK2I*");
|
|
||||||
params.put("appType",3);
|
|
||||||
params.put("source",1);
|
|
||||||
String result = HttpClientUtilT.doGet(url,null,params);
|
|
||||||
return R.ok(result);
|
return R.ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,6 @@ package com.ruoyi.business.service;
|
||||||
|
|
||||||
public interface IMeituanService {
|
public interface IMeituanService {
|
||||||
String getComments();
|
String getComments();
|
||||||
|
|
||||||
|
String getScore();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,15 +28,49 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取订单数和好评(4,5星)数
|
@Override
|
||||||
|
public String getScore() {
|
||||||
|
BusStoreInfo busStoreInfo = new BusStoreInfo();
|
||||||
|
busStoreInfo.setGrantStatus("1");
|
||||||
|
List<BusStoreInfo> busStoreInfoList = busStoreInfoMapper.selectBusStoreInfoList(busStoreInfo);
|
||||||
|
for(BusStoreInfo store: busStoreInfoList){
|
||||||
|
getScoreOne(store);
|
||||||
|
}
|
||||||
|
return "ok";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取评分
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Boolean getScoreOne(BusStoreInfo store) {
|
||||||
|
String url = "https://waimaieapp.meituan.com/gw/customer/comment/scores";
|
||||||
|
Map<String,Object> params = new HashMap<>();
|
||||||
|
params.put("ignoreSetRouterProxy",true);
|
||||||
|
params.put("acctId",valueFromCookie("acctId",store.getStoreCookie()));
|
||||||
|
params.put("wmPoiId",valueFromCookie("wmPoiId",store.getStoreCookie()));
|
||||||
|
params.put("token",valueFromCookie("token",store.getStoreCookie()));
|
||||||
|
params.put("appType",3);
|
||||||
|
params.put("source",1);
|
||||||
|
String result = HttpClientUtilT.doGet(url,null,params);
|
||||||
|
System.out.println(result);//落库
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取订单数和好评(4,5星)数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private Boolean getCommentsOne(BusStoreInfo store){
|
private Boolean getCommentsOne(BusStoreInfo store){
|
||||||
//commScore=1 好评;commScore=0 全部(即订单量);五星好评取返回结果orderCommentScore=5
|
//commScore=1 好评;commScore=0 全部(即订单量);五星好评取返回结果orderCommentScore=5
|
||||||
String url = "https://waimaieapp.meituan.com/gw/customer/comment/list";
|
String url = "https://waimaieapp.meituan.com/gw/customer/comment/list";
|
||||||
Map<String,Object> params = new HashMap<>();
|
Map<String,Object> params = new HashMap<>();
|
||||||
params.put("ignoreSetRouterProxy",true);
|
params.put("ignoreSetRouterProxy",true);
|
||||||
params.put("acctId","196975850");
|
params.put("acctId",
|
||||||
params.put("wmPoiId","18277065");
|
valueFromCookie("acctId",store.getStoreCookie()));
|
||||||
params.put("token","0G5G-OOR2Q2APHeiU6dvlB6W2TBBirC_1c6zb_K2HG8I*");
|
params.put("wmPoiId",
|
||||||
|
valueFromCookie("wmPoiId",store.getStoreCookie()));
|
||||||
|
params.put("token",valueFromCookie("token",store.getStoreCookie()));
|
||||||
params.put("appType",3);
|
params.put("appType",3);
|
||||||
params.put("commScore",1);
|
params.put("commScore",1);
|
||||||
params.put("commType",-1);
|
params.put("commType",-1);
|
||||||
|
@ -49,7 +83,14 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
params.put("pageSize",10);
|
params.put("pageSize",10);
|
||||||
params.put("source",1);
|
params.put("source",1);
|
||||||
String result = HttpClientUtilT.doGet(url,null,params);
|
String result = HttpClientUtilT.doGet(url,null,params);
|
||||||
System.out.println(result);
|
System.out.println(result);//落库
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 解析Cookie
|
||||||
|
private String valueFromCookie(String key,String text) {
|
||||||
|
String s = text.substring(text.indexOf(key), text.length());
|
||||||
|
String value = s.substring(s.indexOf("=")+1,s.indexOf(";"));
|
||||||
|
return value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width =120>
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width =120>
|
||||||
<!-- <template slot-scope="scope" v-if="scope.row.roleId !== 1"> -->
|
<!-- <template slot-scope="scope" v-if="scope.row.id !== 1"> -->
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -192,13 +192,16 @@
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['system:role:edit']"
|
v-hasPermi="['system:role:edit']"
|
||||||
>配置</el-button>
|
>配置</el-button>
|
||||||
|
<template slot-scope="scope" v-if="scope.row.selfDeliveryStatus == 1">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:role:remove']"
|
v-hasPermi="['system:role:edit']"
|
||||||
>自配送</el-button>
|
>自配送</el-button>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope" v-if="scope.row.returnVisitStatus !== 1">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -206,6 +209,7 @@
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:role:remove']"
|
v-hasPermi="['system:role:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -356,11 +360,7 @@ export default {
|
||||||
},
|
},
|
||||||
getListSale() {
|
getListSale() {
|
||||||
listSale(this.queryParams).then(response => {
|
listSale(this.queryParams).then(response => {
|
||||||
console.log(response);
|
|
||||||
this.saleList = response.data;
|
this.saleList = response.data;
|
||||||
// this.roleList = response.rows;
|
|
||||||
// this.total = response.total;
|
|
||||||
// this.loading = false;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue