feat:
1. add mall product
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
package org.springblade.modules.api.app;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.vo.MallProductApiVO;
|
||||
import org.springblade.modules.mall.service.IMallProductService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Hidden
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@@ -12,6 +19,18 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Tag(name = "APP用户接口", description = "APP用户接口")
|
||||
public class APPMallController {
|
||||
|
||||
private final IMallProductService mallProductService;
|
||||
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "列表")
|
||||
public R<List<MallProductApiVO>> list() {
|
||||
return R.data(mallProductService.apiVoList());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MallProductApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String serialNumber;
|
||||
|
||||
private String productName;
|
||||
|
||||
private List<String> mainImageUrls;
|
||||
|
||||
private List<String> detailImageUrls;
|
||||
|
||||
private String thumbImageUrl;
|
||||
|
||||
private BigDecimal originalPrice;
|
||||
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user