feat:
1. add mall product
This commit is contained in:
@@ -28,7 +28,7 @@ CREATE INDEX idx_user_market_pid ON user_market_info (pid) WHERE status = 1;
|
||||
comment on table user_market_info is '用户拓展信息表';
|
||||
comment on column user_market_info.id is '主键';
|
||||
comment on column user_market_info.pid is '邀请人';
|
||||
comment on column user_market_info.synchronized is '是否同步族谱 0-否 1-是';
|
||||
comment on column user_market_info.has_synchronized is '是否同步族谱 0-否 1-是';
|
||||
comment on column user_market_info.vendor is '是否成为服务商 0-否 1-是';
|
||||
comment on column user_market_info.e_signed is '是否签署法大大协议 0-否 1-是';
|
||||
comment on column user_market_info.e_signed_url is '电子合同地址';
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.springblade.modules.mall.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springblade.modules.api.vo.MallProductApiVO;
|
||||
import org.springblade.modules.mall.pojo.entity.MallProductEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AppMallConvert {
|
||||
|
||||
AppMallConvert INSTANCE = Mappers.getMapper(AppMallConvert.class);
|
||||
|
||||
MallProductApiVO convertMallProductApiVO(MallProductEntity entity);
|
||||
|
||||
List<MallProductApiVO> convertMallProductApiListVO(List<MallProductEntity> list);
|
||||
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
package org.springblade.modules.mall.mapper;
|
||||
|
||||
import org.springblade.modules.api.vo.MallProductApiVO;
|
||||
import org.springblade.modules.mall.pojo.entity.MallProductEntity;
|
||||
import org.springblade.modules.mall.pojo.vo.MallProductVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@@ -48,5 +49,4 @@ public interface MallProductMapper extends BaseMapper<MallProductEntity> {
|
||||
*/
|
||||
List<MallProductVO> selectMallProductPage(IPage page, MallProductVO mallProduct);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
<select id="selectMallProductPage" resultMap="mallProductResultMap">
|
||||
select * from mall_product where is_deleted = 0
|
||||
select * from mall_product where is_deleted = 0 and status = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package org.springblade.modules.mall.service;
|
||||
|
||||
import org.springblade.modules.api.vo.MallProductApiVO;
|
||||
import org.springblade.modules.mall.pojo.entity.MallProductEntity;
|
||||
import org.springblade.modules.mall.pojo.vo.MallProductVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商城商品 服务类
|
||||
*
|
||||
@@ -22,4 +25,7 @@ public interface IMallProductService extends BaseService<MallProductEntity> {
|
||||
IPage<MallProductVO> selectMallProductPage(IPage<MallProductVO> page, MallProductVO mallProduct);
|
||||
|
||||
|
||||
List<MallProductApiVO> apiVoList();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
package org.springblade.modules.mall.service.impl;
|
||||
|
||||
import org.springblade.modules.api.vo.MallProductApiVO;
|
||||
import org.springblade.modules.mall.convert.AppMallConvert;
|
||||
import org.springblade.modules.mall.pojo.entity.MallProductEntity;
|
||||
import org.springblade.modules.mall.pojo.vo.MallProductVO;
|
||||
import org.springblade.modules.mall.mapper.MallProductMapper;
|
||||
@@ -33,6 +35,8 @@ import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商城商品 服务实现类
|
||||
*
|
||||
@@ -47,4 +51,10 @@ public class MallProductServiceImpl extends BaseServiceImpl<MallProductMapper, M
|
||||
return page.setRecords(baseMapper.selectMallProductPage(page, mallProduct));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MallProductApiVO> apiVoList() {
|
||||
List<MallProductEntity> list = list();
|
||||
return AppMallConvert.INSTANCE.convertMallProductApiListVO(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ import java.util.Map;
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/marcket")
|
||||
@RequestMapping("/market-info")
|
||||
@Tag(name = "用户拓展信息表", description = "用户拓展信息表接口")
|
||||
public class MarketInfoController extends BladeController {
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public class MarketInfoEntity extends BaseEntity {
|
||||
* 是否同步族谱 0-否 1-是
|
||||
*/
|
||||
@Schema(description = "是否同步族谱 0-否 1-是")
|
||||
private Integer has_synchronized;
|
||||
private Integer hasSynchronized;
|
||||
/**
|
||||
* 是否成为服务商 0-否 1-是
|
||||
*/
|
||||
|
||||
@@ -240,7 +240,7 @@ blade:
|
||||
strict-header: true
|
||||
#接口放行
|
||||
skip-url:
|
||||
- /formal-app/base/formal-app-privacy
|
||||
- /app-mall/list
|
||||
- /formal-app/base/formal-app-agreement
|
||||
- /formal-app/base/find-main-banner
|
||||
- /formal-app/base/find-mall-banner
|
||||
|
||||
Reference in New Issue
Block a user