修改 system-service-app 导入的数据库脚本
This commit is contained in:
parent
8646d0a69e
commit
d0ce6090ad
@ -46,11 +46,20 @@ public interface ProductSpuRpc {
|
||||
CommonResult<List<ProductSpuRespDTO>> listProductSpus(List<Integer> productSpuIds);
|
||||
|
||||
/**
|
||||
* 获得商品 SPU分页
|
||||
* 获得商品 SPU 分页
|
||||
*
|
||||
* @param pageDTO 商品 SPU分页查询
|
||||
* @return 商品 SPU分页结果
|
||||
* @param pageDTO 商品 SPU 分页查询
|
||||
* @return 商品 SPU 分页结果
|
||||
*/
|
||||
CommonResult<PageResult<ProductSpuRespDTO>> pageProductSpu(ProductSpuPageReqDTO pageDTO);
|
||||
|
||||
/**
|
||||
* 顺序获得商品 SPU 编号数组
|
||||
*
|
||||
* @param limit 数量
|
||||
* @param lastSpuId 最后一个商品 SPU 编号
|
||||
* @return 商品 SPU 编号数组
|
||||
*/
|
||||
CommonResult<List<Integer>> listProductSpuIds(Integer limit, Integer lastSpuId);
|
||||
|
||||
}
|
||||
|
@ -47,6 +47,10 @@ public class ProductSpuManager {
|
||||
@Autowired
|
||||
private ProductMQProducer productMQProducer;
|
||||
|
||||
private static ProductSpuManager self() {
|
||||
return (ProductSpuManager) AopContext.currentProxy();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建商品 SPU 和 SKU
|
||||
*
|
||||
@ -158,6 +162,17 @@ public class ProductSpuManager {
|
||||
return categoryBO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 顺序获得商品 SPU 编号数组
|
||||
*
|
||||
* @param limit 数量
|
||||
* @param lastSpuId 最后一个商品 SPU 编号
|
||||
* @return 商品 SPU 编号数组
|
||||
*/
|
||||
public List<Integer> listProductSpuIds(Integer limit, Integer lastSpuId) {
|
||||
return productAttrService.listProductSpuIds(limit, lastSpuId);
|
||||
}
|
||||
|
||||
private List<ProductAttrKeyValueBO> checkProductAttr(List<ProductSkuCreateOrUpdateBO> skuBOs) {
|
||||
// 第一步,校验 SKU 使用到的规格是否存在
|
||||
Set<Integer> attrValueIds = new HashSet<>();
|
||||
@ -192,8 +207,4 @@ public class ProductSpuManager {
|
||||
return attrKeyValueBOs;
|
||||
}
|
||||
|
||||
private ProductSpuManager self() {
|
||||
return (ProductSpuManager) AopContext.currentProxy();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -49,4 +49,9 @@ public class ProductSpuRpcImpl implements ProductSpuRpc {
|
||||
return success(productSpuManager.pageProductSpu(pageDTO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<Integer>> listProductSpuIds(Integer limit, Integer lastSpuId) {
|
||||
return success(productSpuManager.listProductSpuIds(limit, lastSpuId));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -208,4 +208,18 @@ public class ProductAttrService {
|
||||
return ProductAttrConvert.INSTANCE.convertList03(productAttrValueDOs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 顺序获得商品 SPU 编号数组
|
||||
*
|
||||
* 一般情况下,该接口我们用于提供顺序的 SPU 编号数组,以便调用方进一步根据自己需要获取商品信息
|
||||
* 例如说,搜索服务会不断获取商品编号,重建该商品编号的索引
|
||||
*
|
||||
* @param limit 数量
|
||||
* @param lastSpuId 最后一个商品 SPU 编号
|
||||
* @return 商品 SPU 编号数组
|
||||
*/
|
||||
public List<Integer> listProductSpuIds(Integer limit, Integer lastSpuId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,45 +0,0 @@
|
||||
package cn.iocoder.mall.product.biz.bo.product;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品 SKU BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductSkuBO implements Serializable {
|
||||
|
||||
/**
|
||||
* sku 编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 商品编号
|
||||
*/
|
||||
private Integer spuId;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String picURL;
|
||||
// /**
|
||||
// * 规格值数组
|
||||
// */
|
||||
// // TODO 芋艿,这个属性目前未进行设置
|
||||
// private List<ProductAttrAndValuePairBO> attrs;
|
||||
/**
|
||||
* 价格,单位:分
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
}
|
@ -30,16 +30,8 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
|
||||
@Autowired
|
||||
private ProductSpuMapper productSpuMapper;
|
||||
@Autowired
|
||||
private ProductSkuMapper productSkuMapper;
|
||||
@Autowired
|
||||
private ProductCategoryMapper productCategoryMapper;
|
||||
@Autowired
|
||||
private ProductAttrService productAttrService;
|
||||
@Autowired
|
||||
private ProductCategoryService productCategoryService;
|
||||
|
||||
@Override
|
||||
public ProductSpuDetailBO getProductSpuDetail(Integer spuId) {
|
||||
|
@ -1,45 +0,0 @@
|
||||
package cn.iocoder.mall.product.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品 SKU BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductSkuBO implements Serializable {
|
||||
|
||||
/**
|
||||
* sku 编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 商品编号
|
||||
*/
|
||||
private Integer spuId;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String picURL;
|
||||
// /**
|
||||
// * 规格值数组
|
||||
// */
|
||||
// // TODO 芋艿,这个属性目前未进行设置
|
||||
// private List<ProductAttrAndValuePairBO> attrs;
|
||||
/**
|
||||
* 价格,单位:分
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.mall.product.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* Product 规格添加 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrAddDTO {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotEmpty(message = "规格名不能为空")
|
||||
private String name;
|
||||
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package cn.iocoder.mall.product.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Product 规格修改 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrUpdateDTO {
|
||||
|
||||
/**
|
||||
* 规格编号
|
||||
*/
|
||||
@NotNull(message = "规格编号不能为空")
|
||||
private Integer id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotEmpty(message = "规格名不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package cn.iocoder.mall.product.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Product 规格值添加 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrValueAddDTO {
|
||||
|
||||
/**
|
||||
* 规格编号
|
||||
*/
|
||||
@NotNull(message = "规格编号不能为空")
|
||||
private Integer attrId;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotEmpty(message = "规格值名不能为空")
|
||||
private String name;
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package cn.iocoder.mall.product.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Product 规格值修改 DTO
|
||||
*
|
||||
* 注意,不允许修改所属规格
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrValueUpdateDTO {
|
||||
|
||||
/**
|
||||
* 规格值编号
|
||||
*/
|
||||
@NotNull(message = "规格编号不能为空")
|
||||
private Integer id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotEmpty(message = "规格名不能为空")
|
||||
private String name;
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package cn.iocoder.mall.product.config;
|
||||
|
||||
import cn.iocoder.mall.product.message.MQStreamProducer;
|
||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@EnableBinding(MQStreamProducer.class)
|
||||
public class MQStreamConfiguration {
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package cn.iocoder.mall.product.message;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Output;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
|
||||
/**
|
||||
* Spring Cloud Stream Source 接口
|
||||
*/
|
||||
public interface MQStreamProducer {
|
||||
|
||||
/**
|
||||
* 商品更新 Output
|
||||
*/
|
||||
String PRODUCT_UPDATE_OUTPUT = "product-update-output";
|
||||
|
||||
@Output(PRODUCT_UPDATE_OUTPUT)
|
||||
MessageChannel productUpdateOutput();
|
||||
|
||||
// default boolean sendProductUpdateMessage(ProductUpdateMessage message) {
|
||||
// // 创建 Spring Message 对象
|
||||
// Message<ProductUpdateMessage> springMessage = MessageBuilder.withPayload(message)
|
||||
// .build();
|
||||
// // 发送消息
|
||||
// return productUpdateOutput().send(springMessage);
|
||||
// }
|
||||
|
||||
}
|
@ -35,28 +35,6 @@ public class ProductAttrServiceImpl implements ProductAttrService {
|
||||
@Autowired
|
||||
private ProductAttrValueMapper productAttrValueMapper;
|
||||
|
||||
@Override
|
||||
public ProductAttrPageBO getProductAttrPage(ProductAttrPageDTO productAttrPageDTO) {
|
||||
ProductAttrPageBO productAttrPageBO = new ProductAttrPageBO();
|
||||
// 查询分页数据
|
||||
int offset = (productAttrPageDTO.getPageNo()-1) * productAttrPageDTO.getPageSize();
|
||||
productAttrPageBO.setAttrs(ProductAttrConvert.INSTANCE.convert(productAttrMapper.selectListByNameLike(productAttrPageDTO.getName(),
|
||||
offset, productAttrPageDTO.getPageSize())));
|
||||
// 查询分页总数
|
||||
productAttrPageBO.setCount(productAttrMapper.selectCountByNameLike(productAttrPageDTO.getName()));
|
||||
// 将规格值拼接上去
|
||||
if (!productAttrPageBO.getAttrs().isEmpty()) {
|
||||
Set<Integer> attrIds = productAttrPageBO.getAttrs().stream().map(ProductAttrDetailBO::getId).collect(Collectors.toSet());
|
||||
List<ProductAttrValueDO> attrValues = productAttrValueMapper.selectListByAttrIds(attrIds);
|
||||
ImmutableListMultimap<Integer, ProductAttrValueDO> attrValueMap = Multimaps.index(attrValues, ProductAttrValueDO::getAttrId); // KEY 是 attrId ,VALUE 是 ProductAttrValueDO 数组
|
||||
for (ProductAttrDetailBO productAttrDetailBO : productAttrPageBO.getAttrs()) {
|
||||
productAttrDetailBO.setValues(ProductAttrConvert.INSTANCE.convert2(((attrValueMap).get(productAttrDetailBO.getId()))));
|
||||
}
|
||||
}
|
||||
// 返回结果
|
||||
return productAttrPageBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductAttrSimpleBO> getProductAttrList() {
|
||||
// 查询所有开启的规格数组
|
||||
@ -74,57 +52,5 @@ public class ProductAttrServiceImpl implements ProductAttrService {
|
||||
return attrs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAttrValueBO addProductAttrValue(Integer adminId, ProductAttrValueAddDTO productAttrValueAddDTO) {
|
||||
// 校验规格名不重复
|
||||
if (productAttrValueMapper.selectByAttrIdAndName(productAttrValueAddDTO.getAttrId(), productAttrValueAddDTO.getName()) != null) {
|
||||
throw ServiceExceptionUtil.exception(ProductErrorCodeEnum.PRODUCT_ATTR_VALUE_EXISTS.getCode());
|
||||
}
|
||||
// 插入到数据库
|
||||
ProductAttrValueDO productAttrValueDO = ProductAttrConvert.INSTANCE.convert(productAttrValueAddDTO)
|
||||
.setStatus(ProductAttrConstants.ATTR_VALUE_STATUS_ENABLE);
|
||||
productAttrValueDO.setCreateTime(new Date());
|
||||
productAttrValueDO.setDeleted(DeletedStatusEnum.DELETED_NO.getValue());
|
||||
productAttrValueMapper.insert(productAttrValueDO);
|
||||
// 返回成功
|
||||
return ProductAttrConvert.INSTANCE.convert2(productAttrValueDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateProductAttrValue(Integer adminId, ProductAttrValueUpdateDTO productAttrValueUpdateDTO) {
|
||||
// 校验存在
|
||||
ProductAttrValueDO productAttrValueDO = productAttrValueMapper.selectById(productAttrValueUpdateDTO.getId());
|
||||
if (productAttrValueDO == null) {
|
||||
throw ServiceExceptionUtil.exception(ProductErrorCodeEnum.PRODUCT_ATTR_VALUE_NOT_EXIST.getCode());
|
||||
}
|
||||
// 校验规格名不重复
|
||||
ProductAttrValueDO existsAttrDO = productAttrValueMapper.selectByAttrIdAndName(productAttrValueDO.getAttrId(), productAttrValueUpdateDTO.getName());
|
||||
if (existsAttrDO != null && !existsAttrDO.getId().equals(productAttrValueUpdateDTO.getId())) {
|
||||
throw ServiceExceptionUtil.exception(ProductErrorCodeEnum.PRODUCT_ATTR_VALUE_EXISTS.getCode());
|
||||
}
|
||||
// 更新到数据库
|
||||
ProductAttrValueDO updateProductValue = ProductAttrConvert.INSTANCE.convert(productAttrValueUpdateDTO);
|
||||
productAttrValueMapper.update(updateProductValue);
|
||||
// 返回成功
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateProductAttrValueStatus(Integer adminId, Integer productAttrValueId, Integer status) {
|
||||
// 校验存在
|
||||
ProductAttrValueDO productAttrValueDO = productAttrValueMapper.selectById(productAttrValueId);
|
||||
if (productAttrValueDO == null) {
|
||||
throw ServiceExceptionUtil.exception(ProductErrorCodeEnum.PRODUCT_ATTR_VALUE_NOT_EXIST.getCode());
|
||||
}
|
||||
// 校验状态
|
||||
if (productAttrValueDO.getStatus().equals(status)) {
|
||||
throw ServiceExceptionUtil.exception(ProductErrorCodeEnum.PRODUCT_ATTR_VALUE_STATUS_EQUALS.getCode());
|
||||
}
|
||||
// 更新到数据库
|
||||
ProductAttrValueDO updateProductAttrValue = new ProductAttrValueDO().setId(productAttrValueId).setStatus(status);
|
||||
productAttrValueMapper.update(updateProductAttrValue);
|
||||
// 返回成功
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -42,9 +42,6 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
@Autowired
|
||||
private ProductAttrServiceImpl productAttrService;
|
||||
|
||||
@Autowired
|
||||
private MQStreamProducer mqStreamProducer;
|
||||
|
||||
// @Override
|
||||
// public ProductSpuBO getProductSpuDetail(Integer id) {
|
||||
// ProductSpuDO productSpuDO = productSpuMapper.selectById(id);
|
||||
@ -86,15 +83,6 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
return spus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductSpuDetailBO addProductSpu(Integer adminId, ProductSpuAddDTO productSpuAddDTO) {
|
||||
// 如果新增生成,发送创建商品 Topic 消息
|
||||
// TODO 芋艿,先不考虑事务的问题。等后面的 fescar 一起搞
|
||||
sendProductUpdateMessage(productSpuDetailBO.getId());
|
||||
// 返回成功
|
||||
return productSpuDetailBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateProductSpuSort(Integer adminId, Integer spuId, Integer sort) {
|
||||
// 校验 Spu 是否存在
|
||||
|
@ -0,0 +1 @@
|
||||
package cn.iocoder.mall.searchservice.enums;
|
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.mall.searchservice.enums.product;
|
||||
|
||||
/**
|
||||
* 搜索商品分页查询的排序字段枚举
|
||||
*/
|
||||
public enum SearchProductPageQuerySortFieldEnum {
|
||||
|
||||
/**
|
||||
* 购买价格
|
||||
*/
|
||||
BUY_PRICE("buyPrice");
|
||||
|
||||
/**
|
||||
* 字段
|
||||
*/
|
||||
private final String field;
|
||||
|
||||
SearchProductPageQuerySortFieldEnum(String field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public String getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public static boolean contains(String field) {
|
||||
for (SearchProductPageQuerySortFieldEnum fieldEnum : values()) {
|
||||
if (field.equals(fieldEnum.getField())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +1,15 @@
|
||||
package cn.iocoder.mall.searchservice.convert.product;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.productservice.rpc.category.dto.ProductCategoryRespDTO;
|
||||
import cn.iocoder.mall.productservice.rpc.spu.dto.ProductSpuRespDTO;
|
||||
import cn.iocoder.mall.searchservice.dal.es.dataobject.ESProductDO;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductCreateBO;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductBO;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductSaveBO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springframework.data.domain.Page;
|
||||
|
||||
@Mapper
|
||||
public interface SearchProductConvert {
|
||||
@ -23,8 +26,12 @@ public interface SearchProductConvert {
|
||||
@Mapping(source = "spu.picUrls", target = "picUrls")
|
||||
@Mapping(source = "spu.visible", target = "visible")
|
||||
@Mapping(source = "spu.sort", target = "sort")
|
||||
SearchProductCreateBO convert(ProductSpuRespDTO spu, ProductCategoryRespDTO category);
|
||||
SearchProductSaveBO convert(ProductSpuRespDTO spu, ProductCategoryRespDTO category);
|
||||
|
||||
ESProductDO convert(SearchProductCreateBO bean);
|
||||
ESProductDO convert(SearchProductSaveBO bean);
|
||||
|
||||
@Mapping(source = "content", target = "list")
|
||||
@Mapping(source = "getTotalElements", target = "total")
|
||||
PageResult<SearchProductBO> convert(Page<ESProductDO> searchPage);
|
||||
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import cn.iocoder.mall.productservice.rpc.spu.ProductSpuRpc;
|
||||
import cn.iocoder.mall.productservice.rpc.spu.dto.ProductSpuRespDTO;
|
||||
import cn.iocoder.mall.searchservice.convert.product.SearchProductConvert;
|
||||
import cn.iocoder.mall.searchservice.service.product.SearchProductService;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductCreateBO;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductSaveBO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -62,7 +62,7 @@ public class SearchProductManager {
|
||||
return false;
|
||||
}
|
||||
// 保存商品到 ES 中
|
||||
SearchProductCreateBO searchProductCreateBO = SearchProductConvert.INSTANCE.convert(
|
||||
SearchProductSaveBO searchProductCreateBO = SearchProductConvert.INSTANCE.convert(
|
||||
productSpuResult.getData(), getProductCategoryResult.getData());
|
||||
ProductSkuRespDTO productSku = listProductSkusResult.getData().stream()
|
||||
.min(Comparator.comparing(ProductSkuRespDTO::getPrice)).orElse(null);
|
||||
@ -72,7 +72,7 @@ public class SearchProductManager {
|
||||
searchProductCreateBO.setOriginalPrice(productSku.getPrice());
|
||||
searchProductCreateBO.setBuyPrice(productSku.getPrice());
|
||||
searchProductCreateBO.setQuantity(productSku.getQuantity());
|
||||
searchProductService.createSearchProduct(searchProductCreateBO);
|
||||
searchProductService.saveSearchProduct(searchProductCreateBO);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,21 +1,111 @@
|
||||
package cn.iocoder.mall.searchservice.service.product;
|
||||
|
||||
import cn.iocoder.common.framework.util.CollectionUtils;
|
||||
import cn.iocoder.common.framework.util.StringUtils;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.common.framework.vo.SortingField;
|
||||
import cn.iocoder.mall.searchservice.convert.product.SearchProductConvert;
|
||||
import cn.iocoder.mall.searchservice.dal.es.dataobject.ESProductDO;
|
||||
import cn.iocoder.mall.searchservice.dal.es.repository.ESProductRepository;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductCreateBO;
|
||||
import cn.iocoder.mall.searchservice.enums.product.SearchProductPageQuerySortFieldEnum;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductBO;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductConditionBO;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductPageQueryBO;
|
||||
import cn.iocoder.mall.searchservice.service.product.bo.SearchProductSaveBO;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.search.aggregations.Aggregation;
|
||||
import org.elasticsearch.search.aggregations.AggregationBuilders;
|
||||
import org.elasticsearch.search.aggregations.bucket.terms.LongTerms;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
|
||||
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SearchProductService {
|
||||
|
||||
@Autowired
|
||||
private ESProductRepository productRepository;
|
||||
@Autowired
|
||||
private ElasticsearchTemplate elasticsearchTemplate; // 因为需要使用到聚合操作,只好引入 ElasticsearchTemplate 。
|
||||
|
||||
public void createSearchProduct(SearchProductCreateBO createBO) {
|
||||
ESProductDO productDO = SearchProductConvert.INSTANCE.convert(createBO);
|
||||
/**
|
||||
* 搜索商品分页结果
|
||||
*
|
||||
* @param pageQueryBO 分页查询条件
|
||||
* @return 商品信息
|
||||
*/
|
||||
public PageResult<SearchProductBO> getSearchPage(SearchProductPageQueryBO pageQueryBO) {
|
||||
checkSortFieldInvalid(pageQueryBO.getSorts());
|
||||
// 执行查询
|
||||
Page<ESProductDO> searchPage = productRepository.search(pageQueryBO.getCid(), pageQueryBO.getKeyword(),
|
||||
pageQueryBO.getPageNo(), pageQueryBO.getPageSize(), pageQueryBO.getSorts());
|
||||
// 转换结果
|
||||
return SearchProductConvert.INSTANCE.convert(searchPage);
|
||||
}
|
||||
|
||||
private void checkSortFieldInvalid(List<SortingField> sorts) {
|
||||
if (CollectionUtils.isEmpty(sorts)) {
|
||||
return;
|
||||
}
|
||||
sorts.forEach(sortingField -> Assert.isTrue(SearchProductPageQuerySortFieldEnum.contains(sortingField.getField()),
|
||||
String.format("排序字段(%s) 不在允许范围内", sortingField.getField())));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存商品信息到 ES 中
|
||||
*
|
||||
* @param saveBO 商品信息
|
||||
*/
|
||||
public void saveSearchProduct(SearchProductSaveBO saveBO) {
|
||||
ESProductDO productDO = SearchProductConvert.INSTANCE.convert(saveBO);
|
||||
productRepository.save(productDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得指定关键字对应的搜索条件
|
||||
*
|
||||
* 在我们搜索商品时,需要获得关键字可选择的分类、品牌等等搜索条件,方便用户进一步检索
|
||||
*
|
||||
* @param keyword 关键字
|
||||
* @param fields 需要返回的搜索条件。目前可传入的参数为
|
||||
* 1. category :商品分类,会返回商品分类编号
|
||||
* @return 搜索条件
|
||||
*/
|
||||
public SearchProductConditionBO getSearchCondition(String keyword, Collection<String> fields) {
|
||||
// 创建 ES 搜索条件
|
||||
NativeSearchQueryBuilder nativeSearchQueryBuilder = new NativeSearchQueryBuilder();
|
||||
// 筛选
|
||||
if (StringUtils.hasText(keyword)) { // 如果有 keyword ,就去匹配
|
||||
nativeSearchQueryBuilder.withQuery(QueryBuilders.multiMatchQuery(keyword,
|
||||
"name", "sellPoint", "categoryName"));
|
||||
} else {
|
||||
nativeSearchQueryBuilder.withQuery(QueryBuilders.matchAllQuery());
|
||||
}
|
||||
// 聚合
|
||||
if (fields.contains("category")) { // 商品分类
|
||||
nativeSearchQueryBuilder.addAggregation(AggregationBuilders.terms("cids").field("cid"));
|
||||
}
|
||||
// 执行查询,返回结果
|
||||
return elasticsearchTemplate.query(nativeSearchQueryBuilder.build(), response -> {
|
||||
SearchProductConditionBO result = new SearchProductConditionBO();
|
||||
// categoryIds 聚合
|
||||
Aggregation categoryIdsAggregation = response.getAggregations().get("cids");
|
||||
if (categoryIdsAggregation != null) {
|
||||
result.setCids(new ArrayList<>());
|
||||
for (LongTerms.Bucket bucket : (((LongTerms) categoryIdsAggregation).getBuckets())) {
|
||||
result.getCids().add(bucket.getKeyAsNumber().intValue());
|
||||
}
|
||||
}
|
||||
// 返回结果
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,17 +1,16 @@
|
||||
package cn.iocoder.mall.search.biz.bo;
|
||||
package cn.iocoder.mall.searchservice.service.product.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品 ES BO
|
||||
* 搜索商品 BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductBO implements Serializable {
|
||||
public class SearchProductBO {
|
||||
|
||||
private Integer id;
|
||||
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.mall.searchservice.service.product.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品搜索条件返回 BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SearchProductConditionBO {
|
||||
|
||||
/**
|
||||
* 商品分类数组
|
||||
*/
|
||||
private List<Integer> cids;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.mall.searchservice.service.product.bo;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageParam;
|
||||
import cn.iocoder.common.framework.vo.SortingField;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品检索分查询 BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SearchProductPageQueryBO extends PageParam {
|
||||
|
||||
/**
|
||||
* 分类编号
|
||||
*/
|
||||
private Integer cid;
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
private String keyword;
|
||||
/**
|
||||
* 排序字段数组
|
||||
*
|
||||
*
|
||||
*/
|
||||
private List<SortingField> sorts;
|
||||
|
||||
}
|
@ -6,11 +6,11 @@ import lombok.experimental.Accessors;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 搜索商品创建 BO
|
||||
* 搜索商品保存 BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors
|
||||
public class SearchProductCreateBO {
|
||||
public class SearchProductSaveBO {
|
||||
|
||||
private Integer id;
|
||||
|
@ -1,35 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品搜索条件返回 BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductConditionBO {
|
||||
|
||||
/**
|
||||
* 商品分类数组
|
||||
*/
|
||||
private List<Category> categories;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class Category {
|
||||
|
||||
/**
|
||||
* 分类编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductPageBO implements Serializable {
|
||||
|
||||
/**
|
||||
* 管理员数组
|
||||
*/
|
||||
private List<ProductBO> list;
|
||||
/**
|
||||
* 总量
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
|
||||
|
||||
@Configuration
|
||||
@EnableElasticsearchRepositories(basePackages = "cn.iocoder.mall.search.biz.dao")
|
||||
public class JPAConfiguration {
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.constant;
|
||||
|
||||
/**
|
||||
* ES 字段分析器的枚举类
|
||||
*
|
||||
* 关于 IK 分词,文章 https://blog.csdn.net/xsdxs/article/details/72853288 不错。
|
||||
* 目前项目使用的 ES 版本是 6.7.1 ,可以在 https://www.elastic.co/cn/downloads/past-releases/elasticsearch-6-7-1 下载。
|
||||
* 如果不知道怎么安装 ES ,可以看 https://blog.csdn.net/chengyuqiang/article/details/78837712 简单。
|
||||
*/
|
||||
public class FieldAnalyzer {
|
||||
|
||||
/**
|
||||
* IK 最大化分词
|
||||
*
|
||||
* 会将文本做最细粒度的拆分
|
||||
*/
|
||||
public static final String IK_MAX_WORD = "ik_max_word";
|
||||
|
||||
/**
|
||||
* IK 智能分词
|
||||
*
|
||||
* 会做最粗粒度的拆分
|
||||
*/
|
||||
public static final String IK_SMART = "ik_smart";
|
||||
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.search.biz.bo.ProductBO;
|
||||
import cn.iocoder.mall.search.biz.dataobject.ESProductDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProductSearchConvert {
|
||||
|
||||
ProductSearchConvert INSTANCE = Mappers.getMapper(ProductSearchConvert.class);
|
||||
|
||||
List<ProductBO> convert(List<ESProductDO> list);
|
||||
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.dao;
|
||||
|
||||
import cn.iocoder.common.framework.util.CollectionUtil;
|
||||
import cn.iocoder.common.framework.util.StringUtil;
|
||||
import cn.iocoder.common.framework.vo.SortingField;
|
||||
import cn.iocoder.mall.search.biz.dataobject.ESProductDO;
|
||||
import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder;
|
||||
import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders;
|
||||
import org.elasticsearch.search.sort.SortBuilders;
|
||||
import org.elasticsearch.search.sort.SortOrder;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
|
||||
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.elasticsearch.index.query.QueryBuilders.matchQuery;
|
||||
|
||||
@Repository
|
||||
public interface ProductRepository extends ElasticsearchRepository<ESProductDO, Integer> {
|
||||
|
||||
@Deprecated
|
||||
ESProductDO findByName(String name);
|
||||
|
||||
default Page<ESProductDO> search(Integer cid, String keyword, Integer pageNo, Integer pageSize,
|
||||
List<SortingField> sortFields) {
|
||||
NativeSearchQueryBuilder nativeSearchQueryBuilder = new NativeSearchQueryBuilder()
|
||||
.withPageable(PageRequest.of(pageNo - 1, pageSize));
|
||||
// 筛选条件 cid
|
||||
if (cid != null) {
|
||||
nativeSearchQueryBuilder.withFilter(QueryBuilders.termQuery("cid", cid));
|
||||
}
|
||||
// 筛选
|
||||
if (StringUtil.hasText(keyword)) {
|
||||
FunctionScoreQueryBuilder.FilterFunctionBuilder[] functions = { // TODO 芋艿,分值随便打的
|
||||
new FunctionScoreQueryBuilder.FilterFunctionBuilder(matchQuery("name", keyword),
|
||||
ScoreFunctionBuilders.weightFactorFunction(10)),
|
||||
new FunctionScoreQueryBuilder.FilterFunctionBuilder(matchQuery("sellPoint", keyword),
|
||||
ScoreFunctionBuilders.weightFactorFunction(2)),
|
||||
new FunctionScoreQueryBuilder.FilterFunctionBuilder(matchQuery("categoryName", keyword),
|
||||
ScoreFunctionBuilders.weightFactorFunction(3)),
|
||||
// new FunctionScoreQueryBuilder.FilterFunctionBuilder(matchQuery("description", keyword),
|
||||
// ScoreFunctionBuilders.weightFactorFunction(2)), // TODO 芋艿,目前这么做,如果商品描述很长,在按照价格降序,会命中超级多的关键字。
|
||||
};
|
||||
FunctionScoreQueryBuilder functionScoreQueryBuilder = QueryBuilders.functionScoreQuery(functions)
|
||||
.scoreMode(FunctionScoreQuery.ScoreMode.SUM)
|
||||
.setMinScore(2F); // TODO 芋艿,需要考虑下 score
|
||||
nativeSearchQueryBuilder.withQuery(functionScoreQueryBuilder);
|
||||
} else {
|
||||
nativeSearchQueryBuilder.withQuery(QueryBuilders.matchAllQuery());
|
||||
}
|
||||
// 排序
|
||||
if (!CollectionUtil.isEmpty(sortFields)) {
|
||||
sortFields.forEach(sortField -> nativeSearchQueryBuilder.withSort(SortBuilders.fieldSort(sortField.getField())
|
||||
.order(SortOrder.fromString(sortField.getOrder()))));
|
||||
} else if (StringUtil.hasText(keyword)) {
|
||||
nativeSearchQueryBuilder.withSort(SortBuilders.scoreSort().order(SortOrder.DESC));
|
||||
} else {
|
||||
nativeSearchQueryBuilder.withSort(SortBuilders.fieldSort("sort").order(SortOrder.DESC));
|
||||
}
|
||||
// 执行查询
|
||||
return search(nativeSearchQueryBuilder.build());
|
||||
}
|
||||
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.dataobject;
|
||||
|
||||
import cn.iocoder.mall.search.biz.constant.FieldAnalyzer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.elasticsearch.annotations.Document;
|
||||
import org.springframework.data.elasticsearch.annotations.Field;
|
||||
import org.springframework.data.elasticsearch.annotations.FieldType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品 ES DO
|
||||
*/
|
||||
@Document(indexName = "product", type = "spu", shards = 1, replicas = 0)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ESProductDO {
|
||||
|
||||
@Id
|
||||
private Integer id;
|
||||
|
||||
// ========== 基本信息 =========
|
||||
/**
|
||||
* SPU 名字
|
||||
*/
|
||||
@Field(analyzer = FieldAnalyzer.IK_MAX_WORD, type = FieldType.Text)
|
||||
private String name;
|
||||
/**
|
||||
* 卖点
|
||||
*/
|
||||
@Field(analyzer = FieldAnalyzer.IK_MAX_WORD, type = FieldType.Text)
|
||||
private String sellPoint;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@Field(analyzer = FieldAnalyzer.IK_MAX_WORD, type = FieldType.Text)
|
||||
private String description;
|
||||
/**
|
||||
* 分类编号
|
||||
*/
|
||||
private Integer cid;
|
||||
/**
|
||||
* 分类名
|
||||
*/
|
||||
@Field(analyzer = FieldAnalyzer.IK_MAX_WORD, type = FieldType.Text)
|
||||
private String categoryName;
|
||||
/**
|
||||
* 商品主图地数组
|
||||
*/
|
||||
private List<String> picUrls;
|
||||
|
||||
// ========== 其他信息 =========
|
||||
/**
|
||||
* 是否上架商品(是否可见)。
|
||||
*
|
||||
* true 为已上架
|
||||
* false 为已下架
|
||||
*/
|
||||
private Boolean visible;
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
// ========== Sku 相关字段 =========
|
||||
/**
|
||||
* 原价格,单位:分
|
||||
*/
|
||||
private Integer originalPrice;
|
||||
/**
|
||||
* 购买价格,单位:分。
|
||||
*/
|
||||
private Integer buyPrice;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
// ========== 促销活动相关字段 =========
|
||||
// 目前只促销单体商品促销,目前仅限制折扣。
|
||||
/**
|
||||
* 促销活动编号
|
||||
*/
|
||||
private Integer promotionActivityId;
|
||||
/**
|
||||
* 促销活动标题
|
||||
*/
|
||||
private String promotionActivityTitle;
|
||||
/**
|
||||
* 促销活动类型
|
||||
*/
|
||||
private Integer promotionActivityType;
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 获得商品检索条件 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductConditionDTO {
|
||||
|
||||
/**
|
||||
* Field - 商品分类
|
||||
*/
|
||||
public static final String FIELD_CATEGORY = "category";
|
||||
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
private String keyword;
|
||||
/**
|
||||
* 需要返回的搜索条件的 fields 名
|
||||
*/
|
||||
private Collection<String> fields;
|
||||
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.dto;
|
||||
|
||||
import cn.iocoder.common.framework.util.CollectionUtil;
|
||||
import cn.iocoder.common.framework.vo.SortingField;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 商品检索分页 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductSearchPageDTO {
|
||||
|
||||
public static final Set<String> SORT_FIELDS = CollectionUtil.asSet("buyPrice");
|
||||
|
||||
/**
|
||||
* 分类编号
|
||||
*/
|
||||
private Integer cid;
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
private String keyword;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNo;
|
||||
/**
|
||||
* 分页大小
|
||||
*/
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
* 排序字段数组
|
||||
*/
|
||||
private List<SortingField> sorts;
|
||||
|
||||
}
|
@ -19,8 +19,7 @@ public class ProductSearchServiceImpl implements ProductSearchService {
|
||||
|
||||
@Autowired
|
||||
private ProductRepository productRepository;
|
||||
@Autowired
|
||||
private ElasticsearchTemplate elasticsearchTemplate; // 因为需要使用到聚合操作,只好引入 ElasticsearchTemplate 。
|
||||
|
||||
|
||||
// @Reference(validation = "true", version = "${dubbo.consumer.ProductSpuService.version}")
|
||||
// private ProductSpuService productSpuService;
|
||||
@ -51,97 +50,5 @@ public class ProductSearchServiceImpl implements ProductSearchService {
|
||||
// return rebuildCounts;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Boolean save(Integer id) {
|
||||
// // 获得商品性情
|
||||
// ProductSpuDetailBO result = productSpuService.getProductSpuDetail(id);
|
||||
// // 存储到 ES 中
|
||||
// ESProductDO product = convert(result);
|
||||
// productRepository.save(product);
|
||||
// // 返回成功
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @SuppressWarnings("OptionalGetWithoutIsPresent")
|
||||
// private ESProductDO convert(ProductSpuDetailBO spu) {
|
||||
// // 获得最小价格的 SKU ,用于下面的价格计算
|
||||
// ProductSpuDetailBO.Sku sku = spu.getSkus().stream().min(Comparator.comparing(ProductSpuDetailBO.Sku::getPrice)).get();
|
||||
// // 价格计算
|
||||
// CalcSkuPriceBO calSkuPriceResult = cartService.calcSkuPrice(sku.getId());
|
||||
// // 拼装结果
|
||||
// return ProductSearchConvert.INSTANCE.convert(spu, calSkuPriceResult);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ProductPageBO getSearchPage(ProductSearchPageDTO searchPageDTO) {
|
||||
// checkSortFieldInvalid(searchPageDTO.getSorts());
|
||||
// // 执行查询
|
||||
// Page<ESProductDO> searchPage = productRepository.search(searchPageDTO.getCid(), searchPageDTO.getKeyword(),
|
||||
// searchPageDTO.getPageNo(), searchPageDTO.getPageSize(), searchPageDTO.getSorts());
|
||||
// // 转换结果
|
||||
// return new ProductPageBO()
|
||||
// .setList(ProductSearchConvert.INSTANCE.convert(searchPage.getContent()))
|
||||
// .setTotal((int) searchPage.getTotalElements());
|
||||
// }
|
||||
|
||||
private void checkSortFieldInvalid(List<SortingField> sorts) {
|
||||
if (CollectionUtil.isEmpty(sorts)) {
|
||||
return;
|
||||
}
|
||||
sorts.forEach(sortingField -> Assert.isTrue(ProductSearchPageDTO.SORT_FIELDS.contains(sortingField.getField()),
|
||||
String.format("排序字段(%s) 不在允许范围内", sortingField.getField())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer rebuild() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean save(Integer id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ProductConditionBO getSearchCondition(ProductConditionDTO conditionDTO) {
|
||||
// // 创建 ES 搜索条件
|
||||
// NativeSearchQueryBuilder nativeSearchQueryBuilder = new NativeSearchQueryBuilder();
|
||||
// // 筛选
|
||||
// if (StringUtil.hasText(conditionDTO.getKeyword())) { // 如果有 keyword ,就去匹配
|
||||
// nativeSearchQueryBuilder.withQuery(QueryBuilders.multiMatchQuery(conditionDTO.getKeyword(),
|
||||
// "name", "sellPoint", "categoryName"));
|
||||
// } else {
|
||||
// nativeSearchQueryBuilder.withQuery(QueryBuilders.matchAllQuery());
|
||||
// }
|
||||
// // 聚合
|
||||
// if (conditionDTO.getFields().contains(ProductConditionDTO.FIELD_CATEGORY)) { // 商品分类
|
||||
// nativeSearchQueryBuilder.addAggregation(AggregationBuilders.terms("cids").field("cid"));
|
||||
// }
|
||||
// // 执行查询
|
||||
// ProductConditionBO condition = elasticsearchTemplate.query(nativeSearchQueryBuilder.build(), response -> {
|
||||
// ProductConditionBO result = new ProductConditionBO();
|
||||
// // categoryIds 聚合
|
||||
// Aggregation categoryIdsAggregation = response.getAggregations().get("cids");
|
||||
// if (categoryIdsAggregation != null) {
|
||||
// result.setCategories(new ArrayList<>());
|
||||
// for (LongTerms.Bucket bucket : (((LongTerms) categoryIdsAggregation).getBuckets())) {
|
||||
// result.getCategories().add(new ProductConditionBO.Category().setId(bucket.getKeyAsNumber().intValue()));
|
||||
// }
|
||||
// }
|
||||
// // 返回结果
|
||||
// return result;
|
||||
// });
|
||||
// // 聚合其它数据源
|
||||
// if (!CollectionUtil.isEmpty(condition.getCategories())) {
|
||||
// // 查询指定的 ProductCategoryBO 数组,并转换成 ProductCategoryBO Map
|
||||
// Map<Integer, ProductCategoryBO> categoryMap = productCategoryService.getListByIds(
|
||||
// condition.getCategories().stream().map(ProductConditionBO.Category::getId).collect(Collectors.toList()))
|
||||
// .stream().collect(Collectors.toMap(ProductCategoryBO::getId, category -> category));
|
||||
// // 设置分类名
|
||||
// condition.getCategories().forEach(category -> category.setName(categoryMap.get(category.getId()).getName()));
|
||||
// }
|
||||
// // 返回结果
|
||||
// return condition;
|
||||
// }
|
||||
|
||||
}
|
||||
|
@ -9,14 +9,6 @@ public interface ProductSearchService {
|
||||
|
||||
Integer rebuild();
|
||||
|
||||
/**
|
||||
* 构建商品的搜索索引
|
||||
*
|
||||
* @param id 商品编号
|
||||
* @return 构建结果
|
||||
*/
|
||||
Boolean save(Integer id);
|
||||
|
||||
ProductPageBO getSearchPage(ProductSearchPageDTO searchPageDTO);
|
||||
|
||||
ProductConditionBO getSearchCondition(ProductConditionDTO conditionDTO);
|
||||
|
@ -1,86 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品 ES BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductBO implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
// ========== 基本信息 =========
|
||||
/**
|
||||
* SPU 名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 卖点
|
||||
*/
|
||||
private String sellPoint;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 分类编号
|
||||
*/
|
||||
private Integer cid;
|
||||
/**
|
||||
* 分类名
|
||||
*/
|
||||
private String categoryName;
|
||||
/**
|
||||
* 商品主图地数组
|
||||
*/
|
||||
private List<String> picUrls;
|
||||
|
||||
// ========== 其他信息 =========
|
||||
/**
|
||||
* 是否上架商品(是否可见)。
|
||||
*
|
||||
* true 为已上架
|
||||
* false 为已下架
|
||||
*/
|
||||
private Boolean visible;
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
// ========== Sku 相关字段 =========
|
||||
/**
|
||||
* 原价格,单位:分
|
||||
*/
|
||||
private Integer originalPrice;
|
||||
/**
|
||||
* 购买价格,单位:分。
|
||||
*/
|
||||
private Integer buyPrice;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
// ========== 促销活动相关字段 =========
|
||||
// 目前只促销单体商品促销,目前仅限制折扣。
|
||||
/**
|
||||
* 促销活动编号
|
||||
*/
|
||||
private Integer promotionActivityId;
|
||||
/**
|
||||
* 促销活动标题
|
||||
*/
|
||||
private String promotionActivityTitle;
|
||||
/**
|
||||
* 促销活动类型
|
||||
*/
|
||||
private Integer promotionActivityType;
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package cn.iocoder.mall.search.biz.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductPageBO implements Serializable {
|
||||
|
||||
/**
|
||||
* 管理员数组
|
||||
*/
|
||||
private List<ProductBO> list;
|
||||
/**
|
||||
* 总量
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
}
|
@ -68,26 +68,6 @@ public class ProductSearchServiceImpl implements ProductSearchService {
|
||||
return rebuildCounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductPageBO getSearchPage(ProductSearchPageDTO searchPageDTO) {
|
||||
checkSortFieldInvalid(searchPageDTO.getSorts());
|
||||
// 执行查询
|
||||
Page<ESProductDO> searchPage = productRepository.search(searchPageDTO.getCid(), searchPageDTO.getKeyword(),
|
||||
searchPageDTO.getPageNo(), searchPageDTO.getPageSize(), searchPageDTO.getSorts());
|
||||
// 转换结果
|
||||
return new ProductPageBO()
|
||||
.setList(ProductSearchConvert.INSTANCE.convert(searchPage.getContent()))
|
||||
.setTotal((int) searchPage.getTotalElements());
|
||||
}
|
||||
|
||||
private void checkSortFieldInvalid(List<SortingField> sorts) {
|
||||
if (CollectionUtil.isEmpty(sorts)) {
|
||||
return;
|
||||
}
|
||||
sorts.forEach(sortingField -> Assert.isTrue(ProductSearchPageDTO.SORT_FIELDS.contains(sortingField.getField()),
|
||||
String.format("排序字段(%s) 不在允许范围内", sortingField.getField())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductConditionBO getSearchCondition(ProductConditionDTO conditionDTO) {
|
||||
// 创建 ES 搜索条件
|
||||
|
@ -3,9 +3,6 @@
|
||||
-- ----------------------------
|
||||
|
||||
INSERT INTO `mall_system`.`admin`(`id`, `name`, `avatar`, `department_id`, `status`, `username`, `password`, `password_salt`, `create_admin_id`, `create_ip`, `create_time`, `update_time`) VALUES (1, '管理员', '', NULL, 1, 'admin', '$2a$10$5sSIO3fq77iVvrnv4XjXwugz4D91D4gxIe7ClQzKsPySNPEZcr6za', '$2a$10$5sSIO3fq77iVvrnv4XjXwu', 0, '', '2020-04-17 19:20:14', '2020-07-04 21:33:30');
|
||||
INSERT INTO `mall_system`.`admin`(`id`, `name`, `avatar`, `department_id`, `status`, `username`, `password`, `password_salt`, `create_admin_id`, `create_ip`, `create_time`, `update_time`) VALUES (31, '测试管理员', '', 1, 1, 'admin02', '$2a$10$YhC.E1RvO573BVa10E7Os.GwpID4iHyhh8HGdu7r2Klr0sFc9Pmd.', '$2a$10$YhC.E1RvO573BVa10E7Os.', 1, '127.0.0.1', '2020-07-05 21:34:45', '2020-07-05 23:14:26');
|
||||
INSERT INTO `mall_system`.`admin`(`id`, `name`, `avatar`, `department_id`, `status`, `username`, `password`, `password_salt`, `create_admin_id`, `create_ip`, `create_time`, `update_time`) VALUES (32, '测试员工1', NULL, 0, 1, 'test', '$2a$10$9d/OEH4PpoDmZUY3mb2cn.ADra1IHNnEwAvP1c/nPqNIWsIrPEss2', '$2a$10$9d/OEH4PpoDmZUY3mb2cn.', 1, '127.0.0.1', '2020-07-13 09:58:39', '2020-07-14 07:00:53');
|
||||
INSERT INTO `mall_system`.`admin`(`id`, `name`, `avatar`, `department_id`, `status`, `username`, `password`, `password_salt`, `create_admin_id`, `create_ip`, `create_time`, `update_time`) VALUES (33, '技术测试员工', NULL, 3, 1, 'test001', '$2a$10$lFiDPNXUEeFogIEg43CUmu/YjcCTXszQaOCffNhKXyGL3BWAiQi9W', '$2a$10$lFiDPNXUEeFogIEg43CUmu', 1, '127.0.0.1', '2020-07-14 16:32:15', '2020-07-15 14:39:28');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table data for admin_department
|
||||
@ -22,11 +19,21 @@ INSERT INTO `mall_system`.`admin_department`(`id`, `name`, `sort`, `pid`, `creat
|
||||
-- ----------------------------
|
||||
|
||||
INSERT INTO `mall_system`.`permission_admin_role`(`id`, `admin_id`, `role_id`, `create_time`, `update_time`, `deleted`) VALUES (35, 1, 1, '2019-05-17 17:08:37', '2020-04-23 07:59:16', b'0');
|
||||
INSERT INTO `mall_system`.`permission_admin_role`(`id`, `admin_id`, `role_id`, `create_time`, `update_time`, `deleted`) VALUES (36, 32, 1, '2020-07-13 18:25:29', '2020-07-13 18:39:51', b'1');
|
||||
INSERT INTO `mall_system`.`permission_admin_role`(`id`, `admin_id`, `role_id`, `create_time`, `update_time`, `deleted`) VALUES (37, 32, 13, '2020-07-13 18:25:29', '2020-07-13 18:39:51', b'1');
|
||||
INSERT INTO `mall_system`.`permission_admin_role`(`id`, `admin_id`, `role_id`, `create_time`, `update_time`, `deleted`) VALUES (38, 32, 13, '2020-07-13 18:39:51', '2020-07-14 07:04:47', b'1');
|
||||
INSERT INTO `mall_system`.`permission_admin_role`(`id`, `admin_id`, `role_id`, `create_time`, `update_time`, `deleted`) VALUES (39, 32, 16, '2020-07-14 07:04:55', '2020-07-14 07:04:55', b'0');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oauth2_access_token
|
||||
-- ----------------------------
|
||||
|
||||
INSERT INTO `mall_system`.`oauth2_access_token`(`id`, `user_id`, `user_type`, `refresh_token`, `expires_time`, `create_ip`, `create_time`, `update_time`, `deleted`) VALUES ('yudaoyuanma', 1, 2, '7fc104020a2f428abece37c2d3f91839', '2021-07-05 10:39:14', '127.0.0.1', '2020-07-05 22:51:13', '2020-07-07 17:15:10', b'0');
|
||||
INSERT INTO `mall_system`.`oauth2_access_token`(`id`, `user_id`, `user_type`, `refresh_token`, `expires_time`, `create_ip`, `create_time`, `update_time`, `deleted`) VALUES ('yunai', 243, 1, 'yunai_refresh', '2055-07-03 21:24:01', '127.0.0.1', '2020-07-04 09:36:04', '2020-07-24 11:08:46', b'0');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oauth2_refresh_token
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for permission_admin_role
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table data for permission_resource
|
||||
@ -38,24 +45,24 @@ INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `typ
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (15, '权限列表', 'system:resource:tree', 1, 4, 13, 'resource-list', 'el-icon-s-operation', 'permission/resource/index', 0, '2019-03-10 03:59:56', '2020-07-14 13:25:55', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (16, '角色列表', 'system:role:page', 1, 3, 13, 'role-list', 'peoples', 'permission/role/index', 0, '2019-03-10 04:00:35', '2020-07-14 13:25:59', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (19, '数据字典', 'system:data-dict:list', 1, 5, 13, 'data-dict-list', 'el-icon-reading', 'datadict/index', 0, '2019-03-15 19:10:30', '2020-07-15 10:58:48', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (20, '商品管理', NULL, 1, 4, 0, 'product', NULL, NULL, 0, '2019-03-15 19:53:09', '2020-07-10 12:24:52', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (20, '商品管理', '', 1, 4, 0, '/product', 'el-icon-potato-strips', NULL, 0, '2019-03-15 19:53:09', '2020-07-25 18:27:15', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (21, '商品列表', NULL, 1, 1, 20, 'product-spu-list', NULL, NULL, 0, '2019-03-15 19:55:22', '2020-07-10 12:24:49', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (22, '展示类目', NULL, 1, 2, 20, 'product-category-list', NULL, NULL, 0, '2019-03-15 19:56:42', '2020-07-10 12:24:57', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (22, '展示类目', 'product:category:tree', 1, 2, 20, 'product-category-list', 'el-icon-lollipop', 'product/category/list', 0, '2019-03-15 19:56:42', '2020-07-25 18:24:16', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (23, '营销管理', NULL, 1, 7, 0, 'promotion', NULL, NULL, 0, '2019-03-30 22:42:13', '2020-07-10 12:25:00', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (24, '首页广告', NULL, 1, 1, 23, 'banner-list', NULL, NULL, 0, '2019-03-30 22:54:57', '2020-07-10 12:25:04', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (25, '商品推荐', NULL, 1, 2, 23, 'product-recommend-list', NULL, NULL, 0, '2019-04-01 13:17:28', '2020-07-10 12:25:09', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (26, '优惠劵', NULL, 1, 3, 23, 'coupon-card-template-list', NULL, NULL, 0, '2019-04-04 16:02:14', '2020-07-10 12:25:14', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (27, '订单管理', NULL, 1, 5, 0, 'order', NULL, NULL, 0, '2019-04-06 12:53:55', '2020-07-10 12:25:17', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (28, '订单管理', NULL, 1, 1, 27, 'order-list', NULL, NULL, 0, '2019-04-06 12:57:17', '2020-07-10 12:25:21', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (29, '商品品牌', NULL, 1, 3, 20, 'product-brand-list', NULL, NULL, 0, '2019-04-09 17:58:36', '2020-07-10 12:25:25', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (29, '商品品牌', 'product:brand:page', 1, 3, 20, 'product-brand-list', 'el-icon-orange', 'product/brand/list', 0, '2019-04-09 17:58:36', '2020-07-25 23:40:02', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (30, '发布商品', NULL, 1, -99, 20, 'product-spu-add', NULL, NULL, 0, '2019-05-01 21:01:38', '2020-07-10 12:25:29', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (31, '概述', NULL, 1, 0, 0, '/home', NULL, NULL, 0, '2019-05-03 00:01:33', '2020-07-12 00:06:47', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (32, '数据分析', NULL, 1, 1, 0, '/statistic', NULL, NULL, 0, '2019-05-03 00:02:08', '2020-07-12 00:07:14', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (33, '店铺资产', '', 1, 2, 0, '/pay', 'money-collect', NULL, 0, '2019-05-03 00:02:57', '2020-07-12 00:25:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (34, '会员管理', NULL, 1, 6, 0, 'member', NULL, NULL, 0, '2019-05-03 00:03:55', '2020-07-10 12:26:17', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (34, '会员管理', NULL, 1, 6, 0, '/member', NULL, NULL, 0, '2019-05-03 00:03:55', '2020-07-23 07:11:42', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (41, '限时折扣', NULL, 1, 24, 23, 'time-limit-discount-list', NULL, NULL, 0, '2019-05-07 22:34:30', '2020-07-10 12:26:12', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (42, '满减送', NULL, 1, 25, 23, 'full-privilege-list', NULL, NULL, 0, '2019-05-08 00:05:20', '2020-07-10 12:26:24', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (43, '会员资料', NULL, 1, 1, 34, 'user-list', NULL, NULL, 0, '2019-05-08 11:11:22', '2020-07-10 12:26:21', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (43, '会员资料', NULL, 1, 1, 34, 'user-list', 'el-icon-user', 'user/user/index', 0, '2019-05-08 11:11:22', '2020-07-23 07:10:12', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (44, '支付单', NULL, 1, 1, 33, 'transaction-list', NULL, NULL, 0, '2019-05-08 14:17:15', '2020-07-10 12:25:47', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (45, '退款单', NULL, 1, 2, 33, 'refund-list', NULL, NULL, 0, '2019-05-08 16:58:05', '2020-07-10 12:25:51', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (46, '订单售后', NULL, 1, 1, 27, 'order-refunds', NULL, NULL, 0, '2019-05-09 19:57:23', '2020-07-10 12:25:57', b'0');
|
||||
@ -86,171 +93,42 @@ INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `typ
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (79, '新建部门', 'system:department:create', 2, 1, 78, NULL, NULL, NULL, 1, '2020-07-14 13:44:32', '2020-07-14 13:44:32', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (80, '修改部门', 'system:department:update', 2, 2, 78, NULL, NULL, NULL, 1, '2020-07-14 13:45:15', '2020-07-14 13:45:15', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (81, '删除部门', 'system:department:delete', 2, 3, 78, NULL, NULL, NULL, 1, '2020-07-14 13:47:40', '2020-07-14 13:47:40', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (82, '日志管理', NULL, 1, 9, 0, '/system-log', NULL, NULL, 1, '2020-07-15 17:44:33', '2020-07-15 17:44:53', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (83, '访问日志', NULL, 1, 1, 82, 'system-access-log-list', NULL, 'system-log/system-access-log/index', 1, '2020-07-15 17:47:08', '2020-07-15 17:47:08', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (82, '日志管理', NULL, 1, 9, 0, '/system-log', 'el-icon-pear', NULL, 1, '2020-07-15 17:44:33', '2020-07-23 07:08:40', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (83, '访问日志', 'system:system-access-log:page', 1, 1, 82, 'system-access-log-list', 'el-icon-receiving', 'system-log/system-access-log/index', 1, '2020-07-15 17:47:08', '2020-07-16 14:31:10', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (84, '异常日志', 'system:system-exception-log:page', 1, 2, 82, 'system-exception-log-list', 'el-icon-collection', 'system-log/system-exception-log/index', 1, '2020-07-16 12:56:15', '2020-07-16 14:32:00', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (85, '处理异常', 'system:system-exception-log:process', 2, 1, 84, NULL, NULL, NULL, 1, '2020-07-16 14:32:42', '2020-07-16 14:32:42', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (86, '错误码', 'system:error-dict:page', 1, 6, 13, 'error-code-list', 'el-icon-picture-outline-round', 'errorCode/index.vue', 1, '2020-07-20 19:25:35', '2020-07-20 19:27:09', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (87, '新建错误码', 'system:error-code:create', 2, 1, 86, NULL, NULL, NULL, 1, '2020-07-20 20:27:47', '2020-07-20 20:27:47', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (88, '修改错误码', 'system:error-code:update', 2, 2, 86, NULL, NULL, NULL, 1, '2020-07-20 20:28:04', '2020-07-20 20:28:04', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (89, '删除错误码', 'system:error-code:delete', 2, 3, 86, NULL, NULL, NULL, 1, '2020-07-20 20:28:22', '2020-07-20 20:28:22', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (90, '会员地址', NULL, 1, 2, 34, 'user-address-list', NULL, NULL, 1, '2020-07-23 07:11:23', '2020-07-23 07:11:23', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (91, '新建类目', 'product:category:create', 2, 1, 22, NULL, NULL, NULL, 1, '2020-07-25 18:25:13', '2020-07-25 18:25:13', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (92, '修改类目', 'product:category:update', 2, 2, 22, NULL, NULL, NULL, 1, '2020-07-25 18:25:41', '2020-07-25 18:25:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (93, '删除类目', 'product:category:delete', 2, 3, 22, NULL, NULL, NULL, 1, '2020-07-25 18:26:02', '2020-07-25 18:26:02', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (94, '新建品牌', 'product:brand:create', 2, 1, 29, NULL, NULL, NULL, 1, '2020-07-25 23:40:47', '2020-07-25 23:40:47', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (95, '修改品牌', 'product:brand:update', 2, 2, 29, NULL, NULL, NULL, 1, '2020-07-25 23:41:01', '2020-07-25 23:41:01', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (96, '删除品牌', 'product:brand:delete', 2, 3, 29, NULL, NULL, NULL, 1, '2020-07-25 23:41:17', '2020-07-25 23:41:17', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (97, '商品规格', NULL, 1, 5, 20, 'product-attr-list', 'el-icon-dish', 'product/attr/list', 1, '2020-07-28 13:44:06', '2020-07-30 01:11:57', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (98, '规格键列表', 'product:attr-value:page', 2, 1, 97, NULL, NULL, NULL, 1, '2020-07-30 01:09:02', '2020-07-30 01:09:47', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (99, '新建规格键', 'product:attr-value:create', 2, 2, 97, NULL, NULL, NULL, 1, '2020-07-30 01:09:39', '2020-07-30 01:09:39', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (100, '修改规格键', 'product:attr-key:update', 2, 3, 97, NULL, NULL, NULL, 1, '2020-07-30 01:10:07', '2020-07-30 01:10:07', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (101, '规格值列表', 'product:attr-value:list', 2, 11, 97, NULL, NULL, NULL, 1, '2020-07-30 01:10:26', '2020-07-30 01:10:26', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (102, '新建规格值', 'product:attr-value:create', 2, 12, 97, NULL, NULL, NULL, 1, '2020-07-30 01:10:48', '2020-07-30 01:10:48', b'0');
|
||||
INSERT INTO `mall_system`.`permission_resource`(`id`, `name`, `permission`, `type`, `sort`, `pid`, `route`, `icon`, `view`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (103, '修改规格值', 'product:attr-value:update', 2, 13, 97, NULL, NULL, NULL, 1, '2020-07-30 01:11:04', '2020-07-30 01:11:04', b'0');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table data for permission_role
|
||||
-- ----------------------------
|
||||
-- ---------------------------
|
||||
|
||||
INSERT INTO `mall_system`.`permission_role`(`id`, `name`, `code`, `type`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (1, '超级管理员', 'SUPER_ADMIN', 1, 0, '2019-02-24 09:03:51', '2020-04-30 16:53:38', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role`(`id`, `name`, `code`, `type`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (13, '测试角色001', 'TEST', 2, 1, '2020-04-27 20:56:14', '2020-07-08 10:41:10', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role`(`id`, `name`, `code`, `type`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (14, 'test', NULL, 2, 1, '2020-07-08 09:51:38', '2020-07-08 09:54:05', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role`(`id`, `name`, `code`, `type`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (15, '测试角色哈', '123', 2, 1, '2020-07-12 21:20:17', '2020-07-12 21:37:01', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role`(`id`, `name`, `code`, `type`, `create_admin_id`, `create_time`, `update_time`, `deleted`) VALUES (16, '测试角色', NULL, 2, 32, '2020-07-14 07:04:20', '2020-07-14 07:04:20', b'0');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table data for permission_role_resource
|
||||
-- ----------------------------
|
||||
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (666, 1, 13, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (667, 1, 14, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (668, 1, 15, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (669, 1, 16, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (670, 1, 20, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (671, 1, 21, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (672, 1, 22, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (673, 1, 23, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (674, 1, 24, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (675, 1, 25, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (676, 1, 26, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (677, 1, 27, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (678, 1, 28, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (679, 1, 29, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (680, 1, 30, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (681, 1, 31, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (682, 1, 32, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (683, 1, 33, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (684, 1, 34, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (685, 1, 41, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (686, 1, 42, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (687, 1, 43, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (688, 1, 44, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (689, 1, 45, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (690, 1, 46, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (691, 1, 47, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (692, 1, 51, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (693, 1, 52, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (694, 1, 53, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (695, 1, 19, '2019-06-11 15:02:42', '2019-06-11 15:02:41', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (696, 1, 58, '2019-06-11 15:02:42', '2020-04-27 15:56:30', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (743, 13, 52, '2020-04-28 20:55:18', '2020-07-13 09:20:04', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (744, 13, 52, '2020-07-12 20:23:00', '2020-07-13 09:23:02', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (745, 13, 53, '2020-07-12 20:23:00', '2020-07-13 09:23:02', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (746, 13, 52, '2020-07-12 20:23:02', '2020-07-13 09:23:03', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (747, 13, 53, '2020-07-12 20:23:02', '2020-07-13 09:23:03', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (748, 13, 52, '2020-07-12 20:23:03', '2020-07-13 09:23:03', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (749, 13, 53, '2020-07-12 20:23:03', '2020-07-13 09:23:03', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (750, 13, 52, '2020-07-12 20:23:04', '2020-07-13 09:23:04', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (751, 13, 53, '2020-07-12 20:23:04', '2020-07-13 09:23:04', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (752, 13, 52, '2020-07-12 20:23:05', '2020-07-13 09:23:05', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (753, 13, 53, '2020-07-12 20:23:05', '2020-07-13 09:23:05', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (754, 13, 52, '2020-07-12 20:23:06', '2020-07-13 09:23:06', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (755, 13, 53, '2020-07-12 20:23:06', '2020-07-13 09:23:06', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (756, 13, 52, '2020-07-12 20:23:06', '2020-07-13 09:23:11', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (757, 13, 53, '2020-07-12 20:23:06', '2020-07-13 09:23:11', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (758, 13, 52, '2020-07-12 20:23:12', '2020-07-13 09:23:12', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (759, 13, 53, '2020-07-12 20:23:12', '2020-07-13 09:23:12', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (760, 13, 52, '2020-07-12 20:23:12', '2020-07-13 09:23:12', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (761, 13, 53, '2020-07-12 20:23:12', '2020-07-13 09:23:12', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (762, 13, 52, '2020-07-12 20:23:13', '2020-07-13 09:23:13', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (763, 13, 53, '2020-07-12 20:23:13', '2020-07-13 09:23:13', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (764, 13, 52, '2020-07-12 20:23:14', '2020-07-13 09:23:14', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (765, 13, 53, '2020-07-12 20:23:14', '2020-07-13 09:23:14', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (766, 13, 52, '2020-07-12 20:23:14', '2020-07-13 09:23:14', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (767, 13, 53, '2020-07-12 20:23:14', '2020-07-13 09:23:14', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (768, 13, 52, '2020-07-12 20:23:14', '2020-07-13 09:25:22', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (769, 13, 53, '2020-07-12 20:23:14', '2020-07-13 09:25:22', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (770, 13, 52, '2020-07-12 20:25:23', '2020-07-13 09:25:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (771, 13, 53, '2020-07-12 20:25:23', '2020-07-13 09:25:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (772, 13, 51, '2020-07-12 20:25:32', '2020-07-13 09:25:32', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (773, 13, 52, '2020-07-12 20:25:32', '2020-07-13 09:25:32', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (774, 13, 53, '2020-07-12 20:25:32', '2020-07-13 09:25:32', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (775, 13, 70, '2020-07-12 20:25:32', '2020-07-13 09:25:32', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (776, 16, 47, '2020-07-14 07:14:21', '2020-07-14 07:56:55', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (777, 16, 75, '2020-07-14 07:56:55', '2020-07-14 08:02:12', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (778, 16, 76, '2020-07-14 07:56:55', '2020-07-14 08:02:12', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (779, 16, 14, '2020-07-14 07:56:55', '2020-07-14 08:02:12', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (780, 16, 62, '2020-07-14 07:56:55', '2020-07-14 08:02:12', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (781, 16, 47, '2020-07-14 07:56:55', '2020-07-14 08:02:12', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (782, 16, 48, '2020-07-14 08:02:12', '2020-07-14 08:05:39', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (783, 16, 49, '2020-07-14 08:02:12', '2020-07-14 08:05:39', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (784, 16, 50, '2020-07-14 08:02:12', '2020-07-14 08:05:39', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (785, 16, 19, '2020-07-14 08:02:12', '2020-07-14 08:05:39', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (786, 16, 55, '2020-07-14 08:02:12', '2020-07-14 08:05:39', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (787, 16, 59, '2020-07-14 08:02:12', '2020-07-14 08:05:39', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (788, 16, 47, '2020-07-14 08:02:12', '2020-07-14 08:05:39', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (789, 16, 13, '2020-07-14 08:05:40', '2020-07-14 08:33:33', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (790, 16, 15, '2020-07-14 08:05:40', '2020-07-14 08:33:33', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (791, 16, 13, '2020-07-14 08:34:03', '2020-07-14 08:34:21', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (792, 16, 13, '2020-07-14 08:34:21', '2020-07-14 08:34:39', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (793, 16, 15, '2020-07-14 08:34:21', '2020-07-14 08:34:39', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (794, 16, 13, '2020-07-14 08:34:39', '2020-07-14 08:34:50', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (795, 16, 13, '2020-07-14 08:34:50', '2020-07-14 08:36:09', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (796, 16, 15, '2020-07-14 08:34:50', '2020-07-14 08:36:09', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (797, 16, 13, '2020-07-14 08:36:09', '2020-07-14 08:47:07', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (798, 16, 15, '2020-07-14 08:36:09', '2020-07-14 08:47:07', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (799, 16, 56, '2020-07-14 08:47:07', '2020-07-14 08:47:29', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (800, 16, 57, '2020-07-14 08:47:07', '2020-07-14 08:47:29', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (801, 16, 13, '2020-07-14 08:47:07', '2020-07-14 08:47:29', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (802, 16, 15, '2020-07-14 08:47:07', '2020-07-14 08:47:29', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (803, 16, 56, '2020-07-14 08:47:29', '2020-07-14 09:10:23', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (804, 16, 13, '2020-07-14 08:47:29', '2020-07-14 09:10:23', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (805, 16, 15, '2020-07-14 08:47:29', '2020-07-14 09:10:23', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (806, 16, 75, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (807, 16, 76, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (808, 16, 77, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (809, 16, 13, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (810, 16, 47, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (811, 16, 16, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (812, 16, 48, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (813, 16, 49, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (814, 16, 50, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (815, 16, 55, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (816, 16, 56, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (817, 16, 57, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (818, 16, 59, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (819, 16, 60, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (820, 16, 62, '2020-07-14 09:10:23', '2020-07-14 09:16:32', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (821, 16, 48, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (822, 16, 49, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (823, 16, 50, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (824, 16, 55, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (825, 16, 56, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (826, 16, 57, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (827, 16, 75, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (828, 16, 76, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (829, 16, 60, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (830, 16, 77, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (831, 16, 62, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (832, 16, 47, '2020-07-14 09:16:32', '2020-07-14 09:16:46', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (833, 16, 60, '2020-07-14 09:16:46', '2020-07-14 09:18:01', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (834, 16, 77, '2020-07-14 09:16:46', '2020-07-14 09:18:01', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (835, 16, 59, '2020-07-14 09:18:01', '2020-07-14 09:18:29', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (836, 16, 60, '2020-07-14 09:18:01', '2020-07-14 09:18:29', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (837, 16, 77, '2020-07-14 09:18:01', '2020-07-14 09:18:29', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (838, 16, 75, '2020-07-14 09:18:29', '2020-07-14 09:19:50', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (839, 16, 59, '2020-07-14 09:18:29', '2020-07-14 09:19:50', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (840, 16, 76, '2020-07-14 09:18:29', '2020-07-14 09:19:50', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (841, 16, 60, '2020-07-14 09:18:29', '2020-07-14 09:19:50', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (842, 16, 77, '2020-07-14 09:18:29', '2020-07-14 09:19:50', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (843, 16, 62, '2020-07-14 09:18:29', '2020-07-14 09:19:50', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (844, 16, 47, '2020-07-14 09:18:29', '2020-07-14 09:19:50', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (845, 16, 59, '2020-07-14 09:19:50', '2020-07-14 09:19:58', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (846, 16, 60, '2020-07-14 09:19:50', '2020-07-14 09:19:58', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (847, 16, 77, '2020-07-14 09:19:50', '2020-07-14 09:19:58', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (848, 16, 59, '2020-07-14 09:19:58', '2020-07-14 09:20:02', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (849, 16, 60, '2020-07-14 09:19:58', '2020-07-14 09:20:02', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (850, 16, 77, '2020-07-14 09:19:58', '2020-07-14 09:20:02', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (851, 16, 59, '2020-07-14 09:20:02', '2020-07-14 09:21:21', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (852, 16, 60, '2020-07-14 09:20:02', '2020-07-14 09:21:21', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (853, 16, 77, '2020-07-14 09:20:02', '2020-07-14 09:21:21', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (854, 16, 47, '2020-07-14 09:20:02', '2020-07-14 09:21:21', b'1');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (855, 16, 75, '2020-07-14 09:21:21', '2020-07-14 09:21:21', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (856, 16, 59, '2020-07-14 09:21:21', '2020-07-14 09:21:21', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (857, 16, 60, '2020-07-14 09:21:21', '2020-07-14 09:21:21', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (858, 16, 77, '2020-07-14 09:21:21', '2020-07-14 09:21:21', b'0');
|
||||
INSERT INTO `mall_system`.`permission_role_resource`(`id`, `role_id`, `resource_id`, `create_time`, `update_time`, `deleted`) VALUES (859, 16, 47, '2020-07-14 09:21:21', '2020-07-14 09:21:21', b'0');
|
||||
-- ----------------------------
|
||||
-- Table structure for system_access_log
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table data for system_data_dict
|
||||
@ -324,3 +202,16 @@ INSERT INTO `mall_system`.`system_data_dict`(`id`, `enum_value`, `value`, `displ
|
||||
INSERT INTO `mall_system`.`system_data_dict`(`id`, `enum_value`, `value`, `display_name`, `sort`, `memo`, `create_time`, `update_time`, `deleted`) VALUES (66, 'resource_type', '2', '按钮', 2, '资源类型 - 按钮', '2020-07-15 14:43:38', '2020-07-15 14:43:38', b'0');
|
||||
INSERT INTO `mall_system`.`system_data_dict`(`id`, `enum_value`, `value`, `display_name`, `sort`, `memo`, `create_time`, `update_time`, `deleted`) VALUES (67, 'role_type', '1', '内置角色', 1, '角色类型 - 内置角色', '2020-07-15 15:04:04', '2020-07-15 15:04:04', b'0');
|
||||
INSERT INTO `mall_system`.`system_data_dict`(`id`, `enum_value`, `value`, `display_name`, `sort`, `memo`, `create_time`, `update_time`, `deleted`) VALUES (68, 'role_type', '2', '自定义角色', 2, '角色类型 - 自定义角色', '2020-07-15 15:04:20', '2020-07-15 15:04:20', b'0');
|
||||
INSERT INTO `mall_system`.`system_data_dict`(`id`, `enum_value`, `value`, `display_name`, `sort`, `memo`, `create_time`, `update_time`, `deleted`) VALUES (69, 'system_exception_log_process_status', '0', '未处理', 1, '系统异常日志的处理状态 - 未处理', '2020-07-16 13:34:56', '2020-07-16 13:40:03', b'0');
|
||||
INSERT INTO `mall_system`.`system_data_dict`(`id`, `enum_value`, `value`, `display_name`, `sort`, `memo`, `create_time`, `update_time`, `deleted`) VALUES (70, 'system_exception_log_process_status', '1', '已处理', 2, '系统异常日志的处理状态 - 已处理', '2020-07-16 13:35:19', '2020-07-16 13:40:08', b'0');
|
||||
INSERT INTO `mall_system`.`system_data_dict`(`id`, `enum_value`, `value`, `display_name`, `sort`, `memo`, `create_time`, `update_time`, `deleted`) VALUES (71, 'system_exception_log_process_status', '2', '已忽略', 3, '系统异常日志的处理状态 - 已忽略', '2020-07-16 13:35:31', '2020-07-16 13:40:11', b'0');
|
||||
INSERT INTO `mall_system`.`system_data_dict`(`id`, `enum_value`, `value`, `display_name`, `sort`, `memo`, `create_time`, `update_time`, `deleted`) VALUES (72, 'error_code_type', '1', '自动生成', 1, '错误码的类型枚举 - 自动生成', '2020-07-20 19:49:23', '2020-07-20 19:50:45', b'0');
|
||||
INSERT INTO `mall_system`.`system_data_dict`(`id`, `enum_value`, `value`, `display_name`, `sort`, `memo`, `create_time`, `update_time`, `deleted`) VALUES (73, 'error_code_type', '2', '手动编辑', 2, '错误码的类型枚举 - 手动编辑', '2020-07-20 19:50:00', '2020-07-20 19:50:51', b'0');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_error_code
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_exception_log
|
||||
-- ----------------------------
|
@ -195,6 +195,22 @@ CREATE TABLE `system_data_dict` (
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8mb4 COMMENT='数据字典';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_error_code
|
||||
-- ----------------------------
|
||||
CREATE TABLE `system_error_code` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '错误码编号',
|
||||
`code` int(11) NOT NULL DEFAULT '0' COMMENT '错误码编码',
|
||||
`message` varchar(255) NOT NULL DEFAULT '' COMMENT '错误码错误提示',
|
||||
`type` tinyint(4) NOT NULL COMMENT '错误码类型',
|
||||
`group` varchar(64) NOT NULL COMMENT '错误码分组',
|
||||
`memo` varchar(255) DEFAULT NULL COMMENT '错误码备注',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=350 DEFAULT CHARSET=utf8mb4 COMMENT='错误码';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_exception_log
|
||||
-- ----------------------------
|
@ -5,7 +5,7 @@ import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.userweb.controller.passport.vo.PassportLoginBySmsReqVO;
|
||||
import cn.iocoder.mall.userweb.controller.passport.vo.UserPassportSendSmsRespVO;
|
||||
import cn.iocoder.mall.userweb.controller.passport.vo.PassportAccessTokenRespVO;
|
||||
import cn.iocoder.mall.userweb.manager.passport.UserPassportManager;
|
||||
import cn.iocoder.mall.userweb.manager.passport.PassportManager;
|
||||
import cn.iocoder.security.annotations.RequiresNone;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -24,7 +24,7 @@ import static cn.iocoder.common.framework.vo.CommonResult.success;
|
||||
public class UserPassportController {
|
||||
|
||||
@Autowired
|
||||
private UserPassportManager userPassportManager;
|
||||
private PassportManager userPassportManager;
|
||||
|
||||
@PostMapping("/login-by-sms")
|
||||
@ApiOperation("手机验证码登陆")
|
||||
|
@ -9,21 +9,21 @@ import cn.iocoder.mall.userservice.enums.sms.UserSmsSceneEnum;
|
||||
import cn.iocoder.mall.userservice.rpc.sms.UserSmsCodeRpc;
|
||||
import cn.iocoder.mall.userservice.rpc.user.UserRpc;
|
||||
import cn.iocoder.mall.userservice.rpc.user.dto.UserRespDTO;
|
||||
import cn.iocoder.mall.userweb.controller.passport.vo.PassportAccessTokenRespVO;
|
||||
import cn.iocoder.mall.userweb.controller.passport.vo.PassportLoginBySmsReqVO;
|
||||
import cn.iocoder.mall.userweb.controller.passport.vo.UserPassportSendSmsRespVO;
|
||||
import cn.iocoder.mall.userweb.controller.passport.vo.PassportAccessTokenRespVO;
|
||||
import cn.iocoder.mall.userweb.convert.passport.PassportConvert;
|
||||
import org.apache.dubbo.config.annotation.Reference;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserPassportManager {
|
||||
public class PassportManager {
|
||||
|
||||
@Reference(version = "${dubbo.consumer.UserSmsCodeRpc.version}", validation = "false")
|
||||
@DubboReference(version = "${dubbo.consumer.UserSmsCodeRpc.version}", validation = "false")
|
||||
private UserSmsCodeRpc userSmsCodeRpc;
|
||||
@Reference(version = "${dubbo.consumer.UserRpc.version}", validation = "false")
|
||||
@DubboReference(version = "${dubbo.consumer.UserRpc.version}", validation = "false")
|
||||
private UserRpc userRpc;
|
||||
@Reference(version = "${dubbo.consumer.OAuth2Rpc.version}", validation = "false")
|
||||
@DubboReference(version = "${dubbo.consumer.OAuth2Rpc.version}", validation = "false")
|
||||
private OAuth2Rpc oauth2Rpc;
|
||||
|
||||
public PassportAccessTokenRespVO loginBySms(PassportLoginBySmsReqVO loginBySmsDTO, String ip) {
|
Loading…
Reference in New Issue
Block a user