Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
farming
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑云飞
farming
Commits
b3e9d1bc
Commit
b3e9d1bc
authored
May 23, 2023
by
郑云飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时任务 拼团失败退款 完成
parent
56313839
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
150 additions
and
53 deletions
+150
-53
src/main/java/com/yunniu/farming/app/GroupBuyAppController.java
+3
-4
src/main/java/com/yunniu/farming/app/WxController.java
+1
-1
src/main/java/com/yunniu/farming/webadmin/controller/GroupOrderController.java
+22
-0
src/main/java/com/yunniu/farming/webadmin/controller/TaskJob.java
+2
-1
src/main/java/com/yunniu/farming/webadmin/dao/GroupBuyDao.java
+5
-0
src/main/java/com/yunniu/farming/webadmin/model/GroupOrder.java
+6
-0
src/main/java/com/yunniu/farming/webadmin/service/GroupBuyService.java
+4
-0
src/main/java/com/yunniu/farming/webadmin/service/GroupOrderService.java
+4
-0
src/main/java/com/yunniu/farming/webadmin/service/impl/GroupBuyServiceimpl.java
+15
-0
src/main/java/com/yunniu/farming/webadmin/service/impl/GroupOrderServiceImpl.java
+30
-0
src/main/java/com/yunniu/farming/webadmin/service/impl/OrderMainServiceImpl.java
+1
-1
src/main/java/com/yunniu/farming/webadmin/service/impl/WxServiceImpl.java
+1
-1
src/main/java/com/yunniu/farming/wx/WxConfigUtil.java
+4
-2
src/main/resources/mappings/GroupBuyMapper.xml
+10
-1
src/main/resources/mappings/GroupBuyProductMapper.xml
+4
-4
src/main/resources/mappings/GroupOrderMapper.xml
+1
-1
src/main/resources/mappings/OrderMainMapper.xml
+3
-1
src/main/resources/static/js/xm-select.js
+0
-0
src/main/resources/templates/groupArea/addOrEdit.html
+8
-11
src/main/resources/templates/groupBuy/addOrEdit.html
+18
-14
src/main/resources/templates/groupBuy/list.html
+3
-3
src/main/resources/templates/groupOrder/detail.html
+1
-1
src/main/resources/templates/groupOrder/list.html
+4
-7
No files found.
src/main/java/com/yunniu/farming/app/GroupBuyAppController.java
View file @
b3e9d1bc
...
...
@@ -70,13 +70,12 @@ public class GroupBuyAppController {
totalPs
=
1
+
totalRs
/
pinfo
.
getPageSize
();
}
pinfo
.
setTotalPages
(
totalPs
);
Integer
joinNumber
=
groupBuyService
.
findJoinNumber
();
List
<
String
>
avatarList
=
groupBuyService
.
findavatarList
();
// 4.将分页对象、结果集合 封装后返回前台
rmap
.
put
(
"pageinfo"
,
pinfo
);
rmap
.
put
(
"items"
,
list
);
rmap
.
put
(
"joinNumber"
,
0
);
List
<
String
>
avatarList
=
new
ArrayList
<>();
avatarList
.
add
(
"https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLjFK35Wvia9lJKHoXfQuHhk0qZbvpPNxrAiaEKF7aL2k4I8kuqrdTWwliamdPHeyAA7DjAg725X2GIQ/132"
);
rmap
.
put
(
"joinNumber"
,
joinNumber
);
rmap
.
put
(
"avatarList"
,
avatarList
);
return
Result
.
success
(
rmap
);
}
...
...
src/main/java/com/yunniu/farming/app/WxController.java
View file @
b3e9d1bc
...
...
@@ -75,7 +75,7 @@ public class WxController {
public
String
testNotifyOk
(
@PathVariable
Integer
id
){
if
(
id
==
null
)
return
null
;
this
.
wxServiceImpl
.
test
NotifyOk
(
id
);
this
.
wxServiceImpl
.
handle
NotifyOk
(
id
);
return
"ok"
;
}
...
...
src/main/java/com/yunniu/farming/webadmin/controller/GroupOrderController.java
View file @
b3e9d1bc
...
...
@@ -53,6 +53,28 @@ public class GroupOrderController {
return
"groupOrder/detail"
;
}
/**
* 发货
* @param id
* @return
*/
@RequestMapping
(
value
=
"/updateFwStatus"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
Result
updateFwStatus
(
Long
id
)
{
return
Result
.
success
(
groupOrderService
.
sendOutGoods
(
id
));
}
/**
* 完成
* @param id
* @return
*/
@RequestMapping
(
value
=
"/successOrder"
)
@ResponseBody
public
Result
successOrder
(
Long
id
)
{
return
Result
.
success
(
groupOrderService
.
successOrder
(
id
));
}
@RequestMapping
(
value
=
"/findPageList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Result
findPageList
(
@RequestBody
GroupOrder
item
)
{
...
...
src/main/java/com/yunniu/farming/webadmin/controller/TaskJob.java
View file @
b3e9d1bc
...
...
@@ -71,11 +71,11 @@ public class TaskJob {
// 查询待成团并到期的团购订单
List
<
GroupOrder
>
orders
=
groupOrderDao
.
getList
();
orders
.
forEach
(
order
->
{
order
.
setGroupStatus
(
"4"
);
// 查询已支付成功订单
List
<
OrderMain
>
orderMains
=
orderMainDao
.
selectByGroupOrderId
(
order
.
getId
());
// 订单数小于成团数 拼团失败 进行退款
if
(
order
.
getGroupSize
()
<
orderMains
.
size
())
{
order
.
setGroupStatus
(
"4"
);
// 循环退款
orderMains
.
forEach
(
orderMain
->
{
try
{
...
...
@@ -85,6 +85,7 @@ public class TaskJob {
}
});
}
groupOrderDao
.
updateById
(
order
);
});
}
...
...
src/main/java/com/yunniu/farming/webadmin/dao/GroupBuyDao.java
View file @
b3e9d1bc
...
...
@@ -21,4 +21,9 @@ public interface GroupBuyDao extends BaseMapper<GroupBuy> {
int
activityFailure
();
int
updateStatus
(
Long
id
);
Integer
findJoinNumber
();
List
<
String
>
findavatarList
();
}
src/main/java/com/yunniu/farming/webadmin/model/GroupOrder.java
View file @
b3e9d1bc
package
com
.
yunniu
.
farming
.
webadmin
.
model
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.yunniu.farming.common.plugin.PageInfo
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -28,7 +30,11 @@ public class GroupOrder {
private
String
groupStatus
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
successTime
;
@TableField
(
exist
=
false
)
private
String
successTimeStr
;
private
Date
createTime
;
...
...
src/main/java/com/yunniu/farming/webadmin/service/GroupBuyService.java
View file @
b3e9d1bc
...
...
@@ -36,4 +36,8 @@ public interface GroupBuyService {
List
<
Product
>
productList
(
Product
item
);
int
delById
(
Long
id
);
Integer
findJoinNumber
();
List
<
String
>
findavatarList
();
}
src/main/java/com/yunniu/farming/webadmin/service/GroupOrderService.java
View file @
b3e9d1bc
...
...
@@ -28,4 +28,8 @@ public interface GroupOrderService {
List
<
OrderSub
>
productList
(
OrderSub
item
);
boolean
updateRefundStatus
(
String
outRefundNo
);
int
sendOutGoods
(
Long
id
);
int
successOrder
(
Long
id
);
}
src/main/java/com/yunniu/farming/webadmin/service/impl/GroupBuyServiceimpl.java
View file @
b3e9d1bc
...
...
@@ -42,6 +42,8 @@ public class GroupBuyServiceimpl implements GroupBuyService {
private
GroupAreaDao
areaDao
;
@Autowired
private
ProductDao
productDao
;
@Autowired
private
DocCatalogDao
docCatalogDao
;
/**
* 分页查询
...
...
@@ -137,6 +139,8 @@ public class GroupBuyServiceimpl implements GroupBuyService {
*/
@Override
public
List
<
Product
>
productList
(
Product
item
)
{
DocCatalog
catalog
=
docCatalogDao
.
selectOne
(
Wrappers
.<
DocCatalog
>
lambdaQuery
().
like
(
DocCatalog:
:
getSname
,
"团购"
));
item
.
setCatalogid
(
catalog
.
getId
());
return
productDao
.
selectByParamPageList
(
item
);
}
...
...
@@ -149,4 +153,15 @@ public class GroupBuyServiceimpl implements GroupBuyService {
public
int
delById
(
Long
id
)
{
return
mapper
.
updateStatus
(
id
);
}
@Override
public
Integer
findJoinNumber
()
{
return
mapper
.
findJoinNumber
();
}
@Override
public
List
<
String
>
findavatarList
()
{
return
mapper
.
findavatarList
();
}
}
src/main/java/com/yunniu/farming/webadmin/service/impl/GroupOrderServiceImpl.java
View file @
b3e9d1bc
...
...
@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
...
...
@@ -104,6 +105,10 @@ public class GroupOrderServiceImpl implements GroupOrderService {
@Override
public
GroupOrder
findById
(
Long
id
)
{
GroupOrder
order
=
orderDao
.
detailById
(
id
);
if
(
order
.
getSuccessTime
()!=
null
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
order
.
setSuccessTimeStr
(
formatter
.
format
(
order
.
getSuccessTime
()));
}
return
order
;
}
...
...
@@ -145,6 +150,30 @@ public class GroupOrderServiceImpl implements GroupOrderService {
}
/**
* 发货
* @param id
* @return
*/
@Override
public
int
sendOutGoods
(
Long
id
)
{
GroupOrder
order
=
orderDao
.
selectById
(
id
);
order
.
setGroupStatus
(
"2"
);
return
orderDao
.
updateById
(
order
);
}
/**
* 完成
* @param id
* @return
*/
@Override
public
int
successOrder
(
Long
id
)
{
GroupOrder
order
=
orderDao
.
selectById
(
id
);
order
.
setGroupStatus
(
"3"
);
return
orderDao
.
updateById
(
order
);
}
/**
* 支付成功后判断团购订单是否成团
* @param curOrder
*/
...
...
@@ -154,6 +183,7 @@ public class GroupOrderServiceImpl implements GroupOrderService {
.
eq
(
OrderMain:
:
getGroupOrderId
,
curOrder
.
getGroupOrderId
())
.
eq
(
OrderMain:
:
getIpaystatus
,
1
)
.
isNull
(
OrderMain:
:
getIrefundstatus
));
if
(
groupBuy
.
getGroupSize
()
<=
count
)
{
orderDao
.
updateStatus
(
curOrder
.
getGroupOrderId
());
}
...
...
src/main/java/com/yunniu/farming/webadmin/service/impl/OrderMainServiceImpl.java
View file @
b3e9d1bc
...
...
@@ -92,7 +92,7 @@ public class OrderMainServiceImpl {
if
(
item
.
getId
()
==
null
)
{
if
(
item
.
getItype
().
equals
(
OrderMain
.
ITYPE_GROUP
)){
if
(
item
.
getItype
()
!=
null
&&
item
.
getItype
()
.
equals
(
OrderMain
.
ITYPE_GROUP
)){
GroupOrder
order
=
orderService
.
addGroupOrder
(
item
);
item
.
setGroupOrderId
(
order
.
getId
());
}
...
...
src/main/java/com/yunniu/farming/webadmin/service/impl/WxServiceImpl.java
View file @
b3e9d1bc
...
...
@@ -409,7 +409,7 @@ public class WxServiceImpl implements WxService {
* @param id
*/
@Transactional
p
rotected
void
handleNotifyOk
(
Integer
id
)
{
p
ublic
void
handleNotifyOk
(
Integer
id
)
{
// 从数据库中将信息详情查出来
OrderMain
curOrder
=
this
.
orderMainDao
.
selectByPrimaryKey
(
id
);
...
...
src/main/java/com/yunniu/farming/wx/WxConfigUtil.java
View file @
b3e9d1bc
...
...
@@ -15,8 +15,10 @@ public class WxConfigUtil {
public
final
static
String
UNIFIED_ORDER_URL
=
"https://api.mch.weixin.qq.com/pay/unifiedorder"
;
public
final
static
String
PROFIT_SHARING_URL
=
"https://api.mch.weixin.qq.com/secapi/pay/profitsharing"
;
public
final
static
String
PROFIT_SHARING_ADDRECEIVER
=
"https://api.mch.weixin.qq.com/pay/profitsharingaddreceiver"
;
public
final
static
String
notify_url
=
"http://1.15.43.240:8330/wx/notify"
;
// 订单回调接口
public
final
static
String
refund_notify_url
=
"http://1.15.43.240:8330/wx/wxRefundNotify"
;
// 订单回调接口
// public final static String notify_url = "http://1.15.43.240:8330/wx/notify"; // 订单回调接口
public
final
static
String
notify_url
=
"http://farming.nyinhong.com/wx/notify"
;
// 订单回调接口
// public final static String refund_notify_url = "http://1.15.43.240:8330/wx/wxRefundNotify"; // 订单回调接口
public
final
static
String
refund_notify_url
=
"http://farming.nyinhong.com/wx/wxRefundNotify"
;
// 订单回调接口
public
final
static
String
REFUND_ORDER_URL
=
"https://api.mch.weixin.qq.com/secapi/pay/refund"
;
public
static
String
GET_MINICODE_URL
=
"https://api.weixin.qq.com/wxa/getwxacodeunlimit"
;
...
...
src/main/resources/mappings/GroupBuyMapper.xml
View file @
b3e9d1bc
...
...
@@ -12,7 +12,7 @@
<where>
group_status
<>
5
<if
test=
"groupBuyCode != null and groupBuyCode != ''"
>
and
group_buy_code
= #{groupBuyCode,jdbcType=VARCHAR}
and
id
= #{groupBuyCode,jdbcType=VARCHAR}
</if>
<if
test=
"groupBuyTitle != null and groupBuyTitle != ''"
>
and group_buy_title like concat('%', #{groupBuyTitle,jdbcType=VARCHAR},'%')
...
...
@@ -37,4 +37,12 @@
<update
id=
"updateStatus"
>
update group_buy set group_status =5 where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"findJoinNumber"
resultType=
"java.lang.Integer"
>
select count(1) from order_main where group_order_id is not null
</select>
<select
id=
"findavatarList"
resultType=
"java.lang.String"
>
select c.swximgurl from order_main om left join customer c on om.customerid = c.id where group_order_id is not null limit 3
</select>
</mapper>
\ No newline at end of file
src/main/resources/mappings/GroupBuyProductMapper.xml
View file @
b3e9d1bc
...
...
@@ -3,12 +3,12 @@
<mapper
namespace=
"com.yunniu.farming.webadmin.dao.GroupBuyProductDao"
>
<insert
id=
"insertBath"
>
insert into group_buy_product
(group_buy_id, product_id, product_name,
product_sduction, product_price, `status`, create_by)
(group_buy_id, product_
pic, product_
id, product_name,
product_sduction, product_price,
sunit,
`status`, create_by)
values
<foreach
collection=
"products"
index=
"index"
item=
"item"
separator=
","
>
(#{id,jdbcType=BIGINT}, #{item.productId}, #{item.productName},
#{item.productSduction}, #{item.productPrice}, 0, #{item.createBy})
(#{id,jdbcType=BIGINT}, #{item.product
Pic,jdbcType=VARCHAR}, #{item.product
Id}, #{item.productName},
#{item.productSduction}, #{item.productPrice},
#{item.sunit,jdbcType=VARCHAR},
0, #{item.createBy})
</foreach>
</insert>
...
...
src/main/resources/mappings/GroupOrderMapper.xml
View file @
b3e9d1bc
...
...
@@ -62,7 +62,7 @@
</select>
<update
id=
"updateStatus"
>
update group_order set group_status = 1 where id = #{groupOrderId,jdbcType=BIGINT}
update group_order set group_status = 1
, success_time = now()
where id = #{groupOrderId,jdbcType=BIGINT}
</update>
<select
id=
"getBySdef1"
resultType=
"com.yunniu.farming.webadmin.model.OrderMain"
>
...
...
src/main/resources/mappings/OrderMainMapper.xml
View file @
b3e9d1bc
...
...
@@ -19,6 +19,7 @@
<result
column=
"dactmoney"
property=
"dactmoney"
jdbcType=
"DECIMAL"
/>
<result
column=
"dactscore"
property=
"dactscore"
jdbcType=
"DECIMAL"
/>
<result
column=
"ipaystatus"
property=
"ipaystatus"
jdbcType=
"INTEGER"
/>
<result
column=
"group_order_id"
property=
"groupOrderId"
jdbcType=
"INTEGER"
/>
<result
column=
"irefundstatus"
property=
"irefundstatus"
jdbcType=
"INTEGER"
/>
<result
column=
"tpaytime"
property=
"tpaytime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"trefundtime"
property=
"trefundtime"
jdbcType=
"TIMESTAMP"
/>
...
...
@@ -136,7 +137,8 @@
ordermain.idef7,
ordermain.ddef8,
ordermain.ddef9,
ordermain.ddef10
ordermain.ddef10,
ordermain.group_order_id
</sql>
...
...
src/main/resources/static/js/xm-select.js
0 → 100644
View file @
b3e9d1bc
This diff is collapsed.
Click to expand it.
src/main/resources/templates/groupArea/addOrEdit.html
View file @
b3e9d1bc
...
...
@@ -47,7 +47,8 @@
</div>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
class=
"layui-input"
id=
"areaAddress"
th:value=
"${obj.areaAddress}"
placeholder=
"详细地址"
<input
type=
"text"
class=
"layui-input"
id=
"areaAddress"
th:value=
"${obj.areaAddress}"
placeholder=
"详细地址"
name=
"areaAddress"
style=
"width: 300px"
>
</div>
</div>
...
...
@@ -65,7 +66,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
联系电话
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
class=
"layui-input"
id=
"liaisonPhone"
th:value=
"${obj.liaisonPhone}"
placeholder=
"联系电话"
<input
type=
"text"
class=
"layui-input"
id=
"liaisonPhone"
th:value=
"${obj.liaisonPhone}"
placeholder=
"联系电话"
name=
"liaisonPhone"
style=
"width: 300px"
>
</div>
</div>
...
...
@@ -140,13 +142,9 @@
dataType
:
"json"
,
contentType
:
"application/json;charset=utf-8"
,
success
:
function
(
result
)
{
if
(
result
.
code
==
0
)
{
layer
.
msg
(
"恭喜您,提交成功"
,
{
icon
:
6
,
time
:
1000
},
function
()
{
closeLayer
();
parent
.
layui
.
table
.
reload
(
'tableId'
);
});
if
(
result
.
code
==
100
)
{
closeLayer
();
parent
.
layui
.
table
.
reload
(
'tableId'
);
}
else
{
layer
.
msg
(
result
.
msg
,
{
icon
:
5
});
}
...
...
@@ -155,9 +153,8 @@
}
function
closeLayer
()
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//关闭当前frame
parent
.
layer
.
close
(
index
);
parent
.
layer
.
close
(
parent
.
layer
.
getFrameIndex
(
window
.
name
)
);
}
</script>
...
...
src/main/resources/templates/groupBuy/addOrEdit.html
View file @
b3e9d1bc
...
...
@@ -19,6 +19,8 @@
<script
type=
"text/javascript"
th:src=
"@{/js/ueditor/lang/zh-cn/zh-cn.js}"
></script>
<script
src=
"http://www.jq22.com/jquery/jquery-1.7.1.js"
></script>
<script
src=
"https://cdn.staticfile.org/layui/2.5.6/layui.min.js"
></script>
<!-- <link href="https://cdn.jsdelivr.net/npm/xm-select/dist/xm-select.css" rel="stylesheet">-->
<script
type=
"text/javascript"
th:src=
"@{/js/xm-select.js}"
charset=
"utf-8"
></script>
<style>
.layui-form-label
{
...
...
@@ -62,7 +64,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><span
style=
"color: red"
>
*
</span>
配送小区
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"areaIdList"
id=
"areaIdList"
lay-filter=
"areaIdList"
>
<select
name=
"areaIdList"
id=
"areaIdList"
multiple
>
<option
th:each=
"list:${areaList}"
th:value=
"${list.id}"
th:text=
"${list.areaName }"
></option>
</select>
...
...
@@ -85,7 +87,7 @@
<div
class=
"layui-upload-list"
>
<img
class=
"layui-upload-img"
id=
"previewImg"
>
<p
id=
"uploadText"
></p>
<span
style=
"color: red"
>
图片建议500*
25
0px
</span>
<span
style=
"color: red"
>
图片建议500*
40
0px
</span>
</div>
</div>
</div>
...
...
@@ -164,15 +166,15 @@
}
}
layui
.
use
(
'form'
,
function
()
{
layui
.
use
(
'form'
,
function
()
{
var
form
=
layui
.
form
;
form
.
render
(
'select'
);
form
.
render
();
// 监听 select 元素的 change 事件
form
.
on
(
'select(areaIdList)'
,
function
(
data
)
{
if
(
selectedValues
.
includes
(
parseInt
(
data
.
value
))){
form
.
on
(
'select(areaIdList)'
,
function
(
data
)
{
if
(
selectedValues
.
includes
(
parseInt
(
data
.
value
)))
{
var
index
=
selectedValues
.
indexOf
(
parseInt
(
data
.
value
));
selectedValues
.
splice
(
index
,
1
);
}
else
{
}
else
{
selectedValues
.
push
(
parseInt
(
data
.
value
));
}
console
.
log
(
selectedValues
);
// 打印选中的值
...
...
@@ -221,6 +223,7 @@
$
(
function
()
{
if
(
id
)
{
console
.
log
(
"==========================="
,
'[[${obj}]]'
)
console
.
log
(
"==========================="
,
'[[${areaList}]]'
)
showPic
(
'[[${obj.groupBuyPic}]]'
);
showTable
(
'[[${obj.productList}]]'
);
console
.
log
(
111111111
,
selectedData
)
...
...
@@ -295,6 +298,7 @@
if
(
obj
.
event
===
'del'
)
{
var
oldData
=
table
.
cache
[
"tableId"
];
oldData
.
splice
(
obj
.
tr
.
data
(
'index'
),
1
);
selectedData
=
oldData
;
layer
.
msg
(
"删除成功"
,
{
time
:
10
},
function
()
{
table
.
reload
(
'tableId'
,
{
data
:
oldData
});
});
...
...
@@ -400,11 +404,11 @@
processData
:
false
,
contentType
:
"application/json"
,
success
:
function
(
result
)
{
if
(
result
.
code
===
100
)
{
layer
.
msg
(
result
.
msg
,
{
icon
:
6
,
time
:
1000
},
function
(
)
{
closeLayer
(
);
parent
.
layui
.
table
.
reload
(
'tableId'
);
}
);
console
.
log
(
"sdffffffffffffffffff"
,
result
);
if
(
result
.
code
==
100
)
{
console
.
log
(
"sdffffffffffffffffff"
,
100
);
closeLayer
(
);
parent
.
layui
.
table
.
reload
(
'tableId'
);
}
else
{
layer
.
msg
(
result
.
msg
,
{
icon
:
5
});
}
...
...
@@ -452,9 +456,9 @@
function
closeLayer
()
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
console
.
log
(
"sdffffffffffffffffff"
);
//关闭当前frame
parent
.
layer
.
close
(
index
);
parent
.
layer
.
close
(
parent
.
layer
.
getFrameIndex
(
window
.
name
)
);
}
...
...
src/main/resources/templates/groupBuy/list.html
View file @
b3e9d1bc
...
...
@@ -136,9 +136,9 @@
table
.
render
({
elem
:
'#tableId'
,
url
:
'findPageList'
,
where
:
{}
,
where
:
field
,
method
:
'post'
,
contentType
:
"application/json"
// 内容编码, json格式
,
contentType
:
"application/json"
// 内容编码, json格式
,
height
:
500
,
toolbar
:
'#toolbarUtil'
//开启头部工具栏,并为其绑定左侧模板
,
defaultToolbar
:
[
'filter'
]
...
...
@@ -186,7 +186,7 @@
//订单状态
var
status
=
""
;
if
(
d
.
groupStatus
==
3
)
status
=
"<span class='layui-badge layui-bg-orange'>生效中</span>"
;
if
(
d
.
groupStatus
==
4
)
status
=
"<span class='layui-badge layui-bg-
orange
'>已失效</span>"
;
if
(
d
.
groupStatus
==
4
)
status
=
"<span class='layui-badge layui-bg-
black
'>已失效</span>"
;
str
+=
' <span>'
+
status
+
'</span>'
;
str
+=
'</div>'
;
return
str
?
str
:
""
;
...
...
src/main/resources/templates/groupOrder/detail.html
View file @
b3e9d1bc
...
...
@@ -72,7 +72,7 @@
<label
class=
"layui-form-label"
>
成团时间
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
class=
"layui-input"
name=
"successTime"
id=
"successTime"
th:value=
"${obj.successTime}"
>
th:value=
"${obj.successTime
Str
}"
>
</div>
<label
class=
"layui-form-label"
>
小区名称
</label>
<div
class=
"layui-input-inline"
>
...
...
src/main/resources/templates/groupOrder/list.html
View file @
b3e9d1bc
...
...
@@ -274,11 +274,9 @@
param
.
istatus
=
30
;
$
.
ajax
({
url
:
"updateFwStatus"
,
data
:
JSON
.
stringify
(
param
),
type
:
"POST"
,
url
:
"updateFwStatus?id="
+
id
,
type
:
"GET"
,
dataType
:
"json"
,
contentType
:
"application/json;charset=utf-8"
,
success
:
function
(
result
)
{
if
(
result
.
code
==
100
)
{
layer
.
msg
(
result
.
msg
,
{
icon
:
6
,
time
:
1000
},
function
()
{
...
...
@@ -361,9 +359,8 @@
param
.
istatus
=
90
;
$
.
ajax
({
url
:
"updateOkStatus"
,
data
:
JSON
.
stringify
(
param
),
type
:
"POST"
,
url
:
"successOrder?id="
+
id
,
type
:
"GET"
,
dataType
:
"json"
,
contentType
:
"application/json;charset=utf-8"
,
success
:
function
(
result
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment