1,授权成功通知提示-脚本

2,代理管理昨日消耗 昨日好评量未显示
3,倒序显示内容
This commit is contained in:
wangshuai 2024-07-18 18:58:19 +08:00
parent 8f7e9f0535
commit 1dc3b89e6b
18 changed files with 51 additions and 29 deletions

View File

@ -1,4 +1,4 @@
document.addEventListener("click", function(e) {
document.addEventListener("mouseup", function(e) {
// 处理点击事件的代码
var account = document.getElementById("login")
var password = document.getElementById("password")
@ -74,9 +74,9 @@ document.addEventListener("click", function(e) {
xhr.send(JSON.stringify(sendData))
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
if (xhr.responseText === 'true') {
// if (xhr.responseText === 'true') {
alert('当前授权完成,请直接关闭当前浏览器!')
}
// }
}
}
}else if(phone !== null && phone !== 'null' ){
@ -91,9 +91,9 @@ document.addEventListener("click", function(e) {
xhr.send(JSON.stringify(sendData))
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
if (xhr.responseText === 'true') {
// if (xhr.responseText === 'true') {
alert('当前授权完成,请直接关闭当前浏览器!')
}
// }
}
}
}

View File

@ -83,9 +83,9 @@ public class BusAgentInfoController extends BaseController {
String date = sdf.format(minusDay);
String startTime = date + " 00:00:00";
String endTime = date + " 23:59:59";
int lastUserIntegralNum = iBusStoreInfoService.lastUserIntegralNum(busAgentInfo.getAgentAccount(), startTime, endTime);
int lastUserIntegralNum = iBusStoreInfoService.lastUserIntegralNum(bean.getAgentAccount(), startTime, endTime);
bean.setLastUseIntegralNum(lastUserIntegralNum);
bean.setLastPositiveReviewsNum(iBusStoreInfoService.lastPositiveReviewsNum(bean.getAgentAccount()));
List<BusStoreInfo> lll = ll.stream().filter(f -> "1".equals(f.getReturnVisitStatus())).collect(Collectors.toList());
bean.setOperateStoreNum(lll.size());
SysUser user1 = iSysUserService.selectUserById(bean.getId());

View File

@ -12,6 +12,7 @@ ruoyi:
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证
captchaType: math
# 根路径地址
baseUrl: http://localhost/dev-api
# 开发环境配置

View File

@ -30,7 +30,7 @@ public class RuoYiConfig
/** 验证码类型 */
private static String captchaType;
private static String baseUrl;
private String baseUrl;
public String getName()
{
@ -122,11 +122,11 @@ public class RuoYiConfig
return getProfile() + "/upload";
}
public static String getBaseUrl() {
public String getBaseUrl() {
return baseUrl;
}
public static void setBaseUrl(String baseUrl) {
RuoYiConfig.baseUrl = baseUrl;
public void setBaseUrl(String baseUrl) {
this.baseUrl = baseUrl;
}
}

View File

@ -62,4 +62,6 @@ public interface BusStoreInfoMapper
public int deleteBusStoreInfoByIds(Long[] ids);
String getBindUserByStoreCode(String wmPoiId);
int lastPositiveReviewsNum(String agentAccount);
}

View File

@ -79,4 +79,6 @@ public interface IBusStoreInfoService
int saveOrUpdateConfig(BusStoreConfigInfo busStoreConfigInfo);
int changeReturnVisitStatus(BusStoreInfo busStoreInfo);
int lastPositiveReviewsNum(String agentAccount);
}

View File

@ -125,6 +125,12 @@ public class BusStoreInfoServiceImpl implements IBusStoreInfoService
busStoreInfo.setUpdateTime(DateUtils.getNowDate());
return busStoreInfoMapper.updateBusStoreInfo(busStoreInfo);
}
@Override
public int lastPositiveReviewsNum(String agentAccount) {
return busStoreInfoMapper.lastPositiveReviewsNum(agentAccount);
}
/**
* 批量删除店铺信息
*

View File

@ -30,6 +30,8 @@ public class BusTemplateInfoServiceImpl implements IBusTemplateInfoService
@Autowired
private BusTemplateAttrInfoMapper busTemplateAttrInfoMapper;
@Autowired
private RuoYiConfig ruoyiConfig;
/**
* 查询模版
*
@ -119,7 +121,7 @@ public class BusTemplateInfoServiceImpl implements IBusTemplateInfoService
if(list.size() == 1){
BusTemplateInfo busTemplateInfo1 = list.get(0);
String content = busTemplateInfo1.getTemplateContent();
String http = RuoYiConfig.getBaseUrl()==null?"http://localhost/dev-api":"";
String http = ruoyiConfig.getBaseUrl();
if(content.contains("img src")){
int img = content.indexOf("<img");
String[] array = content.split("/dev-api");

View File

@ -149,6 +149,7 @@ public class MeituanServiceImpl implements IMeituanService {
storeInfo.setStorePassword(cookie.getPassword());
storeInfo.setStoreName(cookie.getWmPoiName());
storeInfo.setStoreCookie(cookie.getCookie());
storeInfo.setSelfDeliveryStatus("1");// 1 正常 2 自配送 3 删除
storeInfo.setGrantStatus("1");//授权登录状态
}else{
storeInfo.setId(list.get(0).getId());

View File

@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if>
<if test="operationStatus != null and operationStatus != ''"> and operation_status = #{operationStatus}</if>
</where>
ORDER BY update_time desc
</select>
<select id="selectBusMarketOperationInfoById" parameterType="Long" resultMap="BusMarketOperationInfoResult">
@ -45,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if>
<if test="operationStatus != null and operationStatus != ''"> and operation_status = #{operationStatus}</if>
</where>
ORDER BY update_time desc
</select>
<insert id="insertBusMarketOperationInfo" parameterType="BusMarketOperationInfo">

View File

@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="finishTime != null "> and finish_time = #{finishTime}</if>
and phone_number is not null
</where>
ORDER BY return_visit_time desc
</select>
<select id="selectBusReturnVisitInfoList1" parameterType="BusReturnVisitInfo" resultMap="BusReturnVisitInfoResult">
@ -51,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="storeCode != null and storeCode != ''"> and store_code = #{storeCode}</if>
and phone_number is not null and return_visit_time is not null
</where>
ORDER BY return_visit_time desc
</select>
<select id="selectBusReturnVisitInfoById" parameterType="Long" resultMap="BusReturnVisitInfoResult">

View File

@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="lastUserIntegralNum" parameterType="java.lang.String" resultType="java.lang.Integer">
select count(integral_update_num) from bus_integral_record
select ifnull(sum(integral_update_num),0) from bus_integral_record
where account = #{agentAccount} and update_type = '消耗账分'
and integral_update_time between #{startTime} and #{endTime}
</select>
@ -81,6 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectBusStoreInfoVo"/>
where id = #{wmPoiId}
</select>
<select id="lastPositiveReviewsNum" resultType="java.lang.Integer">
select ifnull(sum(last_positive_reviews_num),0) from bus_store_day_info
where store_id in (select id from bus_store_info where bind_user =#{agentAccount})
</select>
<insert id="insertBusStoreInfo" parameterType="BusStoreInfo" useGeneratedKeys="true" keyProperty="id">
insert into bus_store_info

View File

@ -63,7 +63,7 @@
<!-- v-hasPermi="['system:info:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
@ -72,7 +72,7 @@
@click="handleExport"
v-hasPermi="['system:info:export']"
>导出</el-button>
</el-col>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

View File

@ -144,15 +144,15 @@
</el-row>
<el-table v-loading="loading" :data="storeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" ></el-table-column>
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" type="index" width="50" />
<el-table-column label="平台" prop="platformType" width="55">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_platform_type" :value="scope.row.platformType"/>
</template>
</el-table-column>
<el-table-column label="编号" prop="storeCode" :show-overflow-tooltip="true" width="55" align="center" />
<el-table-column label="名称" prop="storeName" :show-overflow-tooltip="true" align="center" />
<el-table-column label="编号" prop="storeCode" width="85" align="center" />
<el-table-column label="名称" prop="storeName" align="center" />
<el-table-column label="在线状态" prop ="grantStatus" align="center" width="75" >
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_grant_status" :value="scope.row.grantStatus"/>

View File

@ -26,14 +26,14 @@
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
>导出</el-button> -->
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

View File

@ -23,7 +23,7 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-row :gutter="10" class="mb8"> -->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
@ -66,8 +66,8 @@
<!-- v-hasPermi="['system:record:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> -->
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />

View File

@ -44,7 +44,7 @@
@click="handleUpdate"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="danger"
plain
@ -62,7 +62,7 @@
size="mini"
@click="handleExport"
>导出</el-button>
</el-col>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

View File

@ -23,12 +23,12 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</el-row> -->
<el-table v-loading="loading" :data="infoList" >
<el-table-column label="序号" align="center" prop="id" />
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="店铺名称" align="center" prop="storeName" />
<el-table-column label="店铺标识" align="center" prop="storeCode" />
<el-table-column label="操作账户" align="center" prop="updateUser" />