mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-08 12:00:11 +08:00
Merge branch 'dev' of http://192.168.2.46:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -451,7 +451,7 @@ public class PersonPileController extends BaseController {
|
|||||||
logger.error("根据充电桩查询预约状态error, params:{}", dto, e);
|
logger.error("根据充电桩查询预约状态error, params:{}", dto, e);
|
||||||
response = new RestApiResponse<>(ReturnCodeEnum.CODE_QUERY_RESERVATION_STATUS_ERROR);
|
response = new RestApiResponse<>(ReturnCodeEnum.CODE_QUERY_RESERVATION_STATUS_ERROR);
|
||||||
}
|
}
|
||||||
logger.info("根据充电桩查询预约状态params:{}, result:{}", dto, response);
|
logger.info("根据充电桩查询预约状态params:{}, result:{}", dto, JSON.toJSONString(response));
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class SysLoginController {
|
|||||||
public AjaxResult getRouters() {
|
public AjaxResult getRouters() {
|
||||||
Long userId = SecurityUtils.getUserId();
|
Long userId = SecurityUtils.getUserId();
|
||||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
||||||
logs.info("获取路由信息userId:{}, menus:{}, 菜单数量:{}", userId, menus, menus.size());
|
// logs.info("获取路由信息userId:{}, menus:{}, 菜单数量:{}", userId, menus, menus.size());
|
||||||
return AjaxResult.success(menuService.buildMenus(menus));
|
return AjaxResult.success(menuService.buildMenus(menus));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.io.Serializable;
|
|||||||
public class AppletTemplateMessageSendDTO implements Serializable {
|
public class AppletTemplateMessageSendDTO implements Serializable {
|
||||||
private static final long serialVersionUID = 2234575457450378840L;
|
private static final long serialVersionUID = 2234575457450378840L;
|
||||||
|
|
||||||
// 场景类型(1-开始充电;2-结束充电)
|
// 场景类型(1-开始充电;2-结束充电; 3-预约充电启动结果通知)
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
//接收者(用户)的 openid
|
//接收者(用户)的 openid
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONObject;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
import com.jsowell.common.constant.CacheConstants;
|
import com.jsowell.common.constant.CacheConstants;
|
||||||
import com.jsowell.common.constant.Constants;
|
import com.jsowell.common.constant.Constants;
|
||||||
import com.jsowell.common.core.redis.RedisCache;
|
import com.jsowell.common.core.redis.RedisCache;
|
||||||
@@ -14,10 +15,9 @@ import com.jsowell.common.util.DateUtils;
|
|||||||
import com.jsowell.common.util.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.common.util.http.HttpUtils;
|
import com.jsowell.common.util.http.HttpUtils;
|
||||||
import com.jsowell.pile.domain.MemberBasicInfo;
|
import com.jsowell.pile.domain.MemberBasicInfo;
|
||||||
import com.jsowell.pile.dto.ReservationChargingStartupResult;
|
|
||||||
import com.jsowell.pile.service.MemberBasicInfoService;
|
import com.jsowell.pile.service.MemberBasicInfoService;
|
||||||
import com.jsowell.pile.service.PileBillingTemplateService;
|
|
||||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||||
|
import com.jsowell.pile.service.PileBillingTemplateService;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.CurrentTimePriceDetails;
|
import com.jsowell.pile.vo.uniapp.customer.CurrentTimePriceDetails;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.SendMessageVO;
|
import com.jsowell.pile.vo.uniapp.customer.SendMessageVO;
|
||||||
import com.jsowell.wxpay.config.WeixinLoginProperties;
|
import com.jsowell.wxpay.config.WeixinLoginProperties;
|
||||||
@@ -278,7 +278,7 @@ public class WxAppletRemoteService {
|
|||||||
*/
|
*/
|
||||||
public Map<String, String> reservationStartupResultSendMsg(String openId, String startTime, String endTime, String startUpResult, String failReason) {
|
public Map<String, String> reservationStartupResultSendMsg(String openId, String startTime, String endTime, String startUpResult, String failReason) {
|
||||||
AppletTemplateMessageSendDTO msgInfo = new AppletTemplateMessageSendDTO();
|
AppletTemplateMessageSendDTO msgInfo = new AppletTemplateMessageSendDTO();
|
||||||
msgInfo.setType("2"); // 2-结束充电推送消息
|
msgInfo.setType(Constants.THREE); // 2-结束充电推送消息
|
||||||
msgInfo.setTouser(openId);
|
msgInfo.setTouser(openId);
|
||||||
// 封装对象并调用发送消息的方法
|
// 封装对象并调用发送消息的方法
|
||||||
AppletTemplateMessageSendDTO.StartUpResultMessage startUpResultMessage = new AppletTemplateMessageSendDTO.StartUpResultMessage();
|
AppletTemplateMessageSendDTO.StartUpResultMessage startUpResultMessage = new AppletTemplateMessageSendDTO.StartUpResultMessage();
|
||||||
@@ -299,39 +299,34 @@ public class WxAppletRemoteService {
|
|||||||
// 判断是什么场景调用此方法(1-开始充电推送消息;2-充电结束推送消息)
|
// 判断是什么场景调用此方法(1-开始充电推送消息;2-充电结束推送消息)
|
||||||
String type = dto.getType();
|
String type = dto.getType();
|
||||||
// 根据不同的场景set不同的对象
|
// 根据不同的场景set不同的对象
|
||||||
|
Map<String, Object> map = Maps.newHashMap();
|
||||||
|
String templateId = null;
|
||||||
if (StringUtils.equals("1", type)) {
|
if (StringUtils.equals("1", type)) {
|
||||||
// 开始充电
|
// 开始充电
|
||||||
String templateId = startChargingTmpId;
|
templateId = startChargingTmpId;
|
||||||
dto.setTemplate_id(templateId);
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("thing5", ImmutableMap.of("value", dto.getStartChargingMessage().getStationName())); // 充电站名称
|
map.put("thing5", ImmutableMap.of("value", dto.getStartChargingMessage().getStationName())); // 充电站名称
|
||||||
map.put("time2", ImmutableMap.of("value", dto.getStartChargingMessage().getStartTime())); // 开始时间
|
map.put("time2", ImmutableMap.of("value", dto.getStartChargingMessage().getStartTime())); // 开始时间
|
||||||
map.put("character_string11", ImmutableMap.of("value", dto.getStartChargingMessage().getOrderCode())); // 订单编号
|
map.put("character_string11", ImmutableMap.of("value", dto.getStartChargingMessage().getOrderCode())); // 订单编号
|
||||||
map.put("thing7", ImmutableMap.of("value", dto.getStartChargingMessage().getPileConnectorCode())); // 充电插座
|
map.put("thing7", ImmutableMap.of("value", dto.getStartChargingMessage().getPileConnectorCode())); // 充电插座
|
||||||
map.put("thing13", ImmutableMap.of("value", dto.getStartChargingMessage().getTotalPrice())); // 收费标准
|
map.put("thing13", ImmutableMap.of("value", dto.getStartChargingMessage().getTotalPrice())); // 收费标准
|
||||||
dto.setData(map);
|
|
||||||
} else if (StringUtils.equals("2", type)) {
|
} else if (StringUtils.equals("2", type)) {
|
||||||
// 结束充电
|
// 结束充电
|
||||||
String templateId = stopChargingTmpId;
|
templateId = stopChargingTmpId;
|
||||||
dto.setTemplate_id(templateId);
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("character_string5", ImmutableMap.of("value", dto.getStopChargingMessage().getOrderCode())); // 充电金额
|
map.put("character_string5", ImmutableMap.of("value", dto.getStopChargingMessage().getOrderCode())); // 充电金额
|
||||||
map.put("amount17", ImmutableMap.of("value", dto.getStopChargingMessage().getChargingAmount())); // 充电金额
|
map.put("amount17", ImmutableMap.of("value", dto.getStopChargingMessage().getChargingAmount())); // 充电金额
|
||||||
map.put("thing7", ImmutableMap.of("value", dto.getStopChargingMessage().getEndReason())); // 结束原因
|
map.put("thing7", ImmutableMap.of("value", dto.getStopChargingMessage().getEndReason())); // 结束原因
|
||||||
map.put("thing22", ImmutableMap.of("value", dto.getStopChargingMessage().getChargingTime())); // 充电时长
|
map.put("thing22", ImmutableMap.of("value", dto.getStopChargingMessage().getChargingTime())); // 充电时长
|
||||||
map.put("number13", ImmutableMap.of("value", dto.getStopChargingMessage().getChargingDegree())); // 充电度数
|
map.put("number13", ImmutableMap.of("value", dto.getStopChargingMessage().getChargingDegree())); // 充电度数
|
||||||
dto.setData(map);
|
|
||||||
} else if (StringUtils.equals("3", type)) {
|
} else if (StringUtils.equals("3", type)) {
|
||||||
// 结束充电
|
// 预约充电启动通知
|
||||||
String templateId = stopChargingTmpId;
|
templateId = stopChargingTmpId;
|
||||||
dto.setTemplate_id(templateId);
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("time2", ImmutableMap.of("value", dto.getStartUpResultMessage().getStartTime())); // 开始时间
|
map.put("time2", ImmutableMap.of("value", dto.getStartUpResultMessage().getStartTime())); // 开始时间
|
||||||
map.put("time3", ImmutableMap.of("value", dto.getStartUpResultMessage().getEndTime())); // 结束时间
|
map.put("time3", ImmutableMap.of("value", dto.getStartUpResultMessage().getEndTime())); // 结束时间
|
||||||
map.put("phrase20", ImmutableMap.of("value", dto.getStartUpResultMessage().getStartUpResult())); // 启动结果
|
map.put("phrase20", ImmutableMap.of("value", dto.getStartUpResultMessage().getStartUpResult())); // 启动结果
|
||||||
map.put("thing21", ImmutableMap.of("value", dto.getStartUpResultMessage().getFailReason())); // 失败原因
|
map.put("thing21", ImmutableMap.of("value", dto.getStartUpResultMessage().getFailReason())); // 失败原因
|
||||||
|
|
||||||
}
|
}
|
||||||
|
dto.setTemplate_id(templateId);
|
||||||
|
dto.setData(map);
|
||||||
// 调用下面的发送消息接口
|
// 调用下面的发送消息接口
|
||||||
return uniformMessageSend(dto);
|
return uniformMessageSend(dto);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user