Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
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
hooloo
ms
soss
Commits
1fe2fc95
Commit
1fe2fc95
authored
Mar 16, 2023
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增后台退款接口
parent
d06db564
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletions
+25
-1
soss-admin/src/main/java/com/soss/web/controller/coffee/ShopController.java
+13
-1
soss-system/src/main/java/com/soss/system/service/IShopService.java
+2
-0
soss-system/src/main/java/com/soss/system/service/impl/ShopServiceImpl.java
+10
-0
No files found.
soss-admin/src/main/java/com/soss/web/controller/coffee/ShopController.java
View file @
1fe2fc95
...
@@ -101,7 +101,7 @@ public class ShopController extends BaseController {
...
@@ -101,7 +101,7 @@ public class ShopController extends BaseController {
/**
/**
* 开始营业
* 开始营业
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:shop:
open
')"
)
@PreAuthorize
(
"@ss.hasPermi('system:shop:
start
')"
)
@Log
(
title
=
"店铺"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"店铺"
,
businessType
=
BusinessType
.
UPDATE
)
@GetMapping
(
"/open/{shopId}"
)
@GetMapping
(
"/open/{shopId}"
)
@ApiOperation
(
"开始营业"
)
@ApiOperation
(
"开始营业"
)
...
@@ -111,6 +111,18 @@ public class ShopController extends BaseController {
...
@@ -111,6 +111,18 @@ public class ShopController extends BaseController {
}
}
/**
/**
* 暂停营业
*/
@PreAuthorize
(
"@ss.hasPermi('system:shop:suspended')"
)
@Log
(
title
=
"店铺"
,
businessType
=
BusinessType
.
UPDATE
)
@GetMapping
(
"/close/{shopId}"
)
@ApiOperation
(
"暂停营业"
)
public
AjaxResult
close
(
@PathVariable
Long
shopId
)
{
shopService
.
close
(
shopId
);
return
AjaxResult
.
success
();
}
/**
* 修改店铺
* 修改店铺
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:shop:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('system:shop:edit')"
)
...
...
soss-system/src/main/java/com/soss/system/service/IShopService.java
View file @
1fe2fc95
...
@@ -39,6 +39,8 @@ public interface IShopService
...
@@ -39,6 +39,8 @@ public interface IShopService
void
open
(
Long
shopId
);
void
open
(
Long
shopId
);
void
close
(
Long
shopId
);
/**
/**
* 新增店铺
* 新增店铺
*
*
...
...
soss-system/src/main/java/com/soss/system/service/impl/ShopServiceImpl.java
View file @
1fe2fc95
...
@@ -140,6 +140,16 @@ public class ShopServiceImpl implements IShopService {
...
@@ -140,6 +140,16 @@ public class ShopServiceImpl implements IShopService {
shopMapper
.
updateShop
(
new
Shop
(
shopId
,
ShopState
.
OPEN
.
getState
()));
shopMapper
.
updateShop
(
new
Shop
(
shopId
,
ShopState
.
OPEN
.
getState
()));
}
}
@Override
public
void
close
(
Long
shopId
)
{
Shop
shop
=
shopMapper
.
selectShopById
(
shopId
);
Assert
.
notNull
(
shop
,
"未查询到匹配的店铺信息[id="
+
shopId
+
"]"
);
if
(!
Objects
.
equals
(
shop
.
getState
(),
ShopState
.
OPEN
.
getState
()))
{
throw
new
ServiceException
(
"店铺暂停营业状态下才能正常营业"
);
}
shopMapper
.
updateShop
(
new
Shop
(
shopId
,
ShopState
.
CLOSE
.
getState
()));
}
/**
/**
* 新增店铺
* 新增店铺
*
*
...
...
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