fix[通用模块]:接口文档说明优化
This commit is contained in:
@@ -4,7 +4,7 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: file-center
|
name: file-center
|
||||||
cloud:
|
# cloud:
|
||||||
nacos:
|
# nacos:
|
||||||
discovery:
|
# discovery:
|
||||||
ip: 119.45.169.13
|
# ip: 119.45.169.13
|
||||||
|
|||||||
+33
-19
@@ -45,7 +45,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@Tag(name = "Order information")
|
@Tag(name = "订单管理")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class OrderController {
|
public class OrderController {
|
||||||
|
|
||||||
@@ -73,22 +73,35 @@ public class OrderController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private TencentPayProperties tencentPayProperties;
|
private TencentPayProperties tencentPayProperties;
|
||||||
|
|
||||||
@Value("cdn.oss-url")
|
@Value("${cdn.oss-url}")
|
||||||
private String cdnOssUrl;
|
private String cdnOssUrl;
|
||||||
|
|
||||||
@Value("cdn.url")
|
@Value("${cdn.url}")
|
||||||
private String cdnUrl;
|
private String cdnUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "查询列表")
|
@Operation(summary = "查询全部列表")
|
||||||
|
@Parameters({
|
||||||
|
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
|
||||||
|
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
|
||||||
|
})
|
||||||
|
@GetMapping("/list")
|
||||||
|
public PageResult list(@RequestParam Map<String, Object> params) {
|
||||||
|
return orderService.findList(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "查询用户订单列表")
|
||||||
@Parameters({
|
@Parameters({
|
||||||
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
|
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
|
||||||
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
|
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
|
||||||
})
|
})
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public PageResult list(@RequestParam Map<String, Object> params) {
|
public PageResult listByUser(@RequestParam Map<String, Object> params) {
|
||||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
return new PageResult<>();
|
return new PageResult<>();
|
||||||
@@ -100,13 +113,13 @@ public class OrderController {
|
|||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "查询列表")
|
@Operation(summary = "查询用户订单详情列表")
|
||||||
@Parameters({
|
@Parameters({
|
||||||
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
|
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
|
||||||
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
|
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
|
||||||
})
|
})
|
||||||
@GetMapping("/user")
|
@GetMapping("/user")
|
||||||
public PageResult<Map> listByUser(@RequestParam Map<String, Object> params) {
|
public PageResult<Map> listInfoByUser(@RequestParam Map<String, Object> params) {
|
||||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||||
params.put("userId", user.getId());
|
params.put("userId", user.getId());
|
||||||
|
|
||||||
@@ -115,7 +128,7 @@ public class OrderController {
|
|||||||
|
|
||||||
PageResult<Order> result = orderService.findListByUser(params);
|
PageResult<Order> result = orderService.findListByUser(params);
|
||||||
if (result.getCount() > 0){
|
if (result.getCount() > 0){
|
||||||
List<Map<String,Object>> page = new ArrayList<>();
|
List<Map> page = new ArrayList<>();
|
||||||
for(Order order : result.getData()){
|
for(Order order : result.getData()){
|
||||||
Map<String,Object> orderFileMap = new HashMap<>();
|
Map<String,Object> orderFileMap = new HashMap<>();
|
||||||
orderFileMap.put("time", sdf.format(order.getCreateTime()));
|
orderFileMap.put("time", sdf.format(order.getCreateTime()));
|
||||||
@@ -159,6 +172,7 @@ public class OrderController {
|
|||||||
// 同时创建支付记录(/api-order/payment)
|
// 同时创建支付记录(/api-order/payment)
|
||||||
// 前端进入排队队列中(/api-order/queue)已支付订单列表
|
// 前端进入排队队列中(/api-order/queue)已支付订单列表
|
||||||
// 设备执行完成后更新订单状态已完成(根据设备上报状态触发或者设备直接调用接口进行更新任务状态)
|
// 设备执行完成后更新订单状态已完成(根据设备上报状态触发或者设备直接调用接口进行更新任务状态)
|
||||||
|
@Operation(summary = "创建订单")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result<Order> createOrder(@RequestBody Order order) {
|
public Result<Order> createOrder(@RequestBody Order order) {
|
||||||
|
|
||||||
@@ -189,6 +203,8 @@ public class OrderController {
|
|||||||
* @param orderId 微信公众号对应微信付款用户的唯一标识
|
* @param orderId 微信公众号对应微信付款用户的唯一标识
|
||||||
* @return 返回jsapi所需参数
|
* @return 返回jsapi所需参数
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Operation(summary = "生成预支付订单")
|
||||||
@PutMapping("/{orderId}/pay")
|
@PutMapping("/{orderId}/pay")
|
||||||
public Result<PrepayWithRequestPaymentResponse> payOrder(@PathVariable("orderId") Long orderId) {
|
public Result<PrepayWithRequestPaymentResponse> payOrder(@PathVariable("orderId") Long orderId) {
|
||||||
|
|
||||||
@@ -218,7 +234,7 @@ public class OrderController {
|
|||||||
return Result.succeed(response, order.getOrderNo());
|
return Result.succeed(response, order.getOrderNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取排队总览信息
|
@Operation(summary = "获取排队总览信息")
|
||||||
@GetMapping("/queue/info")
|
@GetMapping("/queue/info")
|
||||||
public Result<Map> getQueueInfo() {
|
public Result<Map> getQueueInfo() {
|
||||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||||
@@ -246,7 +262,7 @@ public class OrderController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取排队总览信息
|
@Operation(summary = "获取用户是否存在排队订单")
|
||||||
@GetMapping("/queue/info/user")
|
@GetMapping("/queue/info/user")
|
||||||
public Result<Integer> getQueueInfoByUser() {
|
public Result<Integer> getQueueInfoByUser() {
|
||||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||||
@@ -260,7 +276,7 @@ public class OrderController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取排队中的订单列表
|
@Operation(summary = "获取排队中的订单列表")
|
||||||
@GetMapping("/queue")
|
@GetMapping("/queue")
|
||||||
public Result<List<Order>> getOrdersInQueue() {
|
public Result<List<Order>> getOrdersInQueue() {
|
||||||
List<Order> orders = orderService.getOrdersInQueue();
|
List<Order> orders = orderService.getOrdersInQueue();
|
||||||
@@ -268,6 +284,7 @@ public class OrderController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取排队中的订单列表
|
// 获取排队中的订单列表
|
||||||
|
@Operation(summary = "获取排队中的第一个订单")
|
||||||
@GetMapping("/queue/first")
|
@GetMapping("/queue/first")
|
||||||
public Result<Order> getOrdersInQueueFirstOne() {
|
public Result<Order> getOrdersInQueueFirstOne() {
|
||||||
List<Order> orders = orderService.getOrdersInQueue();
|
List<Order> orders = orderService.getOrdersInQueue();
|
||||||
@@ -278,12 +295,14 @@ public class OrderController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 处理排队中的订单(模拟消费通知等操作)
|
// 处理排队中的订单(模拟消费通知等操作)
|
||||||
|
@Operation(summary = "通知排队中的订单")
|
||||||
@PutMapping("/queue/process")
|
@PutMapping("/queue/process")
|
||||||
public Result<String> processOrdersInQueue() {
|
public Result<String> processOrdersInQueue() {
|
||||||
orderService.processOrdersInQueue();
|
orderService.processOrdersInQueue();
|
||||||
return Result.succeed("排队订单处理已启动");
|
return Result.succeed("排队订单处理已启动");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "更新订单支付完成状态")
|
||||||
@PatchMapping("/update/{orderNo}")
|
@PatchMapping("/update/{orderNo}")
|
||||||
public Result<String> updateOrderStatus(@PathVariable String orderNo) {
|
public Result<String> updateOrderStatus(@PathVariable String orderNo) {
|
||||||
Transaction transaction = queryOrderByOutTradeNo(orderNo);
|
Transaction transaction = queryOrderByOutTradeNo(orderNo);
|
||||||
@@ -298,6 +317,7 @@ public class OrderController {
|
|||||||
return Result.failed("未查询到订单数据");
|
return Result.failed("未查询到订单数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "机库更新订单完成状态")
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
public Result<String> updateOrderStatusComplete(@RequestBody Map payload) {
|
public Result<String> updateOrderStatusComplete(@RequestBody Map payload) {
|
||||||
Order order = orderService.getOrderByNumber(payload.get("orderNo").toString());
|
Order order = orderService.getOrderByNumber(payload.get("orderNo").toString());
|
||||||
@@ -342,6 +362,7 @@ public class OrderController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "取消订单")
|
||||||
@PutMapping("/{id}")
|
@PutMapping("/{id}")
|
||||||
public Result cancelOrder(@PathVariable("id") Long id) {
|
public Result cancelOrder(@PathVariable("id") Long id) {
|
||||||
|
|
||||||
@@ -354,6 +375,7 @@ public class OrderController {
|
|||||||
return Result.failed("请重试");
|
return Result.failed("请重试");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "机库查询订单执行情况")
|
||||||
@GetMapping("/status/{orderNo}")
|
@GetMapping("/status/{orderNo}")
|
||||||
public Result getOrderExecStatus(@PathVariable("orderNo") String orderNo) {
|
public Result getOrderExecStatus(@PathVariable("orderNo") String orderNo) {
|
||||||
|
|
||||||
@@ -368,12 +390,4 @@ public class OrderController {
|
|||||||
}
|
}
|
||||||
return Result.failed("不满足执行条件");
|
return Result.failed("不满足执行条件");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCdnOssUrl() {
|
|
||||||
return cdnOssUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCdnUrl() {
|
|
||||||
return cdnUrl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-1
@@ -32,7 +32,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@Tag(name = "Order Files information")
|
@Tag(name = "订单资源管理")
|
||||||
@RequestMapping("/files")
|
@RequestMapping("/files")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class OrderFileController {
|
public class OrderFileController {
|
||||||
@@ -74,6 +74,7 @@ public class OrderFileController {
|
|||||||
return orderFileService.findListByUser(params);
|
return orderFileService.findListByUser(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "创建订单资源")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result<OrderFile> createOrderFile(@RequestBody OrderFile orderFile) {
|
public Result<OrderFile> createOrderFile(@RequestBody OrderFile orderFile) {
|
||||||
|
|
||||||
@@ -96,6 +97,7 @@ public class OrderFileController {
|
|||||||
return Result.succeed(orderFile,"获取成功");
|
return Result.succeed(orderFile,"获取成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "查询订单资源列表")
|
||||||
@GetMapping("/order/{orderNo}")
|
@GetMapping("/order/{orderNo}")
|
||||||
public Result<List<OrderFile>> getOrderFiles(@PathVariable("orderNo") String orderNo) {
|
public Result<List<OrderFile>> getOrderFiles(@PathVariable("orderNo") String orderNo) {
|
||||||
List<OrderFile> orderFiles = orderFileService.getOrderFileByOrderNo(orderNo);
|
List<OrderFile> orderFiles = orderFileService.getOrderFileByOrderNo(orderNo);
|
||||||
@@ -111,6 +113,7 @@ public class OrderFileController {
|
|||||||
return Result.succeed(orderFiles);
|
return Result.succeed(orderFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "查询用户订单资源列表")
|
||||||
@GetMapping("/user/{userId}")
|
@GetMapping("/user/{userId}")
|
||||||
public Result<Map<String,Object>> getUserOrderFiles(@PathVariable("userId") Long userId) {
|
public Result<Map<String,Object>> getUserOrderFiles(@PathVariable("userId") Long userId) {
|
||||||
List<OrderFile> orderFiles = orderFileService.getOrderFileByUserId(userId);
|
List<OrderFile> orderFiles = orderFileService.getOrderFileByUserId(userId);
|
||||||
@@ -147,4 +150,15 @@ public class OrderFileController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除文件")
|
||||||
|
@DeleteMapping( "/{id}")
|
||||||
|
public Result delete(@PathVariable Long id) {
|
||||||
|
|
||||||
|
if (orderFileService.delete(id) > 0){
|
||||||
|
return Result.succeed("删除成功");
|
||||||
|
}
|
||||||
|
return Result.failed("删除失败");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@Tag(name = "Payment information")
|
@Tag(name = "支付记录管理")
|
||||||
@RequestMapping("/payment")
|
@RequestMapping("/payment")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class PaymentRecordController {
|
public class PaymentRecordController {
|
||||||
|
|||||||
+3
-1
@@ -26,7 +26,7 @@ import java.util.UUID;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@Tag(name = "Qrcode information")
|
@Tag(name = "二维码管理")
|
||||||
@RequestMapping("/qrcode")
|
@RequestMapping("/qrcode")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class QrCodeController {
|
public class QrCodeController {
|
||||||
@@ -50,6 +50,7 @@ public class QrCodeController {
|
|||||||
return qrCodeService.findList(params);
|
return qrCodeService.findList(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "生成景区二维码")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result<QrCode> createQrCode(@RequestBody QrCode qrCode) throws Exception {
|
public Result<QrCode> createQrCode(@RequestBody QrCode qrCode) throws Exception {
|
||||||
String codeId = UUID.randomUUID().toString();
|
String codeId = UUID.randomUUID().toString();
|
||||||
@@ -70,6 +71,7 @@ public class QrCodeController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "根据code查询二维码信息")
|
||||||
@GetMapping("/{codeId}")
|
@GetMapping("/{codeId}")
|
||||||
public Result<QrCode> getQrCode(@PathVariable("codeId") String codeId) {
|
public Result<QrCode> getQrCode(@PathVariable("codeId") String codeId) {
|
||||||
QrCode qrCode = qrCodeService.getByCodeId(codeId);
|
QrCode qrCode = qrCodeService.getByCodeId(codeId);
|
||||||
|
|||||||
+3
-1
@@ -24,7 +24,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@Tag(name = "Tourism information")
|
@Tag(name = "Tourism管理")
|
||||||
@RequestMapping("/tourism")
|
@RequestMapping("/tourism")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class TourismController {
|
public class TourismController {
|
||||||
@@ -45,6 +45,7 @@ public class TourismController {
|
|||||||
return tourismService.findList(params);
|
return tourismService.findList(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "创建Tourism")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result<Tourism> createTourism(@RequestBody Tourism tourism) {
|
public Result<Tourism> createTourism(@RequestBody Tourism tourism) {
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@ public class TourismController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "查询Tourism")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public Result<Tourism> getTourism(@PathVariable("id") Long id) {
|
public Result<Tourism> getTourism(@PathVariable("id") Long id) {
|
||||||
Tourism tourism = tourismService.getTourismById(id);
|
Tourism tourism = tourismService.getTourismById(id);
|
||||||
|
|||||||
+5
-1
@@ -11,6 +11,8 @@ import com.wechat.pay.java.core.notification.NotificationConfig;
|
|||||||
import com.wechat.pay.java.core.notification.NotificationParser;
|
import com.wechat.pay.java.core.notification.NotificationParser;
|
||||||
import com.wechat.pay.java.core.notification.RequestParam;
|
import com.wechat.pay.java.core.notification.RequestParam;
|
||||||
import com.wechat.pay.java.service.payments.model.Transaction;
|
import com.wechat.pay.java.service.payments.model.Transaction;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -24,6 +26,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
|
@Tag(name = "支付管理")
|
||||||
@RequestMapping("/wechat")
|
@RequestMapping("/wechat")
|
||||||
public class WxPayController {
|
public class WxPayController {
|
||||||
|
|
||||||
@@ -39,8 +42,9 @@ public class WxPayController {
|
|||||||
* @return
|
* @return
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
|
@Operation(summary = "支付回调")
|
||||||
@PostMapping("/pay/Notify")
|
@PostMapping("/pay/Notify")
|
||||||
public void wechatPayNotify(HttpServletRequest request) throws IOException {
|
public String wechatPayNotify(HttpServletRequest request) throws IOException {
|
||||||
log.info("------收到微信支付回调通知------");
|
log.info("------收到微信支付回调通知------");
|
||||||
return payNotify(request);
|
return payNotify(request);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import com.central.common.model.SuperEntity;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.data.annotation.Transient;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -35,10 +34,10 @@ public class Order extends SuperEntity {
|
|||||||
private Integer orderStatus;
|
private Integer orderStatus;
|
||||||
|
|
||||||
private Date payTime;
|
private Date payTime;
|
||||||
@Transient
|
|
||||||
private String createdTime;
|
private transient String createdTime;
|
||||||
@Transient
|
|
||||||
private String codeId;
|
private transient String codeId;
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT)
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import com.central.common.model.SuperEntity;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.data.annotation.Transient;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -29,8 +28,7 @@ public class OrderFile extends SuperEntity {
|
|||||||
|
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@Transient
|
private transient String viewUrl;
|
||||||
private String viewUrl;
|
|
||||||
// 景区ID
|
// 景区ID
|
||||||
private Long tourismId;
|
private Long tourismId;
|
||||||
|
|
||||||
@@ -42,7 +40,6 @@ public class OrderFile extends SuperEntity {
|
|||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
//租户ID
|
//租户ID
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
private String company;
|
|
||||||
private Integer isDel;
|
private Integer isDel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -57,5 +57,13 @@ public interface IOrderFileService extends ISuperService<OrderFile> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
OrderFile getOrderFileByFileId(String fileId);
|
OrderFile getOrderFileByFileId(String fileId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文件
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int delete(Long id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
@@ -66,4 +66,13 @@ public class OrderFileServiceImpl extends SuperServiceImpl<OrderFileMapper, Orde
|
|||||||
return baseMapper.getFileByFileId(fileId);
|
return baseMapper.getFileByFileId(fileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int delete(Long id) {
|
||||||
|
OrderFile orderFile = baseMapper.selectById(id);
|
||||||
|
if (orderFile != null) {
|
||||||
|
return baseMapper.deleteById(orderFile.getId());
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ public class OrderServiceImpl extends SuperServiceImpl<OrderMapper, Order> imple
|
|||||||
@Override
|
@Override
|
||||||
public PageResult<Order> findList(Map<String, Object> params){
|
public PageResult<Order> findList(Map<String, Object> params){
|
||||||
Page<Order> page = new Page<>(MapUtils.getInteger(params, "page"), MapUtils.getInteger(params, "limit"));
|
Page<Order> page = new Page<>(MapUtils.getInteger(params, "page"), MapUtils.getInteger(params, "limit"));
|
||||||
List<Order> list = baseMapper.findListByUser(page, params);
|
List<Order> list = baseMapper.findList(page, params);
|
||||||
return PageResult.<Order>builder().data(list).resp_code(0).count(page.getTotal()).build();
|
return PageResult.<Order>builder().data(list).resp_code(0).count(page.getTotal()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: order-center
|
name: order-center
|
||||||
cloud:
|
# cloud:
|
||||||
nacos:
|
# nacos:
|
||||||
discovery:
|
# discovery:
|
||||||
ip: 81.70.164.178
|
# ip: 81.70.164.178
|
||||||
# cloud:
|
# cloud:
|
||||||
# nacos:
|
# nacos:
|
||||||
# discovery:
|
# discovery:
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
########################## bootstrap级别通用配置 ##########################
|
########################## bootstrap级别通用配置 ##########################
|
||||||
# 默认开发环境
|
# 默认开发环境
|
||||||
spring.profiles.active=prod
|
spring.profiles.active=dev
|
||||||
|
|
||||||
##### nacos(注册中心和配置中心)地址
|
##### nacos(注册中心和配置中心)地址
|
||||||
spring.cloud.nacos.server-addr=47.94.136.130:8848
|
#spring.cloud.nacos.server-addr=47.94.136.130:8848
|
||||||
#spring.cloud.nacos.server-addr=127.0.0.1:8848
|
spring.cloud.nacos.server-addr=127.0.0.1:8848
|
||||||
spring.cloud.nacos.username=nacos
|
spring.cloud.nacos.username=nacos
|
||||||
spring.cloud.nacos.password=nacos
|
spring.cloud.nacos.password=nacos
|
||||||
spring.cloud.nacos.config.file-extension=yml
|
spring.cloud.nacos.config.file-extension=yml
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
//console.log(JSON.stringify(data));
|
//console.log(JSON.stringify(data));
|
||||||
if (data.resp_code === 0) {
|
if (data.resp_code === 0) {
|
||||||
config.putToken(data.datas);
|
config.putToken(data.data);
|
||||||
layer.msg('登录成功', {icon: 1, time: 500}, function () {
|
layer.msg('登录成功', {icon: 1, time: 500}, function () {
|
||||||
location.replace('./');
|
location.replace('./');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ layui.define(['config', 'admin', 'layer', 'laytpl', 'element', 'form'], function
|
|||||||
admin.req('api-user/users/current', {}, function (data) {
|
admin.req('api-user/users/current', {}, function (data) {
|
||||||
layer.closeAll('loading');
|
layer.closeAll('loading');
|
||||||
if (data && data.resp_code === 0) {
|
if (data && data.resp_code === 0) {
|
||||||
let user = data.datas;
|
let user = data.data;
|
||||||
config.putUser(user);
|
config.putUser(user);
|
||||||
admin.putTempData("permissions",user.permissions);
|
admin.putTempData("permissions",user.permissions);
|
||||||
success(user);
|
success(user);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
admin.req('api-search/admin/index', {'indexName':indexName}, function (data) {
|
admin.req('api-search/admin/index', {'indexName':indexName}, function (data) {
|
||||||
layer.closeAll('loading');
|
layer.closeAll('loading');
|
||||||
if (0 == data.resp_code) {
|
if (0 == data.resp_code) {
|
||||||
$('#data').html(syntaxHighlight(data.datas));
|
$('#data').html(syntaxHighlight(data.data));
|
||||||
} else {
|
} else {
|
||||||
layer.msg('获取索引信息失败', {icon: 2, time: 500});
|
layer.msg('获取索引信息失败', {icon: 2, time: 500});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
layer.closeAll('loading');
|
layer.closeAll('loading');
|
||||||
if (0 === data.resp_code) {
|
if (0 === data.resp_code) {
|
||||||
let selected = false;
|
let selected = false;
|
||||||
$.each(data.datas,function(index,item){
|
$.each(data.data,function(index,item){
|
||||||
if (config.clientId === item.clientId) {
|
if (config.clientId === item.clientId) {
|
||||||
selected = true;
|
selected = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
admin.req('api-user/users/current', {}, function (data) {
|
admin.req('api-user/users/current', {}, function (data) {
|
||||||
// 回显user数据
|
// 回显user数据
|
||||||
if (data && data.resp_code === 0) {
|
if (data && data.resp_code === 0) {
|
||||||
let user = data.datas;
|
let user = data.data;
|
||||||
user.sex = user.sex.toString();
|
user.sex = user.sex.toString();
|
||||||
form.val('user-form', user);
|
form.val('user-form', user);
|
||||||
$('#user-form').attr('method', 'PUT');
|
$('#user-form').attr('method', 'PUT');
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
$(".layui-nav-img").attr("src",$("[name=headImgUrl]").val());
|
$(".layui-nav-img").attr("src",$("[name=headImgUrl]").val());
|
||||||
layer.msg("操作成功", {icon: 1, time: 500});
|
layer.msg("操作成功", {icon: 1, time: 500});
|
||||||
|
|
||||||
form.val('user-form',data.datas);
|
form.val('user-form',data.data);
|
||||||
} else {
|
} else {
|
||||||
layer.msg(data.resp_msg, {icon: 2, time: 500});
|
layer.msg(data.resp_msg, {icon: 2, time: 500});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
layer.closeAll('loading');
|
layer.closeAll('loading');
|
||||||
if (0 === data.resp_code) {
|
if (0 === data.resp_code) {
|
||||||
let selected = false;
|
let selected = false;
|
||||||
$.each(data.datas,function(index,item){
|
$.each(data.data,function(index,item){
|
||||||
if (config.clientId === item.clientId) {
|
if (config.clientId === item.clientId) {
|
||||||
selected = true;
|
selected = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
layer.closeAll('loading');
|
layer.closeAll('loading');
|
||||||
if (0 === data.resp_code) {
|
if (0 === data.resp_code) {
|
||||||
let selected = false;
|
let selected = false;
|
||||||
$.each(data.datas,function(index,item){
|
$.each(data.data,function(index,item){
|
||||||
if (config.clientId === item.clientId) {
|
if (config.clientId === item.clientId) {
|
||||||
selected = true;
|
selected = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -58,8 +58,8 @@
|
|||||||
if (0 == data.resp_code) {
|
if (0 == data.resp_code) {
|
||||||
// 渲染多选下拉框
|
// 渲染多选下拉框
|
||||||
var roleSelectData = new Array();
|
var roleSelectData = new Array();
|
||||||
for (var i = 0; i < data.datas.length; i++) {
|
for (var i = 0; i < data.data.length; i++) {
|
||||||
roleSelectData.push({name: data.datas[i].name, value: data.datas[i].id});
|
roleSelectData.push({name: data.data[i].name, value: data.data[i].id});
|
||||||
}
|
}
|
||||||
formSelects.data('roleId', 'local', {arr: roleSelectData});
|
formSelects.data('roleId', 'local', {arr: roleSelectData});
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,14 @@ const TableList: React.FC = () => {
|
|||||||
title: '订单ID',
|
title: '订单ID',
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '订单编号',
|
||||||
|
dataIndex: 'orderNo',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'orderStatus',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { request } from 'umi';
|
|||||||
|
|
||||||
export async function order(params?: { [key: string]: string | number }) {
|
export async function order(params?: { [key: string]: string | number }) {
|
||||||
const { current, pageSize, ...rest } = params ?? {};
|
const { current, pageSize, ...rest } = params ?? {};
|
||||||
const result = await request<SYSTEM.Page<ORDERS.Order>>('/api-order', {
|
const result = await request<SYSTEM.Page<ORDERS.Order>>('/api-order/list', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: { page: current, limit: pageSize, ...rest },
|
params: { page: current, limit: pageSize, ...rest },
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ declare namespace ORDERS {
|
|||||||
|
|
||||||
type Order = {
|
type Order = {
|
||||||
id: number;
|
id: number;
|
||||||
|
orderNo: string;
|
||||||
|
orderStatus: string;
|
||||||
createTime?: string;
|
createTime?: string;
|
||||||
tenantId?: string;
|
tenantId?: string;
|
||||||
updateTime?: string;
|
updateTime?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user