Merge remote-tracking branch 'origin/master'
| | |
| | | String reqStr = MsgUtil.codeMsg(phone, code); |
| | | String result = HttpUtils.post(MsgConstants.SEND_URL, reqStr); |
| | | // 记录短信发送 |
| | | chargingPileNotificationService.saveData(1,null,null,phone,"验证码:"+code+",用于更换手机号。请勿转发。"); |
| | | chargingPileNotificationService.saveData(1,-1,-1,phone,"验证码:"+code+",用于更换手机号。请勿转发。"); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | |
| | | String reqStr = MsgUtil.applyCodeMsg(phone, code); |
| | | String result = HttpUtils.post(MsgConstants.SEND_URL, reqStr); |
| | | // 记录短信发送 |
| | | chargingPileNotificationService.saveData(1,null,null,phone,"验证码:"+code+",用于申请建桩。请勿转发。"); |
| | | chargingPileNotificationService.saveData(1,-1,-1,phone,"验证码:"+code+",用于申请建桩。请勿转发。"); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | |
| | | dto.setAuditStatus(1); |
| | | accountingStrategyService.updateById(dto); |
| | | // 添加明细 |
| | | dto.getAccountingStrategyDetails().forEach(detail -> detail.setAccountingStrategyId(dto.getId())); |
| | | dto.getAccountingStrategyDetails().forEach(detail -> { |
| | | detail.setAccountingStrategyId(dto.getId()); |
| | | detail.setId(null); |
| | | }); |
| | | accountingStrategyDetailService.saveBatch(dto.getAccountingStrategyDetails()); |
| | | } |
| | | |
| | |
| | | */ |
| | | List<TChargingPileNotification> chargingPileNotificationPageList(PageInfo<TChargingPileNotification> pageInfo, @Param("siteIds") Set<Integer> siteIds); |
| | | |
| | | /** |
| | | * 保存通知数据 |
| | | * @param siteId |
| | | * @param chargingPileId |
| | | * @param phone |
| | | * @param content |
| | | */ |
| | | void saveData(@Param("siteId") Integer siteId, |
| | | @Param("chargingPileId")Integer chargingPileId, |
| | | @Param("phone")String phone, |
| | | @Param("content")String content); |
| | | |
| | | } |
| | |
| | | @Override |
| | | public void saveData(Integer type,Integer siteId,Integer chargingPileId, String phone, String data) { |
| | | TChargingPileNotification notification = new TChargingPileNotification(); |
| | | notification.setSiteId(siteId==null?-1:siteId); |
| | | notification.setChargingPileId(chargingPileId==null?-1:chargingPileId); |
| | | notification.setSiteId(siteId); |
| | | notification.setChargingPileId(chargingPileId); |
| | | notification.setPhone(phone); |
| | | notification.setContent(data); |
| | | this.save(notification); |
| | |
| | | select |
| | | a.id, |
| | | a.status, |
| | | CONCAT(b.number, a.name) as name, |
| | | CONCAT(b.name, a.name) as name, |
| | | a.parking_number as parkingNumber |
| | | from t_charging_gun a |
| | | left join t_charging_pile b on (a.charging_pile_id = b.id) |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, site_id, charging_pile_id, content, create_time, del_flag |
| | | </sql> |
| | | <insert id="saveData"> |
| | | insert into t_charging_pile_notification( |
| | | <if test="siteId != null and siteId != 0">site_id,</if> |
| | | <if test="chargingPileId != null and chargingPileId != 0">charging_pile_id,</if> |
| | | <if test="phone != null and phone != ''">phone,</if> |
| | | <if test="content != null and content != ''">content,</if> |
| | | create_time |
| | | )values( |
| | | <if test="siteId != null and siteId != 0">#{siteId},</if> |
| | | <if test="chargingPileId != null and chargingPileId != 0">#{chargingPileId},</if> |
| | | <if test="phone != null and phone != ''">#{phone},</if> |
| | | <if test="content != null and content != ''">#{content},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="chargingPileNotificationPageList" resultType="com.ruoyi.chargingPile.api.model.TChargingPileNotification"> |
| | | select |
| | | a.id, |
| | |
| | | |
| | | @ApiOperation(tags = {"小程序-订单评价"},value = "充电订单评价标签及数量查询") |
| | | @GetMapping(value = "/getTagCount") |
| | | public AjaxResult<List<TEvaluationTagVO>> getTagCount() { |
| | | return AjaxResult.ok(orderEvaluateService.getTagCount()); |
| | | public AjaxResult<List<TEvaluationTagVO>> getTagCount(@RequestParam(value = "siteId")@ApiParam(value = "站点id")Integer siteId) { |
| | | return AjaxResult.ok(orderEvaluateService.getTagCount(siteId)); |
| | | } |
| | | |
| | | @ApiOperation(tags = {"小程序-订单评价"},value = "充电订单评价分页列表查询") |
| | |
| | | * 获取评价标签 |
| | | * @return |
| | | */ |
| | | List<TEvaluationTagVO> getTagCount(); |
| | | List<TEvaluationTagVO> getTagCount(Integer siteId); |
| | | |
| | | /** |
| | | * 充电订单评价分页列表查询 |
| | |
| | | String code = Double.valueOf(Math.random() * 1000).intValue() + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS")); |
| | | appUserIntegralChange.setCode(code); |
| | | appUserIntegralChange.setAppUserId(appUser1.getId()); |
| | | appUserIntegralChange.setChangeType(5); |
| | | appUserIntegralChange.setChangeType(4); |
| | | appUserIntegralChange.setHistoricalIntegral(appUser1.getPoints()); |
| | | appUserIntegralChange.setCurrentIntegral(appUser1.getPoints() + num1); |
| | | appUserIntegralChange.setCreateTime(LocalDateTime.now()); |
| | |
| | | } |
| | | } |
| | | |
| | | order.setServiceCharge(periodServicePrice_total); |
| | | order.setServiceCharge(periodServicePrice_total.setScale(2, RoundingMode.DOWN)); |
| | | order.setPaymentAmount(payAmount); |
| | | order.setRefundAmount(refundAmount); |
| | | order.setRefundStatus(1); |
| | |
| | | @Resource |
| | | private TOrderEvaluateMapper orderEvaluateMapper; |
| | | @Override |
| | | public List<TEvaluationTagVO> getTagCount() { |
| | | public List<TEvaluationTagVO> getTagCount(Integer siteId) { |
| | | // 查询标签列表 |
| | | R<List<TEvaluationTagVO>> r = evaluationTagClient.getList(); |
| | | List<TEvaluationTagVO> tagList = r.getData(); |
| | | // 查询站点下的所有订单 |
| | | List<TChargingOrder> tChargingOrders = chargingOrderMapper.selectList(Wrappers.lambdaQuery(TChargingOrder.class) |
| | | .eq(TChargingOrder::getSiteId, siteId)); |
| | | if(CollectionUtils.isEmpty(tChargingOrders)){ |
| | | tagList.forEach(e->e.setTagCount(0)); |
| | | packageTagCount(0L,"有图",2,tagList); |
| | | packageTagCount(0L,"好评",3,tagList); |
| | | packageTagCount(0L,"中差评",4,tagList); |
| | | return tagList; |
| | | } |
| | | List<Integer> tagIds = tagList.stream().map(TEvaluationTagVO::getId).collect(Collectors.toList()); |
| | | // 统计标签使用数量 |
| | | List<TEvaluationTagVO> counts = orderEvaluateTagMapper.getCountByTagIds(tagIds); |
| | |
| | | select id, order_type, order_id, app_user_id,app_user_car_id, mark, content, img_url, evaluation_response, |
| | | create_time, response_time, del_flag |
| | | from t_order_evaluate |
| | | where order_id in |
| | | (select order_id |
| | | where del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | and order_id in |
| | | (select id |
| | | from t_charging_order |
| | | where site_id = #{siteId} |
| | | and del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()}) |