ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderCrossCityController.java
@@ -1,5 +1,6 @@ package com.stylefeng.guns.modular.system.controller.specialTrain; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.plugins.Page; @@ -60,6 +61,9 @@ @Value("${filePath}") private String filePath; @Autowired private IAppOperationLogService appOperationLogService; /** * 跳转到跨城出行订单首页 @@ -204,6 +208,7 @@ orderCrossCity.setState(10); tOrderCrossCityService.updateById(orderCrossCity); appOperationLogService.addAppOperationLog(ShiroKit.getUser().getId(), "{\"type\":\"调度取消订单\",\"orderId\":\"" + orderCrossCity.getId() + "\",\"orderInfo\":\"" + JSON.toJSONString(orderCrossCity) + "\"}"); if(orderCrossCity.getDriverId() != null){ //修改司机信息 LineShiftDriver lineShiftDriver = lineShiftDriverMapper.selectById(orderCrossCity.getLineShiftDriverId()); ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarConfirmController.java
@@ -1,9 +1,11 @@ package com.stylefeng.guns.modular.system.controller.specialTrain; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.plugins.Page; import com.stylefeng.guns.core.base.controller.BaseController; import com.stylefeng.guns.core.base.tips.ErrorTip; import com.stylefeng.guns.core.common.constant.factory.PageFactory; import com.stylefeng.guns.core.shiro.ShiroKit; import com.stylefeng.guns.core.util.DateUtil; @@ -52,23 +54,16 @@ @Autowired private ITServerCarmodelService tServerCarmodelService; @Autowired private ITOrderPositionService tOrderPositionService; @Autowired private ITDriverService tDriverService; @Autowired private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; @Resource private OrderCancelMapper orderCancelMapper; @Value("${pushMinistryOfTransport}") private boolean pushMinistryOfTransport; @Value("${filePath}") private String filePath; private ResultUtil resultUtil; @Autowired private IAppOperationLogService appOperationLogService; @Autowired private PushUtil pushUtil; /** @@ -138,8 +133,6 @@ private ResultUtil resultUtil; /** * 获取订单轨迹 * @param orderDetailId @@ -179,20 +172,7 @@ return resultUtil; } @Autowired private ITCompanyService companyService; @Autowired private ITDriverService driverService; @Autowired private IIncomeService incomeService; @Autowired private PushUtil pushUtil; /** * 支付专车订单 */ @@ -200,12 +180,16 @@ @ResponseBody public Object confirmMoney(Integer id,BigDecimal money) { TOrderPrivateCar orderPrivateCar = tOrderPrivateCarService.selectById(id); if(6 != orderPrivateCar.getState()){ return new ErrorTip(500, "订单状态不支持此操作"); } orderPrivateCar.setAbnormalMoney(orderPrivateCar.getOrderMoney()); orderPrivateCar.setOrderMoney(money); orderPrivateCar.setIsException(0); orderPrivateCar.setPriceAuditState(2); orderPrivateCar.setState(7); orderPrivateCar.updateById(); appOperationLogService.addAppOperationLog(ShiroKit.getUser().getId(), "{\"type\":\"调度确认费用\",\"orderId\":\"" + orderPrivateCar.getId() + "\",\"orderInfo\":\"" + JSON.toJSONString(orderPrivateCar) + "\"}"); // 推送消息 TOrderPrivateCar finalOrderPrivateCar = orderPrivateCar; ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java
@@ -1,5 +1,6 @@ package com.stylefeng.guns.modular.system.controller.specialTrain; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.plugins.Page; @@ -241,6 +242,9 @@ @Autowired private IIncomeService incomeService; @Autowired private IAppOperationLogService appOperationLogService; /** @@ -253,6 +257,7 @@ orderPrivateCar.setAbnormalMoney(orderPrivateCar.getOrderMoney()); orderPrivateCar.setOrderMoney(money); orderPrivateCar.updateById(); appOperationLogService.addAppOperationLog(ShiroKit.getUser().getId(), "{\"type\":\"调度修改订单金额\",\"orderId\":\"" + orderPrivateCar.getId() + "\",\"orderInfo\":\"" + JSON.toJSONString(orderPrivateCar) + "\"}"); return SUCCESS_TIP; } @@ -331,6 +336,7 @@ orderPrivateCar.setIsplatPay(2); orderPrivateCar.setState(8); tOrderPrivateCarService.updateAllColumnById(orderPrivateCar); appOperationLogService.addAppOperationLog(ShiroKit.getUser().getId(), "{\"type\":\"调度修改订单已完成\",\"orderId\":\"" + orderPrivateCar.getId() + "\",\"orderInfo\":\"" + JSON.toJSONString(orderPrivateCar) + "\"}"); return SUCCESS_TIP; } @@ -351,6 +357,7 @@ tOrderPrivateCar.setState(10); tOrderPrivateCarService.updateById(tOrderPrivateCar); appOperationLogService.addAppOperationLog(ShiroKit.getUser().getId(), "{\"type\":\"调度取消订单\",\"orderId\":\"" + tOrderPrivateCar.getId() + "\",\"orderInfo\":\"" + JSON.toJSONString(tOrderPrivateCar) + "\"}"); OrderCancel orderCancel = new OrderCancel(); orderCancel.setOrderId(tOrderPrivateCarId); @@ -390,6 +397,7 @@ TOrderPrivateCar tOrderPrivateCar = tOrderPrivateCarService.selectById(tOrderPrivateCarId); tOrderPrivateCar.setIsDelete(2); tOrderPrivateCarService.updateById(tOrderPrivateCar); appOperationLogService.addAppOperationLog(ShiroKit.getUser().getId(), "{\"type\":\"调度删除订单\",\"orderId\":\"" + tOrderPrivateCar.getId() + "\",\"orderInfo\":\"" + JSON.toJSONString(tOrderPrivateCar) + "\"}"); return SUCCESS_TIP; } ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/AppOperationLogMapper.java
New file @@ -0,0 +1,7 @@ package com.stylefeng.guns.modular.system.dao; import com.baomidou.mybatisplus.mapper.BaseMapper; import com.stylefeng.guns.modular.system.model.AppOperationLog; public interface AppOperationLogMapper extends BaseMapper<AppOperationLog> { } ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AppOperationLogMapper.xml
New file @@ -0,0 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.stylefeng.guns.modular.system.dao.AppOperationLogMapper"> </mapper> ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/AppOperationLog.java
New file @@ -0,0 +1,78 @@ package com.stylefeng.guns.modular.system.model; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.IdType; import java.util.Date; @TableName("t_app_operation_log") public class AppOperationLog { /** * 主键 */ @TableId(value = "id", type = IdType.AUTO) private Integer id; /** * 用户类型 */ @TableField("userType") private Integer userType; /** * 用户id */ @TableField("userId") private Integer userId; /** * 操作日志 */ @TableField("content") private String content; /** * 操作时间 */ @TableField("createTime") private Date createTime; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getUserType() { return userType; } public void setUserType(Integer userType) { this.userType = userType; } public Integer getUserId() { return userId; } public void setUserId(Integer userId) { this.userId = userId; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } } ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IAppOperationLogService.java
New file @@ -0,0 +1,14 @@ package com.stylefeng.guns.modular.system.service; import com.baomidou.mybatisplus.service.IService; import com.stylefeng.guns.modular.system.model.AppOperationLog; public interface IAppOperationLogService extends IService<AppOperationLog> { /** * 添加日志记录 * @param userId * @param content */ void addAppOperationLog(Integer userId, String content); } ManagementZYTravel/guns-admin/src/main/resources/application.yml
@@ -72,18 +72,6 @@ filters: wall,mergeStat #多数据源情况的配置 guns: muti-datasource: open: false url: jdbc:mysql://120.24.34.190:3306/mask?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 username: root password: Root2020! dataSourceNames: - dataSourceGuns - dataSourceBiz --- #filePath: /usr/local/server/orderPostionFile/ #存储订单轨迹文件路径