- 清理被错误提交的 target

This commit is contained in:
YunaiV
2019-06-05 08:03:30 +08:00
parent 92d8eec7ad
commit 1749ccbe41
106 changed files with 2 additions and 6951 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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 = ""
}
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}