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