- 清理被错误提交的 target
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
swagger:
|
||||
enable: false
|
||||
title: 营销子系统
|
||||
description: 营销子系统
|
||||
version: 1.0.0
|
||||
base-package: cn.iocoder.mall.promotion.application.controller
|
||||
@@ -1,29 +0,0 @@
|
||||
spring:
|
||||
application:
|
||||
name: promotion-application
|
||||
cloud:
|
||||
sentinel:
|
||||
transport:
|
||||
port: 8719
|
||||
dashboard: localhost:12088
|
||||
metric:
|
||||
charset: UTF-8
|
||||
eager: false
|
||||
|
||||
# server
|
||||
server:
|
||||
port: 18085
|
||||
servlet:
|
||||
context-path: /promotion-api/
|
||||
|
||||
swagger:
|
||||
enable: false
|
||||
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,env,metrics,prometheus
|
||||
metrics:
|
||||
enabled: true
|
||||
@@ -1,65 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.application.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.BannerBO;
|
||||
import cn.iocoder.mall.promotion.api.bo.BannerPageBO;
|
||||
import cn.iocoder.mall.promotion.application.convert.BannerConvert.Admins;
|
||||
import cn.iocoder.mall.promotion.application.vo.admins.AdminsBannerPageVO;
|
||||
import cn.iocoder.mall.promotion.application.vo.admins.AdminsBannerVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:16+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class BannerConvert$AdminsImpl implements Admins {
|
||||
|
||||
@Override
|
||||
public AdminsBannerVO convert(BannerBO bannerBO) {
|
||||
if ( bannerBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsBannerVO adminsBannerVO = new AdminsBannerVO();
|
||||
|
||||
adminsBannerVO.setId( bannerBO.getId() );
|
||||
adminsBannerVO.setTitle( bannerBO.getTitle() );
|
||||
adminsBannerVO.setUrl( bannerBO.getUrl() );
|
||||
adminsBannerVO.setPicUrl( bannerBO.getPicUrl() );
|
||||
adminsBannerVO.setSort( bannerBO.getSort() );
|
||||
adminsBannerVO.setStatus( bannerBO.getStatus() );
|
||||
adminsBannerVO.setMemo( bannerBO.getMemo() );
|
||||
adminsBannerVO.setCreateTime( bannerBO.getCreateTime() );
|
||||
|
||||
return adminsBannerVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminsBannerPageVO convert3(BannerPageBO bannerPageBO) {
|
||||
if ( bannerPageBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsBannerPageVO adminsBannerPageVO = new AdminsBannerPageVO();
|
||||
|
||||
adminsBannerPageVO.setList( bannerBOListToAdminsBannerVOList( bannerPageBO.getList() ) );
|
||||
adminsBannerPageVO.setTotal( bannerPageBO.getTotal() );
|
||||
|
||||
return adminsBannerPageVO;
|
||||
}
|
||||
|
||||
protected List<AdminsBannerVO> bannerBOListToAdminsBannerVOList(List<BannerBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsBannerVO> list1 = new ArrayList<AdminsBannerVO>( list.size() );
|
||||
for ( BannerBO bannerBO : list ) {
|
||||
list1.add( convert( bannerBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.application.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.BannerBO;
|
||||
import cn.iocoder.mall.promotion.application.convert.BannerConvert.Users;
|
||||
import cn.iocoder.mall.promotion.application.vo.users.UsersBannerVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:15+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class BannerConvert$UsersImpl implements Users {
|
||||
|
||||
@Override
|
||||
public List<UsersBannerVO> convertList(List<BannerBO> banners) {
|
||||
if ( banners == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<UsersBannerVO> list = new ArrayList<UsersBannerVO>( banners.size() );
|
||||
for ( BannerBO bannerBO : banners ) {
|
||||
list.add( bannerBOToUsersBannerVO( bannerBO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected UsersBannerVO bannerBOToUsersBannerVO(BannerBO bannerBO) {
|
||||
if ( bannerBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersBannerVO usersBannerVO = new UsersBannerVO();
|
||||
|
||||
usersBannerVO.setUrl( bannerBO.getUrl() );
|
||||
usersBannerVO.setPicUrl( bannerBO.getPicUrl() );
|
||||
|
||||
return usersBannerVO;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.application.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.CouponCardBO;
|
||||
import cn.iocoder.mall.promotion.api.bo.CouponCardPageBO;
|
||||
import cn.iocoder.mall.promotion.application.vo.users.UsersCouponCardPageVO;
|
||||
import cn.iocoder.mall.promotion.application.vo.users.UsersCouponCardVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:15+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class CouponCardConvertImpl implements CouponCardConvert {
|
||||
|
||||
@Override
|
||||
public UsersCouponCardVO convert(CouponCardBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersCouponCardVO usersCouponCardVO = new UsersCouponCardVO();
|
||||
|
||||
usersCouponCardVO.setId( result.getId() );
|
||||
usersCouponCardVO.setTemplateId( result.getTemplateId() );
|
||||
usersCouponCardVO.setTitle( result.getTitle() );
|
||||
usersCouponCardVO.setStatus( result.getStatus() );
|
||||
usersCouponCardVO.setPriceAvailable( result.getPriceAvailable() );
|
||||
usersCouponCardVO.setValidStartTime( result.getValidStartTime() );
|
||||
usersCouponCardVO.setValidEndTime( result.getValidEndTime() );
|
||||
usersCouponCardVO.setPreferentialType( result.getPreferentialType() );
|
||||
usersCouponCardVO.setPercentOff( result.getPercentOff() );
|
||||
usersCouponCardVO.setPriceOff( result.getPriceOff() );
|
||||
usersCouponCardVO.setDiscountPriceLimit( result.getDiscountPriceLimit() );
|
||||
|
||||
return usersCouponCardVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsersCouponCardPageVO convert2(CouponCardPageBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersCouponCardPageVO usersCouponCardPageVO = new UsersCouponCardPageVO();
|
||||
|
||||
usersCouponCardPageVO.setList( couponCardBOListToUsersCouponCardVOList( result.getList() ) );
|
||||
usersCouponCardPageVO.setTotal( result.getTotal() );
|
||||
|
||||
return usersCouponCardPageVO;
|
||||
}
|
||||
|
||||
protected List<UsersCouponCardVO> couponCardBOListToUsersCouponCardVOList(List<CouponCardBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<UsersCouponCardVO> list1 = new ArrayList<UsersCouponCardVO>( list.size() );
|
||||
for ( CouponCardBO couponCardBO : list ) {
|
||||
list1.add( convert( couponCardBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.application.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.CouponTemplateBO;
|
||||
import cn.iocoder.mall.promotion.api.bo.CouponTemplatePageBO;
|
||||
import cn.iocoder.mall.promotion.application.convert.CouponTemplateConvert.Admins;
|
||||
import cn.iocoder.mall.promotion.application.vo.admins.AdminsCouponTemplatePageVO;
|
||||
import cn.iocoder.mall.promotion.application.vo.admins.AdminsCouponTemplateVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:15+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class CouponTemplateConvert$AdminsImpl implements Admins {
|
||||
|
||||
@Override
|
||||
public AdminsCouponTemplateVO convert(CouponTemplateBO template) {
|
||||
if ( template == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsCouponTemplateVO adminsCouponTemplateVO = new AdminsCouponTemplateVO();
|
||||
|
||||
adminsCouponTemplateVO.setId( template.getId() );
|
||||
adminsCouponTemplateVO.setTitle( template.getTitle() );
|
||||
adminsCouponTemplateVO.setDescription( template.getDescription() );
|
||||
adminsCouponTemplateVO.setType( template.getType() );
|
||||
adminsCouponTemplateVO.setCodeType( template.getCodeType() );
|
||||
adminsCouponTemplateVO.setStatus( template.getStatus() );
|
||||
adminsCouponTemplateVO.setQuota( template.getQuota() );
|
||||
adminsCouponTemplateVO.setTotal( template.getTotal() );
|
||||
adminsCouponTemplateVO.setPriceAvailable( template.getPriceAvailable() );
|
||||
adminsCouponTemplateVO.setRangeType( template.getRangeType() );
|
||||
adminsCouponTemplateVO.setRangeValues( template.getRangeValues() );
|
||||
adminsCouponTemplateVO.setDateType( template.getDateType() );
|
||||
adminsCouponTemplateVO.setValidStartTime( template.getValidStartTime() );
|
||||
adminsCouponTemplateVO.setValidEndTime( template.getValidEndTime() );
|
||||
adminsCouponTemplateVO.setFixedStartTerm( template.getFixedStartTerm() );
|
||||
adminsCouponTemplateVO.setFixedEndTerm( template.getFixedEndTerm() );
|
||||
adminsCouponTemplateVO.setPreferentialType( template.getPreferentialType() );
|
||||
adminsCouponTemplateVO.setPercentOff( template.getPercentOff() );
|
||||
adminsCouponTemplateVO.setPriceOff( template.getPriceOff() );
|
||||
adminsCouponTemplateVO.setDiscountPriceLimit( template.getDiscountPriceLimit() );
|
||||
adminsCouponTemplateVO.setStatFetchNum( template.getStatFetchNum() );
|
||||
adminsCouponTemplateVO.setCreateTime( template.getCreateTime() );
|
||||
|
||||
return adminsCouponTemplateVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminsCouponTemplatePageVO convertPage(CouponTemplatePageBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsCouponTemplatePageVO adminsCouponTemplatePageVO = new AdminsCouponTemplatePageVO();
|
||||
|
||||
adminsCouponTemplatePageVO.setList( convertList( result.getList() ) );
|
||||
adminsCouponTemplatePageVO.setTotal( result.getTotal() );
|
||||
|
||||
return adminsCouponTemplatePageVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdminsCouponTemplateVO> convertList(List<CouponTemplateBO> templates) {
|
||||
if ( templates == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsCouponTemplateVO> list = new ArrayList<AdminsCouponTemplateVO>( templates.size() );
|
||||
for ( CouponTemplateBO couponTemplateBO : templates ) {
|
||||
list.add( convert( couponTemplateBO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.application.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.CouponTemplateBO;
|
||||
import cn.iocoder.mall.promotion.application.convert.CouponTemplateConvert.Users;
|
||||
import cn.iocoder.mall.promotion.application.vo.users.UsersCouponTemplateVO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:15+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class CouponTemplateConvert$UsersImpl implements Users {
|
||||
|
||||
@Override
|
||||
public UsersCouponTemplateVO convert2(CouponTemplateBO template) {
|
||||
if ( template == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersCouponTemplateVO usersCouponTemplateVO = new UsersCouponTemplateVO();
|
||||
|
||||
usersCouponTemplateVO.setId( template.getId() );
|
||||
usersCouponTemplateVO.setTitle( template.getTitle() );
|
||||
usersCouponTemplateVO.setStatus( template.getStatus() );
|
||||
usersCouponTemplateVO.setPriceAvailable( template.getPriceAvailable() );
|
||||
usersCouponTemplateVO.setRangeType( template.getRangeType() );
|
||||
usersCouponTemplateVO.setRangeValues( template.getRangeValues() );
|
||||
usersCouponTemplateVO.setDateType( template.getDateType() );
|
||||
usersCouponTemplateVO.setValidStartTime( template.getValidStartTime() );
|
||||
usersCouponTemplateVO.setValidEndTime( template.getValidEndTime() );
|
||||
usersCouponTemplateVO.setFixedStartTerm( template.getFixedStartTerm() );
|
||||
usersCouponTemplateVO.setFixedEndTerm( template.getFixedEndTerm() );
|
||||
usersCouponTemplateVO.setPreferentialType( template.getPreferentialType() );
|
||||
usersCouponTemplateVO.setPercentOff( template.getPercentOff() );
|
||||
usersCouponTemplateVO.setPriceOff( template.getPriceOff() );
|
||||
usersCouponTemplateVO.setDiscountPriceLimit( template.getDiscountPriceLimit() );
|
||||
|
||||
return usersCouponTemplateVO;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.application.convert;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:15+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class CouponTemplateConvertImpl implements CouponTemplateConvert {
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.application.convert;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductSpuBO;
|
||||
import cn.iocoder.mall.promotion.api.bo.ProductRecommendBO;
|
||||
import cn.iocoder.mall.promotion.api.bo.ProductRecommendPageBO;
|
||||
import cn.iocoder.mall.promotion.application.vo.admins.AdminsProductRecommendPageVO;
|
||||
import cn.iocoder.mall.promotion.application.vo.admins.AdminsProductRecommendVO;
|
||||
import cn.iocoder.mall.promotion.application.vo.users.UsersProductRecommendVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:16+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductRecommendConvertImpl implements ProductRecommendConvert {
|
||||
|
||||
@Override
|
||||
public AdminsProductRecommendVO convert(ProductRecommendBO bannerBO) {
|
||||
if ( bannerBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductRecommendVO adminsProductRecommendVO = new AdminsProductRecommendVO();
|
||||
|
||||
adminsProductRecommendVO.setId( bannerBO.getId() );
|
||||
adminsProductRecommendVO.setType( bannerBO.getType() );
|
||||
adminsProductRecommendVO.setProductSpuId( bannerBO.getProductSpuId() );
|
||||
adminsProductRecommendVO.setSort( bannerBO.getSort() );
|
||||
adminsProductRecommendVO.setStatus( bannerBO.getStatus() );
|
||||
adminsProductRecommendVO.setMemo( bannerBO.getMemo() );
|
||||
adminsProductRecommendVO.setCreateTime( bannerBO.getCreateTime() );
|
||||
|
||||
return adminsProductRecommendVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminsProductRecommendPageVO convert(ProductRecommendPageBO result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminsProductRecommendPageVO adminsProductRecommendPageVO = new AdminsProductRecommendPageVO();
|
||||
|
||||
adminsProductRecommendPageVO.setList( productRecommendBOListToAdminsProductRecommendVOList( result.getList() ) );
|
||||
adminsProductRecommendPageVO.setTotal( result.getTotal() );
|
||||
|
||||
return adminsProductRecommendPageVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsersProductRecommendVO convert(ProductSpuBO productSpu) {
|
||||
if ( productSpu == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersProductRecommendVO usersProductRecommendVO = new UsersProductRecommendVO();
|
||||
|
||||
usersProductRecommendVO.setId( productSpu.getId() );
|
||||
usersProductRecommendVO.setName( productSpu.getName() );
|
||||
usersProductRecommendVO.setSellPoint( productSpu.getSellPoint() );
|
||||
List<String> list = productSpu.getPicUrls();
|
||||
if ( list != null ) {
|
||||
usersProductRecommendVO.setPicUrls( new ArrayList<String>( list ) );
|
||||
}
|
||||
usersProductRecommendVO.setPrice( productSpu.getPrice() );
|
||||
|
||||
return usersProductRecommendVO;
|
||||
}
|
||||
|
||||
protected List<AdminsProductRecommendVO> productRecommendBOListToAdminsProductRecommendVOList(List<ProductRecommendBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminsProductRecommendVO> list1 = new ArrayList<AdminsProductRecommendVO>( list.size() );
|
||||
for ( ProductRecommendBO productRecommendBO : list ) {
|
||||
list1.add( convert( productRecommendBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://192.168.88.14:3306/mall_promotion?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: ${MALL_MYSQL_PASSWORD}
|
||||
@@ -1,54 +0,0 @@
|
||||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
url: jdbc:mysql://180.167.213.26:13306/mall_promotion?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: ${MALL_MYSQL_PASSWORD}
|
||||
# TODO 芋艿, 后续优化下 druid 参数
|
||||
druid:
|
||||
initial-size: 5
|
||||
max-active: 5
|
||||
max-wait: 10000
|
||||
|
||||
# mybatis-plus
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto
|
||||
mapper-locations: classpath*:mapper/*.xml
|
||||
type-aliases-package: cn.iocoder.mall.promotion.biz.dataobject
|
||||
|
||||
# dubbo
|
||||
dubbo:
|
||||
application:
|
||||
name: promotion-service
|
||||
registry:
|
||||
address: zookeeper://127.0.0.1:2181
|
||||
protocol:
|
||||
port: -1
|
||||
name: dubbo
|
||||
scan:
|
||||
base-packages: cn.iocoder.mall.promotion.biz.service
|
||||
consumer:
|
||||
ProductSpuService:
|
||||
version: 1.0.0
|
||||
provider:
|
||||
filter: -exception
|
||||
BannerService:
|
||||
version: 1.0.0
|
||||
CouponService:
|
||||
version: 1.0.0
|
||||
ProductRecommendService:
|
||||
version: 1.0.0
|
||||
PromotionActivityService:
|
||||
version: 1.0.0
|
||||
|
||||
|
||||
# logging
|
||||
logging:
|
||||
level:
|
||||
cn.iocoder.mall.promotion.dao: debug
|
||||
@@ -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,110 +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.promotion.biz.dao.BannerMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, title, url, pic_url, sort,
|
||||
status, memo, create_time
|
||||
</sql>
|
||||
|
||||
<!-- <select id="selectListByPidAndStatusOrderBySort" resultType="BannerDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM banner-->
|
||||
<!-- WHERE pid = #{pid}-->
|
||||
<!-- AND status = #{status}-->
|
||||
<!-- AND deleted = 0-->
|
||||
<!-- ORDER BY sort ASC-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="selectList" resultType="BannerDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM banner-->
|
||||
<!-- WHERE deleted = 0-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="BannerDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM banner
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectListByStatus" parameterType="Integer" resultType="BannerDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM banner
|
||||
<where>
|
||||
<if test="status != null">
|
||||
status = #{status}
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListByTitleLike" resultType="BannerDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM banner
|
||||
<where>
|
||||
<if test="title != null">
|
||||
title LIKE "%"#{title}"%"
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
LIMIT #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectCountByTitleLike" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM banner
|
||||
<where>
|
||||
<if test="title != null">
|
||||
title LIKE "%"#{title}"%"
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BannerDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO banner (
|
||||
title, url, pic_url, sort, status,
|
||||
memo, create_time, deleted
|
||||
) VALUES (
|
||||
#{title}, #{url}, #{picUrl}, #{sort}, #{status},
|
||||
#{memo}, #{createTime}, #{deleted}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="BannerDO">
|
||||
UPDATE banner
|
||||
<set>
|
||||
<if test="title != null">
|
||||
title = #{title},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url = #{url},
|
||||
</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="memo != null">
|
||||
memo = #{memo},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,134 +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.promotion.biz.dao.CouponCardMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, template_id, title, status, user_id, take_type,
|
||||
price_available, valid_start_time, valid_end_time, preferential_type, percent_off, price_off,
|
||||
discount_price_limit, used_time,
|
||||
create_time
|
||||
</sql>
|
||||
|
||||
<!-- <select id="selectListByPidAndStatusOrderBySort" resultType="CouponCardDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM coupon_card-->
|
||||
<!-- WHERE pid = #{pid}-->
|
||||
<!-- AND status = #{status}-->
|
||||
<!-- AND deleted = 0-->
|
||||
<!-- ORDER BY sort ASC-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="selectList" resultType="CouponCardDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM coupon_card-->
|
||||
<!-- WHERE deleted = 0-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="CouponCardDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM coupon_card
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectListByUserIdAndStatus" resultType="CouponCardDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM coupon_card
|
||||
<where>
|
||||
<if test="userId != null">
|
||||
AND user_id = #{userId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListByPage" resultType="CouponCardDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM coupon_card
|
||||
<where>
|
||||
<if test="userId != null">
|
||||
AND user_id = #{userId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
LIMIT #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectCountByPage" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM coupon_card
|
||||
<where>
|
||||
<if test="userId != null">
|
||||
AND user_id = #{userId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCountByUserIdAndTemplateId" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM coupon_card
|
||||
<where>
|
||||
<if test="userId != null">
|
||||
AND user_id = #{userId}
|
||||
</if>
|
||||
<if test="templateId != null">
|
||||
AND template_id = #{templateId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="CouponCardDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO coupon_card (
|
||||
template_id, title, status, user_id, take_type,
|
||||
price_available, valid_start_time, valid_end_time, preferential_type, percent_off, price_off,
|
||||
discount_price_limit, used_time,
|
||||
create_time
|
||||
) VALUES (
|
||||
#{templateId}, #{title}, #{status}, #{userId}, #{takeType},
|
||||
#{priceAvailable}, #{validStartTime}, #{validEndTime}, #{preferentialType}, #{percentOff}, #{priceOff},
|
||||
#{discountPriceLimit}, #{usedTime},
|
||||
#{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="CouponCardDO">
|
||||
UPDATE coupon_card
|
||||
<set>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="usedTime != null">
|
||||
used_time = #{usedTime},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateByIdAndStatus">
|
||||
UPDATE coupon_card
|
||||
<set>
|
||||
<if test="updateObj.status != null">
|
||||
status = #{updateObj.status},
|
||||
</if>
|
||||
<if test="updateObj.usedTime != null">
|
||||
used_time = #{updateObj.usedTime},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
AND status = #{status}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,169 +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.promotion.biz.dao.CouponTemplateMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, title, description, type, code_type,
|
||||
status, quota, total, price_available, range_type,
|
||||
range_values, date_type, valid_start_time, valid_end_time, fixed_start_term, fixed_end_term,
|
||||
preferential_type, percent_off, price_off, discount_price_limit, stat_fetch_num,
|
||||
create_time
|
||||
</sql>
|
||||
|
||||
<!-- <select id="selectListByPidAndStatusOrderBySort" resultType="CouponTemplateDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM coupon_template-->
|
||||
<!-- WHERE pid = #{pid}-->
|
||||
<!-- AND status = #{status}-->
|
||||
<!-- AND deleted = 0-->
|
||||
<!-- ORDER BY sort ASC-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="selectList" resultType="CouponTemplateDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM coupon_template-->
|
||||
<!-- WHERE deleted = 0-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="CouponTemplateDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM coupon_template
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectListByIds" resultType="CouponTemplateDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM coupon_template
|
||||
WHERE id IN
|
||||
<foreach item="id" collection="ids" separator="," open="(" close=")" index="">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectListByPage" resultType="CouponTemplateDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM coupon_template
|
||||
<where>
|
||||
<if test="type != null">
|
||||
AND type = #{type}
|
||||
</if>
|
||||
<if test="title != null">
|
||||
AND title LIKE "%"#{title}"%"
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="preferentialType != null">
|
||||
AND preferential_type = #{preferentialType}
|
||||
</if>
|
||||
</where>
|
||||
LIMIT #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectCountByPage" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM coupon_template
|
||||
<where>
|
||||
<if test="type != null">
|
||||
AND type = #{type}
|
||||
</if>
|
||||
<if test="title != null">
|
||||
AND title LIKE "%"#{title}"%"
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="preferentialType != null">
|
||||
AND preferential_type = #{preferentialType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="CouponTemplateDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO coupon_template (
|
||||
title, description, type, code_type,
|
||||
status, quota, total, price_available, range_type,
|
||||
range_values, date_type, valid_start_time, valid_end_time, fixed_start_term, fixed_end_term,
|
||||
preferential_type, percent_off, price_off, discount_price_limit, stat_fetch_num,
|
||||
create_time
|
||||
) VALUES (
|
||||
#{title}, #{description}, #{type}, #{codeType},
|
||||
#{status}, #{quota}, #{total}, #{priceAvailable}, #{rangeType},
|
||||
#{rangeValues}, #{dateType}, #{validStartTime}, #{validEndTime}, #{fixedStartTerm}, #{fixedEndTerm}
|
||||
#{preferentialType}, #{percentOff}, #{priceOff}, #{discountPriceLimit}, #{statFetchNum},
|
||||
#{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="CouponTemplateDO">
|
||||
UPDATE coupon_template
|
||||
<set>
|
||||
<if test="title != null">
|
||||
title = #{title},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="quota != null">
|
||||
quota = #{quota},
|
||||
</if>
|
||||
<if test="total != null">
|
||||
total = #{total},
|
||||
</if>
|
||||
<if test="priceAvailable != null">
|
||||
price_available = #{priceAvailable},
|
||||
</if>
|
||||
<if test="rangeType != null">
|
||||
range_type = #{rangeType},
|
||||
</if>
|
||||
<if test="rangeValues != null">
|
||||
range_values = #{rangeValues},
|
||||
</if>
|
||||
<if test="dateType != null">
|
||||
date_type = #{dateType},
|
||||
</if>
|
||||
<if test="validStartTime != null">
|
||||
valid_start_time = #{validStartTime},
|
||||
</if>
|
||||
<if test="validEndTime != null">
|
||||
valid_end_time = #{validEndTime},
|
||||
</if>
|
||||
<if test="fixedStartTerm != null">
|
||||
fixed_start_term = #{fixedStartTerm},
|
||||
</if>
|
||||
<if test="fixedEndTerm != null">
|
||||
fixed_end_term = #{fixedEndTerm},
|
||||
</if>
|
||||
<if test="preferentialType != null">
|
||||
preferential_type = #{preferentialType},
|
||||
</if>
|
||||
<if test="percentOff != null">
|
||||
percent_off = #{percentOff},
|
||||
</if>
|
||||
<if test="priceOff != null">
|
||||
price_off = #{priceOff},
|
||||
</if>
|
||||
<if test="discountPriceLimit != null">
|
||||
discount_price_limit = #{discountPriceLimit},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateStatFetchNumIncr" parameterType="Integer">
|
||||
UPDATE coupon_template
|
||||
SET stat_fetch_Num = stat_fetch_Num + 1
|
||||
WHERE id = #{id}
|
||||
AND total > stat_fetch_Num
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,125 +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.promotion.biz.dao.ProductRecommendMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, type, product_spu_id, sort,
|
||||
status, memo, create_time
|
||||
</sql>
|
||||
|
||||
<!-- <select id="selectListByPidAndStatusOrderBySort" resultType="ProductRecommendDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM product_recommend-->
|
||||
<!-- WHERE pid = #{pid}-->
|
||||
<!-- AND status = #{status}-->
|
||||
<!-- AND deleted = 0-->
|
||||
<!-- ORDER BY sort ASC-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="selectList" resultType="ProductRecommendDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM product_recommend-->
|
||||
<!-- WHERE deleted = 0-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="ProductRecommendDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_recommend
|
||||
WHERE id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByProductSpuIdAndType" resultType="ProductRecommendDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_recommend
|
||||
<where>
|
||||
<if test="productSpuId != null">
|
||||
product_spu_id = #{productSpuId}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
AND type = #{type}
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListByTypeAndStatus" parameterType="Integer" resultType="ProductRecommendDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_recommend
|
||||
<where>
|
||||
<if test="type != null">
|
||||
type = #{type}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPageByType" resultType="ProductRecommendDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM product_recommend
|
||||
<where>
|
||||
<if test="type != null">
|
||||
type = #{type}
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
LIMIT #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectCountByType" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM product_recommend
|
||||
<where>
|
||||
<if test="type != null">
|
||||
type = #{type}
|
||||
</if>
|
||||
AND deleted = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="ProductRecommendDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO product_recommend (
|
||||
type, product_spu_id, sort, status, memo,
|
||||
create_time, deleted
|
||||
) VALUES (
|
||||
#{type}, #{productSpuId}, #{sort}, #{status}, #{memo},
|
||||
#{createTime}, #{deleted}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="ProductRecommendDO">
|
||||
UPDATE product_recommend
|
||||
<set>
|
||||
<if test="type != null">
|
||||
type = #{type},
|
||||
</if>
|
||||
<if test="productSpuId != null">
|
||||
product_spu_id = #{productSpuId},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="memo != null">
|
||||
memo = #{memo},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,135 +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.promotion.biz.dao.PromotionActivityMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, title, activity_type, status, start_time,
|
||||
end_time, invalid_time, delete_time, time_limited_discount, full_privilege,
|
||||
create_time, update_time
|
||||
</sql>
|
||||
|
||||
<resultMap id="PromotionActivityResultMap" type="PromotionActivityDO">
|
||||
<result property="timeLimitedDiscount" column="time_limited_discount" javaType="cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO$TimeLimitedDiscount" typeHandler="cn.iocoder.common.framework.mybatis.JSONTypeHandler"/>
|
||||
<result property="fullPrivilege" column="full_privilege" javaType="cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO$FullPrivilege" typeHandler="cn.iocoder.common.framework.mybatis.JSONTypeHandler"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- <select id="selectListByPidAndStatusOrderBySort" resultType="PromotionActivityDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM banner-->
|
||||
<!-- WHERE pid = #{pid}-->
|
||||
<!-- AND status = #{status}-->
|
||||
<!-- AND deleted = 0-->
|
||||
<!-- ORDER BY sort ASC-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="selectList" resultType="PromotionActivityDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM banner-->
|
||||
<!-- WHERE deleted = 0-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultMap="PromotionActivityResultMap">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM promotion_activity
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectListByStatus" resultMap="PromotionActivityResultMap">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM promotion_activity
|
||||
WHERE status IN
|
||||
<foreach item="status" collection="statuses" separator="," open="(" close=")" index="">
|
||||
#{status}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- <select id="selectListByStatus" parameterType="Integer" resultType="PromotionActivityDO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- <include refid="FIELDS" />-->
|
||||
<!-- FROM banner-->
|
||||
<!-- <where>-->
|
||||
<!-- <if test="status != null">-->
|
||||
<!-- status = #{status}-->
|
||||
<!-- </if>-->
|
||||
<!-- AND deleted = 0-->
|
||||
<!-- </where>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectListByPage" resultMap="PromotionActivityResultMap">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM promotion_activity
|
||||
WHERE activity_type = #{activityType}
|
||||
<if test="title != null">
|
||||
AND title LIKE "%"#{title}"%"
|
||||
</if>
|
||||
AND status IN
|
||||
<foreach item="status" collection="statuses" separator="," open="(" close=")" index="">
|
||||
#{status}
|
||||
</foreach>
|
||||
LIMIT #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectCountByPage" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM promotion_activity
|
||||
WHERE activity_type = #{activityType}
|
||||
<if test="title != null">
|
||||
AND title LIKE "%"#{title}"%"
|
||||
</if>
|
||||
AND status IN
|
||||
<foreach item="status" collection="statuses" separator="," open="(" close=")" index="">
|
||||
#{status}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="PromotionActivityDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO promotion_activity (
|
||||
title, activity_type, status, start_time,
|
||||
end_time, invalid_time, delete_time,
|
||||
time_limited_discount,
|
||||
full_privilege,
|
||||
create_time
|
||||
) VALUES (
|
||||
#{title}, #{activityType}, #{status}, #{startTime},
|
||||
#{endTime}, #{invalidTime}, #{deleteTime},
|
||||
#{timeLimitedDiscount, typeHandler=cn.iocoder.common.framework.mybatis.JSONTypeHandler},
|
||||
#{fullPrivilege, typeHandler=cn.iocoder.common.framework.mybatis.JSONTypeHandler},
|
||||
#{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- <update id="update" parameterType="PromotionActivityDO">-->
|
||||
<!-- UPDATE banner-->
|
||||
<!-- <set>-->
|
||||
<!-- <if test="title != null">-->
|
||||
<!-- title = #{title},-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="url != null">-->
|
||||
<!-- url = #{url},-->
|
||||
<!-- </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="memo != null">-->
|
||||
<!-- memo = #{memo},-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="deleted != null">-->
|
||||
<!-- deleted = #{deleted}-->
|
||||
<!-- </if>-->
|
||||
<!-- </set>-->
|
||||
<!-- WHERE id = #{id}-->
|
||||
<!-- </update>-->
|
||||
|
||||
</mapper>
|
||||
@@ -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,86 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.BannerBO;
|
||||
import cn.iocoder.mall.promotion.api.dto.BannerAddDTO;
|
||||
import cn.iocoder.mall.promotion.api.dto.BannerUpdateDTO;
|
||||
import cn.iocoder.mall.promotion.biz.dataobject.BannerDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:38:52+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class BannerConvertImpl implements BannerConvert {
|
||||
|
||||
@Override
|
||||
public BannerBO convertToBO(BannerDO banner) {
|
||||
if ( banner == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
BannerBO bannerBO = new BannerBO();
|
||||
|
||||
bannerBO.setId( banner.getId() );
|
||||
bannerBO.setTitle( banner.getTitle() );
|
||||
bannerBO.setUrl( banner.getUrl() );
|
||||
bannerBO.setPicUrl( banner.getPicUrl() );
|
||||
bannerBO.setSort( banner.getSort() );
|
||||
bannerBO.setStatus( banner.getStatus() );
|
||||
bannerBO.setMemo( banner.getMemo() );
|
||||
bannerBO.setCreateTime( banner.getCreateTime() );
|
||||
|
||||
return bannerBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BannerBO> convertToBO(List<BannerDO> bannerList) {
|
||||
if ( bannerList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<BannerBO> list = new ArrayList<BannerBO>( bannerList.size() );
|
||||
for ( BannerDO bannerDO : bannerList ) {
|
||||
list.add( convertToBO( bannerDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BannerDO convert(BannerAddDTO bannerAddDTO) {
|
||||
if ( bannerAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
BannerDO bannerDO = new BannerDO();
|
||||
|
||||
bannerDO.setTitle( bannerAddDTO.getTitle() );
|
||||
bannerDO.setUrl( bannerAddDTO.getUrl() );
|
||||
bannerDO.setPicUrl( bannerAddDTO.getPicUrl() );
|
||||
bannerDO.setSort( bannerAddDTO.getSort() );
|
||||
bannerDO.setMemo( bannerAddDTO.getMemo() );
|
||||
|
||||
return bannerDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BannerDO convert(BannerUpdateDTO bannerUpdateDTO) {
|
||||
if ( bannerUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
BannerDO bannerDO = new BannerDO();
|
||||
|
||||
bannerDO.setId( bannerUpdateDTO.getId() );
|
||||
bannerDO.setTitle( bannerUpdateDTO.getTitle() );
|
||||
bannerDO.setUrl( bannerUpdateDTO.getUrl() );
|
||||
bannerDO.setPicUrl( bannerUpdateDTO.getPicUrl() );
|
||||
bannerDO.setSort( bannerUpdateDTO.getSort() );
|
||||
bannerDO.setMemo( bannerUpdateDTO.getMemo() );
|
||||
|
||||
return bannerDO;
|
||||
}
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.CouponCardAvailableBO;
|
||||
import cn.iocoder.mall.promotion.api.bo.CouponCardBO;
|
||||
import cn.iocoder.mall.promotion.api.bo.CouponCardDetailBO;
|
||||
import cn.iocoder.mall.promotion.biz.dataobject.CouponCardDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:38:52+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class CouponCardConvertImpl implements CouponCardConvert {
|
||||
|
||||
@Override
|
||||
public List<CouponCardBO> convertToBO(List<CouponCardDO> cardList) {
|
||||
if ( cardList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<CouponCardBO> list = new ArrayList<CouponCardBO>( cardList.size() );
|
||||
for ( CouponCardDO couponCardDO : cardList ) {
|
||||
list.add( convert( couponCardDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CouponCardBO convert(CouponCardDO card) {
|
||||
if ( card == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CouponCardBO couponCardBO = new CouponCardBO();
|
||||
|
||||
couponCardBO.setId( card.getId() );
|
||||
couponCardBO.setTemplateId( card.getTemplateId() );
|
||||
couponCardBO.setTitle( card.getTitle() );
|
||||
couponCardBO.setStatus( card.getStatus() );
|
||||
couponCardBO.setUserId( card.getUserId() );
|
||||
couponCardBO.setTakeType( card.getTakeType() );
|
||||
couponCardBO.setPriceAvailable( card.getPriceAvailable() );
|
||||
couponCardBO.setValidStartTime( card.getValidStartTime() );
|
||||
couponCardBO.setValidEndTime( card.getValidEndTime() );
|
||||
couponCardBO.setPreferentialType( card.getPreferentialType() );
|
||||
couponCardBO.setPercentOff( card.getPercentOff() );
|
||||
couponCardBO.setPriceOff( card.getPriceOff() );
|
||||
couponCardBO.setDiscountPriceLimit( card.getDiscountPriceLimit() );
|
||||
couponCardBO.setUsedTime( card.getUsedTime() );
|
||||
couponCardBO.setCreateTime( card.getCreateTime() );
|
||||
|
||||
return couponCardBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CouponCardDetailBO convert2(CouponCardDO card) {
|
||||
if ( card == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CouponCardDetailBO couponCardDetailBO = new CouponCardDetailBO();
|
||||
|
||||
couponCardDetailBO.setId( card.getId() );
|
||||
couponCardDetailBO.setTemplateId( card.getTemplateId() );
|
||||
couponCardDetailBO.setTitle( card.getTitle() );
|
||||
couponCardDetailBO.setStatus( card.getStatus() );
|
||||
couponCardDetailBO.setUserId( card.getUserId() );
|
||||
couponCardDetailBO.setTakeType( card.getTakeType() );
|
||||
couponCardDetailBO.setPriceAvailable( card.getPriceAvailable() );
|
||||
couponCardDetailBO.setValidStartTime( card.getValidStartTime() );
|
||||
couponCardDetailBO.setValidEndTime( card.getValidEndTime() );
|
||||
couponCardDetailBO.setPreferentialType( card.getPreferentialType() );
|
||||
couponCardDetailBO.setPercentOff( card.getPercentOff() );
|
||||
couponCardDetailBO.setPriceOff( card.getPriceOff() );
|
||||
couponCardDetailBO.setDiscountPriceLimit( card.getDiscountPriceLimit() );
|
||||
couponCardDetailBO.setUsedTime( card.getUsedTime() );
|
||||
couponCardDetailBO.setCreateTime( card.getCreateTime() );
|
||||
|
||||
return couponCardDetailBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CouponCardAvailableBO convert2(CouponCardDO card, boolean x) {
|
||||
if ( card == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CouponCardAvailableBO couponCardAvailableBO = new CouponCardAvailableBO();
|
||||
|
||||
if ( card != null ) {
|
||||
couponCardAvailableBO.setId( card.getId() );
|
||||
couponCardAvailableBO.setTemplateId( card.getTemplateId() );
|
||||
couponCardAvailableBO.setTitle( card.getTitle() );
|
||||
couponCardAvailableBO.setStatus( card.getStatus() );
|
||||
couponCardAvailableBO.setUserId( card.getUserId() );
|
||||
couponCardAvailableBO.setTakeType( card.getTakeType() );
|
||||
couponCardAvailableBO.setPriceAvailable( card.getPriceAvailable() );
|
||||
couponCardAvailableBO.setValidStartTime( card.getValidStartTime() );
|
||||
couponCardAvailableBO.setValidEndTime( card.getValidEndTime() );
|
||||
couponCardAvailableBO.setPreferentialType( card.getPreferentialType() );
|
||||
couponCardAvailableBO.setPercentOff( card.getPercentOff() );
|
||||
couponCardAvailableBO.setPriceOff( card.getPriceOff() );
|
||||
couponCardAvailableBO.setDiscountPriceLimit( card.getDiscountPriceLimit() );
|
||||
couponCardAvailableBO.setUsedTime( card.getUsedTime() );
|
||||
couponCardAvailableBO.setCreateTime( card.getCreateTime() );
|
||||
}
|
||||
|
||||
return couponCardAvailableBO;
|
||||
}
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.CouponTemplateBO;
|
||||
import cn.iocoder.mall.promotion.api.dto.CouponCardTemplateAddDTO;
|
||||
import cn.iocoder.mall.promotion.api.dto.CouponCardTemplateUpdateDTO;
|
||||
import cn.iocoder.mall.promotion.api.dto.CouponCodeTemplateAddDTO;
|
||||
import cn.iocoder.mall.promotion.api.dto.CouponCodeTemplateUpdateDTO;
|
||||
import cn.iocoder.mall.promotion.biz.dataobject.CouponTemplateDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:38:52+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class CouponTemplateConvertImpl implements CouponTemplateConvert {
|
||||
|
||||
@Override
|
||||
public List<CouponTemplateBO> convertToBO(List<CouponTemplateDO> templateList) {
|
||||
if ( templateList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<CouponTemplateBO> list = new ArrayList<CouponTemplateBO>( templateList.size() );
|
||||
for ( CouponTemplateDO couponTemplateDO : templateList ) {
|
||||
list.add( convert( couponTemplateDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CouponTemplateDO convert(CouponCodeTemplateUpdateDTO template) {
|
||||
if ( template == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CouponTemplateDO couponTemplateDO = new CouponTemplateDO();
|
||||
|
||||
return couponTemplateDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CouponTemplateDO convert(CouponCardTemplateAddDTO template) {
|
||||
if ( template == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CouponTemplateDO couponTemplateDO = new CouponTemplateDO();
|
||||
|
||||
couponTemplateDO.setTitle( template.getTitle() );
|
||||
couponTemplateDO.setDescription( template.getDescription() );
|
||||
couponTemplateDO.setQuota( template.getQuota() );
|
||||
couponTemplateDO.setTotal( template.getTotal() );
|
||||
couponTemplateDO.setPriceAvailable( template.getPriceAvailable() );
|
||||
couponTemplateDO.setRangeType( template.getRangeType() );
|
||||
couponTemplateDO.setRangeValues( template.getRangeValues() );
|
||||
couponTemplateDO.setDateType( template.getDateType() );
|
||||
couponTemplateDO.setValidStartTime( template.getValidStartTime() );
|
||||
couponTemplateDO.setValidEndTime( template.getValidEndTime() );
|
||||
couponTemplateDO.setFixedEndTerm( template.getFixedEndTerm() );
|
||||
couponTemplateDO.setPreferentialType( template.getPreferentialType() );
|
||||
couponTemplateDO.setPercentOff( template.getPercentOff() );
|
||||
couponTemplateDO.setPriceOff( template.getPriceOff() );
|
||||
couponTemplateDO.setDiscountPriceLimit( template.getDiscountPriceLimit() );
|
||||
|
||||
return couponTemplateDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CouponTemplateDO convert(CouponCardTemplateUpdateDTO template) {
|
||||
if ( template == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CouponTemplateDO couponTemplateDO = new CouponTemplateDO();
|
||||
|
||||
couponTemplateDO.setId( template.getId() );
|
||||
couponTemplateDO.setTitle( template.getTitle() );
|
||||
couponTemplateDO.setDescription( template.getDescription() );
|
||||
couponTemplateDO.setQuota( template.getQuota() );
|
||||
couponTemplateDO.setTotal( template.getTotal() );
|
||||
couponTemplateDO.setRangeType( template.getRangeType() );
|
||||
couponTemplateDO.setRangeValues( template.getRangeValues() );
|
||||
|
||||
return couponTemplateDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CouponTemplateDO convert(CouponCodeTemplateAddDTO template) {
|
||||
if ( template == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CouponTemplateDO couponTemplateDO = new CouponTemplateDO();
|
||||
|
||||
return couponTemplateDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CouponTemplateBO convert(CouponTemplateDO template) {
|
||||
if ( template == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CouponTemplateBO couponTemplateBO = new CouponTemplateBO();
|
||||
|
||||
couponTemplateBO.setId( template.getId() );
|
||||
couponTemplateBO.setTitle( template.getTitle() );
|
||||
couponTemplateBO.setDescription( template.getDescription() );
|
||||
couponTemplateBO.setType( template.getType() );
|
||||
couponTemplateBO.setCodeType( template.getCodeType() );
|
||||
couponTemplateBO.setStatus( template.getStatus() );
|
||||
couponTemplateBO.setQuota( template.getQuota() );
|
||||
couponTemplateBO.setTotal( template.getTotal() );
|
||||
couponTemplateBO.setPriceAvailable( template.getPriceAvailable() );
|
||||
couponTemplateBO.setRangeType( template.getRangeType() );
|
||||
couponTemplateBO.setRangeValues( template.getRangeValues() );
|
||||
couponTemplateBO.setDateType( template.getDateType() );
|
||||
couponTemplateBO.setValidStartTime( template.getValidStartTime() );
|
||||
couponTemplateBO.setValidEndTime( template.getValidEndTime() );
|
||||
couponTemplateBO.setFixedStartTerm( template.getFixedStartTerm() );
|
||||
couponTemplateBO.setFixedEndTerm( template.getFixedEndTerm() );
|
||||
couponTemplateBO.setPreferentialType( template.getPreferentialType() );
|
||||
couponTemplateBO.setPercentOff( template.getPercentOff() );
|
||||
couponTemplateBO.setPriceOff( template.getPriceOff() );
|
||||
couponTemplateBO.setDiscountPriceLimit( template.getDiscountPriceLimit() );
|
||||
couponTemplateBO.setStatFetchNum( template.getStatFetchNum() );
|
||||
couponTemplateBO.setCreateTime( template.getCreateTime() );
|
||||
|
||||
return couponTemplateBO;
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.ProductRecommendBO;
|
||||
import cn.iocoder.mall.promotion.api.dto.ProductRecommendAddDTO;
|
||||
import cn.iocoder.mall.promotion.api.dto.ProductRecommendUpdateDTO;
|
||||
import cn.iocoder.mall.promotion.biz.dataobject.ProductRecommendDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:38:52+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ProductRecommendConvertImpl implements ProductRecommendConvert {
|
||||
|
||||
@Override
|
||||
public ProductRecommendBO convertToBO(ProductRecommendDO recommend) {
|
||||
if ( recommend == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductRecommendBO productRecommendBO = new ProductRecommendBO();
|
||||
|
||||
productRecommendBO.setId( recommend.getId() );
|
||||
productRecommendBO.setType( recommend.getType() );
|
||||
productRecommendBO.setProductSpuId( recommend.getProductSpuId() );
|
||||
productRecommendBO.setSort( recommend.getSort() );
|
||||
productRecommendBO.setStatus( recommend.getStatus() );
|
||||
productRecommendBO.setMemo( recommend.getMemo() );
|
||||
productRecommendBO.setCreateTime( recommend.getCreateTime() );
|
||||
|
||||
return productRecommendBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductRecommendBO> convertToBO(List<ProductRecommendDO> recommendList) {
|
||||
if ( recommendList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ProductRecommendBO> list = new ArrayList<ProductRecommendBO>( recommendList.size() );
|
||||
for ( ProductRecommendDO productRecommendDO : recommendList ) {
|
||||
list.add( convertToBO( productRecommendDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductRecommendDO convert(ProductRecommendAddDTO recommendAddDTO) {
|
||||
if ( recommendAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductRecommendDO productRecommendDO = new ProductRecommendDO();
|
||||
|
||||
productRecommendDO.setType( recommendAddDTO.getType() );
|
||||
productRecommendDO.setProductSpuId( recommendAddDTO.getProductSpuId() );
|
||||
productRecommendDO.setSort( recommendAddDTO.getSort() );
|
||||
productRecommendDO.setMemo( recommendAddDTO.getMemo() );
|
||||
|
||||
return productRecommendDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductRecommendDO convert(ProductRecommendUpdateDTO recommendUpdateDTO) {
|
||||
if ( recommendUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ProductRecommendDO productRecommendDO = new ProductRecommendDO();
|
||||
|
||||
productRecommendDO.setId( recommendUpdateDTO.getId() );
|
||||
productRecommendDO.setType( recommendUpdateDTO.getType() );
|
||||
productRecommendDO.setProductSpuId( recommendUpdateDTO.getProductSpuId() );
|
||||
productRecommendDO.setSort( recommendUpdateDTO.getSort() );
|
||||
productRecommendDO.setMemo( recommendUpdateDTO.getMemo() );
|
||||
|
||||
return productRecommendDO;
|
||||
}
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
package cn.iocoder.mall.promotion.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.promotion.api.bo.PromotionActivityBO;
|
||||
import cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.FullPrivilege.Privilege;
|
||||
import cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.TimeLimitedDiscount;
|
||||
import cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO;
|
||||
import cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO.FullPrivilege;
|
||||
import cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO.TimeLimitedDiscount.Item;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:38:52+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class PromotionActivityConvertImpl implements PromotionActivityConvert {
|
||||
|
||||
@Override
|
||||
public PromotionActivityBO convertToBO(PromotionActivityDO activity) {
|
||||
if ( activity == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
PromotionActivityBO promotionActivityBO = new PromotionActivityBO();
|
||||
|
||||
promotionActivityBO.setId( activity.getId() );
|
||||
promotionActivityBO.setTitle( activity.getTitle() );
|
||||
promotionActivityBO.setActivityType( activity.getActivityType() );
|
||||
promotionActivityBO.setStatus( activity.getStatus() );
|
||||
promotionActivityBO.setStartTime( activity.getStartTime() );
|
||||
promotionActivityBO.setEndTime( activity.getEndTime() );
|
||||
promotionActivityBO.setTimeLimitedDiscount( timeLimitedDiscountToTimeLimitedDiscount( activity.getTimeLimitedDiscount() ) );
|
||||
promotionActivityBO.setFullPrivilege( fullPrivilegeToFullPrivilege( activity.getFullPrivilege() ) );
|
||||
|
||||
return promotionActivityBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PromotionActivityBO> convertToBO(List<PromotionActivityDO> activityList) {
|
||||
if ( activityList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<PromotionActivityBO> list = new ArrayList<PromotionActivityBO>( activityList.size() );
|
||||
for ( PromotionActivityDO promotionActivityDO : activityList ) {
|
||||
list.add( convertToBO( promotionActivityDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.TimeLimitedDiscount.Item itemToItem(Item item) {
|
||||
if ( item == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.TimeLimitedDiscount.Item item1 = new cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.TimeLimitedDiscount.Item();
|
||||
|
||||
item1.setSpuId( item.getSpuId() );
|
||||
item1.setPreferentialType( item.getPreferentialType() );
|
||||
item1.setPreferentialValue( item.getPreferentialValue() );
|
||||
|
||||
return item1;
|
||||
}
|
||||
|
||||
protected List<cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.TimeLimitedDiscount.Item> itemListToItemList(List<Item> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.TimeLimitedDiscount.Item> list1 = new ArrayList<cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.TimeLimitedDiscount.Item>( list.size() );
|
||||
for ( Item item : list ) {
|
||||
list1.add( itemToItem( item ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected TimeLimitedDiscount timeLimitedDiscountToTimeLimitedDiscount(cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO.TimeLimitedDiscount timeLimitedDiscount) {
|
||||
if ( timeLimitedDiscount == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
TimeLimitedDiscount timeLimitedDiscount1 = new TimeLimitedDiscount();
|
||||
|
||||
timeLimitedDiscount1.setQuota( timeLimitedDiscount.getQuota() );
|
||||
timeLimitedDiscount1.setItems( itemListToItemList( timeLimitedDiscount.getItems() ) );
|
||||
|
||||
return timeLimitedDiscount1;
|
||||
}
|
||||
|
||||
protected Privilege privilegeToPrivilege(cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO.FullPrivilege.Privilege privilege) {
|
||||
if ( privilege == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Privilege privilege1 = new Privilege();
|
||||
|
||||
privilege1.setMeetType( privilege.getMeetType() );
|
||||
privilege1.setMeetValue( privilege.getMeetValue() );
|
||||
privilege1.setPreferentialType( privilege.getPreferentialType() );
|
||||
privilege1.setPreferentialValue( privilege.getPreferentialValue() );
|
||||
|
||||
return privilege1;
|
||||
}
|
||||
|
||||
protected List<Privilege> privilegeListToPrivilegeList(List<cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO.FullPrivilege.Privilege> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Privilege> list1 = new ArrayList<Privilege>( list.size() );
|
||||
for ( cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO.FullPrivilege.Privilege privilege : list ) {
|
||||
list1.add( privilegeToPrivilege( privilege ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.FullPrivilege fullPrivilegeToFullPrivilege(FullPrivilege fullPrivilege) {
|
||||
if ( fullPrivilege == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.FullPrivilege fullPrivilege1 = new cn.iocoder.mall.promotion.api.bo.PromotionActivityBO.FullPrivilege();
|
||||
|
||||
fullPrivilege1.setRangeType( fullPrivilege.getRangeType() );
|
||||
List<Integer> list = fullPrivilege.getRangeValues();
|
||||
if ( list != null ) {
|
||||
fullPrivilege1.setRangeValues( new ArrayList<Integer>( list ) );
|
||||
}
|
||||
fullPrivilege1.setCycled( fullPrivilege.getCycled() );
|
||||
fullPrivilege1.setPrivileges( privilegeListToPrivilegeList( fullPrivilege.getPrivileges() ) );
|
||||
|
||||
return fullPrivilege1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user