- 清理被错误提交的 target
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
swagger:
|
||||
enable: true
|
||||
title: 商品子系统
|
||||
description: 商品子系统
|
||||
version: 1.0.0
|
||||
base-package: cn.iocoder.mall.product.application.controller
|
||||
@@ -1,34 +0,0 @@
|
||||
spring:
|
||||
application:
|
||||
name: product-application
|
||||
cloud:
|
||||
sentinel:
|
||||
transport:
|
||||
port: 8719
|
||||
dashboard: localhost:12088
|
||||
metric:
|
||||
charset: UTF-8
|
||||
eager: false
|
||||
|
||||
# server
|
||||
server:
|
||||
port: 18081
|
||||
servlet:
|
||||
context-path: /product-api/
|
||||
|
||||
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,env,metrics,prometheus
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
swagger:
|
||||
enable: true
|
||||
title: 商品子系统
|
||||
description: 商品子系统
|
||||
version: 1.0.0
|
||||
base-package: cn.iocoder.mall.product.application.controller
|
||||
@@ -1,185 +0,0 @@
|
||||
package cn.iocoder.mall.product.application.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrDetailBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrPageBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrSimpleBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrValueBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrValueDetailBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrValueSimpleBO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrDetailVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrPageVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrSimpleVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrValueDetailVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrValueSimpleVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrValueVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:47:10+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductAttrConvertImpl implements ProductAttrConvert {
|
||||
|
||||
@Override
|
||||
public AdminsProductAttrPageVO convert2(ProductAttrPageBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductAttrPageVO adminsProductAttrPageVO = new AdminsProductAttrPageVO();
|
||||
|
||||
adminsProductAttrPageVO.setAttrs( productAttrDetailBOListToAdminsProductAttrDetailVOList( result.getAttrs() ) );
|
||||
adminsProductAttrPageVO.setCount( result.getCount() );
|
||||
|
||||
return adminsProductAttrPageVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdminsProductAttrSimpleVO> convert(List<ProductAttrSimpleBO> result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsProductAttrSimpleVO> list = new ArrayList<AdminsProductAttrSimpleVO>( result.size() );
|
||||
for ( ProductAttrSimpleBO productAttrSimpleBO : result ) {
|
||||
list.add( productAttrSimpleBOToAdminsProductAttrSimpleVO( productAttrSimpleBO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminsProductAttrVO convert3(ProductAttrBO productAttrBO) {
|
||||
if ( productAttrBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductAttrVO adminsProductAttrVO = new AdminsProductAttrVO();
|
||||
|
||||
adminsProductAttrVO.setId( productAttrBO.getId() );
|
||||
adminsProductAttrVO.setName( productAttrBO.getName() );
|
||||
adminsProductAttrVO.setStatus( productAttrBO.getStatus() );
|
||||
adminsProductAttrVO.setCreateTime( productAttrBO.getCreateTime() );
|
||||
|
||||
return adminsProductAttrVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminsProductAttrValueVO convert4(ProductAttrValueBO productAttrValueBO) {
|
||||
if ( productAttrValueBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductAttrValueVO adminsProductAttrValueVO = new AdminsProductAttrValueVO();
|
||||
|
||||
adminsProductAttrValueVO.setId( productAttrValueBO.getId() );
|
||||
adminsProductAttrValueVO.setAttrId( productAttrValueBO.getAttrId() );
|
||||
adminsProductAttrValueVO.setName( productAttrValueBO.getName() );
|
||||
adminsProductAttrValueVO.setStatus( productAttrValueBO.getStatus() );
|
||||
adminsProductAttrValueVO.setCreateTime( productAttrValueBO.getCreateTime() );
|
||||
|
||||
return adminsProductAttrValueVO;
|
||||
}
|
||||
|
||||
protected AdminsProductAttrValueDetailVO productAttrValueDetailBOToAdminsProductAttrValueDetailVO(ProductAttrValueDetailBO productAttrValueDetailBO) {
|
||||
if ( productAttrValueDetailBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductAttrValueDetailVO adminsProductAttrValueDetailVO = new AdminsProductAttrValueDetailVO();
|
||||
|
||||
adminsProductAttrValueDetailVO.setId( productAttrValueDetailBO.getId() );
|
||||
adminsProductAttrValueDetailVO.setName( productAttrValueDetailBO.getName() );
|
||||
adminsProductAttrValueDetailVO.setStatus( productAttrValueDetailBO.getStatus() );
|
||||
adminsProductAttrValueDetailVO.setCreateTime( productAttrValueDetailBO.getCreateTime() );
|
||||
|
||||
return adminsProductAttrValueDetailVO;
|
||||
}
|
||||
|
||||
protected List<AdminsProductAttrValueDetailVO> productAttrValueDetailBOListToAdminsProductAttrValueDetailVOList(List<ProductAttrValueDetailBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsProductAttrValueDetailVO> list1 = new ArrayList<AdminsProductAttrValueDetailVO>( list.size() );
|
||||
for ( ProductAttrValueDetailBO productAttrValueDetailBO : list ) {
|
||||
list1.add( productAttrValueDetailBOToAdminsProductAttrValueDetailVO( productAttrValueDetailBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected AdminsProductAttrDetailVO productAttrDetailBOToAdminsProductAttrDetailVO(ProductAttrDetailBO productAttrDetailBO) {
|
||||
if ( productAttrDetailBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductAttrDetailVO adminsProductAttrDetailVO = new AdminsProductAttrDetailVO();
|
||||
|
||||
adminsProductAttrDetailVO.setId( productAttrDetailBO.getId() );
|
||||
adminsProductAttrDetailVO.setName( productAttrDetailBO.getName() );
|
||||
adminsProductAttrDetailVO.setStatus( productAttrDetailBO.getStatus() );
|
||||
adminsProductAttrDetailVO.setCreateTime( productAttrDetailBO.getCreateTime() );
|
||||
adminsProductAttrDetailVO.setValues( productAttrValueDetailBOListToAdminsProductAttrValueDetailVOList( productAttrDetailBO.getValues() ) );
|
||||
|
||||
return adminsProductAttrDetailVO;
|
||||
}
|
||||
|
||||
protected List<AdminsProductAttrDetailVO> productAttrDetailBOListToAdminsProductAttrDetailVOList(List<ProductAttrDetailBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsProductAttrDetailVO> list1 = new ArrayList<AdminsProductAttrDetailVO>( list.size() );
|
||||
for ( ProductAttrDetailBO productAttrDetailBO : list ) {
|
||||
list1.add( productAttrDetailBOToAdminsProductAttrDetailVO( productAttrDetailBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected AdminsProductAttrValueSimpleVO productAttrValueSimpleBOToAdminsProductAttrValueSimpleVO(ProductAttrValueSimpleBO productAttrValueSimpleBO) {
|
||||
if ( productAttrValueSimpleBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductAttrValueSimpleVO adminsProductAttrValueSimpleVO = new AdminsProductAttrValueSimpleVO();
|
||||
|
||||
adminsProductAttrValueSimpleVO.setId( productAttrValueSimpleBO.getId() );
|
||||
adminsProductAttrValueSimpleVO.setName( productAttrValueSimpleBO.getName() );
|
||||
|
||||
return adminsProductAttrValueSimpleVO;
|
||||
}
|
||||
|
||||
protected List<AdminsProductAttrValueSimpleVO> productAttrValueSimpleBOListToAdminsProductAttrValueSimpleVOList(List<ProductAttrValueSimpleBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsProductAttrValueSimpleVO> list1 = new ArrayList<AdminsProductAttrValueSimpleVO>( list.size() );
|
||||
for ( ProductAttrValueSimpleBO productAttrValueSimpleBO : list ) {
|
||||
list1.add( productAttrValueSimpleBOToAdminsProductAttrValueSimpleVO( productAttrValueSimpleBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected AdminsProductAttrSimpleVO productAttrSimpleBOToAdminsProductAttrSimpleVO(ProductAttrSimpleBO productAttrSimpleBO) {
|
||||
if ( productAttrSimpleBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductAttrSimpleVO adminsProductAttrSimpleVO = new AdminsProductAttrSimpleVO();
|
||||
|
||||
adminsProductAttrSimpleVO.setId( productAttrSimpleBO.getId() );
|
||||
adminsProductAttrSimpleVO.setName( productAttrSimpleBO.getName() );
|
||||
adminsProductAttrSimpleVO.setValues( productAttrValueSimpleBOListToAdminsProductAttrValueSimpleVOList( productAttrSimpleBO.getValues() ) );
|
||||
|
||||
return adminsProductAttrSimpleVO;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package cn.iocoder.mall.product.application.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductBrandBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductBrangPageBO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductBrandVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductBrangPageVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:12:33+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductBrandConvertImpl implements ProductBrandConvert {
|
||||
|
||||
@Override
|
||||
public AdminsProductBrandVO convert(ProductBrandBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductBrandVO adminsProductBrandVO = new AdminsProductBrandVO();
|
||||
|
||||
adminsProductBrandVO.setId( result.getId() );
|
||||
adminsProductBrandVO.setName( result.getName() );
|
||||
adminsProductBrandVO.setDescription( result.getDescription() );
|
||||
adminsProductBrandVO.setPicUrl( result.getPicUrl() );
|
||||
adminsProductBrandVO.setStatus( result.getStatus() );
|
||||
|
||||
return adminsProductBrandVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminsProductBrangPageVO convert(ProductBrangPageBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductBrangPageVO adminsProductBrangPageVO = new AdminsProductBrangPageVO();
|
||||
|
||||
adminsProductBrangPageVO.setBrands( productBrandBOListToAdminsProductBrandVOList( result.getBrands() ) );
|
||||
adminsProductBrangPageVO.setCount( result.getCount() );
|
||||
|
||||
return adminsProductBrangPageVO;
|
||||
}
|
||||
|
||||
protected List<AdminsProductBrandVO> productBrandBOListToAdminsProductBrandVOList(List<ProductBrandBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsProductBrandVO> list1 = new ArrayList<AdminsProductBrandVO>( list.size() );
|
||||
for ( ProductBrandBO productBrandBO : list ) {
|
||||
list1.add( convert( productBrandBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package cn.iocoder.mall.product.application.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductCategoryBO;
|
||||
import cn.iocoder.mall.product.application.convert.ProductCategoryConvert.Admins;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductCategoryTreeNodeVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductCategoryVO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:47:09+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductCategoryConvert$AdminsImpl implements Admins {
|
||||
|
||||
@Override
|
||||
public AdminsProductCategoryTreeNodeVO convert(ProductCategoryBO category) {
|
||||
if ( category == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductCategoryTreeNodeVO adminsProductCategoryTreeNodeVO = new AdminsProductCategoryTreeNodeVO();
|
||||
|
||||
adminsProductCategoryTreeNodeVO.setId( category.getId() );
|
||||
adminsProductCategoryTreeNodeVO.setPid( category.getPid() );
|
||||
adminsProductCategoryTreeNodeVO.setName( category.getName() );
|
||||
adminsProductCategoryTreeNodeVO.setDescription( category.getDescription() );
|
||||
adminsProductCategoryTreeNodeVO.setPicUrl( category.getPicUrl() );
|
||||
adminsProductCategoryTreeNodeVO.setSort( category.getSort() );
|
||||
adminsProductCategoryTreeNodeVO.setStatus( category.getStatus() );
|
||||
adminsProductCategoryTreeNodeVO.setCreateTime( category.getCreateTime() );
|
||||
|
||||
return adminsProductCategoryTreeNodeVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminsProductCategoryVO convert2(ProductCategoryBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductCategoryVO adminsProductCategoryVO = new AdminsProductCategoryVO();
|
||||
|
||||
adminsProductCategoryVO.setId( result.getId() );
|
||||
adminsProductCategoryVO.setPid( result.getPid() );
|
||||
adminsProductCategoryVO.setName( result.getName() );
|
||||
adminsProductCategoryVO.setDescription( result.getDescription() );
|
||||
adminsProductCategoryVO.setPicUrl( result.getPicUrl() );
|
||||
adminsProductCategoryVO.setSort( result.getSort() );
|
||||
adminsProductCategoryVO.setStatus( result.getStatus() );
|
||||
adminsProductCategoryVO.setCreateTime( result.getCreateTime() );
|
||||
|
||||
return adminsProductCategoryVO;
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package cn.iocoder.mall.product.application.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductCategoryBO;
|
||||
import cn.iocoder.mall.product.application.convert.ProductCategoryConvert.Users;
|
||||
import cn.iocoder.mall.product.application.vo.users.UsersProductCategoryVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:47:10+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductCategoryConvert$UsersImpl implements Users {
|
||||
|
||||
@Override
|
||||
public UsersProductCategoryVO convertToVO(ProductCategoryBO category) {
|
||||
if ( category == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersProductCategoryVO usersProductCategoryVO = new UsersProductCategoryVO();
|
||||
|
||||
usersProductCategoryVO.setId( category.getId() );
|
||||
usersProductCategoryVO.setName( category.getName() );
|
||||
usersProductCategoryVO.setPicUrl( category.getPicUrl() );
|
||||
|
||||
return usersProductCategoryVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UsersProductCategoryVO> convertToVO(List<ProductCategoryBO> categoryList) {
|
||||
if ( categoryList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<UsersProductCategoryVO> list = new ArrayList<UsersProductCategoryVO>( categoryList.size() );
|
||||
for ( ProductCategoryBO productCategoryBO : categoryList ) {
|
||||
list.add( convertToVO( productCategoryBO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
package cn.iocoder.mall.product.application.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrAndValuePairBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuDetailBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuDetailBO.Sku;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuPageBO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrAndValuePairVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductSkuDetailVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductSpuDetailVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductSpuPageVO;
|
||||
import cn.iocoder.mall.product.application.vo.admins.AdminsProductSpuVO;
|
||||
import cn.iocoder.mall.product.application.vo.users.UsersProductAttrAndValuePairVO;
|
||||
import cn.iocoder.mall.product.application.vo.users.UsersProductSkuDetailVO;
|
||||
import cn.iocoder.mall.product.application.vo.users.UsersProductSpuDetailVO;
|
||||
import cn.iocoder.mall.product.application.vo.users.UsersProductSpuPageVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:47:09+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductSpuConvertImpl implements ProductSpuConvert {
|
||||
|
||||
@Override
|
||||
public AdminsProductSpuDetailVO convert(ProductSpuDetailBO productSpuDetailBO) {
|
||||
if ( productSpuDetailBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductSpuDetailVO adminsProductSpuDetailVO = new AdminsProductSpuDetailVO();
|
||||
|
||||
adminsProductSpuDetailVO.setId( productSpuDetailBO.getId() );
|
||||
adminsProductSpuDetailVO.setName( productSpuDetailBO.getName() );
|
||||
adminsProductSpuDetailVO.setSellPoint( productSpuDetailBO.getSellPoint() );
|
||||
adminsProductSpuDetailVO.setDescription( productSpuDetailBO.getDescription() );
|
||||
adminsProductSpuDetailVO.setCid( productSpuDetailBO.getCid() );
|
||||
List<String> list = productSpuDetailBO.getPicUrls();
|
||||
if ( list != null ) {
|
||||
adminsProductSpuDetailVO.setPicUrls( new ArrayList<String>( list ) );
|
||||
}
|
||||
adminsProductSpuDetailVO.setVisible( productSpuDetailBO.getVisible() );
|
||||
adminsProductSpuDetailVO.setSort( productSpuDetailBO.getSort() );
|
||||
adminsProductSpuDetailVO.setSkus( skuListToAdminsProductSkuDetailVOList( productSpuDetailBO.getSkus() ) );
|
||||
|
||||
return adminsProductSpuDetailVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminsProductSpuPageVO convert2(ProductSpuPageBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductSpuPageVO adminsProductSpuPageVO = new AdminsProductSpuPageVO();
|
||||
|
||||
adminsProductSpuPageVO.setList( convert3( result.getList() ) );
|
||||
adminsProductSpuPageVO.setTotal( result.getTotal() );
|
||||
|
||||
return adminsProductSpuPageVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdminsProductSpuVO> convert3(List<ProductSpuBO> result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsProductSpuVO> list = new ArrayList<AdminsProductSpuVO>( result.size() );
|
||||
for ( ProductSpuBO productSpuBO : result ) {
|
||||
list.add( productSpuBOToAdminsProductSpuVO( productSpuBO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsersProductSpuPageVO convert3(ProductSpuPageBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersProductSpuPageVO usersProductSpuPageVO = new UsersProductSpuPageVO();
|
||||
|
||||
return usersProductSpuPageVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsersProductSpuDetailVO convert4(ProductSpuDetailBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersProductSpuDetailVO usersProductSpuDetailVO = new UsersProductSpuDetailVO();
|
||||
|
||||
usersProductSpuDetailVO.setId( result.getId() );
|
||||
usersProductSpuDetailVO.setName( result.getName() );
|
||||
usersProductSpuDetailVO.setSellPoint( result.getSellPoint() );
|
||||
usersProductSpuDetailVO.setDescription( result.getDescription() );
|
||||
usersProductSpuDetailVO.setCid( result.getCid() );
|
||||
List<String> list = result.getPicUrls();
|
||||
if ( list != null ) {
|
||||
usersProductSpuDetailVO.setPicUrls( new ArrayList<String>( list ) );
|
||||
}
|
||||
usersProductSpuDetailVO.setSkus( skuListToUsersProductSkuDetailVOList( result.getSkus() ) );
|
||||
|
||||
return usersProductSpuDetailVO;
|
||||
}
|
||||
|
||||
protected AdminsProductAttrAndValuePairVO productAttrAndValuePairBOToAdminsProductAttrAndValuePairVO(ProductAttrAndValuePairBO productAttrAndValuePairBO) {
|
||||
if ( productAttrAndValuePairBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductAttrAndValuePairVO adminsProductAttrAndValuePairVO = new AdminsProductAttrAndValuePairVO();
|
||||
|
||||
adminsProductAttrAndValuePairVO.setAttrId( productAttrAndValuePairBO.getAttrId() );
|
||||
adminsProductAttrAndValuePairVO.setAttrName( productAttrAndValuePairBO.getAttrName() );
|
||||
adminsProductAttrAndValuePairVO.setAttrValueId( productAttrAndValuePairBO.getAttrValueId() );
|
||||
adminsProductAttrAndValuePairVO.setAttrValueName( productAttrAndValuePairBO.getAttrValueName() );
|
||||
|
||||
return adminsProductAttrAndValuePairVO;
|
||||
}
|
||||
|
||||
protected List<AdminsProductAttrAndValuePairVO> productAttrAndValuePairBOListToAdminsProductAttrAndValuePairVOList(List<ProductAttrAndValuePairBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsProductAttrAndValuePairVO> list1 = new ArrayList<AdminsProductAttrAndValuePairVO>( list.size() );
|
||||
for ( ProductAttrAndValuePairBO productAttrAndValuePairBO : list ) {
|
||||
list1.add( productAttrAndValuePairBOToAdminsProductAttrAndValuePairVO( productAttrAndValuePairBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected AdminsProductSkuDetailVO skuToAdminsProductSkuDetailVO(Sku sku) {
|
||||
if ( sku == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductSkuDetailVO adminsProductSkuDetailVO = new AdminsProductSkuDetailVO();
|
||||
|
||||
adminsProductSkuDetailVO.setId( sku.getId() );
|
||||
adminsProductSkuDetailVO.setSpuId( sku.getSpuId() );
|
||||
adminsProductSkuDetailVO.setPicURL( sku.getPicURL() );
|
||||
adminsProductSkuDetailVO.setAttrs( productAttrAndValuePairBOListToAdminsProductAttrAndValuePairVOList( sku.getAttrs() ) );
|
||||
adminsProductSkuDetailVO.setPrice( sku.getPrice() );
|
||||
adminsProductSkuDetailVO.setQuantity( sku.getQuantity() );
|
||||
|
||||
return adminsProductSkuDetailVO;
|
||||
}
|
||||
|
||||
protected List<AdminsProductSkuDetailVO> skuListToAdminsProductSkuDetailVOList(List<Sku> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsProductSkuDetailVO> list1 = new ArrayList<AdminsProductSkuDetailVO>( list.size() );
|
||||
for ( Sku sku : list ) {
|
||||
list1.add( skuToAdminsProductSkuDetailVO( sku ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected AdminsProductSpuVO productSpuBOToAdminsProductSpuVO(ProductSpuBO productSpuBO) {
|
||||
if ( productSpuBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductSpuVO adminsProductSpuVO = new AdminsProductSpuVO();
|
||||
|
||||
adminsProductSpuVO.setId( productSpuBO.getId() );
|
||||
adminsProductSpuVO.setName( productSpuBO.getName() );
|
||||
adminsProductSpuVO.setSellPoint( productSpuBO.getSellPoint() );
|
||||
adminsProductSpuVO.setDescription( productSpuBO.getDescription() );
|
||||
adminsProductSpuVO.setCid( productSpuBO.getCid() );
|
||||
List<String> list = productSpuBO.getPicUrls();
|
||||
if ( list != null ) {
|
||||
adminsProductSpuVO.setPicUrls( new ArrayList<String>( list ) );
|
||||
}
|
||||
adminsProductSpuVO.setQuantity( productSpuBO.getQuantity() );
|
||||
adminsProductSpuVO.setVisible( productSpuBO.getVisible() );
|
||||
adminsProductSpuVO.setSort( productSpuBO.getSort() );
|
||||
|
||||
return adminsProductSpuVO;
|
||||
}
|
||||
|
||||
protected UsersProductAttrAndValuePairVO productAttrAndValuePairBOToUsersProductAttrAndValuePairVO(ProductAttrAndValuePairBO productAttrAndValuePairBO) {
|
||||
if ( productAttrAndValuePairBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersProductAttrAndValuePairVO usersProductAttrAndValuePairVO = new UsersProductAttrAndValuePairVO();
|
||||
|
||||
usersProductAttrAndValuePairVO.setAttrId( productAttrAndValuePairBO.getAttrId() );
|
||||
usersProductAttrAndValuePairVO.setAttrName( productAttrAndValuePairBO.getAttrName() );
|
||||
usersProductAttrAndValuePairVO.setAttrValueId( productAttrAndValuePairBO.getAttrValueId() );
|
||||
usersProductAttrAndValuePairVO.setAttrValueName( productAttrAndValuePairBO.getAttrValueName() );
|
||||
|
||||
return usersProductAttrAndValuePairVO;
|
||||
}
|
||||
|
||||
protected List<UsersProductAttrAndValuePairVO> productAttrAndValuePairBOListToUsersProductAttrAndValuePairVOList(List<ProductAttrAndValuePairBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<UsersProductAttrAndValuePairVO> list1 = new ArrayList<UsersProductAttrAndValuePairVO>( list.size() );
|
||||
for ( ProductAttrAndValuePairBO productAttrAndValuePairBO : list ) {
|
||||
list1.add( productAttrAndValuePairBOToUsersProductAttrAndValuePairVO( productAttrAndValuePairBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected UsersProductSkuDetailVO skuToUsersProductSkuDetailVO(Sku sku) {
|
||||
if ( sku == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersProductSkuDetailVO usersProductSkuDetailVO = new UsersProductSkuDetailVO();
|
||||
|
||||
usersProductSkuDetailVO.setId( sku.getId() );
|
||||
usersProductSkuDetailVO.setSpuId( sku.getSpuId() );
|
||||
usersProductSkuDetailVO.setPicURL( sku.getPicURL() );
|
||||
usersProductSkuDetailVO.setAttrs( productAttrAndValuePairBOListToUsersProductAttrAndValuePairVOList( sku.getAttrs() ) );
|
||||
usersProductSkuDetailVO.setPrice( sku.getPrice() );
|
||||
usersProductSkuDetailVO.setQuantity( sku.getQuantity() );
|
||||
|
||||
return usersProductSkuDetailVO;
|
||||
}
|
||||
|
||||
protected List<UsersProductSkuDetailVO> skuListToUsersProductSkuDetailVOList(List<Sku> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<UsersProductSkuDetailVO> list1 = new ArrayList<UsersProductSkuDetailVO>( list.size() );
|
||||
for ( Sku sku : list ) {
|
||||
list1.add( skuToUsersProductSkuDetailVO( sku ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://192.168.88.14:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: ${MALL_MYSQL_PASSWORD}
|
||||
|
||||
# rocketmq
|
||||
rocketmq:
|
||||
name-server: 192.168.88.14:9876
|
||||
producer:
|
||||
group: product-producer-group
|
||||
@@ -1,47 +0,0 @@
|
||||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://180.167.213.26:13306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: ${MALL_MYSQL_PASSWORD}
|
||||
|
||||
# mybatis
|
||||
mybatis-plus:
|
||||
config-location: classpath:mybatis-config.xml
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
type-aliases-package: cn.iocoder.mall.product.dataobject
|
||||
|
||||
# dubbo
|
||||
dubbo:
|
||||
application:
|
||||
name: product-service
|
||||
registry:
|
||||
address: zookeeper://127.0.0.1:2181
|
||||
protocol:
|
||||
port: -1
|
||||
name: dubbo
|
||||
scan:
|
||||
base-packages: cn.iocoder.mall.product.service
|
||||
provider:
|
||||
filter: -exception
|
||||
ProductAttrService:
|
||||
version: 1.0.0
|
||||
ProductCategoryService:
|
||||
version: 1.0.0
|
||||
ProductSpuService:
|
||||
version: 1.0.0
|
||||
ProductBrandService:
|
||||
version: 1.0.0
|
||||
OAuth2Service:
|
||||
version: 1.0.0
|
||||
|
||||
# rocketmq
|
||||
rocketmq:
|
||||
name-server: 127.0.0.1:9876
|
||||
producer:
|
||||
group: product-producer-group
|
||||
|
||||
# seata
|
||||
seata:
|
||||
tx-service-group: my_test_tx_group
|
||||
@@ -1,69 +0,0 @@
|
||||
transport {
|
||||
# tcp udt unix-domain-socket
|
||||
type = "TCP"
|
||||
#NIO NATIVE
|
||||
server = "NIO"
|
||||
#enable heartbeat
|
||||
heartbeat = true
|
||||
#thread factory for netty
|
||||
thread-factory {
|
||||
boss-thread-prefix = "NettyBoss"
|
||||
worker-thread-prefix = "NettyServerNIOWorker"
|
||||
server-executor-thread-prefix = "NettyServerBizHandler"
|
||||
share-boss-worker = false
|
||||
client-selector-thread-prefix = "NettyClientSelector"
|
||||
client-selector-thread-size = 1
|
||||
client-worker-thread-prefix = "NettyClientWorkerThread"
|
||||
# netty boss thread size,will not be used for UDT
|
||||
boss-thread-size = 1
|
||||
#auto default pin or 8
|
||||
worker-thread-size = 8
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
#vgroup->rgroup
|
||||
vgroup_mapping.my_test_tx_group = "default"
|
||||
#only support single node
|
||||
default.grouplist = "180.167.213.26:8091"
|
||||
#degrade current not support
|
||||
enableDegrade = false
|
||||
#disable
|
||||
disable = false
|
||||
}
|
||||
|
||||
client {
|
||||
async.commit.buffer.limit = 10000
|
||||
lock {
|
||||
retry.internal = 10
|
||||
retry.times = 30
|
||||
}
|
||||
}
|
||||
## transaction log store
|
||||
store {
|
||||
## store mode: file、db
|
||||
mode = "file"
|
||||
|
||||
## file store
|
||||
file {
|
||||
dir = "file_store/data"
|
||||
|
||||
# branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions
|
||||
max-branch-session-size = 16384
|
||||
# globe session size , if exceeded throws exceptions
|
||||
max-global-session-size = 512
|
||||
# file buffer size , if exceeded allocate new buffer
|
||||
file-write-buffer-cache-size = 16384
|
||||
# when recover batch read size
|
||||
session.reload.read_size = 100
|
||||
}
|
||||
|
||||
## database store
|
||||
db {
|
||||
driver_class = ""
|
||||
url = ""
|
||||
user = ""
|
||||
password = ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="cn.iocoder.mall.product.dao.ProductAttrMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, name, status, create_time
|
||||
</sql>
|
||||
|
||||
<!--<select id="selectList" resultType="ProductCategoryDO">-->
|
||||
<!--SELECT-->
|
||||
<!--<include refid="FIELDS" />-->
|
||||
<!--FROM product_category-->
|
||||
<!--WHERE deleted = 0-->
|
||||
<!--</select>-->
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="ProductAttrDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByName" parameterType="String" resultType="ProductAttrDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr
|
||||
WHERE name = #{name}
|
||||
AND deleted = 0
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="ProductAttrDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO product_attr (
|
||||
name, status, create_time, deleted
|
||||
) VALUES (
|
||||
#{name}, #{status}, #{createTime}, #{deleted}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="ProductAttrDO">
|
||||
UPDATE product_attr
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectListByIds" resultType="ProductAttrDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr
|
||||
WHERE id IN
|
||||
<foreach item="id" collection="ids" separator="," open="(" close=")" index="">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectListByNameLike" resultType="ProductAttrDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr
|
||||
<where>
|
||||
<if test="name != null">
|
||||
name LIKE "%"#{name}"%"
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
LIMIT #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectCountByNameLike" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM product_attr
|
||||
<where>
|
||||
<if test="name != null">
|
||||
name LIKE "%"#{name}"%"
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListByStatus" parameterType="Integer" resultType="ProductAttrDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr
|
||||
<where>
|
||||
<if test="status != null">
|
||||
status = #{status}
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,130 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="cn.iocoder.mall.product.dao.ProductAttrValueMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, attr_id, name, status, create_time
|
||||
</sql>
|
||||
|
||||
<!--<select id="selectList" resultType="ProductCategoryDO">-->
|
||||
<!--SELECT-->
|
||||
<!--<include refid="FIELDS" />-->
|
||||
<!--FROM product_category-->
|
||||
<!--WHERE deleted = 0-->
|
||||
<!--</select>-->
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="ProductAttrValueDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr_value
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<!--<insert id="insert" parameterType="ProductCategoryDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">-->
|
||||
<!--INSERT INTO product_category (-->
|
||||
<!--pid, name, description, pic_url, sort,-->
|
||||
<!--status, create_time, deleted-->
|
||||
<!--) VALUES (-->
|
||||
<!--#{pid}, #{name}, #{description}, #{picUrl}, #{sort},-->
|
||||
<!--#{status}, #{createTime}, #{deleted}-->
|
||||
<!--)-->
|
||||
<!--</insert>-->
|
||||
|
||||
<!--<update id="update" parameterType="ProductCategoryDO">-->
|
||||
<!--UPDATE product_category-->
|
||||
<!--<set>-->
|
||||
<!--<if test="pid != null">-->
|
||||
<!--pid = #{pid},-->
|
||||
<!--</if>-->
|
||||
<!--<if test="name != null">-->
|
||||
<!--name = #{name},-->
|
||||
<!--</if>-->
|
||||
<!--<if test="description != null">-->
|
||||
<!--description = #{description},-->
|
||||
<!--</if>-->
|
||||
<!--<if test="picUrl != null">-->
|
||||
<!--pic_url = #{picUrl},-->
|
||||
<!--</if>-->
|
||||
<!--<if test="sort != null">-->
|
||||
<!--sort = #{sort},-->
|
||||
<!--</if>-->
|
||||
<!--<if test="status != null">-->
|
||||
<!--status = #{status},-->
|
||||
<!--</if>-->
|
||||
<!--<if test="deleted != null">-->
|
||||
<!--deleted = #{deleted}-->
|
||||
<!--</if>-->
|
||||
<!--</set>-->
|
||||
<!--WHERE id = #{id}-->
|
||||
<!--</update>-->
|
||||
|
||||
<select id="selectListByIds" resultType="ProductAttrValueDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr_value
|
||||
WHERE id IN
|
||||
<foreach item="id" collection="ids" separator="," open="(" close=")" index="">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectListByAttrIds" resultType="ProductAttrValueDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr_value
|
||||
WHERE attr_id IN
|
||||
<foreach item="attrId" collection="attrIds" separator="," open="(" close=")" index="">
|
||||
#{attrId}
|
||||
</foreach>
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectListByStatus" resultType="ProductAttrValueDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr_value
|
||||
<where>
|
||||
<if test="status != null">
|
||||
status = #{status}
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByAttrIdAndName" resultType="ProductAttrValueDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_attr_value
|
||||
WHERE name = #{name}
|
||||
AND deleted = 0
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="ProductAttrValueDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO product_attr_value (
|
||||
attr_id, name, status, create_time, deleted
|
||||
) VALUES (
|
||||
#{attrId}, #{name}, #{status}, #{createTime}, #{deleted}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="ProductAttrValueDO">
|
||||
UPDATE product_attr_value
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,95 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="cn.iocoder.mall.product.dao.ProductBrandMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, name, description, pic_url, status, create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="ProductBrandDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_brand
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByName" parameterType="String" resultType="ProductBrandDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_brand
|
||||
WHERE name = #{name}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="ProductBrandDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO product_brand (
|
||||
name, description, pic_url, status, create_time, deleted
|
||||
) VALUES (
|
||||
#{name}, #{description}, #{picUrl}, #{status}, #{createTime}, #{deleted}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="ProductBrandDO">
|
||||
UPDATE product_brand
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description},
|
||||
</if>
|
||||
<if test="picUrl != null">
|
||||
pic_url = #{picUrl},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<select id="selectListByParams" resultType="ProductBrandDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_brand
|
||||
<where>
|
||||
deleted = 0
|
||||
<if test="name != null">
|
||||
AND name LIKE "%"#{name}"%"
|
||||
</if>
|
||||
<if test="description != null">
|
||||
AND description LIKE "%"#{description}"%"
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
LIMIT #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectListCountByParams" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM product_brand
|
||||
<where>
|
||||
deleted = 0
|
||||
<if test="name != null">
|
||||
AND name LIKE "%"#{name}"%"
|
||||
</if>
|
||||
<if test="description != null">
|
||||
AND description LIKE "%"#{description}"%"
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="cn.iocoder.mall.product.dao.ProductCategoryMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, pid, name, description, pic_url,
|
||||
sort, status, create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectListByPidAndStatusOrderBySort" resultType="ProductCategoryDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_category
|
||||
WHERE pid = #{pid}
|
||||
AND status = #{status}
|
||||
AND deleted = 0
|
||||
ORDER BY sort ASC
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultType="ProductCategoryDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_category
|
||||
WHERE deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="ProductCategoryDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_category
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByIds" resultType="ProductCategoryDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_category
|
||||
WHERE id IN
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="ProductCategoryDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO product_category (
|
||||
pid, name, description, pic_url, sort,
|
||||
status, create_time, deleted
|
||||
) VALUES (
|
||||
#{pid}, #{name}, #{description}, #{picUrl}, #{sort},
|
||||
#{status}, #{createTime}, #{deleted}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="ProductCategoryDO">
|
||||
UPDATE product_category
|
||||
<set>
|
||||
<if test="pid != null">
|
||||
pid = #{pid},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description},
|
||||
</if>
|
||||
<if test="picUrl != null">
|
||||
pic_url = #{picUrl},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.product.dao.ProductSkuMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, spu_id, status, pic_url, attrs,
|
||||
price, quantity, create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="ProductSkuDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_sku
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByIds" resultType="ProductSkuDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_sku
|
||||
WHERE id IN
|
||||
<foreach item="id" collection="ids" separator="," open="(" close=")" index="">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertList" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO product_sku (
|
||||
spu_id, status, pic_url, attrs, price,
|
||||
quantity, deleted, create_time
|
||||
) VALUES
|
||||
<foreach collection="productSkuDOs" item="productSkuDO" separator=",">
|
||||
(#{productSkuDO.spuId}, #{productSkuDO.status}, #{productSkuDO.picUrl}, #{productSkuDO.attrs}, #{productSkuDO.price},
|
||||
#{productSkuDO.quantity}, #{productSkuDO.deleted}, #{productSkuDO.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectListBySpuIdAndStatus" resultType="ProductSkuDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_sku
|
||||
WHERE spu_id = #{spuId}
|
||||
AND status = #{status}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="ProductSpuDO">
|
||||
UPDATE product_sku
|
||||
<set>
|
||||
<if test="spuId != null">
|
||||
spu_id = #{spuId},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="picUrl != null">
|
||||
pic_url = #{picUrl},
|
||||
</if>
|
||||
<if test="attrs != null">
|
||||
attrs = #{attrs},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price = #{price},
|
||||
</if>
|
||||
<if test="quantity != null">
|
||||
quantity = #{quantity},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateToDeleted" parameterType="Integer">
|
||||
UPDATE product_sku
|
||||
SET deleted = 1
|
||||
WHERE id IN
|
||||
<foreach item="id" collection="ids" separator="," open="(" close=")" index="">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,145 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.product.dao.ProductSpuMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, name, sell_point, description, cid,
|
||||
pic_urls, visible, sort, price, quantity,
|
||||
create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="ProductSpuDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_spu
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByIds" resultType="ProductSpuDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_spu
|
||||
WHERE id IN
|
||||
<foreach item="id" collection="ids" separator="," open="(" close=")" index="">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectIdListByIdGt" parameterType="Integer" resultType="Integer">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_spu
|
||||
<where>
|
||||
<if test="id != null">
|
||||
id > #{id}
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
ORDER BY id ASC
|
||||
LIMIT #{limit}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="ProductSpuDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO product_spu (
|
||||
name, sell_point, description, cid, pic_urls,
|
||||
visible, sort, price, quantity,
|
||||
deleted, create_time
|
||||
) VALUES (
|
||||
#{name}, #{sellPoint}, #{description}, #{cid}, #{picUrls},
|
||||
#{visible}, #{sort}, #{price}, #{quantity},
|
||||
#{deleted}, #{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="ProductSpuDO">
|
||||
UPDATE product_spu
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="sellPoint != null">
|
||||
sell_point = #{sellPoint},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description},
|
||||
</if>
|
||||
<if test="cid != null">
|
||||
cid = #{cid},
|
||||
</if>
|
||||
<if test="picUrls != null">
|
||||
pic_urls = #{picUrls},
|
||||
</if>
|
||||
<if test="visible != null">
|
||||
visible = #{visible},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price = #{price},
|
||||
</if>
|
||||
<if test="quantity != null">
|
||||
quantity = #{quantity},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectListByNameLikeOrderBySortAsc" resultType="ProductSpuDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_spu
|
||||
<where>
|
||||
<if test="name != null">
|
||||
name LIKE "%"#{name}"%"
|
||||
</if>
|
||||
<if test="cid != null">
|
||||
AND cid = #{cid}
|
||||
</if>
|
||||
<if test="visible != null">
|
||||
AND visible = #{visible}
|
||||
</if>
|
||||
<if test="hasQuantity == true">
|
||||
AND quantity > 0
|
||||
</if>
|
||||
<if test="hasQuantity == false">
|
||||
AND quantity = 0
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
ORDER BY sort ASC
|
||||
<if test="offset != null and limit != null">
|
||||
LIMIT #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCountByNameLike" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM product_spu
|
||||
<where>
|
||||
<if test="name != null">
|
||||
name LIKE "%"#{name}"%"
|
||||
</if>
|
||||
<if test="cid != null">
|
||||
AND cid = #{cid}
|
||||
</if>
|
||||
<if test="visible != null">
|
||||
AND visible = #{visible}
|
||||
</if>
|
||||
<if test="hasQuantity == true">
|
||||
AND quantity > 0
|
||||
</if>
|
||||
<if test="hasQuantity == false">
|
||||
AND quantity = 0
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
|
||||
<settings>
|
||||
<!-- 使用驼峰命名法转换字段。 -->
|
||||
<setting name="mapUnderscoreToCamelCase" value="true"/>
|
||||
</settings>
|
||||
|
||||
<typeAliases>
|
||||
<typeAlias alias="Integer" type="java.lang.Integer"/>
|
||||
<typeAlias alias="Long" type="java.lang.Long"/>
|
||||
<typeAlias alias="HashMap" type="java.util.HashMap"/>
|
||||
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap"/>
|
||||
<typeAlias alias="ArrayList" type="java.util.ArrayList"/>
|
||||
<typeAlias alias="LinkedList" type="java.util.LinkedList"/>
|
||||
</typeAliases>
|
||||
|
||||
</configuration>
|
||||
@@ -1,14 +0,0 @@
|
||||
registry {
|
||||
type = "file"
|
||||
|
||||
file {
|
||||
name = "file.conf"
|
||||
}
|
||||
|
||||
zk {
|
||||
cluster = "default"
|
||||
serverAddr = "192.168.88.10:2181"
|
||||
session.timeout = 6000
|
||||
connect.timeout = 2000
|
||||
}
|
||||
}
|
||||
@@ -1,227 +0,0 @@
|
||||
package cn.iocoder.mall.product.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrDetailBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrSimpleBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrValueBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrValueDetailBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrValueSimpleBO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductAttrAddDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductAttrUpdateDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductAttrValueAddDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductAttrValueUpdateDTO;
|
||||
import cn.iocoder.mall.product.dataobject.ProductAttrDO;
|
||||
import cn.iocoder.mall.product.dataobject.ProductAttrValueDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:38:56+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductAttrConvertImpl implements ProductAttrConvert {
|
||||
|
||||
@Override
|
||||
public List<ProductAttrDetailBO> convert(List<ProductAttrDO> attrs) {
|
||||
if ( attrs == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ProductAttrDetailBO> list = new ArrayList<ProductAttrDetailBO>( attrs.size() );
|
||||
for ( ProductAttrDO productAttrDO : attrs ) {
|
||||
list.add( productAttrDOToProductAttrDetailBO( productAttrDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAttrValueDetailBO convert(ProductAttrValueDO value) {
|
||||
if ( value == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrValueDetailBO productAttrValueDetailBO = new ProductAttrValueDetailBO();
|
||||
|
||||
productAttrValueDetailBO.setId( value.getId() );
|
||||
productAttrValueDetailBO.setName( value.getName() );
|
||||
productAttrValueDetailBO.setStatus( value.getStatus() );
|
||||
productAttrValueDetailBO.setCreateTime( value.getCreateTime() );
|
||||
|
||||
return productAttrValueDetailBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductAttrValueDetailBO> convert2(List<ProductAttrValueDO> values) {
|
||||
if ( values == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ProductAttrValueDetailBO> list = new ArrayList<ProductAttrValueDetailBO>( values.size() );
|
||||
for ( ProductAttrValueDO productAttrValueDO : values ) {
|
||||
list.add( convert( productAttrValueDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductAttrSimpleBO> convert3(List<ProductAttrDO> attrs) {
|
||||
if ( attrs == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ProductAttrSimpleBO> list = new ArrayList<ProductAttrSimpleBO>( attrs.size() );
|
||||
for ( ProductAttrDO productAttrDO : attrs ) {
|
||||
list.add( productAttrDOToProductAttrSimpleBO( productAttrDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAttrValueSimpleBO convert3(ProductAttrValueDO value) {
|
||||
if ( value == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrValueSimpleBO productAttrValueSimpleBO = new ProductAttrValueSimpleBO();
|
||||
|
||||
productAttrValueSimpleBO.setId( value.getId() );
|
||||
productAttrValueSimpleBO.setName( value.getName() );
|
||||
|
||||
return productAttrValueSimpleBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductAttrValueSimpleBO> convert4(List<ProductAttrValueDO> values) {
|
||||
if ( values == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ProductAttrValueSimpleBO> list = new ArrayList<ProductAttrValueSimpleBO>( values.size() );
|
||||
for ( ProductAttrValueDO productAttrValueDO : values ) {
|
||||
list.add( convert3( productAttrValueDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAttrDO convert(ProductAttrAddDTO productAttrAddDTO) {
|
||||
if ( productAttrAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrDO productAttrDO = new ProductAttrDO();
|
||||
|
||||
productAttrDO.setName( productAttrAddDTO.getName() );
|
||||
|
||||
return productAttrDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAttrDO convert(ProductAttrUpdateDTO productAttrUpdateDTO) {
|
||||
if ( productAttrUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrDO productAttrDO = new ProductAttrDO();
|
||||
|
||||
productAttrDO.setId( productAttrUpdateDTO.getId() );
|
||||
productAttrDO.setName( productAttrUpdateDTO.getName() );
|
||||
|
||||
return productAttrDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAttrValueDO convert(ProductAttrValueAddDTO productAttrValueAddDTO) {
|
||||
if ( productAttrValueAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrValueDO productAttrValueDO = new ProductAttrValueDO();
|
||||
|
||||
productAttrValueDO.setAttrId( productAttrValueAddDTO.getAttrId() );
|
||||
productAttrValueDO.setName( productAttrValueAddDTO.getName() );
|
||||
|
||||
return productAttrValueDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAttrValueDO convert(ProductAttrValueUpdateDTO productAttrValueUpdateDTO) {
|
||||
if ( productAttrValueUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrValueDO productAttrValueDO = new ProductAttrValueDO();
|
||||
|
||||
productAttrValueDO.setId( productAttrValueUpdateDTO.getId() );
|
||||
productAttrValueDO.setName( productAttrValueUpdateDTO.getName() );
|
||||
|
||||
return productAttrValueDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAttrBO convert(ProductAttrDO productAttrDO) {
|
||||
if ( productAttrDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrBO productAttrBO = new ProductAttrBO();
|
||||
|
||||
productAttrBO.setId( productAttrDO.getId() );
|
||||
productAttrBO.setName( productAttrDO.getName() );
|
||||
productAttrBO.setStatus( productAttrDO.getStatus() );
|
||||
productAttrBO.setCreateTime( productAttrDO.getCreateTime() );
|
||||
|
||||
return productAttrBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAttrValueBO convert2(ProductAttrValueDO productAttrValueDO) {
|
||||
if ( productAttrValueDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrValueBO productAttrValueBO = new ProductAttrValueBO();
|
||||
|
||||
productAttrValueBO.setId( productAttrValueDO.getId() );
|
||||
productAttrValueBO.setAttrId( productAttrValueDO.getAttrId() );
|
||||
productAttrValueBO.setName( productAttrValueDO.getName() );
|
||||
productAttrValueBO.setStatus( productAttrValueDO.getStatus() );
|
||||
productAttrValueBO.setCreateTime( productAttrValueDO.getCreateTime() );
|
||||
|
||||
return productAttrValueBO;
|
||||
}
|
||||
|
||||
protected ProductAttrDetailBO productAttrDOToProductAttrDetailBO(ProductAttrDO productAttrDO) {
|
||||
if ( productAttrDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrDetailBO productAttrDetailBO = new ProductAttrDetailBO();
|
||||
|
||||
productAttrDetailBO.setId( productAttrDO.getId() );
|
||||
productAttrDetailBO.setName( productAttrDO.getName() );
|
||||
productAttrDetailBO.setStatus( productAttrDO.getStatus() );
|
||||
productAttrDetailBO.setCreateTime( productAttrDO.getCreateTime() );
|
||||
|
||||
return productAttrDetailBO;
|
||||
}
|
||||
|
||||
protected ProductAttrSimpleBO productAttrDOToProductAttrSimpleBO(ProductAttrDO productAttrDO) {
|
||||
if ( productAttrDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductAttrSimpleBO productAttrSimpleBO = new ProductAttrSimpleBO();
|
||||
|
||||
productAttrSimpleBO.setId( productAttrDO.getId() );
|
||||
productAttrSimpleBO.setName( productAttrDO.getName() );
|
||||
|
||||
return productAttrSimpleBO;
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
package cn.iocoder.mall.product.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductBrandBO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductBrandAddDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductBrandUpdateDTO;
|
||||
import cn.iocoder.mall.product.dataobject.ProductBrandDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:12:30+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductBrandConvertImpl implements ProductBrandConvert {
|
||||
|
||||
@Override
|
||||
public List<ProductBrandBO> convert(List<ProductBrandDO> brands) {
|
||||
if ( brands == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ProductBrandBO> list = new ArrayList<ProductBrandBO>( brands.size() );
|
||||
for ( ProductBrandDO productBrandDO : brands ) {
|
||||
list.add( convert( productBrandDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductBrandBO convert(ProductBrandDO brand) {
|
||||
if ( brand == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductBrandBO productBrandBO = new ProductBrandBO();
|
||||
|
||||
productBrandBO.setId( brand.getId() );
|
||||
productBrandBO.setName( brand.getName() );
|
||||
productBrandBO.setDescription( brand.getDescription() );
|
||||
productBrandBO.setPicUrl( brand.getPicUrl() );
|
||||
productBrandBO.setStatus( brand.getStatus() );
|
||||
|
||||
return productBrandBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductBrandDO convert(ProductBrandUpdateDTO brand) {
|
||||
if ( brand == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductBrandDO productBrandDO = new ProductBrandDO();
|
||||
|
||||
productBrandDO.setId( brand.getId() );
|
||||
productBrandDO.setName( brand.getName() );
|
||||
productBrandDO.setDescription( brand.getDescription() );
|
||||
productBrandDO.setPicUrl( brand.getPicUrl() );
|
||||
productBrandDO.setStatus( brand.getStatus() );
|
||||
|
||||
return productBrandDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductBrandDO convert(ProductBrandAddDTO brand) {
|
||||
if ( brand == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductBrandDO productBrandDO = new ProductBrandDO();
|
||||
|
||||
productBrandDO.setName( brand.getName() );
|
||||
productBrandDO.setDescription( brand.getDescription() );
|
||||
productBrandDO.setPicUrl( brand.getPicUrl() );
|
||||
productBrandDO.setStatus( brand.getStatus() );
|
||||
|
||||
return productBrandDO;
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
package cn.iocoder.mall.product.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductCategoryBO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductCategoryAddDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductCategoryUpdateDTO;
|
||||
import cn.iocoder.mall.product.dataobject.ProductCategoryDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:38:55+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductCategoryConvertImpl implements ProductCategoryConvert {
|
||||
|
||||
@Override
|
||||
public ProductCategoryBO convertToBO(ProductCategoryDO category) {
|
||||
if ( category == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductCategoryBO productCategoryBO = new ProductCategoryBO();
|
||||
|
||||
productCategoryBO.setId( category.getId() );
|
||||
productCategoryBO.setPid( category.getPid() );
|
||||
productCategoryBO.setName( category.getName() );
|
||||
productCategoryBO.setDescription( category.getDescription() );
|
||||
productCategoryBO.setPicUrl( category.getPicUrl() );
|
||||
productCategoryBO.setSort( category.getSort() );
|
||||
productCategoryBO.setStatus( category.getStatus() );
|
||||
productCategoryBO.setCreateTime( category.getCreateTime() );
|
||||
|
||||
return productCategoryBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductCategoryBO> convertToBO(List<ProductCategoryDO> categoryList) {
|
||||
if ( categoryList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ProductCategoryBO> list = new ArrayList<ProductCategoryBO>( categoryList.size() );
|
||||
for ( ProductCategoryDO productCategoryDO : categoryList ) {
|
||||
list.add( convertToBO( productCategoryDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductCategoryDO convert(ProductCategoryAddDTO productCategoryAddDTO) {
|
||||
if ( productCategoryAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductCategoryDO productCategoryDO = new ProductCategoryDO();
|
||||
|
||||
productCategoryDO.setPid( productCategoryAddDTO.getPid() );
|
||||
productCategoryDO.setName( productCategoryAddDTO.getName() );
|
||||
productCategoryDO.setDescription( productCategoryAddDTO.getDescription() );
|
||||
productCategoryDO.setPicUrl( productCategoryAddDTO.getPicUrl() );
|
||||
productCategoryDO.setSort( productCategoryAddDTO.getSort() );
|
||||
|
||||
return productCategoryDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductCategoryDO convert(ProductCategoryUpdateDTO productCategoryUpdateDTO) {
|
||||
if ( productCategoryUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductCategoryDO productCategoryDO = new ProductCategoryDO();
|
||||
|
||||
productCategoryDO.setId( productCategoryUpdateDTO.getId() );
|
||||
productCategoryDO.setPid( productCategoryUpdateDTO.getPid() );
|
||||
productCategoryDO.setName( productCategoryUpdateDTO.getName() );
|
||||
productCategoryDO.setDescription( productCategoryUpdateDTO.getDescription() );
|
||||
productCategoryDO.setPicUrl( productCategoryUpdateDTO.getPicUrl() );
|
||||
productCategoryDO.setSort( productCategoryUpdateDTO.getSort() );
|
||||
|
||||
return productCategoryDO;
|
||||
}
|
||||
}
|
||||
@@ -1,218 +0,0 @@
|
||||
package cn.iocoder.mall.product.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductSkuBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSkuDetailBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSkuDetailBO.Spu;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuDetailBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuDetailBO.Sku;
|
||||
import cn.iocoder.mall.product.api.dto.ProductSkuAddOrUpdateDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductSpuAddDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductSpuUpdateDTO;
|
||||
import cn.iocoder.mall.product.dataobject.ProductSkuDO;
|
||||
import cn.iocoder.mall.product.dataobject.ProductSpuDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:38:56+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductSpuConvertImpl implements ProductSpuConvert {
|
||||
|
||||
@Override
|
||||
public ProductSpuBO convert(ProductSpuDO spu) {
|
||||
if ( spu == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductSpuBO productSpuBO = new ProductSpuBO();
|
||||
|
||||
productSpuBO.setPicUrls( translatePicUrlsFromString( spu.getPicUrls() ) );
|
||||
productSpuBO.setId( spu.getId() );
|
||||
productSpuBO.setName( spu.getName() );
|
||||
productSpuBO.setSellPoint( spu.getSellPoint() );
|
||||
productSpuBO.setDescription( spu.getDescription() );
|
||||
productSpuBO.setCid( spu.getCid() );
|
||||
productSpuBO.setVisible( spu.getVisible() );
|
||||
productSpuBO.setSort( spu.getSort() );
|
||||
productSpuBO.setPrice( spu.getPrice() );
|
||||
productSpuBO.setQuantity( spu.getQuantity() );
|
||||
|
||||
return productSpuBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductSpuBO> convert(List<ProductSpuDO> spus) {
|
||||
if ( spus == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ProductSpuBO> list = new ArrayList<ProductSpuBO>( spus.size() );
|
||||
for ( ProductSpuDO productSpuDO : spus ) {
|
||||
list.add( convert( productSpuDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductSpuDO convert(ProductSpuAddDTO productSpuAddDTO) {
|
||||
if ( productSpuAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductSpuDO productSpuDO = new ProductSpuDO();
|
||||
|
||||
productSpuDO.setName( productSpuAddDTO.getName() );
|
||||
productSpuDO.setSellPoint( productSpuAddDTO.getSellPoint() );
|
||||
productSpuDO.setDescription( productSpuAddDTO.getDescription() );
|
||||
productSpuDO.setCid( productSpuAddDTO.getCid() );
|
||||
productSpuDO.setVisible( productSpuAddDTO.getVisible() );
|
||||
|
||||
return productSpuDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductSkuDO convert(ProductSkuAddOrUpdateDTO productSkuAddDTO) {
|
||||
if ( productSkuAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductSkuDO productSkuDO = new ProductSkuDO();
|
||||
|
||||
productSkuDO.setPrice( productSkuAddDTO.getPrice() );
|
||||
productSkuDO.setQuantity( productSkuAddDTO.getQuantity() );
|
||||
|
||||
return productSkuDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductSpuDO convert(ProductSpuUpdateDTO productSpuUpdateDTO) {
|
||||
if ( productSpuUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductSpuDO productSpuDO = new ProductSpuDO();
|
||||
|
||||
productSpuDO.setId( productSpuUpdateDTO.getId() );
|
||||
productSpuDO.setName( productSpuUpdateDTO.getName() );
|
||||
productSpuDO.setSellPoint( productSpuUpdateDTO.getSellPoint() );
|
||||
productSpuDO.setDescription( productSpuUpdateDTO.getDescription() );
|
||||
productSpuDO.setCid( productSpuUpdateDTO.getCid() );
|
||||
productSpuDO.setVisible( productSpuUpdateDTO.getVisible() );
|
||||
|
||||
return productSpuDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductSpuDetailBO convert(ProductSpuBO spu) {
|
||||
if ( spu == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductSpuDetailBO productSpuDetailBO = new ProductSpuDetailBO();
|
||||
|
||||
productSpuDetailBO.setId( spu.getId() );
|
||||
productSpuDetailBO.setName( spu.getName() );
|
||||
productSpuDetailBO.setSellPoint( spu.getSellPoint() );
|
||||
productSpuDetailBO.setDescription( spu.getDescription() );
|
||||
productSpuDetailBO.setCid( spu.getCid() );
|
||||
List<String> list = spu.getPicUrls();
|
||||
if ( list != null ) {
|
||||
productSpuDetailBO.setPicUrls( new ArrayList<String>( list ) );
|
||||
}
|
||||
productSpuDetailBO.setVisible( spu.getVisible() );
|
||||
productSpuDetailBO.setSort( spu.getSort() );
|
||||
|
||||
return productSpuDetailBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductSpuDetailBO convert2(ProductSpuDO spu) {
|
||||
if ( spu == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductSpuDetailBO productSpuDetailBO = new ProductSpuDetailBO();
|
||||
|
||||
productSpuDetailBO.setId( spu.getId() );
|
||||
productSpuDetailBO.setName( spu.getName() );
|
||||
productSpuDetailBO.setSellPoint( spu.getSellPoint() );
|
||||
productSpuDetailBO.setDescription( spu.getDescription() );
|
||||
productSpuDetailBO.setCid( spu.getCid() );
|
||||
productSpuDetailBO.setVisible( spu.getVisible() );
|
||||
productSpuDetailBO.setSort( spu.getSort() );
|
||||
|
||||
return productSpuDetailBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Spu convert3(ProductSpuDO spu) {
|
||||
if ( spu == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Spu spu1 = new Spu();
|
||||
|
||||
spu1.setId( spu.getId() );
|
||||
spu1.setName( spu.getName() );
|
||||
spu1.setSellPoint( spu.getSellPoint() );
|
||||
spu1.setDescription( spu.getDescription() );
|
||||
spu1.setCid( spu.getCid() );
|
||||
spu1.setVisible( spu.getVisible() );
|
||||
spu1.setSort( spu.getSort() );
|
||||
|
||||
return spu1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Sku convert2(ProductSkuDO sku) {
|
||||
if ( sku == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Sku sku1 = new Sku();
|
||||
|
||||
sku1.setId( sku.getId() );
|
||||
sku1.setSpuId( sku.getSpuId() );
|
||||
sku1.setPrice( sku.getPrice() );
|
||||
sku1.setQuantity( sku.getQuantity() );
|
||||
|
||||
return sku1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductSkuDetailBO convert3(ProductSkuDO sku) {
|
||||
if ( sku == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductSkuDetailBO productSkuDetailBO = new ProductSkuDetailBO();
|
||||
|
||||
productSkuDetailBO.setId( sku.getId() );
|
||||
productSkuDetailBO.setPrice( sku.getPrice() );
|
||||
productSkuDetailBO.setQuantity( sku.getQuantity() );
|
||||
|
||||
return productSkuDetailBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductSkuBO convert4(ProductSkuDO sku) {
|
||||
if ( sku == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductSkuBO productSkuBO = new ProductSkuBO();
|
||||
|
||||
productSkuBO.setId( sku.getId() );
|
||||
productSkuBO.setSpuId( sku.getSpuId() );
|
||||
productSkuBO.setStatus( sku.getStatus() );
|
||||
productSkuBO.setPrice( sku.getPrice() );
|
||||
productSkuBO.setQuantity( sku.getQuantity() );
|
||||
|
||||
return productSkuBO;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user