-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zohar
committed
Jun 1, 2019
1 parent
5494785
commit 40505fc
Showing
35 changed files
with
1,240 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...ery-admin/src/main/java/me/zohar/lottery/betting/controller/TrackingNumberController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package me.zohar.lottery.betting.controller; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.security.core.context.SecurityContextHolder; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
import me.zohar.lottery.betting.param.TrackingNumberSituationQueryCondParam; | ||
import me.zohar.lottery.betting.service.TrackingNumberService; | ||
import me.zohar.lottery.common.vo.Result; | ||
import me.zohar.lottery.config.security.UserAccountDetails; | ||
|
||
@Controller | ||
@RequestMapping("/trackingNumber") | ||
public class TrackingNumberController { | ||
|
||
@Autowired | ||
private TrackingNumberService trackingNumberService; | ||
|
||
@GetMapping("/findTrackingNumberSituationByPage") | ||
@ResponseBody | ||
public Result findTrackingNumberSituationByPage(TrackingNumberSituationQueryCondParam param) { | ||
return Result.success().setData(trackingNumberService.findTrackingNumberSituationByPage(param)); | ||
} | ||
|
||
@GetMapping("/findTrackingNumberOrderDetails") | ||
@ResponseBody | ||
public Result findTrackingNumberOrderDetails(String id) { | ||
return Result.success().setData(trackingNumberService.findTrackingNumberOrderDetails(id)); | ||
} | ||
|
||
@GetMapping("/cancelOrder") | ||
@ResponseBody | ||
public Result cancelOrder(String orderId) { | ||
UserAccountDetails user = (UserAccountDetails) SecurityContextHolder.getContext().getAuthentication() | ||
.getPrincipal(); | ||
trackingNumberService.cancelOrder(orderId, user.getUserAccountId()); | ||
return Result.success(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.