Jelajahi Sumber

修改随行付聚合支付接口,油站信息

XF--LRQYEJOKYDS\Administrator 4 tahun lalu
induk
melakukan
c65cc7cc7f

+ 2 - 2
YijiaRestful/src/main/java/com/platform/yijia/controller/PayController.java

@@ -38,7 +38,7 @@ public class PayController {
         ResultData resultData =null;
         String token=payInfoRequest.getToken();//token
         String userType=payInfoRequest.getUserType();//用户登录类型 1 公众号。2 小程序
-       // String ordNo=payInfoRequest.getOrdNo();//订单
+        Integer mno=payInfoRequest.getMno();//获取商户
         Integer orderId =payInfoRequest.getOrderId();
         //根据token 和登录类型 身份验证
         AppUserInfo appUserInfo =new AppUserInfo();
@@ -61,7 +61,7 @@ public class PayController {
                     //将业务参数存放在 JSON 对象中
                     JSONObject reqData = new JSONObject();
                     reqData.put("ordNo", payOrder.getOrderNo()); //商户订单号
-                    reqData.put("mno", "399201207783923"); //商户编号
+                    reqData.put("mno", mno); //商户编号
                     //reqData.put("subMechId", ""); //子商户号
                     reqData.put("amt", payOrder.getAmt()); //订单总金额
                     //reqData.put("discountAmt", ""); //参与优惠金额

+ 0 - 5
YijiaRestful/src/main/java/com/platform/yijia/controller/StationController.java

@@ -16,13 +16,8 @@ import com.platform.yijia.utils.ResultData;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
-
-
 import javax.annotation.Resource;
-import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 @Controller
 @RequestMapping("/api")

+ 12 - 6
YijiaRestful/src/main/java/com/platform/yijia/param/response/StationInfoResponse.java

@@ -1,7 +1,5 @@
 package com.platform.yijia.param.response;
 
-import com.platform.yijia.utils.PageUtil;
-
 public class StationInfoResponse {
     private Integer stationId;
     private String stationName;
@@ -11,11 +9,19 @@ public class StationInfoResponse {
     private String phone;
     private Integer stationGroupId;
     private String stationGroupName;
-    private String stationLongitude;
-    private String stationLatitude;
-    private byte[] stationPic;
-    private Double distance;
+    private String stationLongitude;//经度
+    private String stationLatitude;//纬度
+    private byte[] stationPic;//油站照片
+    private Double distance;//距离
+    private Integer mno;//商户号
+
+    public Integer getMno() {
+        return mno;
+    }
 
+    public void setMno(Integer mno) {
+        this.mno = mno;
+    }
 
     public Double getDistance() {
         return distance;

+ 33 - 0
YijiaRestful/src/main/java/com/platform/yijia/pojo/StationInfo.java

@@ -94,6 +94,15 @@ public class StationInfo {
     /**
      *
      * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column station_info.mno
+     *
+     * @mbg.generated
+     */
+    private Integer mno;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
      * This field corresponds to the database column station_info.station_pic
      *
      * @mbg.generated
@@ -342,6 +351,30 @@ public class StationInfo {
 
     /**
      * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column station_info.mno
+     *
+     * @return the value of station_info.mno
+     *
+     * @mbg.generated
+     */
+    public Integer getMno() {
+        return mno;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column station_info.mno
+     *
+     * @param mno the value for station_info.mno
+     *
+     * @mbg.generated
+     */
+    public void setMno(Integer mno) {
+        this.mno = mno;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
      * This method returns the value of the database column station_info.station_pic
      *
      * @return the value of station_info.station_pic

+ 60 - 0
YijiaRestful/src/main/java/com/platform/yijia/pojo/StationInfoExample.java

@@ -863,6 +863,66 @@ public class StationInfoExample {
             addCriterion("station_latitude not between", value1, value2, "stationLatitude");
             return (Criteria) this;
         }
+
+        public Criteria andMnoIsNull() {
+            addCriterion("mno is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoIsNotNull() {
+            addCriterion("mno is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoEqualTo(Integer value) {
+            addCriterion("mno =", value, "mno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoNotEqualTo(Integer value) {
+            addCriterion("mno <>", value, "mno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoGreaterThan(Integer value) {
+            addCriterion("mno >", value, "mno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoGreaterThanOrEqualTo(Integer value) {
+            addCriterion("mno >=", value, "mno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoLessThan(Integer value) {
+            addCriterion("mno <", value, "mno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoLessThanOrEqualTo(Integer value) {
+            addCriterion("mno <=", value, "mno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoIn(List<Integer> values) {
+            addCriterion("mno in", values, "mno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoNotIn(List<Integer> values) {
+            addCriterion("mno not in", values, "mno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoBetween(Integer value1, Integer value2) {
+            addCriterion("mno between", value1, value2, "mno");
+            return (Criteria) this;
+        }
+
+        public Criteria andMnoNotBetween(Integer value1, Integer value2) {
+            addCriterion("mno not between", value1, value2, "mno");
+            return (Criteria) this;
+        }
     }
 
     /**

+ 2 - 2
YijiaRestful/src/main/java/com/platform/yijia/service/impl/StationServiceImpl.java

@@ -24,7 +24,7 @@ public class StationServiceImpl implements StationService {
     public StationInfoVo stationInfoList(StationRequest stationRequest) {
         //根据传过来的坐标查询数据
         List<StationInfoResponse> distanceAndResidueSeat = new ArrayList<>();
-        StationInfoExample example=new StationInfoExample();
+         StationInfoExample example=new StationInfoExample();
         if(StringUtils.isNotBlank(stationRequest.getStationName())){
             example.or().andStationNameLike(stationRequest.getStationName());
         }
@@ -85,9 +85,9 @@ public class StationServiceImpl implements StationService {
                         stationInfoResponse.setStationLatitude(stationInfo.getStationLatitude());
                         stationInfoResponse.setStationLongitude(stationInfo.getStationLongitude());
                         stationInfoResponse.setDistance(format);
+                        stationInfoResponse.setMno(stationInfo.getMno());
                         stationInfoList.add(stationInfoResponse);
                     }
-
                 }
             }
         }

+ 4 - 1
YijiaRestful/src/main/java/com/platform/yijia/utils/PageUtil.java

@@ -9,8 +9,12 @@ public class PageUtil {
         if(pageSize==0){
             pageSize=10;
         }
+        if(pageNum==0){
+            pageNum=1;
+        }
         int listSize = list.size();
         int dangqianye=pageNum*pageSize;
+
         int kaishi = (pageNum-1)*pageSize;
         List<T> subList = new ArrayList<T>();
         if(listSize<dangqianye && kaishi<listSize ){
@@ -27,7 +31,6 @@ public class PageUtil {
                 }
             }
         }
-
         return subList;
     }
 }