Commit dfbf9c83 by 吕明尚

修改对接实现类

parent c490ed73
package share.web.controller.system;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import share.system.domain.Goods;
import share.system.domain.Machine;
import share.system.domain.Shelf;
import share.system.domain.VendingMachine.*;
import share.system.service.VendingMachineSrevice;
import javax.annotation.Resource;
......@@ -62,7 +60,47 @@ public class VendingMachineController {
//商品上架(下发配置)
@PostMapping("/shelfEditList")
public void shelfEditList(String machineId, String shelffData) {
public void shelfEditList(String machineId, List<Shelf> shelffData) {
vendingMachineSrevice.shelfEditList(machineId, shelffData);
}
//⼆维码⼿机⽀付
@PostMapping("/codePay")
public String codePay(String machineId) {
return vendingMachineSrevice.codePay(machineId);
}
//⼆维码⽀付
@PostMapping("/codePayment")
public String codePayment(payment payment) {
return vendingMachineSrevice.codePayment(payment);
}
//单商品出货
@PostMapping("/payDelivery")
public void payDelivery(PayDelivery payDelivery) {
vendingMachineSrevice.payDelivery(payDelivery);
}
//多商品出货
@PostMapping("/payMultiDelivery")
public void payMultiDelivery(PayMultiDelivery payMultiDelivery) {
vendingMachineSrevice.payMultiDelivery(payMultiDelivery);
}
//出货回调 contentType=application/json;charset=utf-8
@RequestMapping(value = "/payCallback", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
public void payCallback(@RequestBody PayCallback payCallback) {
vendingMachineSrevice.payCallback(payCallback);
}
@PostMapping("/orderList")
public String orderList(QueryOrder queryOrder) {
return vendingMachineSrevice.orderList(queryOrder);
}
@PostMapping("/sendOrder")
public String sendOrder(SendOrder sendOrder) {
return vendingMachineSrevice.sendOrder(sendOrder);
}
}
......@@ -28,7 +28,7 @@ public class VendingMachineConstants {
//单商品出货
public static final String PAY_DELIVERY = "/api/mall/pay.delivery";
//多商品出货
public static final String PAY_MULTI_DELIVERY_LIST = "/api/mall/pay.multi.delivery";
public static final String PAY_MULTI_DELIVERY = "/api/mall/pay.multi.delivery";
//获取设备订单
public static final String ORDER_LIST = "/api/mall/query.order.list";
//微信⽀付宝订单出货成功
......
package share.system.domain.VendingMachine;
import lombok.Data;
@Data
public class PayCallback {
private String out_trade_no;
private String trade_status;
private String trade_no;
private Integer delivery_shelf;
private Integer delivery_type;
private Integer pay_price;
private String sign_type;
private String sign;
private String nonce_str;
}
package share.system.domain.VendingMachine;
import lombok.Data;
@Data
public class PayDelivery {
private String machineId;
private String shelfId;
private String tradeNo;
private Integer payPrice;
private String payPersonName;
private String payPersonId;
private String payMobile;
private String notifyUrl;
}
package share.system.domain.VendingMachine;
import lombok.Data;
import java.util.Map;
@Data
public class PayMultiDelivery {
private String machineId;
private Map<Integer, Integer> multiPay;
private String tradeNo;
private Integer payPrice;
private String payPersonName;
private String payPersonId;
private String payMobile;
private String notifyUrl;
}
package share.system.domain.VendingMachine;
import lombok.Data;
@Data
public class QueryOrder {
private String machine_id;
private String order_no;
private String begin_time;
private String end_time;
}
package share.system.domain.VendingMachine;
import lombok.Data;
@Data
public class SendOrder {
private String order_no;
private String machine_id;
private String machine_name;
private String shelf_id;
private String open_id;
private String goods_name;
private String pay_time;
private Integer pay_type;
private Integer quantity;
private Integer price;
private Integer delivery_type;
}
package share.system.domain.VendingMachine;
import lombok.Data;
@Data
public class payment {
private String machineId;
private String shelfId;
private String goodsId;
private String goodsName;
private String tradeNo;
private Integer payPrice;
}
......@@ -3,6 +3,7 @@ package share.system.service;
import share.system.domain.Goods;
import share.system.domain.Machine;
import share.system.domain.Shelf;
import share.system.domain.VendingMachine.*;
import java.util.List;
......@@ -23,5 +24,19 @@ public interface VendingMachineSrevice {
void shelfEdit(String machineId, String shelfId, String goodsId);
void shelfEditList(String machineId, String shelffData);
void shelfEditList(String machineId, List<Shelf> shelf_data);
String codePay(String machineId);
String codePayment(payment payment);
void payDelivery(PayDelivery payDelivery);
void payMultiDelivery(PayMultiDelivery payMultiDelivery);
void payCallback(PayCallback payCallback);
String orderList(QueryOrder queryOrder);
String sendOrder(SendOrder sendOrder);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment