Merge remote-tracking branch 'origin/master'
| | |
| | | @ApiModel(value = "SiteDetailVO对象",description = "站点详情VO") |
| | | public class SiteDetailVO extends Site { |
| | | |
| | | @ApiModelProperty(value = "合作商名称") |
| | | private String partnerName; |
| | | @ApiModelProperty(value = "绑定车牌提示文案") |
| | | private String bindCarTips; |
| | | @ApiModelProperty(value = "距离") |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SiteDetailEvaluateVO对象",description = "站点详情订单评价") |
| | | public class SiteDetailEvaluateVO extends TOrderEvaluate { |
| | | public class SiteDetailEvaluateVO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "好评率") |
| | | private BigDecimal reviewRate; |
| | |
| | | import org.openeuler.BGMProvider; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import okhttp3.OkHttpClient; |
| | | import shade.okhttp3.OkHttpClient; |
| | | |
| | | import javax.net.ssl.*; |
| | | import java.net.HttpURLConnection; |
| | |
| | | t1.del_flag = 0 |
| | | AND t1.app_user_id = #{userId} |
| | | AND t1.status = 1 |
| | | and t1.endTime >= now() |
| | | and t1.end_time >= now() |
| | | GROUP BY |
| | | t1.coupon_id, |
| | | t1.end_time |
| | | t1.app_user_id, |
| | | t1.coupon_id |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | @PostMapping("/getDetailById") |
| | | public AjaxResult<SiteDetailVO> getDetailById(@Validated @RequestBody SiteDetailQuery query){ |
| | | SiteDetailVO siteDetailVO = siteService.getDetailById(query.getSiteId()); |
| | | // 查询合作商名称 |
| | | Partner partner = partnerService.getById(siteDetailVO.getPartnerId()); |
| | | if(Objects.nonNull(partner)){ |
| | | siteDetailVO.setPartnerName(partner.getName()); |
| | | } |
| | | // 计算距离 |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(query.getLat() + "," + query.getLon(), siteDetailVO.getLat() + "," + siteDetailVO.getLon()); |
| | | siteDetailVO.setDistance(distance.get("WGS84")); |
| | |
| | | <select id="getOrderEvaluateBySiteId" resultType="com.ruoyi.order.api.vo.TOrderEvaluateVO"> |
| | | 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 toe |
| | | where toe.order_id in |
| | | (select toc.order_id |
| | | from t_charging_order toc |
| | | where toc.site_id = #{siteId} |
| | | and toc.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()}) |
| | | from t_order_evaluate |
| | | where order_id in |
| | | (select order_id |
| | | from t_charging_order |
| | | where site_id = #{siteId} |
| | | and del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()}) |
| | | </select> |
| | | |
| | | |