Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
81caf6da
Commit
81caf6da
authored
Oct 23, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单表增加商户订单号字段,增加验券逻辑
parent
589e0cb7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
294 additions
and
191 deletions
+294
-191
SConsumerCouponController.java
...hare/web/controller/system/SConsumerCouponController.java
+18
-6
SCouponController.java
...n/java/share/web/controller/system/SCouponController.java
+10
-0
SOrder.java
share-system/src/main/java/share/system/domain/SOrder.java
+43
-14
MTServiceImpl.java
...rc/main/java/share/system/service/impl/MTServiceImpl.java
+26
-7
SOrderMapper.xml
...-system/src/main/resources/mapper/system/SOrderMapper.xml
+197
-164
No files found.
share-front/src/main/java/share/web/controller/system/SConsumerCouponController.java
View file @
81caf6da
...
...
@@ -6,8 +6,11 @@ import org.springframework.web.bind.annotation.*;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.service.ISConsumerCouponService
;
import
java.util.List
;
/**
...
...
@@ -18,8 +21,7 @@ import java.util.List;
*/
@RestController
@RequestMapping
(
"/front/consumerCoupon"
)
public
class
SConsumerCouponController
extends
BaseController
{
public
class
SConsumerCouponController
extends
BaseController
{
@Autowired
private
ISConsumerCouponService
sConsumerCouponService
;
...
...
@@ -28,8 +30,9 @@ public class SConsumerCouponController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:coupon:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SConsumerCoupon
sConsumerCoupon
)
{
public
TableDataInfo
list
(
SConsumerCoupon
sConsumerCoupon
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sConsumerCoupon
.
setConsumerId
(
user
.
getId
());
startPage
();
List
<
SConsumerCoupon
>
list
=
sConsumerCouponService
.
selectSConsumerCouponList
(
sConsumerCoupon
);
return
getDataTable
(
list
);
...
...
@@ -40,9 +43,18 @@ public class SConsumerCouponController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:coupon:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
sConsumerCouponService
.
selectSConsumerCouponById
(
id
));
}
@PreAuthorize
(
"@ss.hasPermi('system:coupon:list')"
)
@GetMapping
(
"/query"
)
public
List
<
SConsumerCoupon
>
query
(
SConsumerCoupon
sConsumerCoupon
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sConsumerCoupon
.
setConsumerId
(
user
.
getId
());
return
sConsumerCouponService
.
selectSConsumerCouponList
(
sConsumerCoupon
);
}
}
share-front/src/main/java/share/web/controller/system/SCouponController.java
View file @
81caf6da
...
...
@@ -2,6 +2,8 @@ package share.web.controller.system;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -16,6 +18,8 @@ import share.common.annotation.Log;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.common.enums.RoomType
;
import
share.common.enums.StoreType
;
import
share.system.domain.SCoupon
;
import
share.system.service.ISCouponService
;
import
share.common.utils.poi.ExcelUtil
;
...
...
@@ -77,6 +81,12 @@ public class SCouponController extends BaseController
@PostMapping
public
AjaxResult
add
(
@RequestBody
SCoupon
sCoupon
)
{
if
(
StringUtils
.
isNotBlank
(
sCoupon
.
getRoomType
())){
sCoupon
.
setRoomType
(
String
.
valueOf
(
RoomType
.
getCodeList
()));
}
if
(
StringUtils
.
isNotBlank
(
sCoupon
.
getStoreType
())){
sCoupon
.
setStoreType
(
String
.
valueOf
(
StoreType
.
getCodeList
()));
}
return
toAjax
(
sCouponService
.
insertSCoupon
(
sCoupon
));
}
...
...
share-system/src/main/java/share/system/domain/SOrder.java
View file @
81caf6da
...
...
@@ -22,18 +22,29 @@ import javax.validation.constraints.NotBlank;
* @date 2023-10-09
*/
@Data
public
class
SOrder
extends
BaseEntity
{
public
class
SOrder
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 订单ID */
/**
* 订单ID
*/
private
Long
id
;
/** 订单流水号 */
/**
* 订单流水号
*/
@Excel
(
name
=
"订单编号"
)
private
String
orderNo
;
/** 订单类型(0:订房订单,1:续房订单,2:充值订单) */
/**
* 订单流水号
*/
@Excel
(
name
=
"订单编号"
)
private
String
outTradeNo
;
/**
* 订单类型(0:订房订单,1:续房订单,2:充值订单)
*/
@Excel
(
name
=
"订单类型(0:订房订单,1:续房订单,2:充值订单)"
)
private
Integer
orderType
;
...
...
@@ -49,15 +60,21 @@ public class SOrder extends BaseEntity
@Excel
(
name
=
"房间ID"
)
private
Long
roomId
;
/** 用户ID */
/**
* 用户ID
*/
@Excel
(
name
=
"用户ID"
)
private
Long
consumerId
;
/** 用户名称 */
/**
* 用户名称
*/
@Excel
(
name
=
"用户名称"
)
private
String
consumerName
;
/** 用户手机号 */
/**
* 用户手机号
*/
@Excel
(
name
=
"用户手机号"
)
private
String
consumerPhone
;
...
...
@@ -67,7 +84,9 @@ public class SOrder extends BaseEntity
@ApiModelProperty
(
value
=
"套餐金额"
)
private
BigDecimal
packPrice
;
/** 优惠券id */
/**
* 优惠券id
*/
@Excel
(
name
=
"优惠券id"
)
private
String
couponId
;
...
...
@@ -86,27 +105,37 @@ public class SOrder extends BaseEntity
@Excel
(
name
=
"订单时长(H)"
)
private
String
timeLong
;
/** 预约开始时间 */
/**
* 预约开始时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@Excel
(
name
=
"预约开始时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
preStartDate
;
/** 预约结束时间 */
/**
* 预约结束时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@Excel
(
name
=
"预约结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
preEndDate
;
/** 开始时间 */
/**
* 开始时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@Excel
(
name
=
"开始时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
startDate
;
/** 结束时间 */
/**
* 结束时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@Excel
(
name
=
"结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
endDate
;
/** 订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中) */
/**
* 订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中)
*/
@Excel
(
name
=
"订单状态(0:待使用/已预约,1:使用中,2:已使用)"
)
private
Integer
status
;
...
...
share-system/src/main/java/share/system/service/impl/MTServiceImpl.java
View file @
81caf6da
...
...
@@ -15,8 +15,10 @@ import com.meituan.sdk.model.tuangouNg.coupon.queryCouponById.QueryCouponByIdRes
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.SCoupon
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.service.ISConsumerCouponService
;
import
share.system.service.ISCouponService
;
import
share.system.service.MTService
;
...
...
@@ -39,16 +41,17 @@ public class MTServiceImpl implements MTService {
//执行验券
@Override
public
MeituanResponse
verificationVouchers
(
String
code
,
int
num
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
//验券准备
MeituanResponse
preparation
=
preparation
(
code
);
//验券准备失败
if
(!
preparation
.
isSuccess
())
{
if
(!
preparation
.
isSuccess
())
{
throw
new
RuntimeException
(
preparation
.
getMsg
());
}
//返回验券准备数据
MsSuperPrepareResponse
data
=
(
MsSuperPrepareResponse
)
preparation
.
getData
();
MsSuperPrepareResponse
data
=
(
MsSuperPrepareResponse
)
preparation
.
getData
();
SCoupon
sCoupon
=
isCouponService
.
selectSCouponByName
(
data
.
getDealTitle
());
if
(
sCoupon
==
null
)
{
if
(
sCoupon
==
null
)
{
throw
new
RuntimeException
(
"未找到对应的优惠券"
);
}
//执行验券
...
...
@@ -65,12 +68,28 @@ public class MTServiceImpl implements MTService {
}
catch
(
MtSdkException
e
)
{
throw
new
RuntimeException
(
e
);
}
if
(
response
.
isSuccess
()){
//验券成功
if
(
response
.
isSuccess
())
{
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
sConsumerCoupon
.
setConsumerId
(
user
.
getId
());
sConsumerCoupon
.
setCouponId
(
sCoupon
.
getId
());
sConsumerCoupon
.
setCouponCode
(
code
);
sConsumerCoupon
.
setName
(
sCoupon
.
getName
());
sConsumerCoupon
.
setCouponType
(
String
.
valueOf
(
sCoupon
.
getCouponType
()));
sConsumerCoupon
.
setStoreType
(
sCoupon
.
getStoreType
());
sConsumerCoupon
.
setRoomType
(
sCoupon
.
getRoomType
());
sConsumerCoupon
.
setMinDuration
(
sCoupon
.
getMinDuration
());
sConsumerCoupon
.
setMaxDuration
(
sCoupon
.
getMaxDuration
());
sConsumerCoupon
.
setDuration
(
sCoupon
.
getDuration
());
sConsumerCoupon
.
setMinPrice
(
sCoupon
.
getMinPrice
());
sConsumerCoupon
.
setSubPrice
(
sCoupon
.
getSubPrice
());
sConsumerCoupon
.
setSourceType
(
"3"
);
sConsumerCoupon
.
setPlatformType
(
"2"
);
sConsumerCoupon
.
setStartDate
(
sCoupon
.
getStartDate
());
sConsumerCoupon
.
setEndDate
(
sCoupon
.
getEndDate
());
sConsumerCoupon
.
setCreateBy
(
String
.
valueOf
(
user
.
getId
()));
isConsumerCouponService
.
insertSConsumerCoupon
(
sConsumerCoupon
);
}
else
{
}
else
{
return
response
;
}
return
response
;
...
...
@@ -79,7 +98,7 @@ public class MTServiceImpl implements MTService {
//撤销验券
@Override
public
MeituanResponse
revoke
(
String
ERPId
,
String
ERPName
,
String
couponCode
)
{
MeituanClient
meituanClient
=
DefaultMeituanClient
.
builder
(
developerId
,
signKey
).
build
();
MeituanClient
meituanClient
=
DefaultMeituanClient
.
builder
(
developerId
,
signKey
).
build
();
CouponCancelRequest
couponCancelRequest
=
new
CouponCancelRequest
();
couponCancelRequest
.
setEId
(
ERPId
);
couponCancelRequest
.
setEName
(
ERPName
);
...
...
@@ -102,7 +121,7 @@ public class MTServiceImpl implements MTService {
msSuperPrepareRequest
.
setCode
(
code
);
MeituanResponse
<
MsSuperPrepareResponse
>
response
=
null
;
try
{
response
=
meituanClient
.
invokeApi
(
msSuperPrepareRequest
,
appAuthToken
);
response
=
meituanClient
.
invokeApi
(
msSuperPrepareRequest
,
appAuthToken
);
}
catch
(
MtSdkException
e
)
{
throw
new
RuntimeException
(
e
);
}
...
...
share-system/src/main/resources/mapper/system/SOrderMapper.xml
View file @
81caf6da
...
...
@@ -5,91 +5,119 @@
<mapper
namespace=
"share.system.mapper.SOrderMapper"
>
<resultMap
type=
"SOrder"
id=
"SOrderResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"orderType"
column=
"order_type"
/>
<result
property=
"payType"
column=
"pay_type"
/>
<result
property=
"payStatus"
column=
"pay_status"
/>
<result
property=
"storeId"
column=
"store_id"
/>
<result
property=
"roomId"
column=
"room_id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"consumerName"
column=
"consumer_name"
/>
<result
property=
"consumerPhone"
column=
"consumer_phone"
/>
<result
property=
"packId"
column=
"pack_id"
/>
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"couponPrice"
column=
"coupon_price"
/>
<result
property=
"totalPrice"
column=
"total_price"
/>
<result
property=
"payPrice"
column=
"pay_price"
/>
<result
property=
"payTime"
column=
"pay_time"
/>
<result
property=
"timeLong"
column=
"time_long"
/>
<result
property=
"preStartDate"
column=
"pre_start_date"
/>
<result
property=
"preEndDate"
column=
"pre_end_date"
/>
<result
property=
"startDate"
column=
"start_date"
/>
<result
property=
"endDate"
column=
"end_date"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"refundStatus"
column=
"refund_status"
/>
<result
property=
"refundReason"
column=
"refund_reason"
/>
<result
property=
"refundReasonTime"
column=
"refund_reason_time"
/>
<result
property=
"refundPrice"
column=
"refund_price"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
<result
property=
"outTradeNo"
column=
"out_trade_no"
/>
<result
property=
"orderType"
column=
"order_type"
/>
<result
property=
"payType"
column=
"pay_type"
/>
<result
property=
"payStatus"
column=
"pay_status"
/>
<result
property=
"storeId"
column=
"store_id"
/>
<result
property=
"roomId"
column=
"room_id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"consumerName"
column=
"consumer_name"
/>
<result
property=
"consumerPhone"
column=
"consumer_phone"
/>
<result
property=
"packId"
column=
"pack_id"
/>
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"couponPrice"
column=
"coupon_price"
/>
<result
property=
"totalPrice"
column=
"total_price"
/>
<result
property=
"payPrice"
column=
"pay_price"
/>
<result
property=
"payTime"
column=
"pay_time"
/>
<result
property=
"timeLong"
column=
"time_long"
/>
<result
property=
"preStartDate"
column=
"pre_start_date"
/>
<result
property=
"preEndDate"
column=
"pre_end_date"
/>
<result
property=
"startDate"
column=
"start_date"
/>
<result
property=
"endDate"
column=
"end_date"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"refundStatus"
column=
"refund_status"
/>
<result
property=
"refundReason"
column=
"refund_reason"
/>
<result
property=
"refundReasonTime"
column=
"refund_reason_time"
/>
<result
property=
"refundPrice"
column=
"refund_price"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectSOrderVo"
>
select id, order_no, order_type,
pay_type, pay_status, store_id,
room_id, consumer_id, consumer_name,
consumer_phone, pack_id, pack_price,
coupon_id, coupon_price, total_price,
pay_price, pay_time, time_long,
pre_start_date, pre_end_date, start_date,
end_date, status, refund_status,
refund_reason, refund_reason_time, refund_price,
is_delete, create_by, create_time,
update_by, update_time, remark from s_order
select id,
order_no,
out_trade_no,
order_type,
pay_type,
pay_status,
store_id,
room_id,
consumer_id,
consumer_name,
consumer_phone,
pack_id,
pack_price,
coupon_id,
coupon_price,
total_price,
pay_price,
pay_time,
time_long,
pre_start_date,
pre_end_date,
start_date,
end_date,
status,
refund_status,
refund_reason,
refund_reason_time,
refund_price,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_order
</sql>
<select
id=
"selectSOrderList"
parameterType=
"SOrder"
resultMap=
"SOrderResult"
>
<include
refid=
"selectSOrderVo"
/>
<where>
1=1
<if
test=
"orderNo != null and orderNo != ''"
>
and order_no = #{orderNo}
</if>
<if
test=
"orderType != null and orderType != ''"
>
and order_type = #{orderType}
</if>
<if
test=
"payType != null and payType != ''"
>
and pay_type = #{payType}
</if>
<if
test=
"payStatus != null and payStatus != ''"
>
and pay_status = #{payStatus},
</if>
<if
test=
"storeId != null and storeId != ''"
>
and store_id = #{storeId},
</if>
<if
test=
"roomId != null and roomId != ''"
>
and room_id = #{roomId},
</if>
<if
test=
"consumerId != null and consumerId != ''"
>
and consumer_id = #{consumerId},
</if>
<if
test=
"consumerName != null and consumerName != ''"
>
and consumer_name = #{consumerName},
</if>
<if
test=
"consumerPhone != null and consumerPhone != ''"
>
and consumer_phone = #{consumerPhone},
</if>
<if
test=
"packId != null and packId != ''"
>
and pack_id = #{packId},
</if>
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice},
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId},
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice},
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice},
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice},
</if>
<if
test=
"payTime != null and payTime != ''"
>
and pay_time = #{payTime},
</if>
<if
test=
"timeLong != null and timeLong != ''"
>
and time_long = #{timeLong},
</if>
<if
test=
"preStartDate != null and preStartDate != ''"
>
and pre_start_date = #{preStartDate},
</if>
<if
test=
"preEndDate != null and preEndDate != ''"
>
and pre_end_date = #{preEndDate},
</if>
<if
test=
"startDate != null and startDate != ''"
>
and start_date = #{startDate},
</if>
<if
test=
"endDate != null and endDate != ''"
>
and end_date = #{endDate},
</if>
<if
test=
"status != null and status != ''"
>
and status = #{status},
</if>
<if
test=
"refundStatus != null and refundStatus != ''"
>
and refund_status = #{refundStatus},
</if>
<if
test=
"refundReason != null and refundReason != ''"
>
and refund_reason = #{refundReason},
</if>
<if
test=
"refundReasonTime != null and refundReasonTime != ''"
>
and refund_reason_time = #{refundReasonTime},
</if>
<if
test=
"refundPrice != null and refundPrice != ''"
>
and refund_price = #{refundPrice},
</if>
<if
test=
"isDelete != null and isDelete != ''"
>
and is_delete = #{isDelete},
</if>
<if
test=
"createBy != null and createBy != ''"
>
and create_by = #{createBy},
</if>
<if
test=
"createTime != null and createTime != ''"
>
and create_time = #{createTime},
</if>
<if
test=
"updateBy != null and updateBy != ''"
>
and update_by = #{updateBy},
</if>
<if
test=
"updateTime != null and updateTime != ''"
>
and update_time = #{updateTime},
</if>
<if
test=
"remark != null and remark != ''"
>
and remark = #{remark},
</if>
<if
test=
"orderNo != null and orderNo != ''"
>
and order_no = #{orderNo},
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
and out_trade_no = #{outTradeNo},
</if>
<if
test=
"orderType != null and orderType != ''"
>
and order_type = #{orderType},
</if>
<if
test=
"payType != null and payType != ''"
>
and pay_type = #{payType},
</if>
<if
test=
"payStatus != null and payStatus != ''"
>
and pay_status = #{payStatus},
</if>
<if
test=
"storeId != null and storeId != ''"
>
and store_id = #{storeId},
</if>
<if
test=
"roomId != null and roomId != ''"
>
and room_id = #{roomId},
</if>
<if
test=
"consumerId != null and consumerId != ''"
>
and consumer_id = #{consumerId},
</if>
<if
test=
"consumerName != null and consumerName != ''"
>
and consumer_name = #{consumerName},
</if>
<if
test=
"consumerPhone != null and consumerPhone != ''"
>
and consumer_phone = #{consumerPhone},
</if>
<if
test=
"packId != null and packId != ''"
>
and pack_id = #{packId},
</if>
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice},
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId},
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice},
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice},
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice},
</if>
<if
test=
"payTime != null and payTime != ''"
>
and pay_time = #{payTime},
</if>
<if
test=
"timeLong != null and timeLong != ''"
>
and time_long = #{timeLong},
</if>
<if
test=
"preStartDate != null and preStartDate != ''"
>
and pre_start_date = #{preStartDate},
</if>
<if
test=
"preEndDate != null and preEndDate != ''"
>
and pre_end_date = #{preEndDate},
</if>
<if
test=
"startDate != null and startDate != ''"
>
and start_date = #{startDate},
</if>
<if
test=
"endDate != null and endDate != ''"
>
and end_date = #{endDate},
</if>
<if
test=
"status != null and status != ''"
>
and status = #{status},
</if>
<if
test=
"refundStatus != null and refundStatus != ''"
>
and refund_status = #{refundStatus},
</if>
<if
test=
"refundReason != null and refundReason != ''"
>
and refund_reason = #{refundReason},
</if>
<if
test=
"refundReasonTime != null and refundReasonTime != ''"
>
and refund_reason_time =
#{refundReasonTime},
</if>
<if
test=
"refundPrice != null and refundPrice != ''"
>
and refund_price = #{refundPrice},
</if>
<if
test=
"isDelete != null and isDelete != ''"
>
and is_delete = #{isDelete},
</if>
<if
test=
"createBy != null and createBy != ''"
>
and create_by = #{createBy},
</if>
<if
test=
"createTime != null and createTime != ''"
>
and create_time = #{createTime},
</if>
<if
test=
"updateBy != null and updateBy != ''"
>
and update_by = #{updateBy},
</if>
<if
test=
"updateTime != null and updateTime != ''"
>
and update_time = #{updateTime},
</if>
<if
test=
"remark != null and remark != ''"
>
and remark = #{remark},
</if>
</where>
</select>
...
...
@@ -101,107 +129,112 @@
<insert
id=
"insertSOrder"
parameterType=
"SOrder"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_order
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderNo != null and orderNo != ''"
>
order_no,
</if>
<if
test=
"orderType != null and orderType != ''"
>
order_type,
</if>
<if
test=
"payType != null and payType != ''"
>
pay_type,
</if>
<if
test=
"payStatus != null and payStatus != ''"
>
pay_status,
</if>
<if
test=
"storeId != null and storeId != ''"
>
store_id,
</if>
<if
test=
"roomId != null and roomId != ''"
>
room_id,
</if>
<if
test=
"consumerId != null and consumerId != ''"
>
consumer_id,
</if>
<if
test=
"consumerName != null and consumerName != ''"
>
consumer_name,
</if>
<if
test=
"consumerPhone != null and consumerPhone != ''"
>
consumer_phone,
</if>
<if
test=
"packId != null and packId != ''"
>
pack_id,
</if>
<if
test=
"packPrice != null and packPrice != ''"
>
pack_price,
</if>
<if
test=
"couponId != null and couponId != ''"
>
coupon_id,
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
coupon_price,
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
total_price,
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
pay_price,
</if>
<if
test=
"payTime != null and payTime != ''"
>
pay_time,
</if>
<if
test=
"timeLong != null and timeLong != ''"
>
time_long,
</if>
<if
test=
"preStartDate != null and preStartDate != ''"
>
pre_start_date,
</if>
<if
test=
"preEndDate != null and preEndDate != ''"
>
pre_end_date,
</if>
<if
test=
"startDate != null and startDate != ''"
>
start_date,
</if>
<if
test=
"endDate != null and endDate != ''"
>
end_date,
</if>
<if
test=
"status != null and status != ''"
>
status,
</if>
<if
test=
"refundStatus != null and refundStatus != ''"
>
refund_status,
</if>
<if
test=
"refundReason != null and refundReason != ''"
>
refund_reason,
</if>
<if
test=
"refundReasonTime != null and refundReasonTime != ''"
>
refund_reason_time,
</if>
<if
test=
"refundPrice != null and refundPrice != ''"
>
refund_price,
</if>
<if
test=
"isDelete != null and isDelete != ''"
>
is_delete,
</if>
<if
test=
"createBy != null and createBy != ''"
>
create_by,
</if>
<if
test=
"createTime != null and createTime != ''"
>
create_time,
</if>
<if
test=
"orderNo != null and orderNo != ''"
>
order_no,
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
out_trade_no,
</if>
<if
test=
"orderType != null and orderType != ''"
>
order_type,
</if>
<if
test=
"payType != null and payType != ''"
>
pay_type,
</if>
<if
test=
"payStatus != null and payStatus != ''"
>
pay_status,
</if>
<if
test=
"storeId != null and storeId != ''"
>
store_id,
</if>
<if
test=
"roomId != null and roomId != ''"
>
room_id,
</if>
<if
test=
"consumerId != null and consumerId != ''"
>
consumer_id,
</if>
<if
test=
"consumerName != null and consumerName != ''"
>
consumer_name,
</if>
<if
test=
"consumerPhone != null and consumerPhone != ''"
>
consumer_phone,
</if>
<if
test=
"packId != null and packId != ''"
>
pack_id,
</if>
<if
test=
"packPrice != null and packPrice != ''"
>
pack_price,
</if>
<if
test=
"couponId != null and couponId != ''"
>
coupon_id,
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
coupon_price,
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
total_price,
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
pay_price,
</if>
<if
test=
"payTime != null and payTime != ''"
>
pay_time,
</if>
<if
test=
"timeLong != null and timeLong != ''"
>
time_long,
</if>
<if
test=
"preStartDate != null and preStartDate != ''"
>
pre_start_date,
</if>
<if
test=
"preEndDate != null and preEndDate != ''"
>
pre_end_date,
</if>
<if
test=
"startDate != null and startDate != ''"
>
start_date,
</if>
<if
test=
"endDate != null and endDate != ''"
>
end_date,
</if>
<if
test=
"status != null and status != ''"
>
status,
</if>
<if
test=
"refundStatus != null and refundStatus != ''"
>
refund_status,
</if>
<if
test=
"refundReason != null and refundReason != ''"
>
refund_reason,
</if>
<if
test=
"refundReasonTime != null and refundReasonTime != ''"
>
refund_reason_time,
</if>
<if
test=
"refundPrice != null and refundPrice != ''"
>
refund_price,
</if>
<if
test=
"isDelete != null and isDelete != ''"
>
is_delete,
</if>
<if
test=
"createBy != null and createBy != ''"
>
create_by,
</if>
<if
test=
"createTime != null and createTime != ''"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderNo != null"
>
#{orderNo},
</if>
<if
test=
"orderType != null"
>
#{orderType},
</if>
<if
test=
"payType != null"
>
#{payType},
</if>
<if
test=
"payStatus != null"
>
#{payStatus},
</if>
<if
test=
"storeId != null"
>
#{storeId},
</if>
<if
test=
"roomId != null"
>
#{roomId},
</if>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"consumerName != null"
>
#{consumerName},
</if>
<if
test=
"consumerPhone != null"
>
#{consumerPhone},
</if>
<if
test=
"packId != null"
>
#{packId},
</if>
<if
test=
"packPrice != null"
>
#{packPrice},
</if>
<if
test=
"couponId != null"
>
#{couponId},
</if>
<if
test=
"couponPrice != null"
>
#{couponPrice},
</if>
<if
test=
"totalPrice != null"
>
#{totalPrice},
</if>
<if
test=
"payPrice != null"
>
#{payPrice},
</if>
<if
test=
"payTime != null"
>
#{payTime},
</if>
<if
test=
"timeLong != null"
>
#{timeLong},
</if>
<if
test=
"preStartDate != null"
>
#{preStartDate},
</if>
<if
test=
"preEndDate != null"
>
#{preEndDate},
</if>
<if
test=
"startDate != null"
>
#{startDate},
</if>
<if
test=
"endDate != null"
>
#{endDate},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"refundStatus != null"
>
#{refundStatus},
</if>
<if
test=
"refundReason != null"
>
#{refundReason},
</if>
<if
test=
"refundReasonTime != null"
>
#{refundReasonTime},
</if>
<if
test=
"refundPrice != null"
>
#{refundPrice},
</if>
<if
test=
"isDelete != null"
>
0,
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"orderNo != null"
>
#{orderNo},
</if>
<if
test=
"outTradeNo != null "
>
#{outTradeNo},
</if>
<if
test=
"orderType != null"
>
#{orderType},
</if>
<if
test=
"payType != null"
>
#{payType},
</if>
<if
test=
"payStatus != null"
>
#{payStatus},
</if>
<if
test=
"storeId != null"
>
#{storeId},
</if>
<if
test=
"roomId != null"
>
#{roomId},
</if>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"consumerName != null"
>
#{consumerName},
</if>
<if
test=
"consumerPhone != null"
>
#{consumerPhone},
</if>
<if
test=
"packId != null"
>
#{packId},
</if>
<if
test=
"packPrice != null"
>
#{packPrice},
</if>
<if
test=
"couponId != null"
>
#{couponId},
</if>
<if
test=
"couponPrice != null"
>
#{couponPrice},
</if>
<if
test=
"totalPrice != null"
>
#{totalPrice},
</if>
<if
test=
"payPrice != null"
>
#{payPrice},
</if>
<if
test=
"payTime != null"
>
#{payTime},
</if>
<if
test=
"timeLong != null"
>
#{timeLong},
</if>
<if
test=
"preStartDate != null"
>
#{preStartDate},
</if>
<if
test=
"preEndDate != null"
>
#{preEndDate},
</if>
<if
test=
"startDate != null"
>
#{startDate},
</if>
<if
test=
"endDate != null"
>
#{endDate},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"refundStatus != null"
>
#{refundStatus},
</if>
<if
test=
"refundReason != null"
>
#{refundReason},
</if>
<if
test=
"refundReasonTime != null"
>
#{refundReasonTime},
</if>
<if
test=
"refundPrice != null"
>
#{refundPrice},
</if>
<if
test=
"isDelete != null"
>
0,
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
</trim>
</insert>
<update
id=
"updateSOrder"
parameterType=
"SOrder"
>
update s_order
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"orderNo != null"
>
order_no = #{orderNo},
</if>
<if
test=
"orderType != null"
>
order_type = #{orderType},
</if>
<if
test=
"payType != null"
>
pay_type = #{payType},
</if>
<if
test=
"payStatus != null"
>
pay_status = #{payStatus},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId},
</if>
<if
test=
"roomId != null"
>
room_id = #{roomId},
</if>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"consumerName != null"
>
consumer_name = #{consumerName},
</if>
<if
test=
"consumerPhone != null"
>
consumer_phone = #{consumerPhone},
</if>
<if
test=
"packId != null"
>
pack_id = #{packId},
</if>
<if
test=
"packPrice != null"
>
pack_price = #{packPrice},
</if>
<if
test=
"couponId != null"
>
coupon_id = #{couponId},
</if>
<if
test=
"couponPrice != null"
>
coupon_price = #{couponPrice},
</if>
<if
test=
"totalPrice != null"
>
total_price = #{totalPrice},
</if>
<if
test=
"payPrice != null"
>
pay_price = #{payPrice},
</if>
<if
test=
"payTime != null"
>
pay_time = #{payTime},
</if>
<if
test=
"timeLong != null"
>
time_long = #{timeLong},
</if>
<if
test=
"preStartDate != null"
>
pre_start_date = #{preStartDate},
</if>
<if
test=
"preEndDate != null"
>
pre_end_date = #{preEndDate},
</if>
<if
test=
"startDate != null"
>
start_date = #{startDate},
</if>
<if
test=
"endDate != null"
>
end_date = #{endDate},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"refundStatus != null"
>
refund_status = #{refundStatus},
</if>
<if
test=
"refundReason != null"
>
refund_reason = #{refundReason},
</if>
<if
test=
"refundReasonTime != null"
>
refund_reason_time = #{refundReasonTime},
</if>
<if
test=
"refundPrice != null"
>
refund_price = #{refundPrice},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = NOW(),
</if>
<if
test=
"orderNo != null"
>
order_no = #{orderNo},
</if>
<if
test=
"outTradeNo != null"
>
out_trade_no = #{outTradeNo},
</if>
<if
test=
"orderType != null"
>
order_type = #{orderType},
</if>
<if
test=
"payType != null"
>
pay_type = #{payType},
</if>
<if
test=
"payStatus != null"
>
pay_status = #{payStatus},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId},
</if>
<if
test=
"roomId != null"
>
room_id = #{roomId},
</if>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"consumerName != null"
>
consumer_name = #{consumerName},
</if>
<if
test=
"consumerPhone != null"
>
consumer_phone = #{consumerPhone},
</if>
<if
test=
"packId != null"
>
pack_id = #{packId},
</if>
<if
test=
"packPrice != null"
>
pack_price = #{packPrice},
</if>
<if
test=
"couponId != null"
>
coupon_id = #{couponId},
</if>
<if
test=
"couponPrice != null"
>
coupon_price = #{couponPrice},
</if>
<if
test=
"totalPrice != null"
>
total_price = #{totalPrice},
</if>
<if
test=
"payPrice != null"
>
pay_price = #{payPrice},
</if>
<if
test=
"payTime != null"
>
pay_time = #{payTime},
</if>
<if
test=
"timeLong != null"
>
time_long = #{timeLong},
</if>
<if
test=
"preStartDate != null"
>
pre_start_date = #{preStartDate},
</if>
<if
test=
"preEndDate != null"
>
pre_end_date = #{preEndDate},
</if>
<if
test=
"startDate != null"
>
start_date = #{startDate},
</if>
<if
test=
"endDate != null"
>
end_date = #{endDate},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"refundStatus != null"
>
refund_status = #{refundStatus},
</if>
<if
test=
"refundReason != null"
>
refund_reason = #{refundReason},
</if>
<if
test=
"refundReasonTime != null"
>
refund_reason_time = #{refundReasonTime},
</if>
<if
test=
"refundPrice != null"
>
refund_price = #{refundPrice},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = NOW(),
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteSOrderById"
parameterType=
"Long"
>
delete from s_order where id = #{id}
delete
from s_order
where id = #{id}
</delete>
<delete
id=
"deleteSOrderByIds"
parameterType=
"String"
>
...
...
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