1;账分快照

This commit is contained in:
wangshuai 2024-08-18 16:33:49 +08:00
parent 872e3f0b57
commit d5a2bdb8d4
16 changed files with 163 additions and 140 deletions

View File

@ -85,7 +85,7 @@ public class BusAgentInfoController extends BaseController {
String date = sdf.format(minusDay); String date = sdf.format(minusDay);
String startTime = date + " 00:00:00"; String startTime = date + " 00:00:00";
String endTime = date + " 23:59:59"; String endTime = date + " 23:59:59";
int lastUserIntegralNum = iBusStoreInfoService.lastUserIntegralNum(bean.getAgentAccount(), startTime, endTime); int lastUserIntegralNum = iBusStoreInfoService.lastUserIntegralNum(bean.getAgentAccount(), startTime, endTime,null);
bean.setLastUseIntegralNum(lastUserIntegralNum); bean.setLastUseIntegralNum(lastUserIntegralNum);
bean.setLastPositiveReviewsNum(iBusStoreInfoService.lastPositiveReviewsNum(bean.getAgentAccount(), startTime, endTime)); bean.setLastPositiveReviewsNum(iBusStoreInfoService.lastPositiveReviewsNum(bean.getAgentAccount(), startTime, endTime));
List<BusStoreInfo> lll = ll.stream().filter(f -> "1".equals(f.getReturnVisitStatus())).collect(Collectors.toList()); List<BusStoreInfo> lll = ll.stream().filter(f -> "1".equals(f.getReturnVisitStatus())).collect(Collectors.toList());

View File

@ -2,6 +2,10 @@ package com.ruoyi.business.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.SecurityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -27,8 +31,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi * @author ruoyi
* @date 2024-08-18 * @date 2024-08-18
*/ */
@Api(tags = "账分快照")
@RestController @RestController
@RequestMapping("/integral/integral") @RequestMapping("/business/integral")
public class BusIntegralHistoryInfoController extends BaseController public class BusIntegralHistoryInfoController extends BaseController
{ {
@Autowired @Autowired
@ -37,7 +42,7 @@ public class BusIntegralHistoryInfoController extends BaseController
/** /**
* 查询帐分历史快照列表 * 查询帐分历史快照列表
*/ */
@PreAuthorize("@ss.hasPermi('integral:integral:list')") // @PreAuthorize("@ss.hasPermi('integral:integral:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(BusIntegralHistoryInfo busIntegralHistoryInfo) public TableDataInfo list(BusIntegralHistoryInfo busIntegralHistoryInfo)
{ {
@ -46,14 +51,34 @@ public class BusIntegralHistoryInfoController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@GetMapping("/list1")
public TableDataInfo list1(String account, String expStartTime, String expEndTime)
{
startPage();
expStartTime = expStartTime + " 00:00:00";
expEndTime = expEndTime + " 23:59:59";
List<BusIntegralHistoryInfo> list = busIntegralHistoryInfoService.selectBusIntegralHistoryInfoList1(account, expStartTime,expEndTime);
return getDataTable(list);
}
@ApiOperation("更新账分表")
@GetMapping("/updateIntegralHistoryInfo")
public AjaxResult updateIntegralHistoryInfo()
{
boolean flag = busIntegralHistoryInfoService.updateIntegralHistoryInfo();
return AjaxResult.success(flag);
}
/** /**
* 导出帐分历史快照列表 * 导出帐分历史快照列表
*/ */
@PreAuthorize("@ss.hasPermi('integral:integral:export')") // @PreAuthorize("@ss.hasPermi('integral:integral:export')")
@Log(title = "帐分历史快照", businessType = BusinessType.EXPORT) @Log(title = "帐分历史快照", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, BusIntegralHistoryInfo busIntegralHistoryInfo) public void export(HttpServletResponse response, BusIntegralHistoryInfo busIntegralHistoryInfo)
{ {
if(!"admin".equals(SecurityUtils.getLoginUser().getUsername())){
busIntegralHistoryInfo.setAccount(SecurityUtils.getLoginUser().getUsername());
}
List<BusIntegralHistoryInfo> list = busIntegralHistoryInfoService.selectBusIntegralHistoryInfoList(busIntegralHistoryInfo); List<BusIntegralHistoryInfo> list = busIntegralHistoryInfoService.selectBusIntegralHistoryInfoList(busIntegralHistoryInfo);
ExcelUtil<BusIntegralHistoryInfo> util = new ExcelUtil<BusIntegralHistoryInfo>(BusIntegralHistoryInfo.class); ExcelUtil<BusIntegralHistoryInfo> util = new ExcelUtil<BusIntegralHistoryInfo>(BusIntegralHistoryInfo.class);
util.exportExcel(response, list, "帐分历史快照数据"); util.exportExcel(response, list, "帐分历史快照数据");

View File

@ -90,7 +90,7 @@ public class ProxyProperties {
if (checkdpsvalid(ip) && getdpsvalidtime(ip)) { if (checkdpsvalid(ip) && getdpsvalidtime(ip)) {
return ip; return ip;
} }
getUrl(); // getUrl();
} finally { } finally {
response.close(); response.close();
} }
@ -125,7 +125,7 @@ public class ProxyProperties {
String code = jsonObject.getString(("code")); String code = jsonObject.getString(("code"));
if ("0".equals(code)) { if ("0".equals(code)) {
int count = jsonObject.getJSONObject("data").getInteger(proxy); int count = jsonObject.getJSONObject("data").getInteger(proxy);
if (count > 30) { if (count > 2) {
System.out.println("剩余:"+count); System.out.println("剩余:"+count);
return true; return true;
} }

View File

@ -2,6 +2,7 @@ package com.ruoyi.quartz.task;
import com.ruoyi.business.service.IAiService; import com.ruoyi.business.service.IAiService;
import com.ruoyi.business.service.IBusFifteenInfoService; import com.ruoyi.business.service.IBusFifteenInfoService;
import com.ruoyi.business.service.IBusIntegralHistoryInfoService;
import com.ruoyi.business.service.IMeituanService; import com.ruoyi.business.service.IMeituanService;
import com.ruoyi.business.service.impl.AsyncTaskImpl; import com.ruoyi.business.service.impl.AsyncTaskImpl;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -25,6 +26,8 @@ public class RyTask {
@Autowired @Autowired
private AsyncTaskImpl taskService; private AsyncTaskImpl taskService;
@Autowired
private IBusIntegralHistoryInfoService iBusIntegralHistoryInfoService;
/** /**
* 获取订单并解析号码 5分钟 * 获取订单并解析号码 5分钟
*/ */
@ -72,4 +75,10 @@ public class RyTask {
taskService.clearStoreKey(); taskService.clearStoreKey();
} }
/**
* 账户账分快照
*/
public void updateIntegralHistoryInfo(){
iBusIntegralHistoryInfoService.updateIntegralHistoryInfo();
}
} }

View File

@ -32,11 +32,11 @@ public class BusIntegralHistoryInfo extends BaseEntity
/** ai帐分 */ /** ai帐分 */
@Excel(name = "ai帐分") @Excel(name = "ai帐分")
private Long aiIntegralBalance; private Integer aiIntegralBalance;
/** sms帐分 */ /** sms帐分 */
@Excel(name = "sms帐分") @Excel(name = "sms帐分")
private Long integralBalance; private Integer integralBalance;
public void setId(Long id) public void setId(Long id)
{ {
@ -74,21 +74,21 @@ public class BusIntegralHistoryInfo extends BaseEntity
{ {
return superiorAgentCode; return superiorAgentCode;
} }
public void setAiIntegralBalance(Long aiIntegralBalance) public void setAiIntegralBalance(Integer aiIntegralBalance)
{ {
this.aiIntegralBalance = aiIntegralBalance; this.aiIntegralBalance = aiIntegralBalance;
} }
public Long getAiIntegralBalance() public Integer getAiIntegralBalance()
{ {
return aiIntegralBalance; return aiIntegralBalance;
} }
public void setIntegralBalance(Long integralBalance) public void setIntegralBalance(Integer integralBalance)
{ {
this.integralBalance = integralBalance; this.integralBalance = integralBalance;
} }
public Long getIntegralBalance() public Integer getIntegralBalance()
{ {
return integralBalance; return integralBalance;
} }

View File

@ -2,6 +2,7 @@ package com.ruoyi.business.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.business.domain.BusIntegralHistoryInfo; import com.ruoyi.business.domain.BusIntegralHistoryInfo;
import org.apache.ibatis.annotations.Param;
/** /**
* 帐分历史快照Mapper接口 * 帐分历史快照Mapper接口
@ -58,4 +59,8 @@ public interface BusIntegralHistoryInfoMapper
* @return 结果 * @return 结果
*/ */
public int deleteBusIntegralHistoryInfoByIds(Long[] ids); public int deleteBusIntegralHistoryInfoByIds(Long[] ids);
public int insertBatch(@Param("infoList") List<BusIntegralHistoryInfo> infoList);
List<BusIntegralHistoryInfo> selectBusIntegralHistoryInfoList1(@Param("account")String account,@Param("expStartTime") String expStartTime,@Param("expEndTime") String expEndTime);
} }

View File

@ -32,7 +32,7 @@ public interface BusStoreInfoMapper
public List<BusStoreInfo> selectBusStoreInfoList(BusStoreInfo busStoreInfo); public List<BusStoreInfo> selectBusStoreInfoList(BusStoreInfo busStoreInfo);
int lastUserIntegralNum(@Param("agentAccount") String agentAccount,@Param("startTime") String startTime,@Param("endTime") String endTime); int lastUserIntegralNum(@Param("agentAccount") String agentAccount,@Param("startTime") String startTime,@Param("endTime") String endTime, @Param("integralType") String integralType);
/** /**
* 新增店铺信息 * 新增店铺信息

View File

@ -58,4 +58,8 @@ public interface IBusIntegralHistoryInfoService
* @return 结果 * @return 结果
*/ */
public int deleteBusIntegralHistoryInfoById(Long id); public int deleteBusIntegralHistoryInfoById(Long id);
public Boolean updateIntegralHistoryInfo();
public List<BusIntegralHistoryInfo> selectBusIntegralHistoryInfoList1(String account, String expStartTime, String expEndTime);
} }

View File

@ -38,7 +38,7 @@ public interface IBusStoreInfoService
* @return 店铺信息集合 * @return 店铺信息集合
*/ */
public List<BusStoreInfo> selectBusStoreInfoList(BusStoreInfo busStoreInfo); public List<BusStoreInfo> selectBusStoreInfoList(BusStoreInfo busStoreInfo);
int lastUserIntegralNum(String agentAccount,String startTime,String endTime); int lastUserIntegralNum(String agentAccount,String startTime,String endTime,String integralType);
/** /**
* 新增店铺信息 * 新增店铺信息

View File

@ -318,7 +318,8 @@ public class AiServiceImpl implements IAiService {
BusOrderInfo busOrderInfo = orderInfoService.selectBusOrderInfoById(1L); BusOrderInfo busOrderInfo = orderInfoService.selectBusOrderInfoById(1L);
String phoneNo = busOrderInfo.getPrivcyPhone().split(",")[0];//#分机号# String phoneNo = busOrderInfo.getPrivcyPhone().split(",")[0];//#分机号#
content = content.replaceAll("分机号",busOrderInfo.getPrivcyPhone().split(",")[1]); content = content.replaceAll("分机号",busOrderInfo.getPrivcyPhone().split(",")[1]);
com.alibaba.fastjson.JSONObject jsonObject = busTencentProperties.smsCredential(phoneNo, content); // com.alibaba.fastjson.JSONObject jsonObject = busTencentProperties.smsCredential(phoneNo, content);
com.alibaba.fastjson.JSONObject jsonObject = busTencentProperties.smsCredential("1050089","10011722840851099","4994af11076e4b5e872d9573abb7ee44",phoneNo, content);
if("00".equals(jsonObject.getString("status"))){ if("00".equals(jsonObject.getString("status"))){
log.error("发送成功========"); log.error("发送成功========");
}else{ }else{

View File

@ -1,12 +1,25 @@
package com.ruoyi.business.service.impl; package com.ruoyi.business.service.impl;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import com.ruoyi.business.domain.BusAgentInfo;
import com.ruoyi.business.mapper.BusAgentInfoMapper;
import com.ruoyi.business.mapper.BusStoreInfoMapper;
import com.ruoyi.business.service.IBusAgentInfoService;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
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.BusIntegralHistoryInfoMapper; import com.ruoyi.business.mapper.BusIntegralHistoryInfoMapper;
import com.ruoyi.business.domain.BusIntegralHistoryInfo; import com.ruoyi.business.domain.BusIntegralHistoryInfo;
import com.ruoyi.business.service.IBusIntegralHistoryInfoService; import com.ruoyi.business.service.IBusIntegralHistoryInfoService;
import org.springframework.transaction.annotation.Transactional;
/** /**
* 帐分历史快照Service业务层处理 * 帐分历史快照Service业务层处理
@ -19,6 +32,10 @@ public class BusIntegralHistoryInfoServiceImpl implements IBusIntegralHistoryInf
{ {
@Autowired @Autowired
private BusIntegralHistoryInfoMapper busIntegralHistoryInfoMapper; private BusIntegralHistoryInfoMapper busIntegralHistoryInfoMapper;
@Autowired
private BusAgentInfoMapper busAgentInfoMapper;
@Autowired
private BusStoreInfoMapper busStoreInfoMapper;
/** /**
* 查询帐分历史快照 * 查询帐分历史快照
@ -92,4 +109,49 @@ public class BusIntegralHistoryInfoServiceImpl implements IBusIntegralHistoryInf
{ {
return busIntegralHistoryInfoMapper.deleteBusIntegralHistoryInfoById(id); return busIntegralHistoryInfoMapper.deleteBusIntegralHistoryInfoById(id);
} }
/*
* 更新账分表
* */
@Override
@Transactional(rollbackFor = ServiceException.class)
public Boolean updateIntegralHistoryInfo() {
boolean flag = false;
try {
BusAgentInfo busAgentInfo = new BusAgentInfo();
LocalDateTime localDateTime = LocalDateTime.now().minusDays(1);
String dd = localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
String startTime = dd+" 00:00:00";
String endTime = dd+" 23:59:59";
List<BusAgentInfo> list = busAgentInfoMapper.selectBusAgentInfoList(busAgentInfo);
List<BusIntegralHistoryInfo> infoList = list.stream().map(bean -> {
BusIntegralHistoryInfo busIntegralHistoryInfo = new BusIntegralHistoryInfo();
busIntegralHistoryInfo.setAccount(bean.getAgentAccount());
busIntegralHistoryInfo.setAccountName(bean.getAgentName());
busIntegralHistoryInfo.setSuperiorAgentCode(bean.getSuperiorAgentAccount());
int smsNum = busStoreInfoMapper.lastUserIntegralNum(bean.getAgentAccount(), startTime, endTime,"sms");
int aiNum = busStoreInfoMapper.lastUserIntegralNum(bean.getAgentAccount(), startTime, endTime,"AI");
if(smsNum == 0 && aiNum == 0){
return null;
}else{
busIntegralHistoryInfo.setIntegralBalance(smsNum);
busIntegralHistoryInfo.setAiIntegralBalance(aiNum);
busIntegralHistoryInfo.setCreateTime(Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()));
// remark
return busIntegralHistoryInfo;
}
}).filter(Objects::nonNull).collect(Collectors.toList());
if(busIntegralHistoryInfoMapper.insertBatch(infoList) > 0){
flag = true;
}
}catch (ServiceException e){
throw new ServiceException("更新失败!");
}
return flag;
}
@Override
public List<BusIntegralHistoryInfo> selectBusIntegralHistoryInfoList1(String account, String expStartTime, String expEndTime) {
return busIntegralHistoryInfoMapper.selectBusIntegralHistoryInfoList1(account,expStartTime,expEndTime);
}
} }

View File

@ -86,8 +86,8 @@ public class BusStoreInfoServiceImpl implements IBusStoreInfoService
} }
@Override @Override
public int lastUserIntegralNum(String agentAccount,String startTime,String endTime){ public int lastUserIntegralNum(String agentAccount,String startTime,String endTime,String integralType){
return busStoreInfoMapper.lastUserIntegralNum(agentAccount, startTime, endTime); return busStoreInfoMapper.lastUserIntegralNum(agentAccount, startTime, endTime,integralType);
} }
/** /**

View File

@ -609,8 +609,8 @@ public class MeituanServiceImpl implements IMeituanService {
code = jsonObject.getString(("code")); code = jsonObject.getString(("code"));
} catch (Exception e) { } catch (Exception e) {
log.error("==============="+orderInfo.getOrderNo()+"承接-隧道代理订单解析号码出错:"+e.getMessage()+"==========转换隧道代理"); log.error("==============="+orderInfo.getOrderNo()+"承接-隧道代理订单解析号码出错:"+e.getMessage()+"==========转换隧道代理");
client = proxyHttpClient();
try { try {
client = proxyHttpClient();
HttpResponse response = client.execute(httpPost); HttpResponse response = client.execute(httpPost);
HttpEntity responseEntity = response.getEntity(); HttpEntity responseEntity = response.getEntity();
String resp = EntityUtils.toString(responseEntity); String resp = EntityUtils.toString(responseEntity);
@ -618,8 +618,8 @@ public class MeituanServiceImpl implements IMeituanService {
code = jsonObject.getString(("code")); code = jsonObject.getString(("code"));
}catch (Exception e1) { }catch (Exception e1) {
log.error("==============="+orderInfo.getOrderNo()+"隧道代理订单解析号码出错:" + e1.getMessage() + "===========转换私密代理"); log.error("==============="+orderInfo.getOrderNo()+"隧道代理订单解析号码出错:" + e1.getMessage() + "===========转换私密代理");
client = proxyHttpClient2(proxyProperties.getUrl());
try { try {
client = proxyHttpClient2(proxyProperties.getUrl());
HttpResponse response = client.execute(httpPost); HttpResponse response = client.execute(httpPost);
HttpEntity responseEntity = response.getEntity(); HttpEntity responseEntity = response.getEntity();
String resp = EntityUtils.toString(responseEntity); String resp = EntityUtils.toString(responseEntity);

View File

@ -35,6 +35,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectBusIntegralHistoryInfoList1" resultMap="BusIntegralHistoryInfoResult">
<include refid="selectBusIntegralHistoryInfoVo"/>
<where>
<if test="account != null and account != ''"> and account = #{account}</if>
<if test="expStartTime != null and expEndTime != null"> and create_time between #{expStartTime} and #{expEndTime}</if>
</where>
</select>
<insert id="insertBusIntegralHistoryInfo" parameterType="BusIntegralHistoryInfo" useGeneratedKeys="true" keyProperty="id"> <insert id="insertBusIntegralHistoryInfo" parameterType="BusIntegralHistoryInfo" useGeneratedKeys="true" keyProperty="id">
insert into bus_integral_history_info insert into bus_integral_history_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -57,6 +65,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<insert id="insertBatch">
insert into bus_integral_history_info (account,account_name,superior_agent_code,ai_integral_balance,integral_balance,create_time,remark) values
<foreach collection="infoList" separator="," item="item">
(#{item.account},#{item.accountName},#{item.superiorAgentCode},#{item.aiIntegralBalance},#{item.integralBalance},#{item.createTime},#{item.remark})
</foreach>
</insert>
<update id="updateBusIntegralHistoryInfo" parameterType="BusIntegralHistoryInfo"> <update id="updateBusIntegralHistoryInfo" parameterType="BusIntegralHistoryInfo">
update bus_integral_history_info update bus_integral_history_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">

View File

@ -64,8 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="lastUserIntegralNum" parameterType="java.lang.String" resultType="java.lang.Integer"> <select id="lastUserIntegralNum" parameterType="java.lang.String" resultType="java.lang.Integer">
select ifnull(sum(integral_update_num),0) from bus_integral_record select ifnull(sum(integral_update_num),0) from bus_integral_record
where account = #{agentAccount} and update_type = '消耗账分' where account = #{agentAccount}
and update_type = '消耗账分'
and integral_update_time between #{startTime} and #{endTime} and integral_update_time between #{startTime} and #{endTime}
<if test="integralType != null "> and integral_type = #{integralType}</if>
</select> </select>
<select id="selectBusStoreInfoList" parameterType="BusStoreInfo" resultMap="BusStoreInfoResult"> <select id="selectBusStoreInfoList" parameterType="BusStoreInfo" resultMap="BusStoreInfoResult">

View File

@ -3,7 +3,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="结算时间" prop="start_time"> <el-form-item label="结算时间" prop="start_time">
<el-date-picker <el-date-picker
v-model="timeRange1" v-model="dateRange1"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
@ -27,52 +27,6 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['system:info:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:info:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:info:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['system:info:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" width="50" > <el-table-column label="序号" type="index" width="50" >
@ -82,10 +36,10 @@
</el-table-column> </el-table-column>
<el-table-column label="账号" align="center" prop="account" /> <el-table-column label="账号" align="center" prop="account" />
<el-table-column label="账户名" align="center" prop="accountName" /> <el-table-column label="账户名" align="center" prop="accountName" />
<el-table-column label="代理账号" align="center" prop="noGrantTotal" /> <el-table-column label="代理账号" align="center" prop="superiorAgentCode" />
<el-table-column label="安全帐分快照" align="center" prop="isGrantTotal" /> <el-table-column label="安全帐分快照" align="center" prop="integralBalance" />
<el-table-column label="普通帐分快照" align="center" prop="orderTotal" /> <el-table-column label="普通帐分快照" align="center" prop="aiIntegralBalance" />
<el-table-column label="快照时间" align="center" prop="time" /> <el-table-column label="快照时间" align="center" prop="createTime" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">--> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
@ -107,66 +61,11 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改店铺单日历史信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="店铺id" prop="storeId">
<el-input v-model="form.storeId" placeholder="请输入店铺id" />
</el-form-item>
<el-form-item label="昨日订单量" prop="lastOrderNum">
<el-input v-model="form.lastOrderNum" placeholder="请输入昨日订单量" />
</el-form-item>
<el-form-item label="昨日好评量" prop="lastPositiveReviewsNum">
<el-input v-model="form.lastPositiveReviewsNum" placeholder="请输入昨日好评量" />
</el-form-item>
<el-form-item label="昨日五星量" prop="lastFiveStarReviewsNum">
<el-input v-model="form.lastFiveStarReviewsNum" placeholder="请输入昨日五星量" />
</el-form-item>
<el-form-item label="昨日回访量" prop="lastReturnVisitNum">
<el-input v-model="form.lastReturnVisitNum" placeholder="请输入昨日回访量" />
</el-form-item>
<el-form-item label="昨日回访比50%" prop="lastReturnVisitRate">
<el-input v-model="form.lastReturnVisitRate" placeholder="请输入昨日回访比50%" />
</el-form-item>
<el-form-item label="今日回访量" prop="todayReturnVisitNum">
<el-input v-model="form.todayReturnVisitNum" placeholder="请输入今日回访量" />
</el-form-item>
<el-form-item label="评分" prop="score">
<el-input v-model="form.score" placeholder="请输入评分" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="open1" width="800px" append-to-body>
<el-form ref="form1" :model="form1" label-width="150px">
<el-form-item label="导出时段" prop="start_time">
<el-date-picker
v-model="timeRange1"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="expireTimeOPtion"
align="right">
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitExport"> </el-button>
<el-button @click="cancel1"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listInfo1, getInfo, delInfo, addInfo, updateInfo } from "@/api/statistics/excel"; import { listInfo, listInfo1, getInfo, delInfo, addInfo, updateInfo } from "@/api/statistics/integral";
export default { export default {
name: "Info", name: "Info",
@ -200,7 +99,7 @@ export default {
// //
open: false, open: false,
open1: false, open1: false,
timeRange1: [new Date(new Date()-(24*60*60*1000)),new Date(new Date()-(24*60*60*1000))], dateRange1: [new Date(new Date()-(24*60*60*1000)),new Date(new Date()-(24*60*60*1000))],
queryParams1: { queryParams1: {
storeId: undefined, storeId: undefined,
storeName: undefined, storeName: undefined,
@ -211,14 +110,6 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
storeId: null,
lastOrderNum: null,
lastPositiveReviewsNum: null,
lastFiveStarReviewsNum: null,
lastReturnVisitNum: null,
lastReturnVisitRate: null,
todayReturnVisitNum: null,
score: null,
expStartTime: null, expStartTime: null,
expEndTime: null, expEndTime: null,
account: null account: null
@ -235,13 +126,22 @@ export default {
}; };
}, },
created() { created() {
this.dateRange1 = [this.formatDate(new Date(new Date()-(24*60*60*1000))),this.formatDate(new Date(new Date()-(24*60*60*1000)))]
this.getList(); this.getList();
}, },
methods: { methods: {
formatDate(date) {
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
},
/** 查询店铺单日历史信息列表 */ /** 查询店铺单日历史信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listInfo1(this.queryParams).then(response => { this.queryParams.expStartTime = this.dateRange1[0]
this.queryParams.expEndTime = this.dateRange1[1]
listInfo(this.queryParams).then(response => {
this.infoList = response.rows; this.infoList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -304,13 +204,13 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.queryParams.expStartTime = this.timeRange1[0]; this.queryParams.expStartTime = this.dateRange1[0];
this.queryParams.expEndTime = this.timeRange1[1]; this.queryParams.expEndTime = this.dateRange1[1];
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.timeRange1 = [new Date(new Date()-(24*60*60*1000)),new Date(new Date()-(24*60*60*1000))]; this.dateRange1 = [this.formatDate(new Date(new Date()-(24*60*60*1000))),this.formatDate(new Date(new Date()-(24*60*60*1000)))]
this.queryParams.account=undefined; this.queryParams.account=undefined;
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();