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
49970133
Commit
49970133
authored
Jun 30, 2023
by
郑云飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0db8b648
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
112 additions
and
73 deletions
+112
-73
src/main/java/com/yunniu/farming/app/OrderMainAppController.java
+35
-41
src/main/java/com/yunniu/farming/webadmin/controller/TaskJob.java
+10
-3
src/main/java/com/yunniu/farming/webadmin/dao/GroupBuyDao.java
+4
-1
src/main/java/com/yunniu/farming/webadmin/dao/OrderMainDao.java
+2
-0
src/main/java/com/yunniu/farming/webadmin/service/impl/GroupBuyServiceimpl.java
+1
-9
src/main/java/com/yunniu/farming/webadmin/service/impl/OrderMainServiceImpl.java
+28
-12
src/main/resources/mappings/GroupBuyMapper.xml
+18
-6
src/main/resources/mappings/OrderMainMapper.xml
+14
-1
No files found.
src/main/java/com/yunniu/farming/app/OrderMainAppController.java
View file @
49970133
...
@@ -30,20 +30,20 @@ public class OrderMainAppController {
...
@@ -30,20 +30,20 @@ public class OrderMainAppController {
@ResponseBody
@ResponseBody
public
Result
findPageList
(
@RequestBody
OrderMain
item
)
{
public
Result
findPageList
(
@RequestBody
OrderMain
item
)
{
if
(
item
.
getCustomerid
()
==
null
||
item
.
getCustomerid
().
equals
(
""
))
return
Result
.
success
();
if
(
item
.
getCustomerid
()
==
null
||
item
.
getCustomerid
().
equals
(
""
))
return
Result
.
success
();
//这里对返回对象用Map处理,map.pageinfo=>分页信息;map.items=>结果数据集;
//这里对返回对象用Map处理,map.pageinfo=>分页信息;map.items=>结果数据集;
Map
<
String
,
Object
>
rmap
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
rmap
=
new
HashMap
<
String
,
Object
>();
//传入当前页数,适配PC端Layui分页
//传入当前页数,适配PC端Layui分页
if
(
item
.
getCurpage
()
!=
null
||
item
.
getPagesize
()
!=
null
)
{
if
(
item
.
getCurpage
()
!=
null
||
item
.
getPagesize
()
!=
null
)
{
PageInfo
pinfo
=
new
PageInfo
();
PageInfo
pinfo
=
new
PageInfo
();
if
(
item
.
getCurpage
()
!=
null
)
{
if
(
item
.
getCurpage
()
!=
null
)
{
pinfo
.
setCurPage
(
item
.
getCurpage
());
pinfo
.
setCurPage
(
item
.
getCurpage
());
}
}
if
(
item
.
getPagesize
()
!=
null
)
{
if
(
item
.
getPagesize
()
!=
null
)
{
pinfo
.
setPageSize
(
item
.
getPagesize
());
pinfo
.
setPageSize
(
item
.
getPagesize
());
}
}
item
.
setPageinfo
(
pinfo
);
item
.
setPageinfo
(
pinfo
);
...
@@ -51,10 +51,10 @@ public class OrderMainAppController {
...
@@ -51,10 +51,10 @@ public class OrderMainAppController {
// 1.查询前 需要对分页对象 做处理,主要是 分页 开始记录数 limit arg0开始记录,arg1每页几条记录
// 1.查询前 需要对分页对象 做处理,主要是 分页 开始记录数 limit arg0开始记录,arg1每页几条记录
PageInfo
pinfo
=
item
.
getPageinfo
();
PageInfo
pinfo
=
item
.
getPageinfo
();
if
(
pinfo
==
null
)
{
if
(
pinfo
==
null
)
{
pinfo
=
new
PageInfo
();
pinfo
=
new
PageInfo
();
item
.
setPageinfo
(
pinfo
);
item
.
setPageinfo
(
pinfo
);
}
else
{
}
else
{
// 分页开始记录数
// 分页开始记录数
int
curRecord
=
(
pinfo
.
getCurPage
()
-
1
)
*
pinfo
.
getPageSize
();
int
curRecord
=
(
pinfo
.
getCurPage
()
-
1
)
*
pinfo
.
getPageSize
();
pinfo
.
setCurRecord
(
curRecord
);
pinfo
.
setCurRecord
(
curRecord
);
...
@@ -62,15 +62,15 @@ public class OrderMainAppController {
...
@@ -62,15 +62,15 @@ public class OrderMainAppController {
}
}
item
.
setAppflag
(
1
);
item
.
setAppflag
(
1
);
// 2.1 执行主表 查询
// 2.1 执行主表 查询
List
<
OrderMain
>
items
=
this
.
orderService
.
selectByParamPageList
(
item
);
List
<
OrderMain
>
items
=
this
.
orderService
.
selectByParamPageList
(
item
);
// 3.将查询结果的 分页数据封装后返回
// 3.将查询结果的 分页数据封装后返回
int
totalRs
=
pinfo
.
getTotalRecords
();
//总记录数
int
totalRs
=
pinfo
.
getTotalRecords
();
//总记录数
int
totalPs
=
0
;
//总页数
int
totalPs
=
0
;
//总页数
if
(
totalRs
%
pinfo
.
getPageSize
()
==
0
){
//总页数计算
if
(
totalRs
%
pinfo
.
getPageSize
()
==
0
)
{
//总页数计算
totalPs
=
totalRs
/
pinfo
.
getPageSize
()
;
totalPs
=
totalRs
/
pinfo
.
getPageSize
();
}
else
{
}
else
{
totalPs
=
1
+
totalRs
/
pinfo
.
getPageSize
()
;
totalPs
=
1
+
totalRs
/
pinfo
.
getPageSize
();
}
}
pinfo
.
setTotalPages
(
totalPs
);
pinfo
.
setTotalPages
(
totalPs
);
...
@@ -81,8 +81,6 @@ public class OrderMainAppController {
...
@@ -81,8 +81,6 @@ public class OrderMainAppController {
}
}
/**
/**
* FRICE TODO 根据 ”多参数“ 查找对象集合
* FRICE TODO 根据 ”多参数“ 查找对象集合
*/
*/
...
@@ -96,7 +94,6 @@ public class OrderMainAppController {
...
@@ -96,7 +94,6 @@ public class OrderMainAppController {
}
}
/**
/**
* 更新订单
* 更新订单
*/
*/
...
@@ -111,8 +108,6 @@ public class OrderMainAppController {
...
@@ -111,8 +108,6 @@ public class OrderMainAppController {
}
}
/**
/**
* 创建订单
* 创建订单
*/
*/
...
@@ -128,7 +123,6 @@ public class OrderMainAppController {
...
@@ -128,7 +123,6 @@ public class OrderMainAppController {
}
}
/**
/**
* 创建积分订单
* 创建积分订单
*/
*/
...
@@ -156,10 +150,8 @@ public class OrderMainAppController {
...
@@ -156,10 +150,8 @@ public class OrderMainAppController {
}
}
/**
/**
* 根据”对象id“ 删除对象
* 根据”对象id“ 删除对象
*
*/
*/
@RequestMapping
(
value
=
"/{id}/deleteById"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/{id}/deleteById"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
...
@@ -170,15 +162,14 @@ public class OrderMainAppController {
...
@@ -170,15 +162,14 @@ public class OrderMainAppController {
}
}
/**
/**
*
根据参数,查询订单数量
* 根据参数,查询订单数量
*/
*/
@RequestMapping
(
value
=
"/findOrderNum"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/findOrderNum"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
Result
findOrderNum
(
@RequestBody
JSONObject
json
){
public
Result
findOrderNum
(
@RequestBody
JSONObject
json
)
{
OrderMain
user
=
JSONObject
.
toJavaObject
(
json
,
OrderMain
.
class
);
OrderMain
user
=
JSONObject
.
toJavaObject
(
json
,
OrderMain
.
class
);
int
orderNum
=
this
.
orderService
.
findOrderNum
(
user
);
int
orderNum
=
this
.
orderService
.
findOrderNum
(
user
);
...
@@ -187,31 +178,28 @@ public class OrderMainAppController {
...
@@ -187,31 +178,28 @@ public class OrderMainAppController {
}
}
/**
/**
*
取消订单
* 取消订单
*/
*/
@RequestMapping
(
value
=
"/cancelOrder"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/cancelOrder"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
Result
cancelOrder
(
@RequestBody
JSONObject
json
){
public
Result
cancelOrder
(
@RequestBody
JSONObject
json
)
{
//1. 将前台传过来的json对象转换成具有业务属性的 Java 对象
//1. 将前台传过来的json对象转换成具有业务属性的 Java 对象
OrderMain
user
=
JSONObject
.
toJavaObject
(
json
,
OrderMain
.
class
);
OrderMain
user
=
JSONObject
.
toJavaObject
(
json
,
OrderMain
.
class
);
return
this
.
orderService
.
cancelOrder
(
user
);
return
this
.
orderService
.
cancelOrder
(
user
);
}
}
/**
/**
*
订单已完成
* 订单已完成
*/
*/
@RequestMapping
(
value
=
"/updateOkStatus"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/updateOkStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
Result
updateOkStatus
(
@RequestBody
JSONObject
json
){
public
Result
updateOkStatus
(
@RequestBody
JSONObject
json
)
{
//1. 将前台传过来的json对象转换成具有业务属性的 Java 对象
//1. 将前台传过来的json对象转换成具有业务属性的 Java 对象
OrderMain
user
=
JSONObject
.
toJavaObject
(
json
,
OrderMain
.
class
);
OrderMain
user
=
JSONObject
.
toJavaObject
(
json
,
OrderMain
.
class
);
return
this
.
orderService
.
updateOkStatus
(
user
);
return
this
.
orderService
.
updateOkStatus
(
user
);
...
@@ -222,9 +210,9 @@ public class OrderMainAppController {
...
@@ -222,9 +210,9 @@ public class OrderMainAppController {
* @积分兑换 商品
* @积分兑换 商品
*/
*/
@RequestMapping
(
value
=
"/integralPay"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/integralPay"
,
method
=
RequestMethod
.
POST
)
public
Result
integralPay
(
Integer
userId
,
Integer
orderId
){
public
Result
integralPay
(
Integer
userId
,
Integer
orderId
)
{
return
this
.
orderService
.
integralPay
(
userId
,
orderId
);
return
this
.
orderService
.
integralPay
(
userId
,
orderId
);
}
}
...
@@ -240,6 +228,12 @@ public class OrderMainAppController {
...
@@ -240,6 +228,12 @@ public class OrderMainAppController {
}
}
}
}
/**
* 获取用户最后一次填写的地址信息
*/
@RequestMapping
(
value
=
"/getLastOrderAddres"
,
method
=
RequestMethod
.
GET
)
public
Result
getLastOrderAddres
(
Integer
userId
)
{
return
orderService
.
getLastOrderAddres
(
userId
);
}
}
}
src/main/java/com/yunniu/farming/webadmin/controller/TaskJob.java
View file @
49970133
package
com
.
yunniu
.
farming
.
webadmin
.
controller
;
package
com
.
yunniu
.
farming
.
webadmin
.
controller
;
import
cn.hutool.core.lang.WeightRandom
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yunniu.farming.util.DateTools
;
import
com.yunniu.farming.util.DateTools
;
import
com.yunniu.farming.webadmin.dao.CustomerDao
;
import
com.yunniu.farming.webadmin.dao.CustomerDao
;
import
com.yunniu.farming.webadmin.dao.GroupBuyDao
;
import
com.yunniu.farming.webadmin.dao.GroupBuyDao
;
...
@@ -94,7 +92,16 @@ public class TaskJob {
...
@@ -94,7 +92,16 @@ public class TaskJob {
*/
*/
@Scheduled
(
cron
=
"0 * * * * ? "
)
@Scheduled
(
cron
=
"0 * * * * ? "
)
public
void
activityFailure
()
{
public
void
activityFailure
()
{
groupBuyDao
.
activityFailure
();
groupBuyDao
.
activityFailure
(
new
Date
());
}
/**
* 定时失效团购活动
*/
@Scheduled
(
cron
=
"0 * * * * ? "
)
public
void
activityValidation
()
{
groupBuyDao
.
activityValidation
(
new
Date
());
}
}
...
...
src/main/java/com/yunniu/farming/webadmin/dao/GroupBuyDao.java
View file @
49970133
...
@@ -3,7 +3,9 @@ package com.yunniu.farming.webadmin.dao;
...
@@ -3,7 +3,9 @@ package com.yunniu.farming.webadmin.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yunniu.farming.webadmin.model.GroupBuy
;
import
com.yunniu.farming.webadmin.model.GroupBuy
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -18,7 +20,7 @@ public interface GroupBuyDao extends BaseMapper<GroupBuy> {
...
@@ -18,7 +20,7 @@ public interface GroupBuyDao extends BaseMapper<GroupBuy> {
int
updateEndTime
(
GroupBuy
item
);
int
updateEndTime
(
GroupBuy
item
);
int
activityFailure
();
int
activityFailure
(
@Param
(
"now"
)
Date
now
);
int
updateStatus
(
Long
id
);
int
updateStatus
(
Long
id
);
...
@@ -26,4 +28,5 @@ public interface GroupBuyDao extends BaseMapper<GroupBuy> {
...
@@ -26,4 +28,5 @@ public interface GroupBuyDao extends BaseMapper<GroupBuy> {
List
<
String
>
findavatarList
();
List
<
String
>
findavatarList
();
int
activityValidation
(
@Param
(
"now"
)
Date
now
);
}
}
src/main/java/com/yunniu/farming/webadmin/dao/OrderMainDao.java
View file @
49970133
...
@@ -20,4 +20,6 @@ public interface OrderMainDao extends BaseMapper<OrderMain> {
...
@@ -20,4 +20,6 @@ public interface OrderMainDao extends BaseMapper<OrderMain> {
List
<
OrderMain
>
getPageListByGroupOrderId
(
OrderMain
item
);
List
<
OrderMain
>
getPageListByGroupOrderId
(
OrderMain
item
);
List
<
OrderMain
>
selectByGroupOrderId
(
Long
id
);
List
<
OrderMain
>
selectByGroupOrderId
(
Long
id
);
OrderMain
getLastOrderAddres
(
Integer
userId
);
}
}
src/main/java/com/yunniu/farming/webadmin/service/impl/GroupBuyServiceimpl.java
View file @
49970133
...
@@ -6,13 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
...
@@ -6,13 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yunniu.farming.result.Result
;
import
com.yunniu.farming.result.Result
;
import
com.yunniu.farming.util.COSUtil
;
import
com.yunniu.farming.util.FileUtil
;
import
com.yunniu.farming.util.ImageUtil
;
import
com.yunniu.farming.util.UUIDUtils
;
import
com.yunniu.farming.webadmin.dao.*
;
import
com.yunniu.farming.webadmin.dao.*
;
import
com.yunniu.farming.webadmin.model.*
;
import
com.yunniu.farming.webadmin.model.*
;
import
com.yunniu.farming.webadmin.service.GroupBuyProductService
;
import
com.yunniu.farming.webadmin.service.GroupBuyService
;
import
com.yunniu.farming.webadmin.service.GroupBuyService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,10 +15,7 @@ import org.springframework.stereotype.Service;
...
@@ -20,10 +15,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* @author zyf
* @author zyf
...
@@ -68,7 +60,7 @@ public class GroupBuyServiceimpl implements GroupBuyService {
...
@@ -68,7 +60,7 @@ public class GroupBuyServiceimpl implements GroupBuyService {
if
(
ObjectUtils
.
isEmpty
(
item
.
getId
()))
{
if
(
ObjectUtils
.
isEmpty
(
item
.
getId
()))
{
// 设置小区id集合的值
// 设置小区id集合的值
item
.
setAreaIds
(
JSON
.
toJSONString
(
item
.
getAreaIdList
()));
item
.
setAreaIds
(
JSON
.
toJSONString
(
item
.
getAreaIdList
()));
item
.
setGroupStatus
(
3
);
item
.
setGroupStatus
(
2
);
// 保存活动基础信息
// 保存活动基础信息
this
.
mapper
.
insert
(
item
);
this
.
mapper
.
insert
(
item
);
...
...
src/main/java/com/yunniu/farming/webadmin/service/impl/OrderMainServiceImpl.java
View file @
49970133
...
@@ -5,7 +5,10 @@ import com.yunniu.farming.util.DateTools;
...
@@ -5,7 +5,10 @@ import com.yunniu.farming.util.DateTools;
import
com.yunniu.farming.util.DateUtils
;
import
com.yunniu.farming.util.DateUtils
;
import
com.yunniu.farming.util.StringHelper
;
import
com.yunniu.farming.util.StringHelper
;
import
com.yunniu.farming.util.WxPayAppUtils
;
import
com.yunniu.farming.util.WxPayAppUtils
;
import
com.yunniu.farming.webadmin.dao.*
;
import
com.yunniu.farming.webadmin.dao.CustomerDao
;
import
com.yunniu.farming.webadmin.dao.IntegralrecDao
;
import
com.yunniu.farming.webadmin.dao.OrderMainDao
;
import
com.yunniu.farming.webadmin.dao.OrderSubDao
;
import
com.yunniu.farming.webadmin.model.GroupOrder
;
import
com.yunniu.farming.webadmin.model.GroupOrder
;
import
com.yunniu.farming.webadmin.model.Integralrec
;
import
com.yunniu.farming.webadmin.model.Integralrec
;
import
com.yunniu.farming.webadmin.model.OrderMain
;
import
com.yunniu.farming.webadmin.model.OrderMain
;
...
@@ -13,14 +16,16 @@ import com.yunniu.farming.webadmin.model.OrderSub;
...
@@ -13,14 +16,16 @@ import com.yunniu.farming.webadmin.model.OrderSub;
import
com.yunniu.farming.webadmin.service.GroupOrderService
;
import
com.yunniu.farming.webadmin.service.GroupOrderService
;
import
com.yunniu.farming.wx.WxConfigUtil
;
import
com.yunniu.farming.wx.WxConfigUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.aspectj.weaver.ast.Or
;
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
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Service
...
@@ -345,13 +350,13 @@ public class OrderMainServiceImpl {
...
@@ -345,13 +350,13 @@ public class OrderMainServiceImpl {
if
(
co
==
null
)
return
;
if
(
co
==
null
)
return
;
// 支付回调标志,防止 多次回调
// 支付回调标志,防止 多次回调
if
(
StringUtils
.
isEmpty
(
co
.
getSdef1
()))
{
if
(
StringUtils
.
isEmpty
(
co
.
getSdef4
()))
{
//支会回调标志
//支会回调标志
co
.
setIstatus
(
OrderMain
.
STATUS_WAITING
);
//待收货
co
.
setIstatus
(
OrderMain
.
STATUS_WAITING
);
//待收货
co
.
setIpaystatus
(
OrderMain
.
PAY_STATUS_OK
);
//支付成功
co
.
setIpaystatus
(
OrderMain
.
PAY_STATUS_OK
);
//支付成功
co
.
setTpaytime
(
new
Date
());
//支付时间
co
.
setTpaytime
(
new
Date
());
//支付时间
co
.
setSdef
1
(
"1"
);
co
.
setSdef
4
(
"1"
);
this
.
update
(
co
);
this
.
update
(
co
);
...
@@ -447,14 +452,25 @@ public class OrderMainServiceImpl {
...
@@ -447,14 +452,25 @@ public class OrderMainServiceImpl {
return
Result
.
success
(
"支付失败"
);
return
Result
.
success
(
"支付失败"
);
}
}
//改变订单状态
//改变订单状态
//待发货
//待发货
ord
.
setIstatus
(
OrderMain
.
STATUS_YESPAY
);
ord
.
setIstatus
(
OrderMain
.
STATUS_YESPAY
);
//已支付
//已支付
ord
.
setIpaystatus
(
OrderMain
.
FLAG_Y
);
ord
.
setIpaystatus
(
OrderMain
.
FLAG_Y
);
//支付时间
//支付时间
ord
.
setTpaytime
(
new
Date
());
//支付时间
ord
.
setTpaytime
(
new
Date
());
//支付时间
this
.
orderMainDao
.
updateById
(
ord
);
this
.
orderMainDao
.
updateById
(
ord
);
return
Result
.
success
(
"支付成功"
);
return
Result
.
success
(
"支付成功"
);
}
}
/**
* 获取用户最后一次填写的地址信息
*
* @param userId 用户id
* @return
*/
public
Result
getLastOrderAddres
(
Integer
userId
)
{
return
Result
.
success
(
this
.
orderMainDao
.
getLastOrderAddres
(
userId
));
}
}
}
src/main/resources/mappings/GroupBuyMapper.xml
View file @
49970133
...
@@ -31,18 +31,29 @@
...
@@ -31,18 +31,29 @@
</update>
</update>
<update
id=
"activityFailure"
>
<update
id=
"activityFailure"
>
update group_buy set group_status = 4 where end_time
<
= now();
update group_buy set group_status = 4 where end_time
<
= DATE_FORMAT(#{now},'%Y-%m-%d %H:%i:%s') and
</update>
group_status =3;
</update>
<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
id=
"findJoinNumber"
resultType=
"java.lang.Integer"
>
select count(1) from order_main where group_order_id is not null
select count(1)
</select>
from order_main
where group_order_id is not null
</select>
<select
id=
"findavatarList"
resultType=
"java.lang.String"
>
<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 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>
</select>
<update
id=
"activityValidation"
>
update group_buy set group_status = 3 where start_time
<
= DATE_FORMAT(#{now},'%Y-%m-%d %H:%i:%s') and
group_status =2;
</update>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mappings/OrderMainMapper.xml
View file @
49970133
...
@@ -314,7 +314,7 @@
...
@@ -314,7 +314,7 @@
om.sdef2,
om.sdef2,
om.sdef3
om.sdef3
from order_main om
from order_main om
left join customer c on om.customerid = c.id
left join customer c on om.customerid = c.id
where om.group_order_id = #{id,jdbcType=BIGINT}
where om.group_order_id = #{id,jdbcType=BIGINT}
</select>
</select>
...
@@ -323,4 +323,17 @@
...
@@ -323,4 +323,17 @@
from order_main
from order_main
where group_order_id = #{id,jdbcType=BIGINT} and ipaystatus = 1
where group_order_id = #{id,jdbcType=BIGINT} and ipaystatus = 1
</select>
</select>
<select
id=
"getLastOrderAddres"
resultMap=
"BaseResultMap"
>
select sdef1,
sdef2,
sdef3
from order_main
where customerid = #{userId}
and group_order_id is not null
and sdef1 is not null
and sdef2 is not null
and sdef3 is not null
order by tordertime desc limit 1
</select>
</mapper>
</mapper>
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