-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
min.zeng
committed
Aug 3, 2019
1 parent
c7be799
commit 6eef0ac
Showing
15 changed files
with
305 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
fx_order_provider/src/main/java/com/zm/fx_order_provider/constant/OrderConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.zm.fx_order_provider.constant; | ||
|
||
/** | ||
* @Describle This Class Is | ||
* @Author ZengMin | ||
* @Date 2018/12/8 16:20 | ||
* @Company Matt | ||
*/ | ||
public class OrderConstant { | ||
|
||
public static final int ORDER_CREATE = 1; //订单创建 | ||
|
||
public static final int ORDER_OUTTIME = 2; //订单超时 | ||
|
||
public static final int ORDER_CLOSE = 3; //订单关闭 | ||
|
||
public static final int ORDER_SUCCESS = 0; //订单成功 | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
fx_order_provider/src/main/java/com/zm/fx_order_provider/service/OrderService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package com.zm.fx_order_provider.service; | ||
|
||
|
||
import com.zm.fx_util_common.bean.OrderDetail; | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
fx_util_common/src/main/java/com/zm/fx_util_common/util/MapUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.zm.fx_util_common.util; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* @Describle This Class Is | ||
* @Author ZengMin | ||
* @Date 2018/12/8 14:57 | ||
* @Company Matt | ||
*/ | ||
@Component | ||
public class MapUtil { | ||
|
||
public static Map<String,Object> packMap(String k,Object v){ | ||
Map<String,Object> map = new HashMap<>(); | ||
map.put(k,v); | ||
return map; | ||
} | ||
|
||
public static Map<String,Object> ResponseSuccess(){ | ||
Map<String,Object> map = new HashMap<>(); | ||
map.put("code",200); | ||
map.put("msg","成功"); | ||
return map; | ||
} | ||
|
||
|
||
public static Map<String,Object> ResponseError(){ | ||
Map<String,Object> map = new HashMap<>(); | ||
map.put("code",200); | ||
map.put("msg","成功"); | ||
return map; | ||
} | ||
|
||
public static Map<String,Object> ResponseError(int code,String msg){ | ||
Map<String,Object> map = new HashMap<>(); | ||
map.put("code",code); | ||
map.put("msg",msg); | ||
return map; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
39 changes: 39 additions & 0 deletions
39
fx_web_admin/src/main/resources/static/plugins/layui/js/order.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
$(function () { | ||
$("#paybtn").click(function () { | ||
var userid = $("#userid").text(); | ||
var itemids = $("#itemids").text(); | ||
var payway = $("#payform").serialize(); | ||
if(payway == ""){ | ||
alert("请选择支付方式!"); | ||
return; | ||
} | ||
if(itemids == ""){ | ||
alert("请选择商品!"); | ||
return; | ||
} | ||
var order = {}; | ||
$.each($(".Address_info"),function (index,item) { | ||
if($(item).attr("check") == "1"){ | ||
var li = $(item).find("li"); | ||
$.each(li,function (lIndex,lItem) { | ||
var key = $(lItem).attr("field"); | ||
var value =$(lItem).text(); | ||
order[key] = value; | ||
}); | ||
} | ||
}); | ||
var split = payway.split("="); | ||
order[split[0]] = split[1]; | ||
order.itemid = itemids; | ||
order.userid = userid; | ||
$.post("/order/addOrder",order,function (result) { | ||
|
||
}); | ||
console.log(order) | ||
}); | ||
|
||
|
||
|
||
|
||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<html> | ||
|
||
<h1>500 SERVICE UNABLED</h1> | ||
|
||
|
||
</html> |
Oops, something went wrong.