李天标 3 سال پیش
والد
کامیت
fd16615974

+ 1 - 4
src/main/java/com/szwl/controller/TCoinOrderController.java

@@ -17,9 +17,7 @@ import com.szwl.model.query.OrderStatisticsDTO;
 import com.szwl.model.query.Pageable;
 import com.szwl.model.utils.JsonUtils;
 import com.szwl.service.TCoinOrderService;
-import com.szwl.service.TEquipmentService;
 import com.szwl.service.es.EsTCoinOrderService;
-import com.szwl.service.es.EsTOrderService;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -41,8 +39,7 @@ import java.util.List;
 @RestController
 @RequestMapping("/api/coinOrder")
 public class TCoinOrderController {
-    @Autowired
-    TEquipmentService equipmentService;
+
     @Autowired
     TCoinOrderService coinOrderService;
     @Autowired

+ 8 - 5
src/main/java/com/szwl/controller/TOrderController.java

@@ -88,10 +88,12 @@ public class TOrderController {
 //            req.getRequestDispatcher(weixin).forward(req,resp);
 //            resp.sendRedirect(redirect:weixin);
             return "redirect:"+wx;
+//            return wx;
         }else if(userAgent.contains("AlipayClient")){ // 支付宝
 //            resp.sendRedirect("https://qr.alipay.com/bax04313rso7xxpoizgx258a");
 //            resp.sendRedirect(apipay);
             return "redirect:"+zfb;
+//            return zfb;
         }
 //        resp.sendRedirect(weixin);
         return "请使用支付宝或微信扫码!";
@@ -193,7 +195,7 @@ public class TOrderController {
             price = new BigDecimal(pri);
         }
 
-        if(code!=null){
+        if(StringUtils.isNotEmpty(code)){
             BigDecimal discount = BigDecimal.valueOf(promoCode.getDiscount());
             price = product.getRmbPrice().multiply(discount).divide(new BigDecimal(10)).setScale(2, RoundingMode.HALF_DOWN);
         }
@@ -592,7 +594,7 @@ public class TOrderController {
         if(StringUtils.isNotEmpty(pri)){
             price = new BigDecimal(pri);
         }
-        if(code!=null){
+        if(StringUtils.isNotEmpty(code)){
             BigDecimal discount = BigDecimal.valueOf(promoCode.getDiscount());
             price = product.getRmbPrice().multiply(discount).divide(new BigDecimal(10)).setScale(2, RoundingMode.HALF_DOWN);
         }
@@ -983,7 +985,7 @@ public class TOrderController {
             return JsonMessage.error("找不到商品");
         }
         BigDecimal price = product.getRmbPrice();
-        if(code!=null){
+        if(StringUtils.isNotEmpty(code)){
             BigDecimal discount = BigDecimal.valueOf(promoCode.getDiscount());
             price = product.getRmbPrice().multiply(discount).divide(new BigDecimal(10)).setScale(2, RoundingMode.HALF_DOWN);
         }
@@ -1313,7 +1315,8 @@ public class TOrderController {
 
             // 汇聚支付支付申请返回支付二维码图片
 
-            String code1 = "http://app.sunzee.com.cn/"+"/api/order/aliPay.htm?wx="+rc_Result1+"&zfb="+rc_Result2;
+//            String code1 = "http://app.sunzee.com.cn/"+"/api/order/aliPay.htm?wx="+rc_Result1+"&zfb="+rc_Result2;
+            String code1 = "http://szwltest.sunzee.com.cn:49002/PAY-SERVER/tOrder/"+"aliPay?wx="+rc_Result1+"&zfb="+rc_Result2;
             String rd_Pic = toQrcode(code1);
             JSONObject kindData = new JSONObject();
             kindData.put("sn", sn1+"-"+sn2);
@@ -2316,7 +2319,7 @@ public class TOrderController {
     }
     @ApiOperation(value = "获取订单")
     @GetMapping("/getOrder")
-    public ResponseModel<?> getOrder(String id) {
+    public ResponseModel<?> getOrder(@RequestParam String id) {
         TOrder order = orderService.getById(id);
         return R.ok(order);
     }

+ 8 - 8
src/main/java/com/szwl/feign/bean/SzwlFeign.java

@@ -19,29 +19,29 @@ public interface SzwlFeign {
     ResponseModel<?> testGetAdmin(@RequestParam String id);
 
     @GetMapping("/tEquipment/findEquipmentByClientId")
-    ResponseModel<TEquipment> findEquipmentByClientId(String clientId);
+    ResponseModel<TEquipment> findEquipmentByClientId(@RequestParam String clientId);
     @GetMapping("/tEquipment/updateByEquipment")
     ResponseModel<TEquipment> updateByEquipment(@RequestBody TEquipment equipment);
     @GetMapping("/tPromoCode/getTPromoCode")
-    ResponseModel<IPage<TPromoCode>> getTPromoCode(String code);
+    ResponseModel<IPage<TPromoCode>> getTPromoCode(@RequestParam String code);
     @GetMapping("/tPromoCode/updatePromoCode")
     void updatePromoCode(@RequestParam(value = "id")String id, @RequestParam(value = "type")String type);
     @GetMapping("/tProduct/getProduct")
     ResponseModel<TProduct> getProduct(@RequestParam(value = "equipmentId")String equipmentId, @RequestParam(value = "productName")String productName);
     @GetMapping("/tProportion/getProportion")
-    ResponseModel<TProportion> getProportion(String equipmentId);
+    ResponseModel<TProportion> getProportion(@RequestParam String equipmentId);
     @GetMapping("/tAdmin/getAdmin")
-    ResponseModel<TAdmin>  getAdmin(String id);
+    ResponseModel<TAdmin>  getAdmin(@RequestParam String id);
     @GetMapping("/tJoinpayMch/getMch")
-    ResponseModel<TJoinpayMch>  getMch(String id);
+    ResponseModel<TJoinpayMch>  getMch(@RequestParam String id);
     @GetMapping("/tShandeMch/getShandeMch")
-    ResponseModel<TShandeMch>  getShandeMch(String id);
+    ResponseModel<TShandeMch>  getShandeMch(@RequestParam String id);
     @GetMapping("/tShandeMch/updateShandeMch")
     void updateShandeMch(@RequestBody TShandeMch shandeMch);
     @GetMapping("/tEquipmentDesc/findEquipmentById")
-    ResponseModel<TEquipmentDesc> findEquipmentById(Long id);
+    ResponseModel<TEquipmentDesc> findEquipmentById(@RequestParam Long id);
     @GetMapping("/tPrice/getPrice")
-    ResponseModel<TPrice>  getPrice(String name);
+    ResponseModel<TPrice>  getPrice(@RequestParam String name);
     @GetMapping("/tPromoCode/addPromoCode")
     void addPromoCode(@RequestParam(value = "adminId")String adminId, @RequestParam(value = "lastUseDate")Date lastUseDate, @RequestParam(value = "number")int number);
 }

+ 2 - 1
src/main/java/com/szwl/mapper/xml/TOrderMapper.xml

@@ -23,6 +23,7 @@
         <result column="price" property="price" />
         <result column="product_id" property="productId" />
         <result column="product_name" property="productName" />
+        <result column="product_no" property="productNo" />
         <result column="refund_date" property="refundDate" />
         <result column="sn" property="sn" />
         <result column="status" property="status" />
@@ -39,7 +40,7 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, create_date, modify_date, admin_id, admin_proportion, agency_id, agency_proportion, alt_info, client_id, equipment_id, frp_code, merchant_id, merchant_proportion, pay_date, personage_id, personage_proportion, price, product_id, product_name, refund_date, sn, status, type, trx_no, refund_trx_no, es, refund_amount, note, pay_platform, is_settlement, proportion_desc
+        id, create_date, modify_date, admin_id, admin_proportion, agency_id, agency_proportion, alt_info, client_id, equipment_id, frp_code, merchant_id, merchant_proportion, pay_date, personage_id, personage_proportion, price, product_id, product_name,product_no, refund_date, sn, status, type, trx_no, refund_trx_no, es, refund_amount, note, pay_platform, is_settlement, proportion_desc
     </sql>
 
 </mapper>

+ 7 - 6
src/main/java/com/szwl/model/utils/JoinpayConstant.java

@@ -39,24 +39,25 @@ public class JoinpayConstant {
     /**
      *  支付成功回调
      */
-    public final static String Notify_Url = "http://pay.sunzee.com.cn:49013/tOrder/notify.htm";
+//    public final static String Notify_Url = "http://pay.sunzee.com.cn:49013/tOrder/notify";
+    public final static String Notify_Url = "http://szwltest.sunzee.com.cn:49002/PAY-SERVER/tOrder/notify";
 //    public final static String Notify_Url = "http://slb.sunzee.com.cn/api/order/notify.htm";
 
-    public final static String mg280Notify_Url = "http://pay.sunzee.com.cn:49013/tOrder/mg280Notify.htm";
+    public final static String mg280Notify_Url = "http://pay.sunzee.com.cn:49013/tOrder/mg280Notify";
 //    public final static String mg280Notify_Url = "http://slb.sunzee.com.cn/api/order/mg280Notify.htm";
 
-    public final static String Notify_Url_PromoCode = "http://pay.sunzee.com.cn:49013/tOrder/promoCodeNotify.htm";
+    public final static String Notify_Url_PromoCode = "http://pay.sunzee.com.cn:49013/tOrder/promoCodeNotify";
 //    public final static String Notify_Url_PromoCode = "http://slb.sunzee.com.cn/api/order/promoCodeNotify.htm";
 
-    public final static String Jiesuan_Url = "http://app.sunzee.com.cn/api/order/jiesuan.htm";
+    public final static String Jiesuan_Url = "http://app.sunzee.com.cn/api/order/jiesuan";
 //    public final static String Jiesuan_Url = "http://slb.sunzee.com.cn/api/order/jiesuan.htm";
 
     public final static Map<String,String> Result_status = new HashMap<>();
     /**
      *  退款成功回调
      */
-    public final static String Notify_Refund_Url = "http://app.sunzee.com.cn/api/order/notifyRefund.htm";
-    public final static String Admin_Notify_Refund_Url = "http://app.sunzee.com.cn/api/order/adminNotifyRefund.htm";
+    public final static String Notify_Refund_Url = "http://app.sunzee.com.cn/api/order/notifyRefund";
+    public final static String Admin_Notify_Refund_Url = "http://app.sunzee.com.cn/api/order/adminNotifyRefund";
 
 
     /**

+ 2 - 2
src/main/resources/bootstrap.yml

@@ -36,7 +36,7 @@ spring:
   profiles: sit
   #数据库配置
   datasource:
-    url: jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/szwl-test
+    url: jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/orderdb-test
     username: root
     password: sunzee@020
     driver-class-name: com.mysql.jdbc.Driver
@@ -57,7 +57,7 @@ spring:
   profiles: prod
   #数据库配置
   datasource:
-    url: jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/szwl
+    url: jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/orderdb
     username: root
     password: sunzee@020
     driver-class-name: com.mysql.jdbc.Driver