1.管理员首页统计
2.审核通过后,判断是否还有正在进行中的订单,没有没有才退款
This commit is contained in:
parent
6f48868cdd
commit
b18cd3cceb
|
@ -40,7 +40,13 @@ public class IndexController extends BaseController
|
||||||
@GetMapping("/getAreaList")
|
@GetMapping("/getAreaList")
|
||||||
public AjaxResult getAreaList()
|
public AjaxResult getAreaList()
|
||||||
{
|
{
|
||||||
List<EtOperatingArea> longs = etOperatingAreaService.selectAreaListByDeptId2(getDeptId());
|
Long deptId;
|
||||||
|
if(getUserId() == 1){
|
||||||
|
deptId = null;
|
||||||
|
}else{
|
||||||
|
deptId = getDeptId();
|
||||||
|
}
|
||||||
|
List<EtOperatingArea> longs = etOperatingAreaService.selectAreaListByDeptId2(deptId);
|
||||||
logger.info("根据token获取运营区列表:【{}】", JSON.toJSON(longs));
|
logger.info("根据token获取运营区列表:【{}】", JSON.toJSON(longs));
|
||||||
return success(longs);
|
return success(longs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -945,6 +945,7 @@ public class AppVerifyController extends BaseController
|
||||||
if(!ServiceConstants.ORDER_TYPE_RIDING.equals(etOrder1.getType())){
|
if(!ServiceConstants.ORDER_TYPE_RIDING.equals(etOrder1.getType())){
|
||||||
throw new ServiceException("保存视频失败,类型必须是骑行订单");
|
throw new ServiceException("保存视频失败,类型必须是骑行订单");
|
||||||
}
|
}
|
||||||
|
etOrder.setUploadTime(DateUtils.getNowDate());
|
||||||
return toAjax(etOrderService.updateEtOrderByOrderNo(etOrder));
|
return toAjax(etOrderService.updateEtOrderByOrderNo(etOrder));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.AsArticleClassify;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.core.domain.entity.AsArticleClassify;
|
|
||||||
import com.ruoyi.system.service.IAsArticleClassifyService;
|
import com.ruoyi.system.service.IAsArticleClassifyService;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -51,6 +51,22 @@ public class AsArticleClassifyController extends BaseController
|
||||||
return success(articleClassifies);
|
return success(articleClassifies);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分类列表(排除节点)
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:articleClassify:list')")
|
||||||
|
@GetMapping("/list/excludes/{classifyIds}")
|
||||||
|
public AjaxResult excludeChild(@PathVariable(value = "classifyIds", required = false) List<Long> classifyIds)
|
||||||
|
{
|
||||||
|
List<AsArticleClassify> articleClassifies = asArticleClassifyService.selectClassifyListWithIsolate(new AsArticleClassify());
|
||||||
|
if (classifyIds != null && !classifyIds.isEmpty()) {
|
||||||
|
for (Long classifyId:classifyIds) {
|
||||||
|
articleClassifies.removeIf(d -> d.getClassifyId().intValue() == classifyId || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), classifyId + ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return success(articleClassifies);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据分类编号获取详细信息
|
* 根据分类编号获取详细信息
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||||
"/appCaptcha",
|
"/appCaptcha",
|
||||||
"/appCodeLogin",
|
"/appCodeLogin",
|
||||||
"/app/**",
|
"/app/**",
|
||||||
// "/appVerify/**",
|
"/appVerify/**",
|
||||||
"/common/upload",
|
"/common/upload",
|
||||||
"/common/receive",
|
"/common/receive",
|
||||||
"/payment/callback/**",
|
"/payment/callback/**",
|
||||||
|
|
|
@ -239,6 +239,11 @@ public class EtOrder extends BaseEntity
|
||||||
@Excel(name = "还车视频")
|
@Excel(name = "还车视频")
|
||||||
private String videoUrl;
|
private String videoUrl;
|
||||||
|
|
||||||
|
/** 视频上传时间 */
|
||||||
|
@Excel(name = "视频上传时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date uploadTime;
|
||||||
|
|
||||||
/** 扣除金额 */
|
/** 扣除金额 */
|
||||||
@Excel(name = "扣除金额")
|
@Excel(name = "扣除金额")
|
||||||
private String deductionAmount;
|
private String deductionAmount;
|
||||||
|
|
|
@ -134,22 +134,25 @@ public class IndexAdminVo {
|
||||||
@Data
|
@Data
|
||||||
public static class OperationVo {
|
public static class OperationVo {
|
||||||
/** 4g解锁失败 */
|
/** 4g解锁失败 */
|
||||||
private Integer failedUnlockCount;
|
private Integer failedUnlockCount=0;
|
||||||
|
|
||||||
|
/** 4g解锁次数 */
|
||||||
|
private Integer unlockCount=0;
|
||||||
|
|
||||||
/** 蓝牙解锁数 */
|
/** 蓝牙解锁数 */
|
||||||
private Integer bluetoothUnlockCount;
|
private Integer bluetoothUnlockCount=0;
|
||||||
|
|
||||||
/** 设备离线率 */
|
/** 设备离线率 */
|
||||||
private BigDecimal deviceOfflineRate;
|
private BigDecimal deviceOfflineRate;
|
||||||
|
|
||||||
/** 异常排查车辆 */
|
/** 异常排查车辆 */
|
||||||
private Integer faultOrderCount;
|
private Integer faultOrderCount=0;
|
||||||
|
|
||||||
/** 待换电 */
|
/** 待换电 */
|
||||||
private Integer replacementOrderCount;
|
private Integer replacementOrderCount=0;
|
||||||
|
|
||||||
/** 待维修 */
|
/** 待维修 */
|
||||||
private Integer repairCount;
|
private Integer repairCount=0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.domain.SysOperLog;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志 数据层
|
* 操作日志 数据层
|
||||||
|
@ -45,4 +46,16 @@ public interface SysOperLogMapper
|
||||||
* 清空操作日志
|
* 清空操作日志
|
||||||
*/
|
*/
|
||||||
public void cleanOperLog();
|
public void cleanOperLog();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4g解锁失败
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getUnlockCount(@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd, @Param("status") String status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 蓝牙解锁数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getBluetoothUnlockCount(@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd , @Param("status") String status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,6 +175,11 @@ public interface IEtOrderService
|
||||||
*/
|
*/
|
||||||
EtOrder getCurrentOrder(String sn);
|
EtOrder getCurrentOrder(String sn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据userId获取当前正在骑行中的订单
|
||||||
|
*/
|
||||||
|
EtOrder getCurrentOrderByUserId(Long userId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除订单信息
|
* 删除订单信息
|
||||||
|
|
|
@ -45,4 +45,16 @@ public interface ISysOperLogService
|
||||||
* 清空操作日志
|
* 清空操作日志
|
||||||
*/
|
*/
|
||||||
public void cleanOperLog();
|
public void cleanOperLog();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4g解锁失败
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getUnlockCount(String timeStart,String timeEnd,String status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 蓝牙解锁数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getBluetoothUnlockCount(String todayStartDateStr, String todayEndDateStr,String status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,19 +3,17 @@ package com.ruoyi.system.service.impl;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.constant.IotConstants;
|
import com.ruoyi.common.constant.IotConstants;
|
||||||
import com.ruoyi.common.constant.ServiceConstants;
|
import com.ruoyi.common.constant.ServiceConstants;
|
||||||
import com.ruoyi.common.core.domain.entity.AsUser;
|
import com.ruoyi.common.core.domain.entity.AsUser;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.enums.BusinessStatus;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.CommonUtil;
|
import com.ruoyi.common.utils.CommonUtil;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.common.utils.onenet.ResponseVo;
|
import com.ruoyi.common.utils.onenet.ResponseVo;
|
||||||
import com.ruoyi.common.utils.onenet.Token;
|
import com.ruoyi.common.utils.onenet.Token;
|
||||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||||
|
@ -111,12 +109,15 @@ public class EtOrderServiceImpl implements IEtOrderService
|
||||||
@Resource
|
@Resource
|
||||||
private EtFaultMapper etFaultMapper;
|
private EtFaultMapper etFaultMapper;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private EtAdminOrderMapper etAdminOrderMapper;
|
private EtAdminOrderMapper etAdminOrderMapper;
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private EtCapitalFlowMapper etCapitalFlowMapper;
|
private EtCapitalFlowMapper etCapitalFlowMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysOperLogService operLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询订单
|
* 查询订单
|
||||||
*
|
*
|
||||||
|
@ -357,6 +358,23 @@ public class EtOrderServiceImpl implements IEtOrderService
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据userId获取当前正在骑行中的订单
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EtOrder getCurrentOrderByUserId(Long userId) {
|
||||||
|
EtOrder etOrder = new EtOrder();
|
||||||
|
etOrder.setUserId(userId);
|
||||||
|
etOrder.setStatus(ServiceConstants.ORDER_STATUS_RIDING);
|
||||||
|
List<EtOrder> etOrders = etOrderMapper.selectEtOrderList(etOrder);
|
||||||
|
if(ObjectUtil.isNotEmpty(etOrders)){
|
||||||
|
return etOrders.get(0);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除订单信息
|
* 删除订单信息
|
||||||
*
|
*
|
||||||
|
@ -463,29 +481,36 @@ public class EtOrderServiceImpl implements IEtOrderService
|
||||||
if(updateEtOrder == 0){
|
if(updateEtOrder == 0){
|
||||||
throw new ServiceException("还车审核失败,更新订单失败");
|
throw new ServiceException("还车审核失败,更新订单失败");
|
||||||
}
|
}
|
||||||
/** 2.退押金*/
|
// 当前还有正在骑行中的订单,不退押金,只有用户没有正在骑行中的订单时才发起退款
|
||||||
EtOrder depositOrder = getDepositOrder(etOrder.getUserId());
|
EtOrder currentOrder = etOrderService.getCurrentOrderByUserId(etOrder.getUserId());
|
||||||
BigDecimal deposit = depositOrder.getTotalFee();
|
if(ObjectUtil.isNull(currentOrder)){
|
||||||
Refund refund = wxPayService.refund(depositOrder, "还车审核通过后退押金",deposit,IdUtils.getOrderNo("ref"));
|
log.info("【还车审核通过】当前用户没有正在骑行的订单,开始退押金");
|
||||||
/** 3.记录退款表 创建退款对象*/
|
/** 2.退押金*/
|
||||||
depositOrder.setReason("还车审核通过后退押金");
|
EtOrder depositOrder = getDepositOrder(etOrder.getUserId());
|
||||||
EtRefund refund1= createRefund(depositOrder, deposit, null, null, null, null, refund.getOutRefundNo(),ServiceConstants.REFUND_TYPE_DEPOSIT);
|
BigDecimal deposit = depositOrder.getTotalFee();
|
||||||
int i = etRefundService.insertEtRefund(refund1);
|
Refund refund = wxPayService.refund(depositOrder, "还车审核通过后退押金",deposit,IdUtils.getOrderNo("ref"));
|
||||||
if(i == 0){
|
/** 3.记录退款表 创建退款对象*/
|
||||||
log.info("【还车审核通过】保存退款对象失败");
|
depositOrder.setReason("还车审核通过后退押金");
|
||||||
throw new ServiceException("【还车审核通过】,保存退款对象失败");
|
EtRefund refund1= createRefund(depositOrder, deposit, null, null, null, null, refund.getOutRefundNo(),ServiceConstants.REFUND_TYPE_DEPOSIT);
|
||||||
}
|
int i = etRefundService.insertEtRefund(refund1);
|
||||||
/** 4.更新用户余额*/
|
if(i == 0){
|
||||||
AsUser asUser = asUserService.selectUserById(depositOrder.getUserId());
|
log.info("【还车审核通过】保存退款对象失败");
|
||||||
if(asUser!=null){
|
throw new ServiceException("【还车审核通过】,保存退款对象失败");
|
||||||
// 更新用户并更新缓存
|
|
||||||
asUser.setBalance(BigDecimal.ZERO);
|
|
||||||
if (asUserService.updateUserProfile(asUser) > 0)
|
|
||||||
{
|
|
||||||
log.info("【还车审核通过】更新用户信息成功:"+ JSON.toJSON(asUser));
|
|
||||||
}else{
|
|
||||||
throw new ServiceException("【还车审核通过】,更新用户信息失败");
|
|
||||||
}
|
}
|
||||||
|
/** 4.更新用户余额*/
|
||||||
|
AsUser asUser = asUserService.selectUserById(depositOrder.getUserId());
|
||||||
|
if(asUser!=null){
|
||||||
|
// 更新用户并更新缓存
|
||||||
|
asUser.setBalance(BigDecimal.ZERO);
|
||||||
|
if (asUserService.updateUserProfile(asUser) > 0)
|
||||||
|
{
|
||||||
|
log.info("【还车审核通过】更新用户信息成功:"+ JSON.toJSON(asUser));
|
||||||
|
}else{
|
||||||
|
throw new ServiceException("【还车审核通过】,更新用户信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
log.info("【还车审核通过】当前用户还有正在骑行的订单------不退押金");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -692,9 +717,17 @@ public class EtOrderServiceImpl implements IEtOrderService
|
||||||
indexAdminVo.setVehicleVo(vehicleVo);
|
indexAdminVo.setVehicleVo(vehicleVo);
|
||||||
|
|
||||||
/** 运维统计*/
|
/** 运维统计*/
|
||||||
|
String formattedDate = dateFormat.format(calendar.getTime());
|
||||||
|
String todayStartDateStr = formattedDate + " " + Constants.DATE_FORMAT_START_PEREND;
|
||||||
|
String todayEndDateStr = formattedDate + " " + Constants.DATE_FORMAT_END_PEREND;
|
||||||
|
|
||||||
IndexAdminVo.OperationVo operationVo = new IndexAdminVo.OperationVo();
|
IndexAdminVo.OperationVo operationVo = new IndexAdminVo.OperationVo();
|
||||||
operationVo.setReplacementOrderCount(etAdminOrderMapper.getOrderCount(ServiceConstants.ADMIN_ORDER_TYPE_REPLACEMENT,ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_UNDER_WAY,null));
|
operationVo.setReplacementOrderCount(etAdminOrderMapper.getOrderCount(ServiceConstants.ADMIN_ORDER_TYPE_REPLACEMENT,ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_UNDER_WAY,null));//待换电
|
||||||
operationVo.setRepairCount(etAdminOrderMapper.getOrderCount(ServiceConstants.ADMIN_ORDER_TYPE_REPAIR,ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_REPAIR,null));
|
operationVo.setRepairCount(etAdminOrderMapper.getOrderCount(ServiceConstants.ADMIN_ORDER_TYPE_REPAIR,ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_REPAIR,null));//待维修
|
||||||
|
operationVo.setFailedUnlockCount(operLogService.getUnlockCount(todayStartDateStr, todayEndDateStr,BusinessStatus.FAIL.name()));// 4g解锁失败
|
||||||
|
operationVo.setUnlockCount(operLogService.getUnlockCount(todayStartDateStr, todayEndDateStr,BusinessStatus.SUCCESS.name()));//4g解锁次数
|
||||||
|
operationVo.setDeviceOfflineRate(new BigDecimal(deviceNumVo.getOfflineNum()).divide(new BigDecimal(deviceNumVo.getInOperation()), 2, RoundingMode.HALF_UP));//设备离线率
|
||||||
|
operationVo.setBluetoothUnlockCount(operLogService.getBluetoothUnlockCount(todayStartDateStr, todayEndDateStr,BusinessStatus.SUCCESS.name()));//蓝牙解锁数
|
||||||
indexAdminVo.setOperationVo(operationVo);
|
indexAdminVo.setOperationVo(operationVo);
|
||||||
log.info("【首页统计-总管理】indexAdminVo==={}",JSON.toJSON(indexAdminVo));
|
log.info("【首页统计-总管理】indexAdminVo==={}",JSON.toJSON(indexAdminVo));
|
||||||
|
|
||||||
|
@ -724,8 +757,8 @@ public class EtOrderServiceImpl implements IEtOrderService
|
||||||
indexAdminVo.setTodayOrderCount(etOrderMapper.getOrderNum(startDateStr, endDateStr, null));//今日订单数
|
indexAdminVo.setTodayOrderCount(etOrderMapper.getOrderNum(startDateStr, endDateStr, null));//今日订单数
|
||||||
indexAdminVo.setTodayOrderFee(etOrderMapper.getPayFee(startDateStr, endDateStr, null, null));//今日订单金额
|
indexAdminVo.setTodayOrderFee(etOrderMapper.getPayFee(startDateStr, endDateStr, null, null));//今日订单金额
|
||||||
|
|
||||||
indexAdminVo.setTodayOrderCount(etOrderMapper.getOrderNum(null, null, null));//总订单数
|
indexAdminVo.setTotalOrderCount(etOrderMapper.getOrderNum(null, null, null));//总订单数
|
||||||
indexAdminVo.setTodayOrderFee(etOrderMapper.getPayFee(null, null, null, null));//总订单金额
|
indexAdminVo.setTotalOrderFee(etOrderMapper.getPayFee(null, null, null, null));//总订单金额
|
||||||
|
|
||||||
indexAdminVo.setTodayRefundFee(new BigDecimal(etOrderMapper.getTotalRefund(startDateStr,endDateStr,null)));// 今日退款金额
|
indexAdminVo.setTodayRefundFee(new BigDecimal(etOrderMapper.getTotalRefund(startDateStr,endDateStr,null)));// 今日退款金额
|
||||||
indexAdminVo.setTodayRefundFee(new BigDecimal(etOrderMapper.getTotalRefund(null,null,null)));// 总退款金额
|
indexAdminVo.setTodayRefundFee(new BigDecimal(etOrderMapper.getTotalRefund(null,null,null)));// 总退款金额
|
||||||
|
@ -934,7 +967,11 @@ public class EtOrderServiceImpl implements IEtOrderService
|
||||||
etOrder.setAppointmentStartTime(DateUtils.getNowDate());//预约开始时间
|
etOrder.setAppointmentStartTime(DateUtils.getNowDate());//预约开始时间
|
||||||
}else if(order.getType().equals("4")){//押金,创建初始订单,根据计费规则,结算费用,
|
}else if(order.getType().equals("4")){//押金,创建初始订单,根据计费规则,结算费用,
|
||||||
etOrder.setType(ServiceConstants.ORDER_TYPE_DEPOSIT);
|
etOrder.setType(ServiceConstants.ORDER_TYPE_DEPOSIT);
|
||||||
EtOperatingArea area = etOperatingAreaService.selectEtOperatingAreaByAreaId(user.getAreaId());
|
if(ObjectUtil.isNull(order.getAreaId())){
|
||||||
|
log.info("【预下单-创建订单】支付场景为:押金支付--order.getAreaId()"+order.getAreaId());
|
||||||
|
throw new ServiceException("【预下单-创建订单】支付场景为:押金支付--order.getAreaId()"+order.getAreaId());
|
||||||
|
}
|
||||||
|
EtOperatingArea area = etOperatingAreaService.selectEtOperatingAreaByAreaId(order.getAreaId());
|
||||||
BigDecimal deposit = new BigDecimal(area.getDeposit());
|
BigDecimal deposit = new BigDecimal(area.getDeposit());
|
||||||
etOrder.setTotalFee(deposit);
|
etOrder.setTotalFee(deposit);
|
||||||
etOrder.setPayFee(deposit);
|
etOrder.setPayFee(deposit);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ruoyi.system.service.impl;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
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.system.domain.SysOperLog;
|
import com.ruoyi.system.domain.SysOperLog;
|
||||||
|
@ -73,4 +75,23 @@ public class SysOperLogServiceImpl implements ISysOperLogService
|
||||||
{
|
{
|
||||||
operLogMapper.cleanOperLog();
|
operLogMapper.cleanOperLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4g解锁失败
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Integer getUnlockCount(String timeStart,String timeEnd,String status) {
|
||||||
|
return operLogMapper.getUnlockCount(timeStart, timeEnd,status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 蓝牙解锁数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Integer getBluetoothUnlockCount(String timeStart,String timeEnd,String status) {
|
||||||
|
return operLogMapper.getBluetoothUnlockCount(timeStart, timeEnd,status);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,9 +117,9 @@ public class WxPayService implements IWxPayService {
|
||||||
request.setMchid(sysDept.getMerchantId());
|
request.setMchid(sysDept.getMerchantId());
|
||||||
String type = order.getType();
|
String type = order.getType();
|
||||||
String description = type.equals(ServiceConstants.ORDER_TYPE_RIDING) ? "骑行订单-"+billNo : "押金充值-"+billNo;
|
String description = type.equals(ServiceConstants.ORDER_TYPE_RIDING) ? "骑行订单-"+billNo : "押金充值-"+billNo;
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
log.info("【预下单】获取登录用户信息:"+JSON.toJSONString(loginUser));
|
// log.info("【预下单】获取登录用户信息:"+JSON.toJSONString(loginUser));
|
||||||
request.setAttach(JSON.toJSONString(new AttachVo(payType,user.getUserId(), loginUser.getToken())));
|
request.setAttach(JSON.toJSONString(new AttachVo(payType,user.getUserId(), "")));
|
||||||
request.setDescription(description);
|
request.setDescription(description);
|
||||||
request.setNotifyUrl(sysDept.getNotifyUrl());
|
request.setNotifyUrl(sysDept.getNotifyUrl());
|
||||||
request.setPayer(getPayer(user.getWxopenid()));
|
request.setPayer(getPayer(user.getWxopenid()));
|
||||||
|
|
|
@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="cycle" column="cycle" />
|
<result property="cycle" column="cycle" />
|
||||||
<result property="depositDeduction" column="deposit_deduction" />
|
<result property="depositDeduction" column="deposit_deduction" />
|
||||||
<result property="videoUrl" column="video_url" />
|
<result property="videoUrl" column="video_url" />
|
||||||
|
<result property="uploadTime" column="upload_time" />
|
||||||
<result property="deductionAmount" column="deduction_amount" />
|
<result property="deductionAmount" column="deduction_amount" />
|
||||||
<result property="audioFiles" column="audio_files" />
|
<result property="audioFiles" column="audio_files" />
|
||||||
<result property="usedSn" column="used_sn" />
|
<result property="usedSn" column="used_sn" />
|
||||||
|
@ -52,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
device_mac, sn, pay_time, paid, pay_type, type, total_fee, pay_fee, dispatch_fee,
|
device_mac, sn, pay_time, paid, pay_type, type, total_fee, pay_fee, dispatch_fee,
|
||||||
manage_fee, riding_fee, appointment_fee, mark, duration, distance, status,
|
manage_fee, riding_fee, appointment_fee, mark, duration, distance, status,
|
||||||
create_time, appointment_start_time, appointment_end_time,appointment_timeout, unlock_time,return_time,
|
create_time, appointment_start_time, appointment_end_time,appointment_timeout, unlock_time,return_time,
|
||||||
rule_end_time, return_type, AsText(trip_route) trip_route,trip_route_str,cycle,deposit_deduction,video_url,deduction_amount,audio_files,used_sn,change_reason from et_order
|
rule_end_time, return_type, AsText(trip_route) trip_route,trip_route_str,cycle,deposit_deduction,video_url,upload_time,deduction_amount,audio_files,used_sn,change_reason from et_order
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEtOrderList" parameterType="EtOrder" resultMap="EtOrderResult">
|
<select id="selectEtOrderList" parameterType="EtOrder" resultMap="EtOrderResult">
|
||||||
|
@ -96,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AsText(o.trip_route),
|
AsText(o.trip_route),
|
||||||
o.trip_route_str,
|
o.trip_route_str,
|
||||||
o.video_url,
|
o.video_url,
|
||||||
|
o.upload_time,
|
||||||
o.deduction_amount,
|
o.deduction_amount,
|
||||||
o.audio_files,
|
o.audio_files,
|
||||||
o.used_sn,
|
o.used_sn,
|
||||||
|
@ -161,6 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
o.paid,
|
o.paid,
|
||||||
o.pay_type,
|
o.pay_type,
|
||||||
o.video_url,
|
o.video_url,
|
||||||
|
o.upload_time,
|
||||||
o.deduction_amount,
|
o.deduction_amount,
|
||||||
o.audio_files,
|
o.audio_files,
|
||||||
o.type, COALESCE(o.total_fee, 0) AS total_fee,
|
o.type, COALESCE(o.total_fee, 0) AS total_fee,
|
||||||
|
@ -218,8 +221,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getTotalIncome" resultType="java.lang.String">
|
<select id="getTotalIncome" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(total_fee), 0) from et_order where status = 4 and type = 1
|
select COALESCE(SUM(total_fee), 0) from et_order where status = 4 and type = 1
|
||||||
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -236,90 +243,142 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getTotalPaid" resultType="java.lang.String">
|
<select id="getTotalPaid" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(total_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
select COALESCE(SUM(total_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
||||||
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTotalRefund" resultType="java.lang.String">
|
<select id="getTotalRefund" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(r.amount), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
select COALESCE(SUM(r.amount), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
||||||
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTotalRidingFee" resultType="java.lang.String">
|
<select id="getTotalRidingFee" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(riding_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
select COALESCE(SUM(riding_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
||||||
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTotalRidingRefund" resultType="java.lang.String">
|
<select id="getTotalRidingRefund" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(r.riding_fee), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
select COALESCE(SUM(r.riding_fee), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
||||||
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTotalDispatchFee" resultType="java.lang.String">
|
<select id="getTotalDispatchFee" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(dispatch_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
select COALESCE(SUM(dispatch_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
||||||
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTotalDispatchRefund" resultType="java.lang.String">
|
<select id="getTotalDispatchRefund" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(r.dispatch_fee), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
select COALESCE(SUM(r.dispatch_fee), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
||||||
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTotalAppointmentFee" resultType="java.lang.String">
|
<select id="getTotalAppointmentFee" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(appointment_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
select COALESCE(SUM(appointment_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
||||||
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTotalAppointmentRefund" resultType="java.lang.String">
|
<select id="getTotalAppointmentRefund" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(r.appointment_fee), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
select COALESCE(SUM(r.appointment_fee), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
||||||
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTotalManageFee" resultType="java.lang.String">
|
<select id="getTotalManageFee" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(manage_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
select COALESCE(SUM(manage_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
||||||
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTotalManageRefund" resultType="java.lang.String">
|
<select id="getTotalManageRefund" resultType="java.lang.String">
|
||||||
select COALESCE(SUM(r.manage_fee), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
select COALESCE(SUM(r.manage_fee), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
||||||
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getPaidOrder" resultType="java.lang.String">
|
<select id="getPaidOrder" resultType="java.lang.String">
|
||||||
select COALESCE(count(1), 0) from et_order where status = 4 and type = 1 and paid = 1
|
select COALESCE(count(1), 0) from et_order where status = 4 and type = 1 and paid = 1
|
||||||
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getRidingOrder" resultType="java.lang.String">
|
<select id="getRidingOrder" resultType="java.lang.String">
|
||||||
select COALESCE(count(1), 0) from et_order where status = 2 and type = 1
|
select COALESCE(count(1), 0) from et_order where status = 2 and type = 1
|
||||||
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRefundOrder" resultType="java.lang.String">
|
<select id="getRefundOrder" resultType="java.lang.String">
|
||||||
select COALESCE(count(1), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
select COALESCE(count(1), 0) from et_refund r left join et_order o on o.order_no = r.order_no where r.type = 1 AND refund_result = 'SUCCESS'
|
||||||
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(r.create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(r.create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and o.area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -371,8 +430,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getServiceFee" resultType="java.math.BigDecimal">
|
<select id="getServiceFee" resultType="java.math.BigDecimal">
|
||||||
select COALESCE(SUM(total_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
select COALESCE(SUM(total_fee), 0) from et_order where status = 4 and type = 1 and paid = 1
|
||||||
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
<if test="timeStart != null and timeStart != ''">
|
||||||
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
AND date_format(create_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(create_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -632,6 +695,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cycle != null">cycle = #{cycle},</if>
|
<if test="cycle != null">cycle = #{cycle},</if>
|
||||||
<if test="depositDeduction != null">deposit_deduction = #{depositDeduction},</if>
|
<if test="depositDeduction != null">deposit_deduction = #{depositDeduction},</if>
|
||||||
<if test="videoUrl != null">video_url = #{videoUrl},</if>
|
<if test="videoUrl != null">video_url = #{videoUrl},</if>
|
||||||
|
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
||||||
<if test="deductionAmount != null">deduction_amount = #{deductionAmount},</if>
|
<if test="deductionAmount != null">deduction_amount = #{deductionAmount},</if>
|
||||||
<if test="audioFiles != null">audio_files = #{audioFiles},</if>
|
<if test="audioFiles != null">audio_files = #{audioFiles},</if>
|
||||||
<if test="usedSn != null">used_sn = #{usedSn},</if>
|
<if test="usedSn != null">used_sn = #{usedSn},</if>
|
||||||
|
@ -675,6 +739,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cycle != null">cycle = #{cycle},</if>
|
<if test="cycle != null">cycle = #{cycle},</if>
|
||||||
<if test="depositDeduction != null">deposit_deduction = #{depositDeduction},</if>
|
<if test="depositDeduction != null">deposit_deduction = #{depositDeduction},</if>
|
||||||
<if test="videoUrl != null">video_url = #{videoUrl},</if>
|
<if test="videoUrl != null">video_url = #{videoUrl},</if>
|
||||||
|
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
||||||
<if test="deductionAmount != null">deduction_amount = #{deductionAmount},</if>
|
<if test="deductionAmount != null">deduction_amount = #{deductionAmount},</if>
|
||||||
<if test="audioFiles != null">audio_files = #{audioFiles},</if>
|
<if test="audioFiles != null">audio_files = #{audioFiles},</if>
|
||||||
<if test="usedSn != null">used_sn = #{usedSn},</if>
|
<if test="usedSn != null">used_sn = #{usedSn},</if>
|
||||||
|
|
|
@ -80,6 +80,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where oper_id = #{operId}
|
where oper_id = #{operId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getUnlockCount" resultType="java.lang.Integer">
|
||||||
|
select count(1) from sys_oper_log where business_type = 10
|
||||||
|
<if test="timeStart != null and timeStart != ''">
|
||||||
|
AND date_format(oper_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(oper_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getBluetoothUnlockCount" resultType="java.lang.Integer">
|
||||||
|
select count(1) from sys_oper_log where business_type = 10 AND oper_param like concat('%', '"isBluetooth":"true"', '%')
|
||||||
|
<if test="timeStart != null and timeStart != ''">
|
||||||
|
AND date_format(oper_time,'%y%m%d') >= date_format(#{timeStart},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="timeEnd != null and timeEnd != ''">
|
||||||
|
AND date_format(oper_time,'%y%m%d') <= date_format(#{timeEnd},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="cleanOperLog">
|
<update id="cleanOperLog">
|
||||||
truncate table sys_oper_log
|
truncate table sys_oper_log
|
||||||
</update>
|
</update>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user