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
4feea183
Commit
4feea183
authored
Jul 15, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单
parent
873ce676
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
172 additions
and
455 deletions
+172
-455
ActivityController.java
.../java/share/web/controller/system/ActivityController.java
+8
-39
BalanceLogController.java
...ava/share/web/controller/system/BalanceLogController.java
+10
-49
ConsumerMemberController.java
...share/web/controller/system/ConsumerMemberController.java
+6
-48
ConsumerWalletController.java
...share/web/controller/system/ConsumerWalletController.java
+5
-53
DurationLogController.java
...va/share/web/controller/system/DurationLogController.java
+10
-49
EquityMembersOrderController.java
...e/web/controller/system/EquityMembersOrderController.java
+7
-37
IntegralLogController.java
...va/share/web/controller/system/IntegralLogController.java
+10
-49
MemberProgressLogController.java
...re/web/controller/system/MemberProgressLogController.java
+10
-49
RechargeController.java
.../java/share/web/controller/system/RechargeController.java
+7
-47
BalanceLog.java
...-system/src/main/java/share/system/domain/BalanceLog.java
+1
-1
DurationLog.java
...system/src/main/java/share/system/domain/DurationLog.java
+1
-1
IntegralLog.java
...system/src/main/java/share/system/domain/IntegralLog.java
+1
-1
MemberProgressLog.java
.../src/main/java/share/system/domain/MemberProgressLog.java
+1
-1
SOrder.java
share-system/src/main/java/share/system/domain/SOrder.java
+6
-0
SOrderVo.java
...system/src/main/java/share/system/domain/vo/SOrderVo.java
+12
-5
ConsumerMemberMapper.java
...c/main/java/share/system/mapper/ConsumerMemberMapper.java
+2
-0
ConsumerMemberService.java
...main/java/share/system/service/ConsumerMemberService.java
+2
-0
ConsumerMemberServiceImpl.java
.../share/system/service/impl/ConsumerMemberServiceImpl.java
+9
-0
OrderPayServiceImpl.java
...n/java/share/system/service/impl/OrderPayServiceImpl.java
+23
-25
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+0
-0
ConsumerMemberMapper.xml
...src/main/resources/mapper/system/ConsumerMemberMapper.xml
+22
-0
SOrderMapper.xml
...-system/src/main/resources/mapper/system/SOrderMapper.xml
+19
-1
No files found.
share-front/src/main/java/share/web/controller/system/ActivityController.java
View file @
4feea183
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.Activity
;
import
share.system.service.ActivityService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -36,17 +35,13 @@ public class ActivityController extends BaseController {
return
getDataTable
(
list
);
}
/**
* 导出活动列表
*/
@Log
(
title
=
"活动"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
Activity
activity
)
{
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
Activity
activity
)
{
List
<
Activity
>
list
=
activityService
.
selectActivityList
(
activity
);
ExcelUtil
<
Activity
>
util
=
new
ExcelUtil
<
Activity
>(
Activity
.
class
);
util
.
exportExcel
(
response
,
list
,
"活动数据"
);
return
success
(
list
);
}
/**
* 获取活动详细信息
*/
...
...
@@ -55,30 +50,4 @@ public class ActivityController extends BaseController {
return
success
(
activityService
.
selectActivityById
(
id
));
}
/**
* 新增活动
*/
@Log
(
title
=
"活动"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
Activity
activity
)
{
return
toAjax
(
activityService
.
insertActivity
(
activity
));
}
/**
* 修改活动
*/
@Log
(
title
=
"活动"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
Activity
activity
)
{
return
toAjax
(
activityService
.
updateActivity
(
activity
));
}
/**
* 删除活动
*/
@Log
(
title
=
"活动"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
activityService
.
deleteActivityByIds
(
ids
));
}
}
share-front/src/main/java/share/web/controller/system/BalanceLogController.java
View file @
4feea183
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.BalanceLog
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.BalanceLogVo
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.service.BalanceLogService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -37,49 +36,11 @@ public class BalanceLogController extends BaseController {
return
getDataTable
(
list
);
}
/**
* 导出余额日志列表
*/
@Log
(
title
=
"余额日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
BalanceLogVo
balanceLog
)
{
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
BalanceLogVo
balanceLog
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
balanceLog
.
setConsumerId
(
user
.
getId
());
List
<
BalanceLogVo
>
list
=
balanceLogService
.
selectBalanceLogList
(
balanceLog
);
ExcelUtil
<
BalanceLogVo
>
util
=
new
ExcelUtil
<
BalanceLogVo
>(
BalanceLogVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"余额日志数据"
);
}
/**
* 获取余额日志详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
balanceLogService
.
selectBalanceLogById
(
id
));
}
/**
* 新增余额日志
*/
@Log
(
title
=
"余额日志"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
BalanceLog
balanceLog
)
{
return
toAjax
(
balanceLogService
.
insertBalanceLog
(
balanceLog
));
}
/**
* 修改余额日志
*/
@Log
(
title
=
"余额日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
BalanceLog
balanceLog
)
{
return
toAjax
(
balanceLogService
.
updateBalanceLog
(
balanceLog
));
}
/**
* 删除余额日志
*/
@Log
(
title
=
"余额日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
balanceLogService
.
deleteBalanceLogByIds
(
ids
));
return
success
(
list
);
}
}
share-front/src/main/java/share/web/controller/system/ConsumerMemberController.java
View file @
4feea183
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.ConsumerMember
;
import
share.system.domain.vo.ConsumerMemberVo
;
import
share.system.service.ConsumerMemberService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -37,49 +34,10 @@ public class ConsumerMemberController extends BaseController {
return
getDataTable
(
list
);
}
/**
* 导出会员用户列表
*/
@Log
(
title
=
"会员用户"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
ConsumerMemberVo
consumerMember
)
{
List
<
ConsumerMemberVo
>
list
=
consumerMemberService
.
selectConsumerMemberList
(
consumerMember
);
ExcelUtil
<
ConsumerMemberVo
>
util
=
new
ExcelUtil
<>(
ConsumerMemberVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"会员用户数据"
);
}
/**
* 获取会员用户详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
consumerMemberService
.
selectConsumerMemberById
(
id
));
@GetMapping
(
"/query"
)
public
AjaxResult
selectByConsumerId
()
{
return
success
(
consumerMemberService
.
selectByConsumerId
());
}
/**
* 新增会员用户
*/
@Log
(
title
=
"会员用户"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
ConsumerMember
consumerMember
)
{
return
toAjax
(
consumerMemberService
.
insertConsumerMember
(
consumerMember
));
}
/**
* 修改会员用户
*/
@Log
(
title
=
"会员用户"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
ConsumerMember
consumerMember
)
{
return
toAjax
(
consumerMemberService
.
updateConsumerMember
(
consumerMember
));
}
/**
* 删除会员用户
*/
@Log
(
title
=
"会员用户"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
consumerMemberService
.
deleteConsumerMemberByIds
(
ids
));
}
}
share-front/src/main/java/share/web/controller/system/ConsumerWalletController.java
View file @
4feea183
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.ConsumerWallet
;
import
share.system.domain.vo.ConsumerWalletVo
;
import
share.system.service.ConsumerWalletService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -38,53 +35,8 @@ public class ConsumerWalletController extends BaseController {
}
@GetMapping
(
"/query"
)
public
ConsumerWalletVo
selectByConsumerId
()
{
return
consumerWalletService
.
selectByConsumerId
(
);
public
AjaxResult
selectByConsumerId
()
{
return
success
(
consumerWalletService
.
selectByConsumerId
()
);
}
/**
* 导出会员钱包列表
*/
@Log
(
title
=
"会员钱包"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
ConsumerWalletVo
consumerWallet
)
{
List
<
ConsumerWalletVo
>
list
=
consumerWalletService
.
selectConsumerWalletList
(
consumerWallet
);
ExcelUtil
<
ConsumerWalletVo
>
util
=
new
ExcelUtil
<
ConsumerWalletVo
>(
ConsumerWalletVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"会员钱包数据"
);
}
/**
* 获取会员钱包详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
consumerWalletService
.
selectConsumerWalletById
(
id
));
}
/**
* 新增会员钱包
*/
@Log
(
title
=
"会员钱包"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
ConsumerWallet
consumerWallet
)
{
return
toAjax
(
consumerWalletService
.
insertConsumerWallet
(
consumerWallet
));
}
/**
* 修改会员钱包
*/
@Log
(
title
=
"会员钱包"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
ConsumerWallet
consumerWallet
)
{
return
toAjax
(
consumerWalletService
.
updateConsumerWallet
(
consumerWallet
));
}
/**
* 删除会员钱包
*/
@Log
(
title
=
"会员钱包"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
consumerWalletService
.
deleteConsumerWalletByIds
(
ids
));
}
}
share-front/src/main/java/share/web/controller/system/DurationLogController.java
View file @
4feea183
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.DurationLog
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.DurationLogVo
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.service.DurationLogService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -37,49 +36,11 @@ public class DurationLogController extends BaseController {
return
getDataTable
(
list
);
}
/**
* 导出时长日志列表
*/
@Log
(
title
=
"时长日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
DurationLogVo
durationLog
)
{
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
DurationLogVo
durationLog
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
durationLog
.
setConsumerId
(
user
.
getId
());
List
<
DurationLogVo
>
list
=
durationLogService
.
selectDurationLogList
(
durationLog
);
ExcelUtil
<
DurationLogVo
>
util
=
new
ExcelUtil
<
DurationLogVo
>(
DurationLogVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"时长日志数据"
);
}
/**
* 获取时长日志详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
durationLogService
.
selectDurationLogById
(
id
));
}
/**
* 新增时长日志
*/
@Log
(
title
=
"时长日志"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
DurationLog
durationLog
)
{
return
toAjax
(
durationLogService
.
insertDurationLog
(
durationLog
));
}
/**
* 修改时长日志
*/
@Log
(
title
=
"时长日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
DurationLog
durationLog
)
{
return
toAjax
(
durationLogService
.
updateDurationLog
(
durationLog
));
}
/**
* 删除时长日志
*/
@Log
(
title
=
"时长日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
durationLogService
.
deleteDurationLogByIds
(
ids
));
return
success
(
list
);
}
}
share-front/src/main/java/share/web/controller/system/EquityMembersOrderController.java
View file @
4feea183
...
...
@@ -13,14 +13,13 @@ import share.common.core.page.TableDataInfo;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.BusinessType
;
import
share.common.utils.JsonConvertUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.EquityMembersOrder
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.EquityMembersOrderVo
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.request.CreateEquityMembersRequest
;
import
share.system.response.EquityMembersResultResponse
;
import
share.system.service.EquityMembersOrderService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -48,41 +47,12 @@ public class EquityMembersOrderController extends BaseController {
return
getDataTable
(
list
);
}
/**
* 导出权益会员订单列表
*/
@Log
(
title
=
"权益会员订单"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
EquityMembersOrderVo
equityMembersOrder
)
{
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
EquityMembersOrderVo
equityMembersOrder
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
equityMembersOrder
.
setConsumerId
(
user
.
getId
());
List
<
EquityMembersOrderVo
>
list
=
equityMembersOrderService
.
selectEquityMembersOrderList
(
equityMembersOrder
);
ExcelUtil
<
EquityMembersOrderVo
>
util
=
new
ExcelUtil
<
EquityMembersOrderVo
>(
EquityMembersOrderVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"权益会员订单数据"
);
}
/**
* 获取权益会员订单详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
equityMembersOrderService
.
selectEquityMembersOrderById
(
id
));
}
/**
* 新增权益会员订单
*/
@Log
(
title
=
"权益会员订单"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
EquityMembersOrder
equityMembersOrder
)
{
return
toAjax
(
equityMembersOrderService
.
insertEquityMembersOrder
(
equityMembersOrder
));
}
/**
* 修改权益会员订单
*/
@Log
(
title
=
"权益会员订单"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
EquityMembersOrder
equityMembersOrder
)
{
return
toAjax
(
equityMembersOrderService
.
updateEquityMembersOrder
(
equityMembersOrder
));
return
success
(
list
);
}
/**
...
...
share-front/src/main/java/share/web/controller/system/IntegralLogController.java
View file @
4feea183
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.IntegralLog
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.IntegralLogVo
;
import
share.system.service.IntegralLogService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -37,49 +36,11 @@ public class IntegralLogController extends BaseController {
return
getDataTable
(
list
);
}
/**
* 导出积分日志列表
*/
@Log
(
title
=
"积分日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
IntegralLogVo
integralLog
)
{
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
IntegralLogVo
integralLog
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
integralLog
.
setConsumerId
(
user
.
getId
());
List
<
IntegralLogVo
>
list
=
integralLogService
.
selectIntegralLogList
(
integralLog
);
ExcelUtil
<
IntegralLogVo
>
util
=
new
ExcelUtil
<
IntegralLogVo
>(
IntegralLogVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"积分日志数据"
);
}
/**
* 获取积分日志详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
integralLogService
.
selectIntegralLogById
(
id
));
}
/**
* 新增积分日志
*/
@Log
(
title
=
"积分日志"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
IntegralLog
integralLog
)
{
return
toAjax
(
integralLogService
.
insertIntegralLog
(
integralLog
));
}
/**
* 修改积分日志
*/
@Log
(
title
=
"积分日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
IntegralLog
integralLog
)
{
return
toAjax
(
integralLogService
.
updateIntegralLog
(
integralLog
));
}
/**
* 删除积分日志
*/
@Log
(
title
=
"积分日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
integralLogService
.
deleteIntegralLogByIds
(
ids
));
return
success
(
list
);
}
}
share-front/src/main/java/share/web/controller/system/MemberProgressLogController.java
View file @
4feea183
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.MemberProgressLog
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.MemberProgressLogVo
;
import
share.system.service.MemberProgressLogService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -37,49 +36,11 @@ public class MemberProgressLogController extends BaseController {
return
getDataTable
(
list
);
}
/**
* 导出会员进度日志列表
*/
@Log
(
title
=
"会员进度日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
MemberProgressLogVo
memberProgressLog
)
{
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
MemberProgressLogVo
memberProgressLog
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
memberProgressLog
.
setConsumerId
(
user
.
getId
());
List
<
MemberProgressLogVo
>
list
=
memberProgressLogService
.
selectMemberProgressLogList
(
memberProgressLog
);
ExcelUtil
<
MemberProgressLogVo
>
util
=
new
ExcelUtil
<
MemberProgressLogVo
>(
MemberProgressLogVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"会员进度日志数据"
);
}
/**
* 获取会员进度日志详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
memberProgressLogService
.
selectMemberProgressLogById
(
id
));
}
/**
* 新增会员进度日志
*/
@Log
(
title
=
"会员进度日志"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
MemberProgressLog
memberProgressLog
)
{
return
toAjax
(
memberProgressLogService
.
insertMemberProgressLog
(
memberProgressLog
));
}
/**
* 修改会员进度日志
*/
@Log
(
title
=
"会员进度日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
MemberProgressLog
memberProgressLog
)
{
return
toAjax
(
memberProgressLogService
.
updateMemberProgressLog
(
memberProgressLog
));
}
/**
* 删除会员进度日志
*/
@Log
(
title
=
"会员进度日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
memberProgressLogService
.
deleteMemberProgressLogByIds
(
ids
));
return
success
(
list
);
}
}
share-front/src/main/java/share/web/controller/system/RechargeController.java
View file @
4feea183
...
...
@@ -5,22 +5,19 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.R
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.BusinessType
;
import
share.common.utils.JsonConvertUtil
;
import
share.
common.utils.poi.ExcelUtil
;
import
share.system.domain.
Recharge
;
import
share.
system.domain.SConsumer
;
import
share.system.domain.
vo.FrontTokenComponent
;
import
share.system.domain.vo.RechargeVo
;
import
share.system.request.CreateRechargeRequest
;
import
share.system.response.RechargePayResultResponse
;
import
share.system.service.RechargeService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -48,51 +45,14 @@ public class RechargeController extends BaseController {
return
getDataTable
(
list
);
}
/**
* 导出充值记录列表
*/
@Log
(
title
=
"充值记录"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
RechargeVo
recharge
)
{
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
RechargeVo
recharge
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
recharge
.
setConsumerId
(
user
.
getId
());
List
<
RechargeVo
>
list
=
rechargeService
.
selectRechargeList
(
recharge
);
ExcelUtil
<
RechargeVo
>
util
=
new
ExcelUtil
<
RechargeVo
>(
RechargeVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"充值记录数据"
);
return
success
(
list
);
}
/**
* 获取充值记录详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
rechargeService
.
selectRechargeById
(
id
));
}
/**
* 新增充值记录
*/
@Log
(
title
=
"充值记录"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
Recharge
recharge
)
{
return
toAjax
(
rechargeService
.
insertRecharge
(
recharge
));
}
/**
* 修改充值记录
*/
@Log
(
title
=
"充值记录"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
Recharge
recharge
)
{
return
toAjax
(
rechargeService
.
updateRecharge
(
recharge
));
}
/**
* 删除充值记录
*/
@Log
(
title
=
"充值记录"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
rechargeService
.
deleteRechargeByIds
(
ids
));
}
@PostMapping
(
"/createRecharge"
)
public
R
<
RechargePayResultResponse
>
createOrder
(
@RequestBody
@Validated
CreateRechargeRequest
request
)
{
...
...
share-system/src/main/java/share/system/domain/BalanceLog.java
View file @
4feea183
...
...
@@ -55,7 +55,7 @@ public class BalanceLog extends BaseEntity {
/**
* 操作时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"操作时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
operationTime
;
...
...
share-system/src/main/java/share/system/domain/DurationLog.java
View file @
4feea183
...
...
@@ -55,7 +55,7 @@ public class DurationLog extends BaseEntity {
/**
* 操作时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"操作时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
operationTime
;
...
...
share-system/src/main/java/share/system/domain/IntegralLog.java
View file @
4feea183
...
...
@@ -55,7 +55,7 @@ public class IntegralLog extends BaseEntity {
/**
* 操作时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"操作时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
operationTime
;
...
...
share-system/src/main/java/share/system/domain/MemberProgressLog.java
View file @
4feea183
...
...
@@ -55,7 +55,7 @@ public class MemberProgressLog extends BaseEntity {
/**
* 操作时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"操作时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
operationTime
;
...
...
share-system/src/main/java/share/system/domain/SOrder.java
View file @
4feea183
...
...
@@ -93,6 +93,12 @@ public class SOrder extends BaseEntity
@Excel
(
name
=
"订单时长(H)"
)
private
String
timeLong
;
@Excel
(
name
=
"使用时长"
)
private
BigDecimal
duration
;
@Excel
(
name
=
"使用余额"
)
private
BigDecimal
balance
;
@Excel
(
name
=
"优惠比例"
)
private
BigDecimal
discountRatio
;
...
...
share-system/src/main/java/share/system/domain/vo/SOrderVo.java
View file @
4feea183
...
...
@@ -111,6 +111,18 @@ public class SOrderVo
@Excel
(
name
=
"实际支付金额"
)
private
BigDecimal
payPrice
;
@ApiModelProperty
(
value
=
"使用时长"
)
@Excel
(
name
=
"使用时长"
)
private
BigDecimal
duration
;
@ApiModelProperty
(
value
=
"使用余额"
)
@Excel
(
name
=
"使用余额"
)
private
BigDecimal
balance
;
@ApiModelProperty
(
value
=
"优惠比例"
)
@Excel
(
name
=
"优惠比例"
)
private
BigDecimal
discountRatio
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"支付时间"
)
@Excel
(
name
=
"支付时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
...
...
@@ -169,11 +181,6 @@ public class SOrderVo
@ApiModelProperty
(
value
=
"支付类型(1:微信,2:支付宝)"
)
private
Integer
payType
;
/**
* 优惠比例
*/
private
BigDecimal
discountRatio
;
@ApiModelProperty
(
value
=
"支付状态(0:未支付,1:已支付)"
)
private
Integer
payStatus
;
...
...
share-system/src/main/java/share/system/mapper/ConsumerMemberMapper.java
View file @
4feea183
...
...
@@ -60,4 +60,6 @@ public interface ConsumerMemberMapper extends BaseMapper<ConsumerMember> {
* @return 结果
*/
public
int
deleteConsumerMemberByIds
(
Long
[]
ids
);
ConsumerMemberVo
selectByConsumerId
(
ConsumerMemberVo
consumerMemberVo
);
}
share-system/src/main/java/share/system/service/ConsumerMemberService.java
View file @
4feea183
...
...
@@ -60,4 +60,6 @@ public interface ConsumerMemberService extends IService<ConsumerMember> {
* @return 结果
*/
public
int
deleteConsumerMemberById
(
Long
id
);
ConsumerMemberVo
selectByConsumerId
();
}
share-system/src/main/java/share/system/service/impl/ConsumerMemberServiceImpl.java
View file @
4feea183
...
...
@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.system.domain.ConsumerMember
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.ConsumerMemberVo
;
import
share.system.mapper.ConsumerMemberMapper
;
import
share.system.service.ConsumerMemberService
;
...
...
@@ -92,4 +93,12 @@ public class ConsumerMemberServiceImpl extends ServiceImpl<ConsumerMemberMapper,
public
int
deleteConsumerMemberById
(
Long
id
)
{
return
consumerMemberMapper
.
deleteConsumerMemberById
(
id
);
}
@Override
public
ConsumerMemberVo
selectByConsumerId
()
{
SConsumer
info
=
sConsumerService
.
getInfo
();
ConsumerMemberVo
consumerMemberVo
=
new
ConsumerMemberVo
();
consumerMemberVo
.
setConsumerId
(
info
.
getId
());
return
consumerMemberMapper
.
selectByConsumerId
(
consumerMemberVo
);
}
}
share-system/src/main/java/share/system/service/impl/OrderPayServiceImpl.java
View file @
4feea183
...
...
@@ -90,31 +90,6 @@ public class OrderPayServiceImpl implements OrderPayService {
return
response
;
}
@Override
public
OrderPayResultResponse
saobeiPayment
(
SOrder
sOrder
)
{
OrderPayResultResponse
response
=
new
OrderPayResultResponse
();
response
.
setOrderNo
(
sOrder
.
getOrderNo
());
response
.
setPayType
(
PayTypeEnum
.
getEnumByCode
(
sOrder
.
getPayType
()).
getValue
());
response
.
setStatus
(
YesNoEnum
.
no
.
getFlag
());
// 扫呗支付
ConcurrentHashMap
<
String
,
String
>
unifiedorder
=
saobeiUnifiedOrder
(
sOrder
);
WxPayJsResultVo
vo
=
new
WxPayJsResultVo
();
vo
.
setAppId
(
unifiedorder
.
get
(
"appId"
));
vo
.
setNonceStr
(
unifiedorder
.
get
(
"nonceStr"
));
vo
.
setPackages
(
unifiedorder
.
get
(
"package"
));
vo
.
setSignType
(
unifiedorder
.
get
(
"signType"
));
vo
.
setTimeStamp
(
unifiedorder
.
get
(
"timeStamp"
));
vo
.
setPaySign
(
unifiedorder
.
get
(
"paySign"
));
// 更新商户订单号
sOrder
.
setOutTradeNo
(
unifiedorder
.
get
(
"outTradeNo"
));
orderService
.
updateById
(
sOrder
);
response
.
setJsConfig
(
vo
);
return
response
;
}
/**
* 预下单
* @param sOrder 订单
...
...
@@ -178,6 +153,29 @@ public class OrderPayServiceImpl implements OrderPayService {
return
vo
;
}
@Override
public
OrderPayResultResponse
saobeiPayment
(
SOrder
sOrder
)
{
OrderPayResultResponse
response
=
new
OrderPayResultResponse
();
response
.
setOrderNo
(
sOrder
.
getOrderNo
());
response
.
setPayType
(
PayTypeEnum
.
getEnumByCode
(
sOrder
.
getPayType
()).
getValue
());
response
.
setStatus
(
YesNoEnum
.
no
.
getFlag
());
// 扫呗支付
ConcurrentHashMap
<
String
,
String
>
unifiedorder
=
saobeiUnifiedOrder
(
sOrder
);
WxPayJsResultVo
vo
=
new
WxPayJsResultVo
();
vo
.
setAppId
(
unifiedorder
.
get
(
"appId"
));
vo
.
setNonceStr
(
unifiedorder
.
get
(
"nonceStr"
));
vo
.
setPackages
(
unifiedorder
.
get
(
"package"
));
vo
.
setSignType
(
unifiedorder
.
get
(
"signType"
));
vo
.
setTimeStamp
(
unifiedorder
.
get
(
"timeStamp"
));
vo
.
setPaySign
(
unifiedorder
.
get
(
"paySign"
));
// 更新商户订单号
sOrder
.
setOutTradeNo
(
unifiedorder
.
get
(
"outTradeNo"
));
orderService
.
updateById
(
sOrder
);
response
.
setJsConfig
(
vo
);
return
response
;
}
/**
* 预下单 (扫呗-微信)
* @param sOrder 订单
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
4feea183
This diff is collapsed.
Click to expand it.
share-system/src/main/resources/mapper/system/ConsumerMemberMapper.xml
View file @
4feea183
...
...
@@ -76,6 +76,28 @@
<include
refid=
"selectConsumerMemberVo"
/>
where id = #{id}
</select>
<select
id=
"selectByConsumerId"
resultType=
"share.system.domain.vo.ConsumerMemberVo"
>
select m.id,
m.consumer_id,
c.nick_name,
c.phone,
c.avatar,
m.membership_level,
m.member_type,
m.member_config_id,
m.expiration_date,
m.membership_progress,
m.is_delete,
m.create_by,
m.create_time,
m.update_by,
m.update_time,
m.remark
from s_consumer_member m
join s_consumer c on m.consumer_id = c.id and m.is_delete = 0
where 1 = 1
and m.consumer_id = #{consumerId}
</select>
<insert
id=
"insertConsumerMember"
parameterType=
"ConsumerMember"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_consumer_member
...
...
share-system/src/main/resources/mapper/system/SOrderMapper.xml
View file @
4feea183
...
...
@@ -22,6 +22,8 @@
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"couponPrice"
column=
"coupon_price"
/>
<result
property=
"totalPrice"
column=
"total_price"
/>
<result
property=
"duration"
column=
"duration"
/>
<result
property=
"balance"
column=
"balance"
/>
<result
property=
"discountRatio"
column=
"discount_ratio"
/>
<result
property=
"payPrice"
column=
"pay_price"
/>
<result
property=
"payTime"
column=
"pay_time"
/>
...
...
@@ -63,6 +65,8 @@
coupon_price,
total_price,
pay_price,
duration,
balance,
discount_ratio,
pay_time,
time_long,
...
...
@@ -108,6 +112,8 @@
<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=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
<if
test=
"balance != null and balance != ''"
>
and balance = #{balance}
</if>
<if
test=
"discountRatio != null and discountRatio != ''"
>
and discount_ratio = #{discountRatio}
</if>
<if
test=
"startPayTime != null"
>
and DATE_FORMAT(pay_time, '%Y-%m-%d')
>
= DATE_FORMAT(#{startPayTime}, '%Y-%m-%d')
...
...
@@ -178,6 +184,9 @@
s.consumer_id,
s.consumer_name,
s.consumer_phone,
s.duration,
s.balance,
s.discount_ratio,
s.pack_id,
s.pack_price,
s.coupon_id,
...
...
@@ -223,6 +232,9 @@
s.consumer_id,
s.consumer_name,
s.consumer_phone,
s.duration,
s.balance,
s.discount_ratio,
s.pack_id,
s.pack_price,
s.coupon_id,
...
...
@@ -292,6 +304,8 @@
<if
test=
"createTime != null and createTime != ''"
>
create_time,
</if>
<if
test=
"arrivalTime != null and arrivalTime != ''"
>
arrival_time,
</if>
<if
test=
"discountRatio != null and discountRatio != ''"
>
discount_ratio,
</if>
<if
test=
"duration != null and duration != ''"
>
duration,
</if>
<if
test=
"balance != null and balance != '' "
>
balance,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderNo != null"
>
#{orderNo},
</if>
...
...
@@ -326,7 +340,9 @@
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"arrivalTime != null"
>
#{arrivalTime},
</if>
<if
test=
"discountRatio != null"
>
#{discountRatio},
</if>
"
<if
test=
"discountRatio != null"
>
#{discountRatio},
</if>
<if
test=
"duration != null"
>
#{duration},
</if>
<if
test=
"balance != null"
>
#{balance},
</if>
</trim>
</insert>
...
...
@@ -367,6 +383,8 @@
<if
test=
"arrivalTime != null"
>
arrival_time = #{arrivalTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"discountRatio != null"
>
discount_ratio = #{discountRatio},
</if>
<if
test=
"duration != null"
>
duration = #{duration},
</if>
<if
test=
"balance != null"
>
balance = #{balance},
</if>
</trim>
where id = #{id}
</update>
...
...
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