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
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
146 additions
and
49 deletions
+146
-49
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
+6
-9
src/main/resources/templates/groupBuy/addOrEdit.html
+16
-12
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 {
...
@@ -70,13 +70,12 @@ public class GroupBuyAppController {
totalPs
=
1
+
totalRs
/
pinfo
.
getPageSize
();
totalPs
=
1
+
totalRs
/
pinfo
.
getPageSize
();
}
}
pinfo
.
setTotalPages
(
totalPs
);
pinfo
.
setTotalPages
(
totalPs
);
Integer
joinNumber
=
groupBuyService
.
findJoinNumber
();
List
<
String
>
avatarList
=
groupBuyService
.
findavatarList
();
// 4.将分页对象、结果集合 封装后返回前台
// 4.将分页对象、结果集合 封装后返回前台
rmap
.
put
(
"pageinfo"
,
pinfo
);
rmap
.
put
(
"pageinfo"
,
pinfo
);
rmap
.
put
(
"items"
,
list
);
rmap
.
put
(
"items"
,
list
);
rmap
.
put
(
"joinNumber"
,
0
);
rmap
.
put
(
"joinNumber"
,
joinNumber
);
List
<
String
>
avatarList
=
new
ArrayList
<>();
avatarList
.
add
(
"https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLjFK35Wvia9lJKHoXfQuHhk0qZbvpPNxrAiaEKF7aL2k4I8kuqrdTWwliamdPHeyAA7DjAg725X2GIQ/132"
);
rmap
.
put
(
"avatarList"
,
avatarList
);
rmap
.
put
(
"avatarList"
,
avatarList
);
return
Result
.
success
(
rmap
);
return
Result
.
success
(
rmap
);
}
}
...
...
src/main/java/com/yunniu/farming/app/WxController.java
View file @
b3e9d1bc
...
@@ -75,7 +75,7 @@ public class WxController {
...
@@ -75,7 +75,7 @@ public class WxController {
public
String
testNotifyOk
(
@PathVariable
Integer
id
){
public
String
testNotifyOk
(
@PathVariable
Integer
id
){
if
(
id
==
null
)
return
null
;
if
(
id
==
null
)
return
null
;
this
.
wxServiceImpl
.
test
NotifyOk
(
id
);
this
.
wxServiceImpl
.
handle
NotifyOk
(
id
);
return
"ok"
;
return
"ok"
;
}
}
...
...
src/main/java/com/yunniu/farming/webadmin/controller/GroupOrderController.java
View file @
b3e9d1bc
...
@@ -53,6 +53,28 @@ public class GroupOrderController {
...
@@ -53,6 +53,28 @@ public class GroupOrderController {
return
"groupOrder/detail"
;
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
)
@RequestMapping
(
value
=
"/findPageList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
Result
findPageList
(
@RequestBody
GroupOrder
item
)
{
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 {
...
@@ -71,11 +71,11 @@ public class TaskJob {
// 查询待成团并到期的团购订单
// 查询待成团并到期的团购订单
List
<
GroupOrder
>
orders
=
groupOrderDao
.
getList
();
List
<
GroupOrder
>
orders
=
groupOrderDao
.
getList
();
orders
.
forEach
(
order
->
{
orders
.
forEach
(
order
->
{
order
.
setGroupStatus
(
"4"
);
// 查询已支付成功订单
// 查询已支付成功订单
List
<
OrderMain
>
orderMains
=
orderMainDao
.
selectByGroupOrderId
(
order
.
getId
());
List
<
OrderMain
>
orderMains
=
orderMainDao
.
selectByGroupOrderId
(
order
.
getId
());
// 订单数小于成团数 拼团失败 进行退款
// 订单数小于成团数 拼团失败 进行退款
if
(
order
.
getGroupSize
()
<
orderMains
.
size
())
{
if
(
order
.
getGroupSize
()
<
orderMains
.
size
())
{
order
.
setGroupStatus
(
"4"
);
// 循环退款
// 循环退款
orderMains
.
forEach
(
orderMain
->
{
orderMains
.
forEach
(
orderMain
->
{
try
{
try
{
...
@@ -85,6 +85,7 @@ public class TaskJob {
...
@@ -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> {
...
@@ -21,4 +21,9 @@ public interface GroupBuyDao extends BaseMapper<GroupBuy> {
int
activityFailure
();
int
activityFailure
();
int
updateStatus
(
Long
id
);
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
;
package
com
.
yunniu
.
farming
.
webadmin
.
model
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.yunniu.farming.common.plugin.PageInfo
;
import
com.yunniu.farming.common.plugin.PageInfo
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -28,7 +30,11 @@ public class GroupOrder {
...
@@ -28,7 +30,11 @@ public class GroupOrder {
private
String
groupStatus
;
private
String
groupStatus
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
successTime
;
private
Date
successTime
;
@TableField
(
exist
=
false
)
private
String
successTimeStr
;
private
Date
createTime
;
private
Date
createTime
;
...
...
src/main/java/com/yunniu/farming/webadmin/service/GroupBuyService.java
View file @
b3e9d1bc
...
@@ -36,4 +36,8 @@ public interface GroupBuyService {
...
@@ -36,4 +36,8 @@ public interface GroupBuyService {
List
<
Product
>
productList
(
Product
item
);
List
<
Product
>
productList
(
Product
item
);
int
delById
(
Long
id
);
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 {
...
@@ -28,4 +28,8 @@ public interface GroupOrderService {
List
<
OrderSub
>
productList
(
OrderSub
item
);
List
<
OrderSub
>
productList
(
OrderSub
item
);
boolean
updateRefundStatus
(
String
outRefundNo
);
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 {
...
@@ -42,6 +42,8 @@ public class GroupBuyServiceimpl implements GroupBuyService {
private
GroupAreaDao
areaDao
;
private
GroupAreaDao
areaDao
;
@Autowired
@Autowired
private
ProductDao
productDao
;
private
ProductDao
productDao
;
@Autowired
private
DocCatalogDao
docCatalogDao
;
/**
/**
* 分页查询
* 分页查询
...
@@ -137,6 +139,8 @@ public class GroupBuyServiceimpl implements GroupBuyService {
...
@@ -137,6 +139,8 @@ public class GroupBuyServiceimpl implements GroupBuyService {
*/
*/
@Override
@Override
public
List
<
Product
>
productList
(
Product
item
)
{
public
List
<
Product
>
productList
(
Product
item
)
{
DocCatalog
catalog
=
docCatalogDao
.
selectOne
(
Wrappers
.<
DocCatalog
>
lambdaQuery
().
like
(
DocCatalog:
:
getSname
,
"团购"
));
item
.
setCatalogid
(
catalog
.
getId
());
return
productDao
.
selectByParamPageList
(
item
);
return
productDao
.
selectByParamPageList
(
item
);
}
}
...
@@ -149,4 +153,15 @@ public class GroupBuyServiceimpl implements GroupBuyService {
...
@@ -149,4 +153,15 @@ public class GroupBuyServiceimpl implements GroupBuyService {
public
int
delById
(
Long
id
)
{
public
int
delById
(
Long
id
)
{
return
mapper
.
updateStatus
(
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;
...
@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
...
@@ -104,6 +105,10 @@ public class GroupOrderServiceImpl implements GroupOrderService {
...
@@ -104,6 +105,10 @@ public class GroupOrderServiceImpl implements GroupOrderService {
@Override
@Override
public
GroupOrder
findById
(
Long
id
)
{
public
GroupOrder
findById
(
Long
id
)
{
GroupOrder
order
=
orderDao
.
detailById
(
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
;
return
order
;
}
}
...
@@ -145,6 +150,30 @@ public class GroupOrderServiceImpl implements GroupOrderService {
...
@@ -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
* @param curOrder
*/
*/
...
@@ -154,6 +183,7 @@ public class GroupOrderServiceImpl implements GroupOrderService {
...
@@ -154,6 +183,7 @@ public class GroupOrderServiceImpl implements GroupOrderService {
.
eq
(
OrderMain:
:
getGroupOrderId
,
curOrder
.
getGroupOrderId
())
.
eq
(
OrderMain:
:
getGroupOrderId
,
curOrder
.
getGroupOrderId
())
.
eq
(
OrderMain:
:
getIpaystatus
,
1
)
.
eq
(
OrderMain:
:
getIpaystatus
,
1
)
.
isNull
(
OrderMain:
:
getIrefundstatus
));
.
isNull
(
OrderMain:
:
getIrefundstatus
));
if
(
groupBuy
.
getGroupSize
()
<=
count
)
{
if
(
groupBuy
.
getGroupSize
()
<=
count
)
{
orderDao
.
updateStatus
(
curOrder
.
getGroupOrderId
());
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 {
...
@@ -92,7 +92,7 @@ public class OrderMainServiceImpl {
if
(
item
.
getId
()
==
null
)
{
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
);
GroupOrder
order
=
orderService
.
addGroupOrder
(
item
);
item
.
setGroupOrderId
(
order
.
getId
());
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 {
...
@@ -409,7 +409,7 @@ public class WxServiceImpl implements WxService {
* @param id
* @param id
*/
*/
@Transactional
@Transactional
p
rotected
void
handleNotifyOk
(
Integer
id
)
{
p
ublic
void
handleNotifyOk
(
Integer
id
)
{
// 从数据库中将信息详情查出来
// 从数据库中将信息详情查出来
OrderMain
curOrder
=
this
.
orderMainDao
.
selectByPrimaryKey
(
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 {
...
@@ -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
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_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
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 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://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
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"
;
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 @@
...
@@ -12,7 +12,7 @@
<where>
<where>
group_status
<>
5
group_status
<>
5
<if
test=
"groupBuyCode != null and groupBuyCode != ''"
>
<if
test=
"groupBuyCode != null and groupBuyCode != ''"
>
and
group_buy_code
= #{groupBuyCode,jdbcType=VARCHAR}
and
id
= #{groupBuyCode,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"groupBuyTitle != null and groupBuyTitle != ''"
>
<if
test=
"groupBuyTitle != null and groupBuyTitle != ''"
>
and group_buy_title like concat('%', #{groupBuyTitle,jdbcType=VARCHAR},'%')
and group_buy_title like concat('%', #{groupBuyTitle,jdbcType=VARCHAR},'%')
...
@@ -37,4 +37,12 @@
...
@@ -37,4 +37,12 @@
<update
id=
"updateStatus"
>
<update
id=
"updateStatus"
>
update group_buy set group_status =5 where id = #{id,jdbcType=BIGINT}
update group_buy set group_status =5 where id = #{id,jdbcType=BIGINT}
</update>
</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>
</mapper>
\ No newline at end of file
src/main/resources/mappings/GroupBuyProductMapper.xml
View file @
b3e9d1bc
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
<mapper
namespace=
"com.yunniu.farming.webadmin.dao.GroupBuyProductDao"
>
<mapper
namespace=
"com.yunniu.farming.webadmin.dao.GroupBuyProductDao"
>
<insert
id=
"insertBath"
>
<insert
id=
"insertBath"
>
insert into group_buy_product
insert into group_buy_product
(group_buy_id, product_id, product_name,
(group_buy_id, product_
pic, product_
id, product_name,
product_sduction, product_price, `status`, create_by)
product_sduction, product_price,
sunit,
`status`, create_by)
values
values
<foreach
collection=
"products"
index=
"index"
item=
"item"
separator=
","
>
<foreach
collection=
"products"
index=
"index"
item=
"item"
separator=
","
>
(#{id,jdbcType=BIGINT}, #{item.productId}, #{item.productName},
(#{id,jdbcType=BIGINT}, #{item.product
Pic,jdbcType=VARCHAR}, #{item.product
Id}, #{item.productName},
#{item.productSduction}, #{item.productPrice}, 0, #{item.createBy})
#{item.productSduction}, #{item.productPrice},
#{item.sunit,jdbcType=VARCHAR},
0, #{item.createBy})
</foreach>
</foreach>
</insert>
</insert>
...
...
src/main/resources/mappings/GroupOrderMapper.xml
View file @
b3e9d1bc
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</select>
</select>
<update
id=
"updateStatus"
>
<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>
</update>
<select
id=
"getBySdef1"
resultType=
"com.yunniu.farming.webadmin.model.OrderMain"
>
<select
id=
"getBySdef1"
resultType=
"com.yunniu.farming.webadmin.model.OrderMain"
>
...
...
src/main/resources/mappings/OrderMainMapper.xml
View file @
b3e9d1bc
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<result
column=
"dactmoney"
property=
"dactmoney"
jdbcType=
"DECIMAL"
/>
<result
column=
"dactmoney"
property=
"dactmoney"
jdbcType=
"DECIMAL"
/>
<result
column=
"dactscore"
property=
"dactscore"
jdbcType=
"DECIMAL"
/>
<result
column=
"dactscore"
property=
"dactscore"
jdbcType=
"DECIMAL"
/>
<result
column=
"ipaystatus"
property=
"ipaystatus"
jdbcType=
"INTEGER"
/>
<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=
"irefundstatus"
property=
"irefundstatus"
jdbcType=
"INTEGER"
/>
<result
column=
"tpaytime"
property=
"tpaytime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"tpaytime"
property=
"tpaytime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"trefundtime"
property=
"trefundtime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"trefundtime"
property=
"trefundtime"
jdbcType=
"TIMESTAMP"
/>
...
@@ -136,7 +137,8 @@
...
@@ -136,7 +137,8 @@
ordermain.idef7,
ordermain.idef7,
ordermain.ddef8,
ordermain.ddef8,
ordermain.ddef9,
ordermain.ddef9,
ordermain.ddef10
ordermain.ddef10,
ordermain.group_order_id
</sql>
</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 @@
...
@@ -47,7 +47,8 @@
</div>
</div>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-block"
>
<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"
>
name=
"areaAddress"
style=
"width: 300px"
>
</div>
</div>
</div>
</div>
...
@@ -65,7 +66,8 @@
...
@@ -65,7 +66,8 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
联系电话
</label>
<label
class=
"layui-form-label"
>
联系电话
</label>
<div
class=
"layui-input-inline"
>
<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"
>
name=
"liaisonPhone"
style=
"width: 300px"
>
</div>
</div>
</div>
</div>
...
@@ -140,13 +142,9 @@
...
@@ -140,13 +142,9 @@
dataType
:
"json"
,
dataType
:
"json"
,
contentType
:
"application/json;charset=utf-8"
,
contentType
:
"application/json;charset=utf-8"
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
100
)
{
layer
.
msg
(
"恭喜您,提交成功"
,
{
icon
:
6
,
time
:
1000
},
function
()
{
closeLayer
();
closeLayer
();
parent
.
layui
.
table
.
reload
(
'tableId'
);
parent
.
layui
.
table
.
reload
(
'tableId'
);
});
}
else
{
}
else
{
layer
.
msg
(
result
.
msg
,
{
icon
:
5
});
layer
.
msg
(
result
.
msg
,
{
icon
:
5
});
}
}
...
@@ -155,9 +153,8 @@
...
@@ -155,9 +153,8 @@
}
}
function
closeLayer
()
{
function
closeLayer
()
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//关闭当前frame
//关闭当前frame
parent
.
layer
.
close
(
index
);
parent
.
layer
.
close
(
parent
.
layer
.
getFrameIndex
(
window
.
name
)
);
}
}
</script>
</script>
...
...
src/main/resources/templates/groupBuy/addOrEdit.html
View file @
b3e9d1bc
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
<script
type=
"text/javascript"
th:src=
"@{/js/ueditor/lang/zh-cn/zh-cn.js}"
></script>
<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=
"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>
<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>
<style>
.layui-form-label
{
.layui-form-label
{
...
@@ -62,7 +64,7 @@
...
@@ -62,7 +64,7 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><span
style=
"color: red"
>
*
</span>
配送小区
</label>
<label
class=
"layui-form-label"
><span
style=
"color: red"
>
*
</span>
配送小区
</label>
<div
class=
"layui-input-inline"
>
<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}"
<option
th:each=
"list:${areaList}"
th:value=
"${list.id}"
th:text=
"${list.areaName }"
></option>
th:text=
"${list.areaName }"
></option>
</select>
</select>
...
@@ -85,7 +87,7 @@
...
@@ -85,7 +87,7 @@
<div
class=
"layui-upload-list"
>
<div
class=
"layui-upload-list"
>
<img
class=
"layui-upload-img"
id=
"previewImg"
>
<img
class=
"layui-upload-img"
id=
"previewImg"
>
<p
id=
"uploadText"
></p>
<p
id=
"uploadText"
></p>
<span
style=
"color: red"
>
图片建议500*
25
0px
</span>
<span
style=
"color: red"
>
图片建议500*
40
0px
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -164,15 +166,15 @@
...
@@ -164,15 +166,15 @@
}
}
}
}
layui
.
use
(
'form'
,
function
()
{
layui
.
use
(
'form'
,
function
()
{
var
form
=
layui
.
form
;
var
form
=
layui
.
form
;
form
.
render
(
'select'
);
form
.
render
();
// 监听 select 元素的 change 事件
// 监听 select 元素的 change 事件
form
.
on
(
'select(areaIdList)'
,
function
(
data
)
{
form
.
on
(
'select(areaIdList)'
,
function
(
data
)
{
if
(
selectedValues
.
includes
(
parseInt
(
data
.
value
))){
if
(
selectedValues
.
includes
(
parseInt
(
data
.
value
)))
{
var
index
=
selectedValues
.
indexOf
(
parseInt
(
data
.
value
));
var
index
=
selectedValues
.
indexOf
(
parseInt
(
data
.
value
));
selectedValues
.
splice
(
index
,
1
);
selectedValues
.
splice
(
index
,
1
);
}
else
{
}
else
{
selectedValues
.
push
(
parseInt
(
data
.
value
));
selectedValues
.
push
(
parseInt
(
data
.
value
));
}
}
console
.
log
(
selectedValues
);
// 打印选中的值
console
.
log
(
selectedValues
);
// 打印选中的值
...
@@ -221,6 +223,7 @@
...
@@ -221,6 +223,7 @@
$
(
function
()
{
$
(
function
()
{
if
(
id
)
{
if
(
id
)
{
console
.
log
(
"==========================="
,
'[[${obj}]]'
)
console
.
log
(
"==========================="
,
'[[${obj}]]'
)
console
.
log
(
"==========================="
,
'[[${areaList}]]'
)
showPic
(
'[[${obj.groupBuyPic}]]'
);
showPic
(
'[[${obj.groupBuyPic}]]'
);
showTable
(
'[[${obj.productList}]]'
);
showTable
(
'[[${obj.productList}]]'
);
console
.
log
(
111111111
,
selectedData
)
console
.
log
(
111111111
,
selectedData
)
...
@@ -295,6 +298,7 @@
...
@@ -295,6 +298,7 @@
if
(
obj
.
event
===
'del'
)
{
if
(
obj
.
event
===
'del'
)
{
var
oldData
=
table
.
cache
[
"tableId"
];
var
oldData
=
table
.
cache
[
"tableId"
];
oldData
.
splice
(
obj
.
tr
.
data
(
'index'
),
1
);
oldData
.
splice
(
obj
.
tr
.
data
(
'index'
),
1
);
selectedData
=
oldData
;
layer
.
msg
(
"删除成功"
,
{
time
:
10
},
function
()
{
layer
.
msg
(
"删除成功"
,
{
time
:
10
},
function
()
{
table
.
reload
(
'tableId'
,
{
data
:
oldData
});
table
.
reload
(
'tableId'
,
{
data
:
oldData
});
});
});
...
@@ -400,11 +404,11 @@
...
@@ -400,11 +404,11 @@
processData
:
false
,
processData
:
false
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
if
(
result
.
code
===
100
)
{
console
.
log
(
"sdffffffffffffffffff"
,
result
);
layer
.
msg
(
result
.
msg
,
{
icon
:
6
,
time
:
1000
},
function
()
{
if
(
result
.
code
==
100
)
{
console
.
log
(
"sdffffffffffffffffff"
,
100
);
closeLayer
();
closeLayer
();
parent
.
layui
.
table
.
reload
(
'tableId'
);
parent
.
layui
.
table
.
reload
(
'tableId'
);
});
}
else
{
}
else
{
layer
.
msg
(
result
.
msg
,
{
icon
:
5
});
layer
.
msg
(
result
.
msg
,
{
icon
:
5
});
}
}
...
@@ -452,9 +456,9 @@
...
@@ -452,9 +456,9 @@
function
closeLayer
()
{
function
closeLayer
()
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
console
.
log
(
"sdffffffffffffffffff"
);
//关闭当前frame
//关闭当前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 @@
...
@@ -136,9 +136,9 @@
table
.
render
({
table
.
render
({
elem
:
'#tableId'
elem
:
'#tableId'
,
url
:
'findPageList'
,
url
:
'findPageList'
,
where
:
{}
,
where
:
field
,
method
:
'post'
,
method
:
'post'
,
contentType
:
"application/json"
// 内容编码, json格式
,
contentType
:
"application/json"
// 内容编码, json格式
,
height
:
500
,
height
:
500
,
toolbar
:
'#toolbarUtil'
//开启头部工具栏,并为其绑定左侧模板
,
toolbar
:
'#toolbarUtil'
//开启头部工具栏,并为其绑定左侧模板
,
defaultToolbar
:
[
'filter'
]
,
defaultToolbar
:
[
'filter'
]
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
//订单状态
//订单状态
var
status
=
""
;
var
status
=
""
;
if
(
d
.
groupStatus
==
3
)
status
=
"<span class='layui-badge layui-bg-orange'>生效中</span>"
;
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
+=
' <span>'
+
status
+
'</span>'
;
str
+=
'</div>'
;
str
+=
'</div>'
;
return
str
?
str
:
""
;
return
str
?
str
:
""
;
...
...
src/main/resources/templates/groupOrder/detail.html
View file @
b3e9d1bc
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<label
class=
"layui-form-label"
>
成团时间
</label>
<label
class=
"layui-form-label"
>
成团时间
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
class=
"layui-input"
name=
"successTime"
id=
"successTime"
<input
type=
"text"
class=
"layui-input"
name=
"successTime"
id=
"successTime"
th:value=
"${obj.successTime}"
>
th:value=
"${obj.successTime
Str
}"
>
</div>
</div>
<label
class=
"layui-form-label"
>
小区名称
</label>
<label
class=
"layui-form-label"
>
小区名称
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
...
...
src/main/resources/templates/groupOrder/list.html
View file @
b3e9d1bc
...
@@ -274,11 +274,9 @@
...
@@ -274,11 +274,9 @@
param
.
istatus
=
30
;
param
.
istatus
=
30
;
$
.
ajax
({
$
.
ajax
({
url
:
"updateFwStatus"
,
url
:
"updateFwStatus?id="
+
id
,
data
:
JSON
.
stringify
(
param
),
type
:
"GET"
,
type
:
"POST"
,
dataType
:
"json"
,
dataType
:
"json"
,
contentType
:
"application/json;charset=utf-8"
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
if
(
result
.
code
==
100
)
{
if
(
result
.
code
==
100
)
{
layer
.
msg
(
result
.
msg
,
{
icon
:
6
,
time
:
1000
},
function
()
{
layer
.
msg
(
result
.
msg
,
{
icon
:
6
,
time
:
1000
},
function
()
{
...
@@ -361,9 +359,8 @@
...
@@ -361,9 +359,8 @@
param
.
istatus
=
90
;
param
.
istatus
=
90
;
$
.
ajax
({
$
.
ajax
({
url
:
"updateOkStatus"
,
url
:
"successOrder?id="
+
id
,
data
:
JSON
.
stringify
(
param
),
type
:
"GET"
,
type
:
"POST"
,
dataType
:
"json"
,
dataType
:
"json"
,
contentType
:
"application/json;charset=utf-8"
,
contentType
:
"application/json;charset=utf-8"
,
success
:
function
(
result
)
{
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