Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
fe2305df
提交
fe2305df
authored
6月 01, 2019
作者:
wangtongzhou
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitee.com/zhijiantianya/onemall
上级
4f506054
7f092ce6
显示空白字符变更
内嵌
并排
正在显示
158 个修改的文件
包含
10993 行增加
和
3 行删除
+10993
-3
router.config.js
admin-web/config/router.config.js
+5
-0
menu.js
admin-web/src/locales/zh-CN/menu.js
+1
-0
productBrandList.js
admin-web/src/models/product/productBrandList.js
+130
-0
ProductBrandList.js
admin-web/src/pages/Product/ProductBrandList.js
+357
-0
product.js
admin-web/src/services/product.js
+29
-1
pom.xml
common/common-framework/pom.xml
+6
-0
DateUtilTest.java
...t/java/cn/iocoder/common/framework/util/DateUtilTest.java
+56
-0
application-test.yaml
order/order-application/target/classes/application-test.yaml
+6
-0
application.yaml
order/order-application/target/classes/application.yaml
+28
-0
CartConvertImpl.java
...coder/mall/order/application/convert/CartConvertImpl.java
+270
-0
OrderConvertAPPImpl.java
...r/mall/order/application/convert/OrderConvertAPPImpl.java
+149
-0
OrderDeliveryConvertImpl.java
...l/order/application/convert/OrderDeliveryConvertImpl.java
+34
-0
OrderReturnConvertImpl.java
...all/order/application/convert/OrderReturnConvertImpl.java
+51
-0
application-test.yaml
...-service-impl/target/classes/config/application-test.yaml
+7
-0
application.yaml
...order-service-impl/target/classes/config/application.yaml
+76
-0
file.conf
order/order-service-impl/target/classes/file.conf
+69
-0
CartMapper.xml
...r/order-service-impl/target/classes/mapper/CartMapper.xml
+129
-0
OrderCancelMapper.xml
...-service-impl/target/classes/mapper/OrderCancelMapper.xml
+22
-0
OrderCommentMapper.xml
...service-impl/target/classes/mapper/OrderCommentMapper.xml
+53
-0
OrderCommentReplayMapper.xml
...e-impl/target/classes/mapper/OrderCommentReplayMapper.xml
+67
-0
OrderItemMapper.xml
...er-service-impl/target/classes/mapper/OrderItemMapper.xml
+172
-0
OrderLogisticsDetailMapper.xml
...impl/target/classes/mapper/OrderLogisticsDetailMapper.xml
+76
-0
OrderLogisticsMapper.xml
...rvice-impl/target/classes/mapper/OrderLogisticsMapper.xml
+81
-0
OrderMapper.xml
.../order-service-impl/target/classes/mapper/OrderMapper.xml
+141
-0
OrderRecipientMapper.xml
...rvice-impl/target/classes/mapper/OrderRecipientMapper.xml
+46
-0
OrderReturnMapper.xml
...-service-impl/target/classes/mapper/OrderReturnMapper.xml
+165
-0
registry.conf
order/order-service-impl/target/classes/registry.conf
+14
-0
mall_order.sql
order/order-service-impl/target/classes/sql/mall_order.sql
+121
-0
CartConvertImpl.java
...ns/cn/iocoder/mall/order/biz/convert/CartConvertImpl.java
+74
-0
OrderCommentConvertImpl.java
...coder/mall/order/biz/convert/OrderCommentConvertImpl.java
+92
-0
OrderConvertImpl.java
...s/cn/iocoder/mall/order/biz/convert/OrderConvertImpl.java
+82
-0
OrderItemConvertImpl.java
.../iocoder/mall/order/biz/convert/OrderItemConvertImpl.java
+156
-0
OrderLogisticsConvertImpl.java
...der/mall/order/biz/convert/OrderLogisticsConvertImpl.java
+217
-0
OrderLogisticsDetailConvertImpl.java
...ll/order/biz/convert/OrderLogisticsDetailConvertImpl.java
+29
-0
OrderRecipientConvertImpl.java
...der/mall/order/biz/convert/OrderRecipientConvertImpl.java
+100
-0
OrderReturnConvertImpl.java
...ocoder/mall/order/biz/convert/OrderReturnConvertImpl.java
+145
-0
application-test.yaml
pay/pay-application/target/classes/application-test.yaml
+6
-0
application.yaml
pay/pay-application/target/classes/application.yaml
+28
-0
PayRefundConvertImpl.java
...er/mall/pay/application/convert/PayRefundConvertImpl.java
+57
-0
application-test.yaml
...-service-impl/target/classes/config/application-test.yaml
+26
-0
application.properties
...service-impl/target/classes/config/application.properties
+2
-0
application.yaml
pay/pay-service-impl/target/classes/config/application.yaml
+41
-0
file.conf
pay/pay-service-impl/target/classes/file.conf
+69
-0
PayAppMapper.xml
pay/pay-service-impl/target/classes/mapper/PayAppMapper.xml
+37
-0
PayNotifyLogMapper.xml
...service-impl/target/classes/mapper/PayNotifyLogMapper.xml
+46
-0
PayNotifyTaskMapper.xml
...ervice-impl/target/classes/mapper/PayNotifyTaskMapper.xml
+61
-0
PayRefundMapper.xml
...ay-service-impl/target/classes/mapper/PayRefundMapper.xml
+122
-0
PayTransactionExtensionMapper.xml
...l/target/classes/mapper/PayTransactionExtensionMapper.xml
+51
-0
PayTransactionMapper.xml
...rvice-impl/target/classes/mapper/PayTransactionMapper.xml
+159
-0
mybatis-config.xml
pay/pay-service-impl/target/classes/mybatis-config.xml
+20
-0
registry.conf
pay/pay-service-impl/target/classes/registry.conf
+14
-0
PayNotifyConvertImpl.java
...cn/iocoder/mall/pay/biz/convert/PayNotifyConvertImpl.java
+128
-0
PayRefundConvertImpl.java
...cn/iocoder/mall/pay/biz/convert/PayRefundConvertImpl.java
+76
-0
PayTransactionConvertImpl.java
...coder/mall/pay/biz/convert/PayTransactionConvertImpl.java
+96
-0
AdminsProductBrandController.java
...ation/controller/admins/AdminsProductBrandController.java
+113
-0
ProductBrandConvert.java
...mall/product/application/convert/ProductBrandConvert.java
+22
-0
AdminsProductBrandVO.java
...l/product/application/vo/admins/AdminsProductBrandVO.java
+38
-0
AdminsProductBrangPageVO.java
...oduct/application/vo/admins/AdminsProductBrangPageVO.java
+25
-0
application.yaml
...t/product-application/src/main/resources/application.yaml
+8
-2
application-test.yaml
.../product-application/target/classes/application-test.yaml
+6
-0
application.yaml
product/product-application/target/classes/application.yaml
+35
-0
ProductAttrConvertImpl.java
...l/product/application/convert/ProductAttrConvertImpl.java
+185
-0
ProductBrandConvertImpl.java
.../product/application/convert/ProductBrandConvertImpl.java
+61
-0
ProductCategoryConvert$AdminsImpl.java
...pplication/convert/ProductCategoryConvert$AdminsImpl.java
+55
-0
ProductCategoryConvert$UsersImpl.java
...application/convert/ProductCategoryConvert$UsersImpl.java
+45
-0
ProductSpuConvertImpl.java
...ll/product/application/convert/ProductSpuConvertImpl.java
+251
-0
ProductBrandService.java
...java/cn/iocoder/mall/product/api/ProductBrandService.java
+40
-0
ProductBrandBO.java
...n/java/cn/iocoder/mall/product/api/bo/ProductBrandBO.java
+42
-0
ProductBrangPageBO.java
...va/cn/iocoder/mall/product/api/bo/ProductBrangPageBO.java
+25
-0
ProductErrorCodeEnum.java
...coder/mall/product/api/constant/ProductErrorCodeEnum.java
+3
-0
ProductBrandAddDTO.java
...a/cn/iocoder/mall/product/api/dto/ProductBrandAddDTO.java
+43
-0
ProductBrandPageDTO.java
.../cn/iocoder/mall/product/api/dto/ProductBrandPageDTO.java
+36
-0
ProductBrandUpdateDTO.java
...n/iocoder/mall/product/api/dto/ProductBrandUpdateDTO.java
+49
-0
ProductBrandConvert.java
.../cn/iocoder/mall/product/convert/ProductBrandConvert.java
+31
-0
ProductBrandMapper.java
.../java/cn/iocoder/mall/product/dao/ProductBrandMapper.java
+66
-0
ProductBrandDO.java
...va/cn/iocoder/mall/product/dataobject/ProductBrandDO.java
+41
-0
ProductBrandServiceImpl.java
...iocoder/mall/product/service/ProductBrandServiceImpl.java
+95
-0
application.yaml
...t-service-impl/src/main/resources/config/application.yaml
+2
-0
ProductBrandMapper.xml
...ice-impl/src/main/resources/mapper/ProductBrandMapper.xml
+96
-0
application-test.yaml
...-service-impl/target/classes/config/application-test.yaml
+13
-0
application.yaml
...oduct-service-impl/target/classes/config/application.yaml
+47
-0
file.conf
product/product-service-impl/target/classes/file.conf
+69
-0
ProductAttrMapper.xml
...-service-impl/target/classes/mapper/ProductAttrMapper.xml
+106
-0
ProductAttrValueMapper.xml
...ice-impl/target/classes/mapper/ProductAttrValueMapper.xml
+131
-0
ProductBrandMapper.xml
...service-impl/target/classes/mapper/ProductBrandMapper.xml
+96
-0
ProductCategoryMapper.xml
...vice-impl/target/classes/mapper/ProductCategoryMapper.xml
+84
-0
ProductSkuMapper.xml
...t-service-impl/target/classes/mapper/ProductSkuMapper.xml
+87
-0
ProductSpuMapper.xml
...t-service-impl/target/classes/mapper/ProductSpuMapper.xml
+145
-0
mybatis-config.xml
...ct/product-service-impl/target/classes/mybatis-config.xml
+20
-0
registry.conf
product/product-service-impl/target/classes/registry.conf
+14
-0
ProductAttrConvertImpl.java
.../iocoder/mall/product/convert/ProductAttrConvertImpl.java
+227
-0
ProductBrandConvertImpl.java
...iocoder/mall/product/convert/ProductBrandConvertImpl.java
+81
-0
ProductCategoryConvertImpl.java
...oder/mall/product/convert/ProductCategoryConvertImpl.java
+86
-0
ProductSpuConvertImpl.java
...n/iocoder/mall/product/convert/ProductSpuConvertImpl.java
+218
-0
application-test.yaml
...romotion-application/target/classes/application-test.yaml
+6
-0
application.yaml
...ion/promotion-application/target/classes/application.yaml
+29
-0
BannerConvert$AdminsImpl.java
...omotion/application/convert/BannerConvert$AdminsImpl.java
+65
-0
BannerConvert$UsersImpl.java
...romotion/application/convert/BannerConvert$UsersImpl.java
+43
-0
CouponCardConvertImpl.java
.../promotion/application/convert/CouponCardConvertImpl.java
+67
-0
CouponTemplateConvert$AdminsImpl.java
...application/convert/CouponTemplateConvert$AdminsImpl.java
+80
-0
CouponTemplateConvert$UsersImpl.java
.../application/convert/CouponTemplateConvert$UsersImpl.java
+41
-0
CouponTemplateConvertImpl.java
...motion/application/convert/CouponTemplateConvertImpl.java
+11
-0
ProductRecommendConvertImpl.java
...tion/application/convert/ProductRecommendConvertImpl.java
+85
-0
application-test.yaml
...-service-impl/target/classes/config/application-test.yaml
+7
-0
application.yaml
...otion-service-impl/target/classes/config/application.yaml
+54
-0
file.conf
promotion/promotion-service-impl/target/classes/file.conf
+69
-0
BannerMapper.xml
...otion-service-impl/target/classes/mapper/BannerMapper.xml
+111
-0
CouponCardMapper.xml
...n-service-impl/target/classes/mapper/CouponCardMapper.xml
+134
-0
CouponTemplateMapper.xml
...rvice-impl/target/classes/mapper/CouponTemplateMapper.xml
+169
-0
ProductRecommendMapper.xml
...ice-impl/target/classes/mapper/ProductRecommendMapper.xml
+126
-0
PromotionActivityMapper.xml
...ce-impl/target/classes/mapper/PromotionActivityMapper.xml
+135
-0
registry.conf
...otion/promotion-service-impl/target/classes/registry.conf
+14
-0
BannerConvertImpl.java
...iocoder/mall/promotion/biz/convert/BannerConvertImpl.java
+86
-0
CouponCardConvertImpl.java
...der/mall/promotion/biz/convert/CouponCardConvertImpl.java
+114
-0
CouponTemplateConvertImpl.java
...mall/promotion/biz/convert/CouponTemplateConvertImpl.java
+135
-0
ProductRecommendConvertImpl.java
...ll/promotion/biz/convert/ProductRecommendConvertImpl.java
+83
-0
PromotionActivityConvertImpl.java
...l/promotion/biz/convert/PromotionActivityConvertImpl.java
+139
-0
application-test.yaml
...h/search-application/target/classes/application-test.yaml
+6
-0
application.yaml
search/search-application/target/classes/application.yaml
+29
-0
application-test.yaml
...-service-impl/target/classes/config/application-test.yaml
+14
-0
application.yaml
...earch-service-impl/target/classes/config/application.yaml
+37
-0
ProductSearchConvertImpl.java
...der/mall/search/biz/convert/ProductSearchConvertImpl.java
+83
-0
application-test.yaml
...m/system-application/target/classes/application-test.yaml
+18
-0
application.yaml
system/system-application/target/classes/application.yaml
+42
-0
AdminConvertImpl.java
...oder/mall/admin/application/convert/AdminConvertImpl.java
+155
-0
DataDictConvertImpl.java
...r/mall/admin/application/convert/DataDictConvertImpl.java
+42
-0
PassportConvertImpl.java
...r/mall/admin/application/convert/PassportConvertImpl.java
+44
-0
ResourceConvertImpl.java
...r/mall/admin/application/convert/ResourceConvertImpl.java
+111
-0
RoleConvertImpl.java
...coder/mall/admin/application/convert/RoleConvertImpl.java
+11
-0
application-test.yaml
...-service-impl/target/classes/config/application-test.yaml
+7
-0
application.properties
...service-impl/target/classes/config/application.properties
+5
-0
application.yaml
...ystem-service-impl/target/classes/config/application.yaml
+67
-0
AdminRoleMapper.xml
...em-service-impl/target/classes/mapper/AdminRoleMapper.xml
+14
-0
DataDictMapper.xml
...tem-service-impl/target/classes/mapper/DataDictMapper.xml
+40
-0
ResourceMapper.xml
...tem-service-impl/target/classes/mapper/ResourceMapper.xml
+27
-0
RoleResourceMapper.xml
...service-impl/target/classes/mapper/RoleResourceMapper.xml
+14
-0
AccessLogConvertImpl.java
...s/cn/iocoder/mall/admin/convert/AccessLogConvertImpl.java
+70
-0
AdminConvertImpl.java
...tions/cn/iocoder/mall/admin/convert/AdminConvertImpl.java
+110
-0
DataDictConvertImpl.java
...ns/cn/iocoder/mall/admin/convert/DataDictConvertImpl.java
+85
-0
OAuth2ConvertImpl.java
...ions/cn/iocoder/mall/admin/convert/OAuth2ConvertImpl.java
+42
-0
ResourceConvertImpl.java
...ns/cn/iocoder/mall/admin/convert/ResourceConvertImpl.java
+91
-0
RoleConvertImpl.java
...ations/cn/iocoder/mall/admin/convert/RoleConvertImpl.java
+89
-0
SmsSignConvertImpl.java
...ons/cn/iocoder/mall/admin/convert/SmsSignConvertImpl.java
+64
-0
SmsTemplateConvertImpl.java
...cn/iocoder/mall/admin/convert/SmsTemplateConvertImpl.java
+101
-0
application-test.yaml
user/user-application/target/classes/application-test.yaml
+6
-0
application.yaml
user/user-application/target/classes/application.yaml
+28
-0
UserAddressConvertImpl.java
...mall/user/application/convert/UserAddressConvertImpl.java
+50
-0
UserConvertImpl.java
...ocoder/mall/user/application/convert/UserConvertImpl.java
+78
-0
application-test.yaml
...-service-impl/target/classes/config/application-test.yaml
+7
-0
application.properties
...service-impl/target/classes/config/application.properties
+5
-0
application.yaml
.../user-service-impl/target/classes/config/application.yaml
+44
-0
UserAddress.xml
user/user-service-impl/target/classes/mapper/UserAddress.xml
+73
-0
UserMapper.xml
user/user-service-impl/target/classes/mapper/UserMapper.xml
+88
-0
UserRegisterMapper.xml
...service-impl/target/classes/mapper/UserRegisterMapper.xml
+14
-0
OAuth2ConvertImpl.java
...s/cn/iocoder/mall/user/biz/convert/OAuth2ConvertImpl.java
+41
-0
UserAccessLogConvertImpl.java
...coder/mall/user/biz/convert/UserAccessLogConvertImpl.java
+33
-0
UserAddressConvertImpl.java
...iocoder/mall/user/biz/convert/UserAddressConvertImpl.java
+91
-0
UserConvertImpl.java
...ons/cn/iocoder/mall/user/biz/convert/UserConvertImpl.java
+82
-0
没有找到文件。
admin-web/config/router.config.js
浏览文件 @
fe2305df
...
...
@@ -115,6 +115,11 @@ export default [
name
:
'product-category-list'
,
component
:
'./Product/ProductCategoryList'
,
},
{
path
:
'/product/product-brand-list'
,
name
:
'product-brand-list'
,
component
:
'./Product/ProductBrandList'
,
},
],
},
// promotion
...
...
admin-web/src/locales/zh-CN/menu.js
浏览文件 @
fe2305df
...
...
@@ -50,6 +50,7 @@ export default {
'menu.product.product-spu-add'
:
'商品添加'
,
'menu.product.product-spu-update'
:
'商品编辑'
,
'menu.product.product-category-list'
:
'商品分类'
,
'menu.product.product-brand-list'
:
'商品品牌'
,
// 订单
'menu.order'
:
'订单管理'
,
'menu.order.order-list'
:
'订单管理'
,
...
...
admin-web/src/models/product/productBrandList.js
0 → 100644
浏览文件 @
fe2305df
import
{
message
}
from
'antd'
;
import
{
productBrandPage
}
from
'../../services/product'
;
import
{
routerRedux
}
from
"dva/router"
;
import
PaginationHelper
from
'../../../helpers/PaginationHelper'
;
const
SEARCH_PARAMS_DEFAULT
=
{
name
:
''
,
status
:
1
,
cid
:
undefined
,
};
export
default
{
namespace
:
'productBrandList'
,
state
:
{
// 分页列表相关
list
:
[],
listLoading
:
false
,
pagination
:
PaginationHelper
.
defaultPaginationConfig
,
searchParams
:
SEARCH_PARAMS_DEFAULT
,
// 添加 or 修改表单相关
// modalVisible: false,
// modalType: undefined, // 'add' or 'update' 表单
formVals
:
{},
// 当前表单值
// modalLoading: false,
sortModalVisible
:
false
,
// 修改排序弹窗
sortModalLoading
:
false
,
// 修改排序的加载
},
effects
:
{
// *updateStatus({ payload }, { call, put }) {
// const { callback, body } = payload;
// const response = yield call(productCategoryUpdateStatus, body);
// if (callback) {
// callback(response);
// }
// yield put({
// type: 'tree',
// payload: {},
// });
// },
// *delete({ payload }, { call, put }) {
// const response = yield call(productCategoryDelete, payload);
// message.info('删除成功!');
// yield put({
// type: 'tree',
// payload: {},
// });
// },
*
redirectToAdd
({
payload
},
{
call
,
put
})
{
// const { callback, body } = payload;
yield
put
(
routerRedux
.
replace
(
'/product/product-spu-add'
));
},
*
redirectToUpdate
({
payload
},
{
call
,
put
})
{
// const { callback, body } = payload;
yield
put
(
routerRedux
.
replace
(
'/product/product-spu-update?id='
+
payload
));
},
*
page
({
payload
},
{
call
,
put
})
{
// const { queryParams } = payload;
// const response = yield call(productSpuPage, payload);
// message.info('查询成功!');
// yield put({
// type: 'treeSuccess',
// payload: {
// list: response.data,
// },
// });
// 显示加载中
yield
put
({
type
:
'changeListLoading'
,
payload
:
true
,
});
// 请求
const
response
=
yield
call
(
productBrandPage
,
payload
);
// 响应
yield
put
({
type
:
'add'
,
payload
:
{
list
:
response
.
data
.
brands
,
pagination
:
PaginationHelper
.
formatPagination
(
response
.
data
,
payload
),
searchParams
:
{
name
:
payload
.
name
,
status
:
payload
.
status
,
cid
:
payload
.
cid
,
}
},
});
// 隐藏加载中
yield
put
({
type
:
'changeListLoading'
,
payload
:
false
,
});
},
},
reducers
:
{
treeSuccess
(
state
,
{
payload
})
{
return
{
...
state
,
...
payload
,
};
},
// 修改加载中的状态
changeSortModalLoading
(
state
,
{
payload
})
{
return
{
...
state
,
sortModalLoading
:
payload
,
};
},
changeListLoading
(
state
,
{
payload
})
{
return
{
...
state
,
listLoading
:
payload
,
};
},
// 设置所有属性
add
(
state
,
{
payload
})
{
return
{
...
state
,
...
payload
,
};
}
},
};
admin-web/src/pages/Product/ProductBrandList.js
0 → 100644
浏览文件 @
fe2305df
/* eslint-disable */
import
React
,
{
PureComponent
,
Fragment
}
from
'react'
;
import
{
connect
}
from
'dva'
;
import
moment
from
'moment'
;
import
{
Card
,
Form
,
Input
,
Row
,
Col
,
Button
,
Modal
,
message
,
Table
,
Divider
,
Tree
,
Tabs
,
TreeSelect
,
Spin
,
InputNumber
}
from
'antd'
;
import
PageHeaderWrapper
from
'@/components/PageHeaderWrapper'
;
import
styles
from
'./ProductSpuList.less'
;
import
PaginationHelper
from
"../../../helpers/PaginationHelper"
;
import
PicturesWall
from
"../../components/Image/PicturesWall"
;
const
FormItem
=
Form
.
Item
;
const
status
=
[
'未知'
,
'开启'
,
'禁用'
];
// 列表
function
List
({
dataSource
,
loading
,
pagination
,
searchParams
,
dispatch
,
categoryTree
,
handleModalVisible
})
{
function
onPageChange
(
page
)
{
// 翻页
dispatch
({
type
:
'productBrandList/page'
,
payload
:
{
pageNo
:
page
.
current
,
pageSize
:
page
.
pageSize
,
...
searchParams
}
})
}
const
columns
=
[
{
title
:
'品牌名称'
,
dataIndex
:
'name'
,
},
{
title
:
'品牌描述'
,
dataIndex
:
'description'
},
{
title
:
'品牌图片'
,
dataIndex
:
'picUrl'
,
render
(
val
)
{
return
<
img
width
=
{
120
}
src
=
{
val
}
/>;}
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
render
(
val
)
{
return
<
span
>
{
status
[
val
]}
<
/span>;}
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
render
:
val
=>
<
span
>
{
moment
(
val
).
format
(
'YYYY-MM-DD'
)}
<
/span>
,
},
{
title
:
'操作'
,
width
:
200
,
render
:
(
text
,
record
)
=>
{
const
statusText
=
record
.
status
===
1
?
'禁用'
:
'开启'
;
return
(
<
Fragment
>
<
a
onClick
=
{()
=>
handleModalVisible
(
true
,
'update'
,
record
)}
>
编辑
<
/a
>
<
Divider
type
=
"vertical"
/>
<
a
className
=
{
styles
.
tableDelete
}
onClick
=
{()
=>
handleStatus
(
record
)}
>
{
statusText
}
<
/a
>
<
Divider
type
=
"vertical"
/>
<
a
className
=
{
styles
.
tableDelete
}
onClick
=
{()
=>
handleDelete
(
record
)}
>
删除
<
/a
>
<
/Fragment
>
);
},
},
];
return
(
<
div
>
<
Table
columns
=
{
columns
}
dataSource
=
{
dataSource
}
rowKey
=
"id"
pagination
=
{
pagination
}
onChange
=
{
onPageChange
}
loading
=
{
loading
}
/
>
<
/div
>
)
}
// 新建 form 表单
const
AddOrUpdateForm
=
Form
.
create
()(
props
=>
{
const
{
dispatch
,
loading
,
modalVisible
,
form
,
handleModalVisible
,
modalType
,
categoryTree
,
formVals
}
=
props
;
let
picturesWall
=
null
;
const
okHandle
=
()
=>
{
form
.
validateFields
((
err
,
fields
)
=>
{
if
(
err
)
return
;
if
(
modalType
===
'add'
)
{
dispatch
({
type
:
'productBrandList/add'
,
payload
:
{
body
:
{
...
fields
,
picUrl
:
picturesWall
?
picturesWall
.
getUrl
()
:
undefined
,
},
callback
:
()
=>
{
// 清空表单
form
.
resetFields
();
// 提示
message
.
success
(
'新建成功'
);
// 关闭弹窗
handleModalVisible
();
},
},
});
}
else
{
dispatch
({
type
:
'productCategoryList/update'
,
payload
:
{
body
:
{
...
formVals
,
...
fields
,
picUrl
:
picturesWall
?
picturesWall
.
getUrl
()
:
undefined
,
},
callback
:
()
=>
{
// 清空表单
form
.
resetFields
();
// 提示
message
.
success
(
'编辑成功'
);
// 关闭弹窗
handleModalVisible
();
},
},
});
}
});
};
const
title
=
modalType
===
'add'
?
'新建品牌'
:
'编辑品牌'
;
const
okText
=
modalType
===
'add'
?
'新建'
:
'编辑'
;
return
(
<
Modal
destroyOnClose
title
=
{
title
}
visible
=
{
modalVisible
}
onOk
=
{
okHandle
}
okText
=
{
okText
}
onCancel
=
{()
=>
handleModalVisible
()}
>
<
Spin
spinning
=
{
loading
}
>
<
FormItem
labelCol
=
{{
span
:
5
}}
wrapperCol
=
{{
span
:
15
}}
label
=
"品牌名称"
>
{
form
.
getFieldDecorator
(
'name'
,
{
rules
:
[{
required
:
true
,
message
:
'请输入品牌名称!'
,
min
:
2
}],
initialValue
:
formVals
.
name
,
})(
<
Input
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
<
FormItem
labelCol
=
{{
span
:
5
}}
wrapperCol
=
{{
span
:
15
}}
label
=
"描述"
>
{
form
.
getFieldDecorator
(
'description'
,
{
rules
:
[{
required
:
true
,
message
:
'请输入描述!'
}],
initialValue
:
formVals
.
description
,
})(
<
Input
.
TextArea
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
<
/Spin
>
<
/Modal
>
);
});
// 搜索表单
const
SearchForm
=
Form
.
create
()(
props
=>
{
const
{
form
,
form
:
{
getFieldDecorator
},
dispatch
,
searchParams
,
categoryTree
,
}
=
props
;
function
search
()
{
dispatch
({
type
:
'productBrandList/page'
,
payload
:
{
...
PaginationHelper
.
defaultPayload
,
...
searchParams
,
...
form
.
getFieldsValue
(),
}
})
}
// 提交搜索
function
handleSubmit
(
e
)
{
// 阻止默认事件
e
.
preventDefault
();
// 提交搜索
search
();
}
// 重置搜索
function
handleReset
()
{
// 重置表单
form
.
resetFields
();
// 执行搜索
search
();
}
return
(
<
Form
onSubmit
=
{
handleSubmit
}
layout
=
"inline"
>
<
Row
gutter
=
{{
md
:
8
,
lg
:
24
,
xl
:
48
}}
>
<
Col
md
=
{
8
}
sm
=
{
24
}
>
<
FormItem
label
=
"品牌名称"
>
{
getFieldDecorator
(
'name'
)(
<
Input
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
<
/Col
>
<
Col
md
=
{
8
}
sm
=
{
24
}
>
<
FormItem
label
=
"品牌描述"
>
{
getFieldDecorator
(
'description'
)(
<
Input
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
<
/Col
>
<
Col
md
=
{
8
}
sm
=
{
24
}
>
<
span
className
=
{
styles
.
submitButtons
}
>
<
Button
type
=
"primary"
htmlType
=
"submit"
>
查询
<
/Button
>
<
Button
style
=
{{
marginLeft
:
8
}}
onClick
=
{
handleReset
}
>
重置
<
/Button
>
<
/span
>
<
/Col
>
<
/Row
>
<
/Form
>
);
});
// productSpuList
@
connect
(({
productBrandList
})
=>
({
...
productBrandList
}))
@
Form
.
create
()
class
ProductBrandList
extends
PureComponent
{
state
=
{
modalVisible
:
false
,
modalType
:
'add'
,
//add update
initValues
:
{},
roleAssignVisible
:
false
,
roleAssignRecord
:
{},
};
componentDidMount
()
{
const
{
dispatch
}
=
this
.
props
;
// 查询初始数据
dispatch
({
type
:
'productBrandList/page'
,
payload
:
{
...
PaginationHelper
.
defaultPayload
,
},
});
}
handleModalVisible
=
(
modalVisible
,
modalType
,
record
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'productBrandList/add'
,
payload
:
{
modalVisible
,
modalType
,
formVals
:
record
||
{}
},
});
};
render
()
{
const
{
dispatch
,
list
,
listLoading
,
searchParams
,
pagination
,
categoryTree
,
modalType
,
formVals
,
modalVisible
,
modalLoading
}
=
this
.
props
;
// 列表属性
const
listProps
=
{
dataSource
:
list
,
pagination
,
searchParams
,
dispatch
,
categoryTree
,
loading
:
listLoading
,
handleModalVisible
:
this
.
handleModalVisible
,
// Function
};
// 搜索表单属性
const
searchFormProps
=
{
dispatch
,
categoryTree
,
searchParams
,
};
// 添加 or 编辑表单属性
const
addOrUpdateFormProps
=
{
modalVisible
,
modalType
,
formVals
,
dispatch
,
loading
:
modalLoading
,
categoryTree
:
list
,
handleModalVisible
:
this
.
handleModalVisible
,
// Function
};
return
(
<
PageHeaderWrapper
>
<
Card
bordered
=
{
false
}
>
<
div
className
=
{
styles
.
tableList
}
>
<
div
className
=
{
styles
.
tableListOperator
}
>
<
Button
icon
=
"plus"
type
=
"primary"
onClick
=
{()
=>
this
.
handleModalVisible
(
true
,
'add'
,
{})}
>
新建品牌
<
/Button
>
<
/div
>
<
/div
>
<
SearchForm
{...
searchFormProps
}
/
>
<
List
{...
listProps
}
/
>
<
/Card
>
<
AddOrUpdateForm
{...
addOrUpdateFormProps
}
/
>
<
/PageHeaderWrapper
>
);
}
}
export
default
ProductBrandList
;
admin-web/src/services/product.js
浏览文件 @
fe2305df
...
...
@@ -92,8 +92,36 @@ export async function productAttrTree(params) {
}
export
async
function
productAttrValueAdd
(
params
)
{
return
request
(
`/product-api/admins/
/
attr_value/add?
${
stringify
(
params
)}
`
,
{
return
request
(
`/product-api/admins/attr_value/add?
${
stringify
(
params
)}
`
,
{
method
:
'POST'
,
body
:
{},
});
}
// product brand 2019-05-31
export
async
function
productBrandAdd
(
params
)
{
return
request
(
`/product-api/admins/brand/add?
${
stringify
(
params
)}
`
,
{
method
:
'POST'
,
body
:
{},
});
}
export
async
function
productBrandUpdate
(
params
)
{
return
request
(
`/product-api/admins/brand/update?
${
stringify
(
params
)}
`
,
{
method
:
'POST'
,
body
:
{},
});
}
export
async
function
productBrandGet
(
params
)
{
return
request
(
`/product-api/admins/brand/get?
${
stringify
(
params
)}
`
,
{
method
:
'GET'
});
}
export
async
function
productBrandPage
(
params
)
{
return
request
(
`/product-api/admins/brand/page?
${
stringify
(
params
)}
`
,
{
method
:
'GET'
});
}
common/common-framework/pom.xml
浏览文件 @
fe2305df
...
...
@@ -88,6 +88,12 @@
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-databind
</artifactId>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.8.1
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
...
...
common/common-framework/src/test/java/cn/iocoder/common/framework/util/DateUtilTest.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
common
.
framework
.
util
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
java.util.Date
;
import
java.util.GregorianCalendar
;
public
class
DateUtilTest
{
@Test
public
void
testAddDate
()
{
Assert
.
assertNull
(
DateUtil
.
addDate
(
0
,
0
));
Assert
.
assertEquals
(
new
Date
(
1_778_410_800_000L
),
DateUtil
.
addDate
(
new
Date
(
1_515_585_600_000L
),
2
,
100
));
}
@Test
public
void
testFormat
()
{
Assert
.
assertEquals
(
""
,
DateUtil
.
format
(
null
,
null
));
Assert
.
assertEquals
(
"2018-01-10:12:00:00"
,
DateUtil
.
format
(
new
Date
(
1_515_585_600_000L
),
"yyyy-MM-dd:HH:mm:ss"
));
}
@Test
public
void
testGetDayBegin
()
{
Assert
.
assertNull
(
DateUtil
.
getDayBegin
(
null
));
Assert
.
assertEquals
(
new
Date
(
1_515_542_400_000L
),
DateUtil
.
getDayBegin
(
new
Date
(
1_515_585_600_000L
)));
}
@Test
public
void
testGetDayEnd
()
{
Assert
.
assertNull
(
DateUtil
.
getDayEnd
(
null
));
Assert
.
assertEquals
(
new
Date
(
1_515_628_799_999L
),
DateUtil
.
getDayEnd
(
new
Date
(
1_515_585_600_000L
)));
}
@Test
public
void
testIsBetween
()
{
Assert
.
assertTrue
(
DateUtil
.
isBetween
(
DateUtil
.
getDayBegin
(),
DateUtil
.
getDayEnd
()));
Assert
.
assertFalse
(
DateUtil
.
isBetween
(
DateUtil
.
getDayBegin
(
new
Date
(
0L
)),
DateUtil
.
getDayEnd
(
new
Date
(
100_000L
))));
}
@Test
public
void
testSetCalender
()
{
final
GregorianCalendar
calendar
=
new
GregorianCalendar
();
DateUtil
.
setCalender
(
calendar
,
2
,
30
,
50
,
0
);
Assert
.
assertEquals
(
2
,
calendar
.
getTime
().
getHours
());
Assert
.
assertEquals
(
30
,
calendar
.
getTime
().
getMinutes
());
Assert
.
assertEquals
(
50
,
calendar
.
getTime
().
getSeconds
());
}
}
order/order-application/target/classes/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
swagger
:
enable
:
true
title
:
订单子系统
description
:
订单子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.pay.application.controller
order/order-application/target/classes/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
application
:
name
:
order-application
cloud
:
sentinel
:
transport
:
port
:
8719
dashboard
:
localhost:12088
metric
:
charset
:
UTF-8
eager
:
false
# server
server
:
port
:
18088
servlet
:
context-path
:
/order-api/
swagger
:
enable
:
false
management
:
endpoints
:
web
:
exposure
:
include
:
health,info,env,metrics,prometheus
metrics
:
enabled
:
true
order/order-application/target/generated-sources/annotations/cn/iocoder/mall/order/application/convert/CartConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
application
.
convert
;
import
cn.iocoder.mall.order.api.bo.CalcOrderPriceBO
;
import
cn.iocoder.mall.order.api.bo.CalcOrderPriceBO.Item
;
import
cn.iocoder.mall.order.api.bo.CalcOrderPriceBO.ItemGroup
;
import
cn.iocoder.mall.order.api.bo.CalcSkuPriceBO
;
import
cn.iocoder.mall.order.application.vo.UsersCalcSkuPriceVO
;
import
cn.iocoder.mall.order.application.vo.UsersCartDetailVO
;
import
cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO
;
import
cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.Fee
;
import
cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.Sku
;
import
cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.Spu
;
import
cn.iocoder.mall.product.api.bo.ProductAttrAndValuePairBO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:47:18+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
CartConvertImpl
implements
CartConvert
{
@Override
public
UsersOrderConfirmCreateVO
convert
(
CalcOrderPriceBO
calcOrderPriceBO
)
{
if
(
calcOrderPriceBO
==
null
)
{
return
null
;
}
UsersOrderConfirmCreateVO
usersOrderConfirmCreateVO
=
new
UsersOrderConfirmCreateVO
();
usersOrderConfirmCreateVO
.
setItemGroups
(
itemGroupListToItemGroupList
(
calcOrderPriceBO
.
getItemGroups
()
)
);
usersOrderConfirmCreateVO
.
setFee
(
feeToFee
(
calcOrderPriceBO
.
getFee
()
)
);
usersOrderConfirmCreateVO
.
setCouponCardDiscountTotal
(
calcOrderPriceBO
.
getCouponCardDiscountTotal
()
);
return
usersOrderConfirmCreateVO
;
}
@Override
public
UsersCartDetailVO
convert2
(
CalcOrderPriceBO
calcOrderPriceBO
)
{
if
(
calcOrderPriceBO
==
null
)
{
return
null
;
}
UsersCartDetailVO
usersCartDetailVO
=
new
UsersCartDetailVO
();
usersCartDetailVO
.
setItemGroups
(
itemGroupListToItemGroupList1
(
calcOrderPriceBO
.
getItemGroups
()
)
);
usersCartDetailVO
.
setFee
(
feeToFee1
(
calcOrderPriceBO
.
getFee
()
)
);
return
usersCartDetailVO
;
}
@Override
public
UsersCalcSkuPriceVO
convert2
(
CalcSkuPriceBO
calcSkuPriceBO
)
{
if
(
calcSkuPriceBO
==
null
)
{
return
null
;
}
UsersCalcSkuPriceVO
usersCalcSkuPriceVO
=
new
UsersCalcSkuPriceVO
();
usersCalcSkuPriceVO
.
setFullPrivilege
(
calcSkuPriceBO
.
getFullPrivilege
()
);
usersCalcSkuPriceVO
.
setTimeLimitedDiscount
(
calcSkuPriceBO
.
getTimeLimitedDiscount
()
);
usersCalcSkuPriceVO
.
setOriginalPrice
(
calcSkuPriceBO
.
getOriginalPrice
()
);
usersCalcSkuPriceVO
.
setBuyPrice
(
calcSkuPriceBO
.
getBuyPrice
()
);
return
usersCalcSkuPriceVO
;
}
protected
Spu
spuToSpu
(
cn
.
iocoder
.
mall
.
product
.
api
.
bo
.
ProductSkuDetailBO
.
Spu
spu
)
{
if
(
spu
==
null
)
{
return
null
;
}
Spu
spu1
=
new
Spu
();
spu1
.
setId
(
spu
.
getId
()
);
spu1
.
setName
(
spu
.
getName
()
);
spu1
.
setCid
(
spu
.
getCid
()
);
List
<
String
>
list
=
spu
.
getPicUrls
();
if
(
list
!=
null
)
{
spu1
.
setPicUrls
(
new
ArrayList
<
String
>(
list
)
);
}
return
spu1
;
}
protected
Sku
itemToSku
(
Item
item
)
{
if
(
item
==
null
)
{
return
null
;
}
Sku
sku
=
new
Sku
();
sku
.
setId
(
item
.
getId
()
);
sku
.
setSpu
(
spuToSpu
(
item
.
getSpu
()
)
);
sku
.
setPicURL
(
item
.
getPicURL
()
);
List
<
ProductAttrAndValuePairBO
>
list
=
item
.
getAttrs
();
if
(
list
!=
null
)
{
sku
.
setAttrs
(
new
ArrayList
<
ProductAttrAndValuePairBO
>(
list
)
);
}
sku
.
setPrice
(
item
.
getPrice
()
);
sku
.
setQuantity
(
item
.
getQuantity
()
);
sku
.
setBuyQuantity
(
item
.
getBuyQuantity
()
);
sku
.
setOriginPrice
(
item
.
getOriginPrice
()
);
sku
.
setBuyPrice
(
item
.
getBuyPrice
()
);
sku
.
setPresentPrice
(
item
.
getPresentPrice
()
);
sku
.
setBuyTotal
(
item
.
getBuyTotal
()
);
sku
.
setDiscountTotal
(
item
.
getDiscountTotal
()
);
sku
.
setPresentTotal
(
item
.
getPresentTotal
()
);
return
sku
;
}
protected
List
<
Sku
>
itemListToSkuList
(
List
<
Item
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
Sku
>
list1
=
new
ArrayList
<
Sku
>(
list
.
size
()
);
for
(
Item
item
:
list
)
{
list1
.
add
(
itemToSku
(
item
)
);
}
return
list1
;
}
protected
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersOrderConfirmCreateVO
.
ItemGroup
itemGroupToItemGroup
(
ItemGroup
itemGroup
)
{
if
(
itemGroup
==
null
)
{
return
null
;
}
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersOrderConfirmCreateVO
.
ItemGroup
itemGroup1
=
new
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersOrderConfirmCreateVO
.
ItemGroup
();
itemGroup1
.
setActivity
(
itemGroup
.
getActivity
()
);
itemGroup1
.
setItems
(
itemListToSkuList
(
itemGroup
.
getItems
()
)
);
return
itemGroup1
;
}
protected
List
<
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersOrderConfirmCreateVO
.
ItemGroup
>
itemGroupListToItemGroupList
(
List
<
ItemGroup
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersOrderConfirmCreateVO
.
ItemGroup
>
list1
=
new
ArrayList
<
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersOrderConfirmCreateVO
.
ItemGroup
>(
list
.
size
()
);
for
(
ItemGroup
itemGroup
:
list
)
{
list1
.
add
(
itemGroupToItemGroup
(
itemGroup
)
);
}
return
list1
;
}
protected
Fee
feeToFee
(
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
CalcOrderPriceBO
.
Fee
fee
)
{
if
(
fee
==
null
)
{
return
null
;
}
Fee
fee1
=
new
Fee
();
fee1
.
setBuyTotal
(
fee
.
getBuyTotal
()
);
fee1
.
setDiscountTotal
(
fee
.
getDiscountTotal
()
);
fee1
.
setPostageTotal
(
fee
.
getPostageTotal
()
);
fee1
.
setPresentTotal
(
fee
.
getPresentTotal
()
);
return
fee1
;
}
protected
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Spu
spuToSpu1
(
cn
.
iocoder
.
mall
.
product
.
api
.
bo
.
ProductSkuDetailBO
.
Spu
spu
)
{
if
(
spu
==
null
)
{
return
null
;
}
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Spu
spu1
=
new
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Spu
();
spu1
.
setId
(
spu
.
getId
()
);
spu1
.
setName
(
spu
.
getName
()
);
spu1
.
setCid
(
spu
.
getCid
()
);
List
<
String
>
list
=
spu
.
getPicUrls
();
if
(
list
!=
null
)
{
spu1
.
setPicUrls
(
new
ArrayList
<
String
>(
list
)
);
}
return
spu1
;
}
protected
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Sku
itemToSku1
(
Item
item
)
{
if
(
item
==
null
)
{
return
null
;
}
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Sku
sku
=
new
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Sku
();
sku
.
setId
(
item
.
getId
()
);
sku
.
setSpu
(
spuToSpu1
(
item
.
getSpu
()
)
);
sku
.
setPicURL
(
item
.
getPicURL
()
);
List
<
ProductAttrAndValuePairBO
>
list
=
item
.
getAttrs
();
if
(
list
!=
null
)
{
sku
.
setAttrs
(
new
ArrayList
<
ProductAttrAndValuePairBO
>(
list
)
);
}
sku
.
setPrice
(
item
.
getPrice
()
);
sku
.
setQuantity
(
item
.
getQuantity
()
);
sku
.
setBuyQuantity
(
item
.
getBuyQuantity
()
);
sku
.
setSelected
(
item
.
getSelected
()
);
sku
.
setActivity
(
item
.
getActivity
()
);
sku
.
setOriginPrice
(
item
.
getOriginPrice
()
);
sku
.
setBuyPrice
(
item
.
getBuyPrice
()
);
sku
.
setPresentPrice
(
item
.
getPresentPrice
()
);
sku
.
setBuyTotal
(
item
.
getBuyTotal
()
);
sku
.
setDiscountTotal
(
item
.
getDiscountTotal
()
);
sku
.
setPresentTotal
(
item
.
getPresentTotal
()
);
return
sku
;
}
protected
List
<
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Sku
>
itemListToSkuList1
(
List
<
Item
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Sku
>
list1
=
new
ArrayList
<
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Sku
>(
list
.
size
()
);
for
(
Item
item
:
list
)
{
list1
.
add
(
itemToSku1
(
item
)
);
}
return
list1
;
}
protected
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
ItemGroup
itemGroupToItemGroup1
(
ItemGroup
itemGroup
)
{
if
(
itemGroup
==
null
)
{
return
null
;
}
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
ItemGroup
itemGroup1
=
new
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
ItemGroup
();
itemGroup1
.
setActivity
(
itemGroup
.
getActivity
()
);
itemGroup1
.
setActivityDiscountTotal
(
itemGroup
.
getActivityDiscountTotal
()
);
itemGroup1
.
setItems
(
itemListToSkuList1
(
itemGroup
.
getItems
()
)
);
return
itemGroup1
;
}
protected
List
<
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
ItemGroup
>
itemGroupListToItemGroupList1
(
List
<
ItemGroup
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
ItemGroup
>
list1
=
new
ArrayList
<
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
ItemGroup
>(
list
.
size
()
);
for
(
ItemGroup
itemGroup
:
list
)
{
list1
.
add
(
itemGroupToItemGroup1
(
itemGroup
)
);
}
return
list1
;
}
protected
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Fee
feeToFee1
(
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
CalcOrderPriceBO
.
Fee
fee
)
{
if
(
fee
==
null
)
{
return
null
;
}
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Fee
fee1
=
new
cn
.
iocoder
.
mall
.
order
.
application
.
vo
.
UsersCartDetailVO
.
Fee
();
fee1
.
setBuyTotal
(
fee
.
getBuyTotal
()
);
fee1
.
setDiscountTotal
(
fee
.
getDiscountTotal
()
);
fee1
.
setPostageTotal
(
fee
.
getPostageTotal
()
);
fee1
.
setPresentTotal
(
fee
.
getPresentTotal
()
);
return
fee1
;
}
}
order/order-application/target/generated-sources/annotations/cn/iocoder/mall/order/application/convert/OrderConvertAPPImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
application
.
convert
;
import
cn.iocoder.mall.order.api.bo.CartItemBO
;
import
cn.iocoder.mall.order.api.dto.OrderCreateDTO
;
import
cn.iocoder.mall.order.api.dto.OrderCreateDTO.OrderItem
;
import
cn.iocoder.mall.order.api.dto.OrderItemUpdateDTO
;
import
cn.iocoder.mall.order.api.dto.OrderLogisticsUpdateDTO
;
import
cn.iocoder.mall.order.api.dto.OrderQueryDTO
;
import
cn.iocoder.mall.order.application.po.admin.OrderItemUpdatePO
;
import
cn.iocoder.mall.order.application.po.admin.OrderLogisticsPO
;
import
cn.iocoder.mall.order.application.po.admin.OrderPageQueryPO
;
import
cn.iocoder.mall.order.application.po.user.OrderCreatePO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:47:18+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderConvertAPPImpl
implements
OrderConvertAPP
{
@Override
public
OrderQueryDTO
convert
(
OrderPageQueryPO
orderPageQueryVO
)
{
if
(
orderPageQueryVO
==
null
)
{
return
null
;
}
OrderQueryDTO
orderQueryDTO
=
new
OrderQueryDTO
();
orderQueryDTO
.
setId
(
orderPageQueryVO
.
getId
()
);
orderQueryDTO
.
setOrderNo
(
orderPageQueryVO
.
getOrderNo
()
);
orderQueryDTO
.
setUserId
(
orderPageQueryVO
.
getUserId
()
);
orderQueryDTO
.
setStartPaymentTime
(
orderPageQueryVO
.
getStartPaymentTime
()
);
orderQueryDTO
.
setEndPaymentTime
(
orderPageQueryVO
.
getEndPaymentTime
()
);
orderQueryDTO
.
setStartCreateTime
(
orderPageQueryVO
.
getStartCreateTime
()
);
orderQueryDTO
.
setEndCreateTime
(
orderPageQueryVO
.
getEndCreateTime
()
);
orderQueryDTO
.
setDeleted
(
orderPageQueryVO
.
getDeleted
()
);
orderQueryDTO
.
setStatus
(
orderPageQueryVO
.
getStatus
()
);
orderQueryDTO
.
setPageNo
(
orderPageQueryVO
.
getPageNo
()
);
orderQueryDTO
.
setPageSize
(
orderPageQueryVO
.
getPageSize
()
);
return
orderQueryDTO
;
}
@Override
public
OrderLogisticsUpdateDTO
convert
(
OrderLogisticsPO
orderLogisticsVO
)
{
if
(
orderLogisticsVO
==
null
)
{
return
null
;
}
OrderLogisticsUpdateDTO
orderLogisticsUpdateDTO
=
new
OrderLogisticsUpdateDTO
();
orderLogisticsUpdateDTO
.
setId
(
orderLogisticsVO
.
getId
()
);
orderLogisticsUpdateDTO
.
setAreaNo
(
orderLogisticsVO
.
getAreaNo
()
);
orderLogisticsUpdateDTO
.
setName
(
orderLogisticsVO
.
getName
()
);
orderLogisticsUpdateDTO
.
setMobile
(
orderLogisticsVO
.
getMobile
()
);
orderLogisticsUpdateDTO
.
setAddress
(
orderLogisticsVO
.
getAddress
()
);
orderLogisticsUpdateDTO
.
setLogisticsNo
(
orderLogisticsVO
.
getLogisticsNo
()
);
return
orderLogisticsUpdateDTO
;
}
@Override
public
OrderItemUpdateDTO
convert
(
OrderItemUpdatePO
orderItemUpdateVO
)
{
if
(
orderItemUpdateVO
==
null
)
{
return
null
;
}
OrderItemUpdateDTO
orderItemUpdateDTO
=
new
OrderItemUpdateDTO
();
orderItemUpdateDTO
.
setId
(
orderItemUpdateVO
.
getId
()
);
orderItemUpdateDTO
.
setSkuId
(
orderItemUpdateVO
.
getSkuId
()
);
orderItemUpdateDTO
.
setQuantity
(
orderItemUpdateVO
.
getQuantity
()
);
orderItemUpdateDTO
.
setPrice
(
orderItemUpdateVO
.
getPrice
()
);
return
orderItemUpdateDTO
;
}
@Override
public
OrderCreateDTO
convert
(
OrderCreatePO
orderCreatePO
)
{
if
(
orderCreatePO
==
null
)
{
return
null
;
}
OrderCreateDTO
orderCreateDTO
=
new
OrderCreateDTO
();
orderCreateDTO
.
setUserAddressId
(
orderCreatePO
.
getUserAddressId
()
);
orderCreateDTO
.
setCouponCardId
(
orderCreatePO
.
getCouponCardId
()
);
orderCreateDTO
.
setRemark
(
orderCreatePO
.
getRemark
()
);
orderCreateDTO
.
setOrderItems
(
orderItemListToOrderItemList
(
orderCreatePO
.
getOrderItems
()
)
);
return
orderCreateDTO
;
}
@Override
public
List
<
OrderItem
>
convert
(
List
<
CartItemBO
>
cartItems
)
{
if
(
cartItems
==
null
)
{
return
null
;
}
List
<
OrderItem
>
list
=
new
ArrayList
<
OrderItem
>(
cartItems
.
size
()
);
for
(
CartItemBO
cartItemBO
:
cartItems
)
{
list
.
add
(
cartItemBOToOrderItem
(
cartItemBO
)
);
}
return
list
;
}
protected
OrderItem
orderItemToOrderItem
(
cn
.
iocoder
.
mall
.
order
.
application
.
po
.
user
.
OrderCreatePO
.
OrderItem
orderItem
)
{
if
(
orderItem
==
null
)
{
return
null
;
}
OrderItem
orderItem1
=
new
OrderItem
();
orderItem1
.
setSkuId
(
orderItem
.
getSkuId
()
);
orderItem1
.
setQuantity
(
orderItem
.
getQuantity
()
);
return
orderItem1
;
}
protected
List
<
OrderItem
>
orderItemListToOrderItemList
(
List
<
cn
.
iocoder
.
mall
.
order
.
application
.
po
.
user
.
OrderCreatePO
.
OrderItem
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
OrderItem
>
list1
=
new
ArrayList
<
OrderItem
>(
list
.
size
()
);
for
(
cn
.
iocoder
.
mall
.
order
.
application
.
po
.
user
.
OrderCreatePO
.
OrderItem
orderItem
:
list
)
{
list1
.
add
(
orderItemToOrderItem
(
orderItem
)
);
}
return
list1
;
}
protected
OrderItem
cartItemBOToOrderItem
(
CartItemBO
cartItemBO
)
{
if
(
cartItemBO
==
null
)
{
return
null
;
}
OrderItem
orderItem
=
new
OrderItem
();
orderItem
.
setSkuId
(
cartItemBO
.
getSkuId
()
);
orderItem
.
setQuantity
(
cartItemBO
.
getQuantity
()
);
return
orderItem
;
}
}
order/order-application/target/generated-sources/annotations/cn/iocoder/mall/order/application/convert/OrderDeliveryConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
application
.
convert
;
import
cn.iocoder.mall.order.api.dto.OrderDeliveryDTO
;
import
cn.iocoder.mall.order.application.po.admin.OrderDeliverPO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:47:18+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderDeliveryConvertImpl
implements
OrderDeliveryConvert
{
@Override
public
OrderDeliveryDTO
convert
(
OrderDeliverPO
orderDeliverPO
)
{
if
(
orderDeliverPO
==
null
)
{
return
null
;
}
OrderDeliveryDTO
orderDeliveryDTO
=
new
OrderDeliveryDTO
();
orderDeliveryDTO
.
setOrderId
(
orderDeliverPO
.
getOrderId
()
);
orderDeliveryDTO
.
setLogistics
(
orderDeliverPO
.
getLogistics
()
);
orderDeliveryDTO
.
setLogisticsNo
(
orderDeliverPO
.
getLogisticsNo
()
);
List
<
Integer
>
list
=
orderDeliverPO
.
getOrderItemIds
();
if
(
list
!=
null
)
{
orderDeliveryDTO
.
setOrderItemIds
(
new
ArrayList
<
Integer
>(
list
)
);
}
return
orderDeliveryDTO
;
}
}
order/order-application/target/generated-sources/annotations/cn/iocoder/mall/order/application/convert/OrderReturnConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
application
.
convert
;
import
cn.iocoder.mall.order.api.dto.OrderReturnApplyDTO
;
import
cn.iocoder.mall.order.api.dto.OrderReturnQueryDTO
;
import
cn.iocoder.mall.order.application.po.admin.OrderReturnQueryPO
;
import
cn.iocoder.mall.order.application.po.user.OrderReturnApplyPO
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:47:18+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderReturnConvertImpl
implements
OrderReturnConvert
{
@Override
public
OrderReturnApplyDTO
convert
(
OrderReturnApplyPO
orderReturnApplyPO
)
{
if
(
orderReturnApplyPO
==
null
)
{
return
null
;
}
OrderReturnApplyDTO
orderReturnApplyDTO
=
new
OrderReturnApplyDTO
();
orderReturnApplyDTO
.
setOrderId
(
orderReturnApplyPO
.
getOrderId
()
);
orderReturnApplyDTO
.
setReason
(
orderReturnApplyPO
.
getReason
()
);
orderReturnApplyDTO
.
setDescribe
(
orderReturnApplyPO
.
getDescribe
()
);
orderReturnApplyDTO
.
setReturnType
(
orderReturnApplyPO
.
getReturnType
()
);
return
orderReturnApplyDTO
;
}
@Override
public
OrderReturnQueryDTO
convert
(
OrderReturnQueryPO
orderReturnQueryPO
)
{
if
(
orderReturnQueryPO
==
null
)
{
return
null
;
}
OrderReturnQueryDTO
orderReturnQueryDTO
=
new
OrderReturnQueryDTO
();
orderReturnQueryDTO
.
setOrderId
(
orderReturnQueryPO
.
getOrderId
()
);
orderReturnQueryDTO
.
setOrderNo
(
orderReturnQueryPO
.
getOrderNo
()
);
orderReturnQueryDTO
.
setServiceNumber
(
orderReturnQueryPO
.
getServiceNumber
()
);
orderReturnQueryDTO
.
setStartCreateTime
(
orderReturnQueryPO
.
getStartCreateTime
()
);
orderReturnQueryDTO
.
setEndCreateTime
(
orderReturnQueryPO
.
getEndCreateTime
()
);
orderReturnQueryDTO
.
setStatus
(
orderReturnQueryPO
.
getStatus
()
);
orderReturnQueryDTO
.
setIndex
(
orderReturnQueryPO
.
getIndex
()
);
orderReturnQueryDTO
.
setPageSize
(
orderReturnQueryPO
.
getPageSize
()
);
return
orderReturnQueryDTO
;
}
}
order/order-service-impl/target/classes/config/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://192.168.88.14:3306/mall_order?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
order/order-service-impl/target/classes/config/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://180.167.213.26:13306/mall_order?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
# mybatis
#mybatis:
# config-location: classpath:mybatis-config.xml
# mapper-locations: classpath:mapper/*.xml
# type-aliases-package: cn.iocoder.mall.order.biz.dataobject
#
# 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.order.biz.dataobject
# dubbo
dubbo
:
application
:
name
:
order-service
registry
:
address
:
zookeeper://127.0.0.1:2181
protocol
:
port
:
-1
name
:
dubbo
scan
:
base-packages
:
cn.iocoder.mall.order.biz.service
provider
:
filter
:
-exception
CartService
:
version
:
1.0.0
OrderService
:
version
:
1.0.0
OrderReturnService
:
version
:
1.0.0
OrderLogisticsService
:
version
:
1.0.0
<<<<<<< Updated upstream
OrderCommentService
:
version
:
1.0.0
=======
>
>>>>>>
Stashed
changes
consumer:
timeout: 120000 # 设置长一点,方便调试代码
ProductSpuService:
version: 1.0.0
PromotionActivityService:
version: 1.0.0
CouponService:
version: 1.0.0
PayRefundService:
version: 1.0.0
UserAddressService:
version: 1.0.0
PayTransactionService:
version: 1.0.0
DataDictService:
version: 1.0.0
# logging
logging
:
level
:
# dao 开启 debug 模式 mybatis 输入 sql
cn.iocoder.mall.order.biz.dao
:
debug
# seata
seata
:
tx-service-group
:
my_test_tx_group
order/order-service-impl/target/classes/file.conf
0 → 100644
浏览文件 @
fe2305df
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
=
""
}
}
order/order-service-impl/target/classes/mapper/CartMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.CartMapper"
>
<sql
id=
"FIELDS"
>
id, status, delete_time, selected, user_id,
spu_id, sku_id, quantity, order_id, order_create_time,
create_time
</sql>
<select
id=
"selectById"
parameterType=
"Integer"
resultType=
"CartItemDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM cart_item
WHERE id = #{id}
-- AND deleted = 0
</select>
<select
id=
"selectByIds"
resultType=
"CartItemDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM cart_item
WHERE id IN
<foreach
item=
"id"
collection=
"ids"
separator=
","
open=
"("
close=
")"
index=
""
>
#{id}
</foreach>
-- AND deleted = 0
</select>
<select
id=
"selectByUserIdAndSkuIdAndStatus"
resultType=
"CartItemDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM cart_item
WHERE user_id = #{userId}
AND sku_id = #{skuId}
AND status = #{status}
-- AND deleted = 0
LIMIT 1
</select>
<select
id=
"selectByUserIdAndStatusAndSelected"
resultType=
"CartItemDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM cart_item
WHERE user_id = #{userId}
AND status = #{status}
<if
test=
"selected != null"
>
AND selected = #{selected}
</if>
-- AND deleted = 0
</select>
<select
id=
"selectQuantitySumByUserIdAndStatus"
resultType=
"Integer"
>
SELECT
SUM(quantity)
FROM cart_item
WHERE user_id = #{userId}
AND status = #{status}
-- AND deleted = 0
</select>
<insert
id=
"insert"
parameterType=
"CartItemDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO cart_item (
status, delete_time, selected, user_id,
spu_id, sku_id, quantity, order_id, order_create_time,
create_time
) VALUES (
#{status}, #{deleteTime}, #{selected}, #{userId},
#{spuId}, #{skuId}, #{quantity}, #{orderId}, #{orderCreateTime},
#{createTime}
)
</insert>
<update
id=
"update"
parameterType=
"CartItemDO"
>
UPDATE cart_item
<set>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"deleteTime != null"
>
delete_time = #{deleteTime},
</if>
<if
test=
"selected != null"
>
selected = #{selected},
</if>
<if
test=
"quantity != null"
>
quantity = #{quantity},
</if>
<if
test=
"orderId != null"
>
order_id = #{orderId},
</if>
<if
test=
"orderCreateTime != null"
>
order_create_time = #{orderCreateTime},
</if>
<if
test=
"price != null"
>
price = #{price},
</if>
<if
test=
"quantity != null"
>
quantity = #{quantity},
</if>
</set>
WHERE id = #{id}
</update>
<update
id=
"updateQuantity"
parameterType=
"CartItemDO"
>
UPDATE cart_item
SET quantity = quantity + #{quantityIncr}
WHERE id = #{id}
</update>
<update
id=
"updateListByUserIdAndSkuId"
>
UPDATE cart_item
<set>
<if
test=
"selected != null"
>
selected = #{selected},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
</set>
WHERE user_id = #{userId}
AND sku_id IN
<foreach
item=
"skuId"
collection=
"skuIds"
separator=
","
open=
"("
close=
")"
index=
""
>
#{skuId}
</foreach>
-- AND deleted = 0
</update>
</mapper>
order/order-service-impl/target/classes/mapper/OrderCancelMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.OrderCancelMapper"
>
<sql
id=
"FIELDS"
>
id, order_id, order_no, reason, other_reason,
create_time, update_time
</sql>
<!--
插入数据
-->
<insert
id=
"insert"
parameterType=
"OrderCancelDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO `order_cancel` (
order_id, order_no, reason, other_reason,
create_time, update_time
) VALUES (
#{orderId}, #{orderNo}, #{reason}, #{otherReason},
#{createTime}, #{updateTime}
)
</insert>
</mapper>
order/order-service-impl/target/classes/mapper/OrderCommentMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.OrderCommentMapper"
>
<sql
id=
"FIELDS"
>
id,order_id,order_no,product_spu_id,product_spu_name,product_sku_id,product_sku_attrs,product_sku_price,product_sku_pic_url,
user_id,user_avatar,user_nick_name,star,product_description_star,logistics_star,merchant_star,replay_count,like_count,comment_content,
comment_pics,create_time,update_time
</sql>
<!--插入-->
<insert
id=
"insert"
parameterType=
"OrderCommentDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO order_comment(order_id,order_no,product_spu_id,product_spu_name,product_sku_id,
product_sku_attrs,product_sku_price,product_sku_pic_url,user_id,user_avatar,user_nick_name,star,
product_description_star,logistics_star,merchant_star,comment_content,comment_pics,create_time,update_time)
VALUES (#{orderId},#{orderNo},#{productSpuId},#{productSpuName},#{productSkuId},#{productSkuAttrs},
#{productSkuPrice},#{productSkuPicUrl},#{userId},#{userAvatar},#{userNickName},#{star},
#{productDescriptionStar},#{logisticsStar},#{merchantStar},#{commentContent},#{commentPics},#{createTime}, #{updateTime});
</insert>
<!--根据 sku id 获取评论总数-->
<select
id=
"selectCommentTotalCountByProductSkuId"
parameterType=
"Integer"
resultType=
"java.lang.Integer"
>
SELECT
COUNT (*)
FROM order_comment
WHERE
product_sku_id = #{productSkuId}
</select>
<!--分页获取评论分页-->
<select
id=
"selectCommentPage"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderCommentDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_comment
WHERE
product_sku_id = #{productSkuId}
ORDER BY create_time DESC
LIMIT ${pageNo * pageSize}, ${pageSize}
</select>
<!--根据评论 id 获取用户详情-->
<select
id=
"selectCommentInfoByCommentId"
parameterType=
"Integer"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderCommentDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_comment
WHERE
id = #{id}
ORDER BY create_time DESC
LIMIT ${pageNo * pageSize}, ${pageSize}
</select>
</mapper>
\ No newline at end of file
order/order-service-impl/target/classes/mapper/OrderCommentReplayMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.OrderCommentReplayMapper"
>
<sql
id=
"FIELDS"
>
id,comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,
reply_user_id,reply_user_nick_name,reply_user_avatar,user_type,reply_like_count,create_time,update_time
</sql>
<!--插入-->
<insert
id=
"insert"
parameterType=
"OrderCommentReplyDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<<<<<<
< Updated
upstream
INSERT
INTO
order_comment_replay(comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,
reply_user_id
=
======
INSERT
INTO
`order_comment_replay`(comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,reply_user_id
>
>>>>>> Stashed changes
reply_user_nick_name,reply_user_avatar,user_type,create_time,update_time)
VALUES (#{commentId},#{replyType},#{parentId},#{parentUserId},#{parentUserNickName},#{parentUserAvatar},#{replyContent},#{replyUserId},
#{replyUserNickName},#{replyUserAvatar},#{userType},#{createTime},#{updateTime})
</insert>
<!--根据评论 id 和用户类型获取商家回复列表-->
<select
id=
"selectCommentMerchantReplyByCommentId"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_comment_replay
WHERE
comment_id = #{commentId}
AND
user_type = #{userType}
ORDER BY create_time DESC
</select>
<!--根据评论 id 和用户类型获取评论总数-->
<select
id=
"selectCommentReplyTotalCountByCommentId"
parameterType=
"Integer"
resultType=
"java.lang.Integer"
>
SELECT
COUNT (*)
FROM order_comment_replay
WHERE
comment_id = #{commentId}
AND
user_type = #{userType}
</select>
<!--分页用户回复-->
<select
id=
"selectCommentReplyPage"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_comment_replay
WHERE
comment_id = #{commentId}
AND
user_type = #{userType}
ORDER BY create_time DESC
LIMIT ${pageNo * pageSize}, ${pageSize}
</select>
<<<<<<
< Updated
upstream
<!--根据评论
id
查询商家最新的评论列表--
>
<select
id=
"selectCommentNewMerchantReplyByCommentIds"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO"
>
</select>
=======
>>>>>>> Stashed changes
</mapper>
order/order-service-impl/target/classes/mapper/OrderItemMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.OrderItemMapper"
>
<sql
id=
"FIELDS"
>
id, order_id, order_no, sku_id, sku_name, sku_image, order_logistics_id,
quantity, origin_price, buy_price, present_price, buy_total, discount_total, present_total,
payment_time, delivery_time, receiver_time, closing_time,
has_return_exchange, delivery_type, status,
create_time, update_time, deleted
</sql>
<!--
插入数据
-->
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO `order_item` (
order_id, order_no, sku_id, sku_name, sku_image, order_logistics_id,
quantity, origin_price, buy_price, present_price, buy_total, discount_total, present_total,
payment_time, delivery_time, receiver_time, closing_time,
has_return_exchange, delivery_type, status,
create_time, update_time, deleted
) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.orderId}, #{item.orderNo}, #{item.skuId}, #{item.skuName}, #{item.skuImage}, #{item.orderLogisticsId},
#{item.quantity}, #{item.originPrice}, #{item.buyPrice}, #{item.presentPrice}, #{item.buyTotal}, #{item.discountTotal}, #{item.presentTotal},
#{item.paymentTime}, #{item.deliveryTime}, #{item.receiverTime}, #{item.closingTime},
#{item.hasReturnExchange}, #{item.deliveryType}, #{item.status},
#{item.createTime}, #{item.updateTime}, #{item.deleted})
</foreach>
</insert>
<!--
更新 - 可更新的字段
-->
<sql
id=
"updateFieldSql"
>
<set>
<if
test=
"orderItemDO.orderId != null"
>
, order_id = #{orderItemDO.orderId}
</if>
<if
test=
"orderItemDO.orderNo != null"
>
, order_no = #{orderItemDO.orderNo}
</if>
<if
test=
"orderItemDO.orderLogisticsId != null"
>
, order_logistics_id = #{orderItemDO.orderLogisticsId}
</if>
<if
test=
"orderItemDO.skuId != null"
>
, sku_id = #{orderItemDO.skuId}
</if>
<if
test=
"orderItemDO.skuName != null"
>
, sku_name = #{orderItemDO.skuName}
</if>
<if
test=
"orderItemDO.skuImage != null"
>
, sku_image = #{orderItemDO.skuImage}
</if>
<if
test=
"orderItemDO.quantity != null"
>
, quantity = #{orderItemDO.quantity}
</if>
<!-- TODO 芋艿 需要改 -->
<!-- <if test="orderItemDO.price != null">-->
<!-- , price = #{orderItemDO.price}-->
<!-- </if>-->
<!-- <if test="orderItemDO.payAmount != null">-->
<!-- , pay_amount = #{orderItemDO.payAmount}-->
<!-- </if>-->
<if
test=
"orderItemDO.paymentTime != null"
>
, payment_time = #{orderItemDO.paymentTime}
</if>
<if
test=
"orderItemDO.deliveryTime != null"
>
, delivery_time = #{orderItemDO.deliveryTime}
</if>
<if
test=
"orderItemDO.receiverTime != null"
>
, receiver_time = #{orderItemDO.receiverTime}
</if>
<if
test=
"orderItemDO.closingTime != null"
>
, closing_time = #{orderItemDO.closingTime}
</if>
<if
test=
"orderItemDO.hasReturnExchange != null"
>
, has_return_exchange = #{orderItemDO.hasReturnExchange}
</if>
<if
test=
"orderItemDO.status != null"
>
, status = #{orderItemDO.status}
</if>
<if
test=
"orderItemDO.deliveryType != null"
>
, delivery_type = #{orderItemDO.deliveryType}
</if>
<if
test=
"orderItemDO.deleted != null"
>
, `deleted` = #{orderItemDO.deleted}
</if>
<if
test=
"orderItemDO.createTime != null"
>
, create_time = #{orderItemDO.createTime}
</if>
<if
test=
"orderItemDO.updateTime != null"
>
, update_time = #{orderItemDO.updateTime}
</if>
</set>
</sql>
<!--
更新 - 根据 id 更新
-->
<update
id=
"updateById"
parameterType=
"OrderDO"
>
UPDATE `order_item`
<include
refid=
"updateFieldSql"
/>
WHERE id = #{orderItemDO.id}
</update>
<!--
更新 - 根据 ids 更新
-->
<update
id=
"updateByIds"
>
UPDATE `order_item`
<include
refid=
"updateFieldSql"
/>
WHERE id IN
<foreach
collection=
"ids"
item=
"id"
separator=
","
open=
"("
close=
")"
>
#{id}
</foreach>
</update>
<!--
更新 - 根据 orderId
-->
<update
id=
"updateByOrderId"
>
UPDATE `order_item`
<include
refid=
"updateFieldSql"
/>
WHERE order_id = #{orderId}
</update>
<!--
获取 - 根据 ids 查询
-->
<select
id=
"selectByIds"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderItemDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_item
WHERE `id` IN
<foreach
collection=
"ids"
item=
"id"
separator=
","
open=
"("
close=
")"
>
#{id}
</foreach>
</select>
<!--
查询 - 根据 orderId 下的 item
-->
<select
id=
"selectByDeletedAndOrderId"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderItemDO"
>
SELECT * FROM `order_item`
WHERE 1=1
<if
test=
"deleted != null"
>
AND deleted = #{deleted}
</if>
<if
test=
"orderId != null"
>
AND order_id = #{orderId}
</if>
</select>
<!--
查询 - 根据 orderIds 和 status
-->
<select
id=
"selectByDeletedAndOrderIds"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderItemDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `order_item`
WHERE `deleted` = #{deleted}
AND `order_id`
IN
<foreach
collection=
"orderIds"
item=
"orderId"
open=
"("
close=
")"
separator=
","
>
#{orderId}
</foreach>
</select>
</mapper>
order/order-service-impl/target/classes/mapper/OrderLogisticsDetailMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.OrderLogisticsDetailMapper"
>
<sql
id=
"FIELDS"
>
id,
order_logistics_id,
logistics_time,
logistics_information,
create_time,
update_time
</sql>
<!--
插入
-->
<insert
id=
"insert"
parameterType=
"CartItemDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO cart_item (order_logistics_id, logistics_time, logistics_information,
create_time, update_time)
VALUES (#{orderLogisticsId}, #{logisticsTime}, #{logisticsInformation},
#{createTime}, #{updateTime})
</insert>
<!--
查询 - 根据 物流id
-->
<select
id=
"selectByOrderLogisticsId"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_logistics_detail
WHERE order_logistics_id = #{orderLogisticsId}
</select>
<!--
查询 - 根据 物流ids
-->
<select
id=
"selectByOrderLogisticsIds"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_logistics_detail
WHERE order_logistics_id IN
<foreach
collection=
"orderLogisticsIds"
item=
"orderLogisticsId"
separator=
","
open=
"("
close=
")"
>
#{orderLogisticsId}
</foreach>
</select>
<!--
查询 - 最新的物流信息
-->
<select
id=
"selectLast"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_logistics_detail
WHERE order_logistics_id IN
<foreach
collection=
"orderLogisticsIds"
item=
"orderLogisticsId"
separator=
","
open=
"("
close=
")"
>
#{orderLogisticsId}
</foreach>
ORDER BY create_time DESC
LIMIT 0, 1
</select>
<!--
查询 - 根据 last 根据物理id
-->
<select
id=
"selectLastByLogisticsId"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM order_logistics_detail
WHERE order_logistics_id = #{orderLogisticsId}
ORDER BY create_time DESC
LIMIT 1
</select>
</mapper>
order/order-service-impl/target/classes/mapper/OrderLogisticsMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.OrderLogisticsMapper"
>
<sql
id=
"FIELDS"
>
id, area_no, `name`, mobile, address, logistics, logistics_no, create_time, update_time
</sql>
<!--
插入数据
-->
<insert
id=
"insert"
parameterType=
"OrderLogisticsDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO `order_logistics` (
area_no, `name`, mobile, address, logistics, logistics_no, create_time, update_time
) VALUES (
#{areaNo}, #{name}, #{mobile}, #{address},
#{logistics}, #{logisticsNo}, #{createTime}, #{updateTime}
)
</insert>
<!--
可更新字段
-->
<sql
id=
"updateFieldSql"
>
<set>
<if
test=
"areaNo != null"
>
, area_no = #{areaNo}
</if>
<if
test=
"name != null"
>
, `name` = #{name}
</if>
<if
test=
"mobile != null"
>
, mobile = #{mobile}
</if>
<if
test=
"address != null"
>
, address = #{address}
</if>
<if
test=
"logistics != null"
>
, logistics = #{logistics}
</if>
<if
test=
"logisticsNo != null"
>
, logistics_no = #{logisticsNo}
</if>
</set>
</sql>
<!--
更新 - 根据id
-->
<update
id=
"updateById"
>
UPDATE `order_logistics`
<include
refid=
"updateFieldSql"
/>
WHERE id = #{id}
</update>
<!--
查询 - 根据 ids
-->
<select
id=
"selectByIds"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `order_logistics`
WHERE `id`
IN
<foreach
collection=
"ids"
item=
"id"
separator=
","
open=
"("
close=
")"
>
#{id}
</foreach>
</select>
<!--
查询 - 根据 ids
-->
<select
id=
"selectById"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `order_logistics`
WHERE `id` = #{id}
LIMIT 1
</select>
</mapper>
\ No newline at end of file
order/order-service-impl/target/classes/mapper/OrderMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.OrderMapper"
>
<sql
id=
"FIELDS"
>
id, user_id, order_no, buy_price, discount_price, logistics_price, present_price, pay_amount,
payment_time, delivery_time, receiver_time, closing_time,
has_return_exchange,
status, remark, create_time, update_time, `deleted`
</sql>
<sql
id=
"updateFieldSql"
>
<set>
<if
test=
"orderNo != null"
>
, order_no = #{orderNo}
</if>
<if
test=
"buyPrice != null"
>
, buy_price = #{buyPrice}
</if>
<if
test=
"discountPrice != null"
>
, discount_price = #{discountPrice}
</if>
<if
test=
"logisticsPrice != null"
>
, logistics_price = #{logisticsPrice}
</if>
<if
test=
"logisticsPrice != null"
>
, logistics_price = #{logisticsPrice}
</if>
<if
test=
"presentPrice != null"
>
, present_price = #{presentPrice}
</if>
<if
test=
"payAmount != null"
>
, pay_amount = #{payAmount}
</if>
<if
test=
"deliveryTime != null"
>
, delivery_time = #{deliveryTime}
</if>
<if
test=
"paymentTime != null"
>
, payment_time = #{paymentTime}
</if>
<if
test=
"receiverTime != null"
>
, receiver_time = #{receiverTime}
</if>
<if
test=
"closingTime != null"
>
, closing_time = #{closingTime}
</if>
<if
test=
"hasReturnExchange != null"
>
, has_return_exchange = #{hasReturnExchange}
</if>
<if
test=
"status != null"
>
, status = #{status}
</if>
<if
test=
"remark != null"
>
, remark = #{remark}
</if>
<if
test=
"deleted != null"
>
, `deleted` = #{deleted}
</if>
<if
test=
"createTime != null"
>
, create_time = #{createTime}
</if>
<if
test=
"updateTime != null"
>
, update_time = #{updateTime}
</if>
</set>
</sql>
<update
id=
"updateById"
parameterType=
"OrderDO"
>
UPDATE `orders`
<include
refid=
"updateFieldSql"
/>
WHERE id = #{id}
</update>
<update
id=
"updateByIdAndStatus"
>
UPDATE `orders`
<set>
<if
test=
"updateObj.payAmount != null"
>
, pay_amount = #{updateObj.payAmount}
</if>
<if
test=
"updateObj.paymentTime != null"
>
, payment_time = #{updateObj.paymentTime}
</if>
<if
test=
"updateObj.status != null"
>
, status = #{updateObj.status}
</if>
</set>
WHERE id = #{id}
AND status = #{status}
</update>
<select
id=
"selectById"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `orders`
WHERE id = #{id}
</select>
<sql
id=
"selectWhere"
>
<if
test=
"status != null"
>
AND `status` = #{status}
</if>
<if
test=
"userId != null"
>
AND `user_id` = #{userId}
</if>
<if
test=
"id != null"
>
AND `id` = #{id}
</if>
<if
test=
"orderNo != null"
>
AND `order_no` = #{orderNo}
</if>
<if
test=
"hasReturnExchange != null"
>
AND `has_return_exchange` = #{hasReturnExchange}
</if>
<if
test=
"startCreateTime != null and endCreateTime != null"
>
AND `create_time`
>
= #{startCreateTime}
AND `create_time`
<
= #{endCreateTime}
</if>
</sql>
<select
id=
"selectPageCount"
resultType=
"java.lang.Integer"
>
SELECT
COUNT(*)
FROM `orders`
<where>
<include
refid=
"selectWhere"
/>
</where>
</select>
<select
id=
"selectPage"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `orders`
<where>
<include
refid=
"selectWhere"
/>
</where>
LIMIT ${pageNo * pageSize}, ${pageSize}
</select>
</mapper>
order/order-service-impl/target/classes/mapper/OrderRecipientMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.OrderRecipientMapper"
>
<sql
id=
"FIELDS"
>
id, order_id, `area_no`, `name`, mobile, address, `type`,
create_time, update_time
</sql>
<!--
插入数据
-->
<insert
id=
"insert"
parameterType=
"OrderRecipientDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO `order_recipient` (
order_id, `area_no`, `name`, mobile, address,
`type`, create_time, update_time
) VALUES (
#{orderId}, #{areaNo}, #{name}, #{mobile}, #{address},
#{type}, #{createTime,jdbcType=TIMESTAMP} , #{updateTime}
)
</insert>
<!--
查询 - 根据 orderId
-->
<select
id=
"selectByOrderId"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `order_recipient`
WHERE order_id = #{orderId}
</select>
<!--
查询 - 根据 orderIds
-->
<select
id=
"selectByOrderIds"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `order_recipient`
WHERE order_id IN
<foreach
collection=
"orderIds"
item=
"orderId"
separator=
","
open=
"("
close=
")"
>
#{orderId}
</foreach>
</select>
</mapper>
order/order-service-impl/target/classes/mapper/OrderReturnMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.order.biz.dao.OrderReturnMapper"
>
<sql
id=
"FIELDS"
>
id,
service_number,
order_id,
order_no,
order_logistics_id,
refund_price,
reason,
`describe`,
approval_time,
refuse_time,
logistics_time,
receiver_time,
closing_time,
service_type,
status,
create_time,
update_time
</sql>
<!--
插入数据
-->
<insert
id=
"insert"
parameterType=
"OrderReturnDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO `order_return` (
service_number, order_id, order_no, order_logistics_id,
refund_price, reason, `describe`,
approval_time, refuse_time, logistics_time, receiver_time, closing_time,
service_type, status,
create_time, update_time)
VALUES (
#{serviceNumber}, #{orderId}, #{orderNo}, #{orderLogisticsId},
${refundPrice}, #{reason}, #{describe},
#{approvalTime}, #{refuse_time}, #{logisticsTime}, #{receiverTime}, #{closingTime},
#{serviceType}, #{status}, #{createTime}, #{updateTime})
</insert>
<!--
更新 - 可更新的字段
-->
<sql
id=
"updateFieldSql"
>
<set>
<if
test=
"orderLogisticsId != null"
>
, order_logistics_id = #{orderLogisticsId}
</if>
<if
test=
"refundPrice != null"
>
, refund_price = #{refundPrice}
</if>
<if
test=
"reason != null"
>
, reason = #{reason}
</if>
<if
test=
"describe != null"
>
, `describe` = #{describe}
</if>
<if
test=
"approvalTime != null"
>
, approval_time = #{approvalTime}
</if>
<if
test=
"refuseTime != null"
>
, refuse_time = #{refuseTime}
</if>
<if
test=
"logisticsTime != null"
>
, logistics_time = #{logisticsTime}
</if>
<if
test=
"receiverTime != null"
>
, receiver_time = #{receiverTime}
</if>
<if
test=
"closingTime != null"
>
, closing_time = #{closingTime}
</if>
<if
test=
"serviceType != null"
>
, service_type = #{serviceType}
</if>
<if
test=
"status != null"
>
, status = #{status}
</if>
<if
test=
"createTime != null"
>
, create_time = #{createTime}
</if>
<if
test=
"updateTime != null"
>
, update_time = #{updateTime}
</if>
</set>
</sql>
<!--
更新 - 根据 id 更新
-->
<update
id=
"updateById"
parameterType=
"OrderReturnDO"
>
UPDATE `order_return`
<include
refid=
"updateFieldSql"
/>
WHERE id = #{id}
</update>
<!--
查询 - 根据id 查询
-->
<select
id=
"selectByOrderId"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderReturnDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `order_return`
WHERE order_id = #{orderId}
LIMIT 1
</select>
<!--
列表查询 - where
-->
<sql
id=
"selectListWhere"
>
<if
test=
"status != null"
>
AND status = #{status}
</if>
<if
test=
"serviceNumber != null"
>
AND service_number = #{serviceNumber}
</if>
<if
test=
"orderId != null"
>
AND order_id = #{orderId}
</if>
<if
test=
"orderId != null"
>
AND order_no = #{orderNo}
</if>
<if
test=
"startCreateTime != null and endCreateTime != null"
>
AND create_time
>
= #{startCreateTime}
AND create_time
<
= #{endCreateTime}
</if>
</sql>
<!--
列表查询 - count
-->
<select
id=
"selectListCount"
resultType=
"java.lang.Integer"
>
SELECT
COUNT(*)
FROM `order_return`
WHERE 1 = 1
<include
refid=
"selectListWhere"
/>
</select>
<!--
列表查询 - queryDTO
-->
<select
id=
"selectList"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderReturnDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `order_return`
WHERE 1 = 1
<include
refid=
"selectListWhere"
/>
<bind
name=
"limitIndex"
value=
"pageSize * (index - 1)"
/>
LIMIT #{limitIndex}, #{pageSize}
</select>
<!--
查询 - 根据 id 查询
-->
<select
id=
"selectById"
resultType=
"cn.iocoder.mall.order.biz.dataobject.OrderReturnDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM `order_return`
WHERE id = #{id}
</select>
</mapper>
order/order-service-impl/target/classes/registry.conf
0 → 100644
浏览文件 @
fe2305df
registry
{
type
=
"file"
file
{
name
=
"file.conf"
}
zk
{
cluster
=
"default"
serverAddr
=
"192.168.88.10:2181"
session
.
timeout
=
6000
connect
.
timeout
=
2000
}
}
order/order-service-impl/target/classes/sql/mall_order.sql
0 → 100644
浏览文件 @
fe2305df
DROP
TABLE
`order`
;
DROP
TABLE
`order_item`
;
DROP
TABLE
`order_exchange`
;
DROP
TABLE
`order_return`
;
DROP
TABLE
`order_logistics`
;
DROP
TABLE
`order_logistics_detail`
;
CREATE
TABLE
`order`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
COMMENT
'Id,自增长'
,
`order_logistics_id`
int
NOT
NULL
COMMENT
'物流id'
,
`order_no`
varchar
(
50
)
NOT
NULL
COMMENT
'订单单号'
,
`price`
int
(
10
)
NULL
COMMENT
'金额(分)'
,
`payment_time`
datetime
NULL
COMMENT
'付款时间'
,
`delivery_time`
datetime
NULL
COMMENT
'发货时间'
,
`receiver_time`
datetime
NULL
COMMENT
'收货时间'
,
`closing_time`
datetime
NULL
COMMENT
'成交时间'
,
`has_return_exchange`
smallint
NULL
COMMENT
'是否退换货'
,
`remark`
varchar
(
255
)
NULL
COMMENT
'备注'
,
`status`
smallint
(
2
)
NULL
COMMENT
'状态(如果有多个商品分开发货需要全部商品发完才会改变状态) 0、待付款 1、待发货 2、待收货 3、已完成 4、已关闭'
,
`create_time`
datetime
NULL
COMMENT
'订单创建时间'
,
`update_time`
datetime
NULL
COMMENT
'更新时间'
,
`deleted`
smallint
NULL
COMMENT
'删除状态'
,
PRIMARY
KEY
(
`id`
)
);
CREATE
TABLE
`order_item`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
COMMENT
'id自增长'
,
`order_id`
int
NOT
NULL
COMMENT
'订单编号'
,
`order_no`
varchar
(
50
)
NOT
NULL
COMMENT
'订单号'
,
`sku_id`
int
NOT
NULL
COMMENT
'商品编号'
,
`quantity`
int
(
3
)
NOT
NULL
COMMENT
'商品数量'
,
`price`
int
(
255
)
NOT
NULL
COMMENT
'金额'
,
`payment_time`
datetime
NULL
COMMENT
'付款时间'
,
`delivery_time`
datetime
NULL
COMMENT
'发货时间'
,
`receiver_time`
datetime
NULL
COMMENT
'收货时间'
,
`closing_time`
datetime
NULL
,
`has_return_exchange`
int
NULL
COMMENT
'是否退换货'
,
`create_time`
datetime
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
NULL
COMMENT
'更新时间'
,
`status`
smallint
(
2
)
NOT
NULL
COMMENT
'状态:0、代发货 1、已发货 2、已收货 20、换货中 21、换货成功 40、退货中 41、已退货'
,
`delete`
smallint
(
2
)
NOT
NULL
COMMENT
'删除状态'
,
PRIMARY
KEY
(
`id`
)
);
CREATE
TABLE
`order_exchange`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`order_id`
int
(
11
)
NOT
NULL
,
`order_no`
varchar
(
50
)
NOT
NULL
,
`sku_id`
int
(
11
)
NOT
NULL
,
`exchange_sku_id`
int
(
11
)
NOT
NULL
COMMENT
'换货商品id'
,
`exchange_order_logistics_id`
int
(
11
)
NOT
NULL
COMMENT
'换货物流id'
,
`receiver_order_logistics_id`
int
(
11
)
NOT
NULL
COMMENT
'收件地址'
,
`order_reason_id`
int
(
11
)
NULL
COMMENT
'换货原因'
,
`reason`
varchar
(
255
)
NULL
COMMENT
'换货原因 (其他的时候)'
,
`payment_time`
datetime
NULL
COMMENT
'付款时间'
,
`delivery_time`
datetime
NULL
COMMENT
'发货时间'
,
`receiver_time`
datetime
NULL
COMMENT
'收货时间'
,
`closing_time`
datetime
NULL
COMMENT
'成交时间'
,
`create_time`
datetime
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
NULL
COMMENT
'更新时间'
,
`delete`
smallint
(
2
)
NULL
COMMENT
'删除状态'
,
`order_type`
int
(
2
)
NULL
COMMENT
'订单类型 0、为 Order 订单 1、为 OrderItem 订单'
,
`status`
int
(
2
)
NULL
COMMENT
'状态 申请换货、申请成功、申请失败、换货中、换货成功'
,
PRIMARY
KEY
(
`id`
)
);
CREATE
TABLE
`order_return`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
COMMENT
'id自增长'
,
`order_id`
int
NOT
NULL
COMMENT
'订单编号'
,
`order_no`
varchar
(
50
)
NOT
NULL
COMMENT
'订单号'
,
`sku_id`
int
NOT
NULL
COMMENT
'商品编号'
,
`order_item_id`
int
(
11
)
NOT
NULL
COMMENT
'订单item id'
,
`order_logistics_id`
int
(
11
)
NOT
NULL
COMMENT
'物流 id'
,
`order_reason_id`
int
(
11
)
NULL
COMMENT
'退货原因'
,
`reason`
varchar
(
255
)
NULL
COMMENT
'换货原因 (其他的时候)'
,
`create_time`
datetime
NULL
COMMENT
'创建时间'
,
`approval_time`
datetime
NULL
COMMENT
'同意时间'
,
`logistics_time`
datetime
NULL
COMMENT
'物流时间(填写物流单号时间)'
,
`receiver_time`
datetime
NULL
COMMENT
'收货时间'
,
`closing_time`
datetime
NULL
COMMENT
'成交时间'
,
`order_type`
int
(
2
)
NULL
COMMENT
'订单类型 0、为 Order 订单 1、为 OrderItem 订单'
,
`update_time`
datetime
NULL
COMMENT
'更新时间'
,
`delete`
smallint
(
2
)
NULL
COMMENT
'删除状态'
,
`status`
int
(
2
)
NULL
COMMENT
'状态 申请换货、申请成功、申请失败、退货中、退货成功'
,
PRIMARY
KEY
(
`id`
)
);
CREATE
TABLE
`order_logistics`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
COMMENT
'id自增长'
,
`area_no`
int
NOT
NULL
COMMENT
'订单编号'
,
`name`
VARCHAR
(
20
)
NOT
NULL
COMMENT
'名称'
,
`mobile`
VARCHAR
(
20
)
NOT
NULL
COMMENT
'手机号'
,
`address`
VARCHAR
(
255
)
NOT
NULL
COMMENT
'详细地址'
,
`logistics_no`
VARCHAR
(
20
)
NOT
NULL
COMMENT
'物流单号'
,
PRIMARY
KEY
(
`id`
)
);
CREATE
TABLE
`order_logistics_detail`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
COMMENT
'id自增长'
,
`order_logistics_id`
int
NOT
NULL
COMMENT
'物流编号'
,
`logistics_time`
datetime
NOT
NULL
COMMENT
'物流时间'
,
`logistics_information`
VARCHAR
(
20
)
NOT
NULL
COMMENT
'物流信息'
,
PRIMARY
KEY
(
`id`
)
);
order/order-service-impl/target/generated-sources/annotations/cn/iocoder/mall/order/biz/convert/CartConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.CalcOrderPriceBO.Item
;
import
cn.iocoder.mall.order.api.bo.CartItemBO
;
import
cn.iocoder.mall.order.biz.dataobject.CartItemDO
;
import
cn.iocoder.mall.product.api.bo.ProductAttrAndValuePairBO
;
import
cn.iocoder.mall.product.api.bo.ProductSkuDetailBO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:07+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
CartConvertImpl
implements
CartConvert
{
@Override
public
Item
convert
(
ProductSkuDetailBO
sku
)
{
if
(
sku
==
null
)
{
return
null
;
}
Item
item
=
new
Item
();
item
.
setId
(
sku
.
getId
()
);
item
.
setSpu
(
sku
.
getSpu
()
);
item
.
setPicURL
(
sku
.
getPicURL
()
);
List
<
ProductAttrAndValuePairBO
>
list
=
sku
.
getAttrs
();
if
(
list
!=
null
)
{
item
.
setAttrs
(
new
ArrayList
<
ProductAttrAndValuePairBO
>(
list
)
);
}
item
.
setPrice
(
sku
.
getPrice
()
);
item
.
setQuantity
(
sku
.
getQuantity
()
);
return
item
;
}
@Override
public
List
<
CartItemBO
>
convert
(
List
<
CartItemDO
>
items
)
{
if
(
items
==
null
)
{
return
null
;
}
List
<
CartItemBO
>
list
=
new
ArrayList
<
CartItemBO
>(
items
.
size
()
);
for
(
CartItemDO
cartItemDO
:
items
)
{
list
.
add
(
cartItemDOToCartItemBO
(
cartItemDO
)
);
}
return
list
;
}
protected
CartItemBO
cartItemDOToCartItemBO
(
CartItemDO
cartItemDO
)
{
if
(
cartItemDO
==
null
)
{
return
null
;
}
CartItemBO
cartItemBO
=
new
CartItemBO
();
cartItemBO
.
setId
(
cartItemDO
.
getId
()
);
cartItemBO
.
setStatus
(
cartItemDO
.
getStatus
()
);
cartItemBO
.
setSelected
(
cartItemDO
.
getSelected
()
);
cartItemBO
.
setUserId
(
cartItemDO
.
getUserId
()
);
cartItemBO
.
setSpuId
(
cartItemDO
.
getSpuId
()
);
cartItemBO
.
setSkuId
(
cartItemDO
.
getSkuId
()
);
cartItemBO
.
setQuantity
(
cartItemDO
.
getQuantity
()
);
cartItemBO
.
setOrderId
(
cartItemDO
.
getOrderId
()
);
cartItemBO
.
setOrderCreateTime
(
cartItemDO
.
getOrderCreateTime
()
);
cartItemBO
.
setCreateTime
(
cartItemDO
.
getCreateTime
()
);
return
cartItemBO
;
}
}
order/order-service-impl/target/generated-sources/annotations/cn/iocoder/mall/order/biz/convert/OrderCommentConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.OrderCommentCreateBO
;
import
cn.iocoder.mall.order.api.bo.OrderCommentPageBO.OrderCommentItem
;
import
cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderCommentDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:14:19+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderCommentConvertImpl
implements
OrderCommentConvert
{
@Override
public
OrderCommentDO
convert
(
OrderCommentCreateDTO
orderCommentCreateDTO
)
{
if
(
orderCommentCreateDTO
==
null
)
{
return
null
;
}
OrderCommentDO
orderCommentDO
=
new
OrderCommentDO
();
orderCommentDO
.
setOrderId
(
orderCommentCreateDTO
.
getOrderId
()
);
orderCommentDO
.
setOrderNo
(
orderCommentCreateDTO
.
getOrderNo
()
);
orderCommentDO
.
setProductSpuId
(
orderCommentCreateDTO
.
getProductSpuId
()
);
orderCommentDO
.
setProductSpuName
(
orderCommentCreateDTO
.
getProductSpuName
()
);
orderCommentDO
.
setProductSkuId
(
orderCommentCreateDTO
.
getProductSkuId
()
);
orderCommentDO
.
setProductSkuAttrs
(
orderCommentCreateDTO
.
getProductSkuAttrs
()
);
orderCommentDO
.
setProductSkuPrice
(
orderCommentCreateDTO
.
getProductSkuPrice
()
);
orderCommentDO
.
setProductSkuPicUrl
(
orderCommentCreateDTO
.
getProductSkuPicUrl
()
);
orderCommentDO
.
setUserId
(
orderCommentCreateDTO
.
getUserId
()
);
orderCommentDO
.
setUserAvatar
(
orderCommentCreateDTO
.
getUserAvatar
()
);
orderCommentDO
.
setUserNickName
(
orderCommentCreateDTO
.
getUserNickName
()
);
orderCommentDO
.
setStar
(
orderCommentCreateDTO
.
getStar
()
);
orderCommentDO
.
setProductDescriptionStar
(
orderCommentCreateDTO
.
getProductDescriptionStar
()
);
orderCommentDO
.
setLogisticsStar
(
orderCommentCreateDTO
.
getLogisticsStar
()
);
orderCommentDO
.
setMerchantStar
(
orderCommentCreateDTO
.
getMerchantStar
()
);
orderCommentDO
.
setCommentContent
(
orderCommentCreateDTO
.
getCommentContent
()
);
orderCommentDO
.
setCommentPics
(
orderCommentCreateDTO
.
getCommentPics
()
);
return
orderCommentDO
;
}
@Override
public
OrderCommentCreateBO
convert
(
OrderCommentDO
orderCommentDO
)
{
if
(
orderCommentDO
==
null
)
{
return
null
;
}
OrderCommentCreateBO
orderCommentCreateBO
=
new
OrderCommentCreateBO
();
orderCommentCreateBO
.
setId
(
orderCommentDO
.
getId
()
);
return
orderCommentCreateBO
;
}
@Override
public
List
<
OrderCommentItem
>
convert
(
List
<
OrderCommentDO
>
orderCommentDOList
)
{
if
(
orderCommentDOList
==
null
)
{
return
null
;
}
List
<
OrderCommentItem
>
list
=
new
ArrayList
<
OrderCommentItem
>(
orderCommentDOList
.
size
()
);
for
(
OrderCommentDO
orderCommentDO
:
orderCommentDOList
)
{
list
.
add
(
orderCommentDOToOrderCommentItem
(
orderCommentDO
)
);
}
return
list
;
}
protected
OrderCommentItem
orderCommentDOToOrderCommentItem
(
OrderCommentDO
orderCommentDO
)
{
if
(
orderCommentDO
==
null
)
{
return
null
;
}
OrderCommentItem
orderCommentItem
=
new
OrderCommentItem
();
orderCommentItem
.
setId
(
orderCommentDO
.
getId
()
);
orderCommentItem
.
setUserAvatar
(
orderCommentDO
.
getUserAvatar
()
);
orderCommentItem
.
setUserNickName
(
orderCommentDO
.
getUserNickName
()
);
orderCommentItem
.
setStar
(
orderCommentDO
.
getStar
()
);
orderCommentItem
.
setCommentContent
(
orderCommentDO
.
getCommentContent
()
);
orderCommentItem
.
setCommentPics
(
orderCommentDO
.
getCommentPics
()
);
orderCommentItem
.
setReplayCount
(
orderCommentDO
.
getReplayCount
()
);
orderCommentItem
.
setCreateTime
(
orderCommentDO
.
getCreateTime
()
);
return
orderCommentItem
;
}
}
order/order-service-impl/target/generated-sources/annotations/cn/iocoder/mall/order/biz/convert/OrderConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.OrderBO
;
import
cn.iocoder.mall.order.api.bo.OrderInfoBO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:07+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderConvertImpl
implements
OrderConvert
{
@Override
public
List
<
OrderBO
>
convertPageBO
(
List
<
OrderDO
>
orderDOList
)
{
if
(
orderDOList
==
null
)
{
return
null
;
}
List
<
OrderBO
>
list
=
new
ArrayList
<
OrderBO
>(
orderDOList
.
size
()
);
for
(
OrderDO
orderDO
:
orderDOList
)
{
list
.
add
(
orderDOToOrderBO
(
orderDO
)
);
}
return
list
;
}
@Override
public
OrderInfoBO
convert
(
OrderDO
orderDO
)
{
if
(
orderDO
==
null
)
{
return
null
;
}
OrderInfoBO
orderInfoBO
=
new
OrderInfoBO
();
orderInfoBO
.
setId
(
orderDO
.
getId
()
);
orderInfoBO
.
setOrderNo
(
orderDO
.
getOrderNo
()
);
orderInfoBO
.
setBuyPrice
(
orderDO
.
getBuyPrice
()
);
orderInfoBO
.
setDiscountPrice
(
orderDO
.
getDiscountPrice
()
);
orderInfoBO
.
setLogisticsPrice
(
orderDO
.
getLogisticsPrice
()
);
orderInfoBO
.
setPresentPrice
(
orderDO
.
getPresentPrice
()
);
orderInfoBO
.
setPayAmount
(
orderDO
.
getPayAmount
()
);
orderInfoBO
.
setPaymentTime
(
orderDO
.
getPaymentTime
()
);
orderInfoBO
.
setDeliveryTime
(
orderDO
.
getDeliveryTime
()
);
orderInfoBO
.
setReceiverTime
(
orderDO
.
getReceiverTime
()
);
orderInfoBO
.
setClosingTime
(
orderDO
.
getClosingTime
()
);
orderInfoBO
.
setHasReturnExchange
(
orderDO
.
getHasReturnExchange
()
);
orderInfoBO
.
setStatus
(
orderDO
.
getStatus
()
);
orderInfoBO
.
setRemark
(
orderDO
.
getRemark
()
);
return
orderInfoBO
;
}
protected
OrderBO
orderDOToOrderBO
(
OrderDO
orderDO
)
{
if
(
orderDO
==
null
)
{
return
null
;
}
OrderBO
orderBO
=
new
OrderBO
();
orderBO
.
setId
(
orderDO
.
getId
()
);
orderBO
.
setUserId
(
orderDO
.
getUserId
()
);
orderBO
.
setOrderNo
(
orderDO
.
getOrderNo
()
);
orderBO
.
setBuyPrice
(
orderDO
.
getBuyPrice
()
);
orderBO
.
setDiscountPrice
(
orderDO
.
getDiscountPrice
()
);
orderBO
.
setLogisticsPrice
(
orderDO
.
getLogisticsPrice
()
);
orderBO
.
setPresentPrice
(
orderDO
.
getPresentPrice
()
);
orderBO
.
setPayAmount
(
orderDO
.
getPayAmount
()
);
orderBO
.
setPaymentTime
(
orderDO
.
getPaymentTime
()
);
orderBO
.
setDeliveryTime
(
orderDO
.
getDeliveryTime
()
);
orderBO
.
setReceiverTime
(
orderDO
.
getReceiverTime
()
);
orderBO
.
setClosingTime
(
orderDO
.
getClosingTime
()
);
orderBO
.
setHasReturnExchange
(
orderDO
.
getHasReturnExchange
()
);
orderBO
.
setStatus
(
orderDO
.
getStatus
()
);
orderBO
.
setRemark
(
orderDO
.
getRemark
()
);
return
orderBO
;
}
}
order/order-service-impl/target/generated-sources/annotations/cn/iocoder/mall/order/biz/convert/OrderItemConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.OrderItemBO
;
import
cn.iocoder.mall.order.api.dto.OrderCreateDTO.OrderItem
;
import
cn.iocoder.mall.order.api.dto.OrderItemUpdateDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderItemDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:07+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderItemConvertImpl
implements
OrderItemConvert
{
@Override
public
OrderItemDO
convert
(
OrderItemUpdateDTO
orderItemUpdateDTO
)
{
if
(
orderItemUpdateDTO
==
null
)
{
return
null
;
}
OrderItemDO
orderItemDO
=
new
OrderItemDO
();
orderItemDO
.
setId
(
orderItemUpdateDTO
.
getId
()
);
orderItemDO
.
setSkuId
(
orderItemUpdateDTO
.
getSkuId
()
);
orderItemDO
.
setQuantity
(
orderItemUpdateDTO
.
getQuantity
()
);
return
orderItemDO
;
}
@Override
public
List
<
OrderItemBO
>
convertOrderItemBO
(
List
<
OrderItemDO
>
orderItemDOList
)
{
if
(
orderItemDOList
==
null
)
{
return
null
;
}
List
<
OrderItemBO
>
list
=
new
ArrayList
<
OrderItemBO
>(
orderItemDOList
.
size
()
);
for
(
OrderItemDO
orderItemDO
:
orderItemDOList
)
{
list
.
add
(
orderItemDOToOrderItemBO
(
orderItemDO
)
);
}
return
list
;
}
@Override
public
List
<
OrderItemDO
>
convert
(
List
<
OrderItem
>
orderCreateItemDTOList
)
{
if
(
orderCreateItemDTOList
==
null
)
{
return
null
;
}
List
<
OrderItemDO
>
list
=
new
ArrayList
<
OrderItemDO
>(
orderCreateItemDTOList
.
size
()
);
for
(
OrderItem
orderItem
:
orderCreateItemDTOList
)
{
list
.
add
(
orderItemToOrderItemDO
(
orderItem
)
);
}
return
list
;
}
@Override
public
List
<
OrderItemBO
>
convertOrderItemDO
(
List
<
OrderItemDO
>
orderItemDOList
)
{
if
(
orderItemDOList
==
null
)
{
return
null
;
}
List
<
OrderItemBO
>
list
=
new
ArrayList
<
OrderItemBO
>(
orderItemDOList
.
size
()
);
for
(
OrderItemDO
orderItemDO
:
orderItemDOList
)
{
list
.
add
(
orderItemDOToOrderItemBO
(
orderItemDO
)
);
}
return
list
;
}
@Override
public
List
<
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderInfoBO
.
OrderItem
>
convertOrderInfoWithOrderItem
(
List
<
OrderItemDO
>
orderItemDOList
)
{
if
(
orderItemDOList
==
null
)
{
return
null
;
}
List
<
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderInfoBO
.
OrderItem
>
list
=
new
ArrayList
<
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderInfoBO
.
OrderItem
>(
orderItemDOList
.
size
()
);
for
(
OrderItemDO
orderItemDO
:
orderItemDOList
)
{
list
.
add
(
orderItemDOToOrderItem
(
orderItemDO
)
);
}
return
list
;
}
protected
OrderItemBO
orderItemDOToOrderItemBO
(
OrderItemDO
orderItemDO
)
{
if
(
orderItemDO
==
null
)
{
return
null
;
}
OrderItemBO
orderItemBO
=
new
OrderItemBO
();
orderItemBO
.
setId
(
orderItemDO
.
getId
()
);
orderItemBO
.
setOrderId
(
orderItemDO
.
getOrderId
()
);
orderItemBO
.
setOrderNo
(
orderItemDO
.
getOrderNo
()
);
orderItemBO
.
setSkuId
(
orderItemDO
.
getSkuId
()
);
orderItemBO
.
setSkuName
(
orderItemDO
.
getSkuName
()
);
orderItemBO
.
setSkuImage
(
orderItemDO
.
getSkuImage
()
);
orderItemBO
.
setQuantity
(
orderItemDO
.
getQuantity
()
);
orderItemBO
.
setOriginPrice
(
orderItemDO
.
getOriginPrice
()
);
orderItemBO
.
setBuyPrice
(
orderItemDO
.
getBuyPrice
()
);
orderItemBO
.
setPresentPrice
(
orderItemDO
.
getPresentPrice
()
);
orderItemBO
.
setBuyTotal
(
orderItemDO
.
getBuyTotal
()
);
orderItemBO
.
setDiscountTotal
(
orderItemDO
.
getDiscountTotal
()
);
orderItemBO
.
setPresentTotal
(
orderItemDO
.
getPresentTotal
()
);
orderItemBO
.
setPaymentTime
(
orderItemDO
.
getPaymentTime
()
);
orderItemBO
.
setDeliveryTime
(
orderItemDO
.
getDeliveryTime
()
);
orderItemBO
.
setReceiverTime
(
orderItemDO
.
getReceiverTime
()
);
orderItemBO
.
setClosingTime
(
orderItemDO
.
getClosingTime
()
);
orderItemBO
.
setHasReturnExchange
(
orderItemDO
.
getHasReturnExchange
()
);
orderItemBO
.
setDeliveryType
(
orderItemDO
.
getDeliveryType
()
);
orderItemBO
.
setStatus
(
orderItemDO
.
getStatus
()
);
orderItemBO
.
setCreateTime
(
orderItemDO
.
getCreateTime
()
);
orderItemBO
.
setUpdateTime
(
orderItemDO
.
getUpdateTime
()
);
orderItemBO
.
setDeleted
(
orderItemDO
.
getDeleted
()
);
return
orderItemBO
;
}
protected
OrderItemDO
orderItemToOrderItemDO
(
OrderItem
orderItem
)
{
if
(
orderItem
==
null
)
{
return
null
;
}
OrderItemDO
orderItemDO
=
new
OrderItemDO
();
orderItemDO
.
setSkuId
(
orderItem
.
getSkuId
()
);
orderItemDO
.
setQuantity
(
orderItem
.
getQuantity
()
);
return
orderItemDO
;
}
protected
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderInfoBO
.
OrderItem
orderItemDOToOrderItem
(
OrderItemDO
orderItemDO
)
{
if
(
orderItemDO
==
null
)
{
return
null
;
}
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderInfoBO
.
OrderItem
orderItem
=
new
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderInfoBO
.
OrderItem
();
orderItem
.
setSkuId
(
orderItemDO
.
getSkuId
()
);
orderItem
.
setSkuName
(
orderItemDO
.
getSkuName
()
);
orderItem
.
setSkuImage
(
orderItemDO
.
getSkuImage
()
);
orderItem
.
setQuantity
(
orderItemDO
.
getQuantity
()
);
orderItem
.
setOriginPrice
(
orderItemDO
.
getOriginPrice
()
);
orderItem
.
setBuyPrice
(
orderItemDO
.
getBuyPrice
()
);
orderItem
.
setPresentPrice
(
orderItemDO
.
getPresentPrice
()
);
orderItem
.
setBuyTotal
(
orderItemDO
.
getBuyTotal
()
);
orderItem
.
setDiscountTotal
(
orderItemDO
.
getDiscountTotal
()
);
orderItem
.
setPresentTotal
(
orderItemDO
.
getPresentTotal
()
);
return
orderItem
;
}
}
order/order-service-impl/target/generated-sources/annotations/cn/iocoder/mall/order/biz/convert/OrderLogisticsConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.OrderLastLogisticsInfoBO
;
import
cn.iocoder.mall.order.api.bo.OrderLogisticsInfoBO
;
import
cn.iocoder.mall.order.api.bo.OrderLogisticsInfoWithOrderBO.Logistics
;
import
cn.iocoder.mall.order.api.bo.OrderLogisticsInfoWithOrderBO.LogisticsDetail
;
import
cn.iocoder.mall.order.api.dto.OrderDeliveryDTO
;
import
cn.iocoder.mall.order.api.dto.OrderLogisticsUpdateDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:07+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderLogisticsConvertImpl
implements
OrderLogisticsConvert
{
@Override
public
OrderLogisticsDO
convert
(
OrderDeliveryDTO
orderDelivery
)
{
if
(
orderDelivery
==
null
)
{
return
null
;
}
OrderLogisticsDO
orderLogisticsDO
=
new
OrderLogisticsDO
();
orderLogisticsDO
.
setLogistics
(
orderDelivery
.
getLogistics
()
);
orderLogisticsDO
.
setLogisticsNo
(
orderDelivery
.
getLogisticsNo
()
);
return
orderLogisticsDO
;
}
@Override
public
OrderLogisticsDO
convert
(
OrderLogisticsUpdateDTO
orderLogisticsDTO
)
{
if
(
orderLogisticsDTO
==
null
)
{
return
null
;
}
OrderLogisticsDO
orderLogisticsDO
=
new
OrderLogisticsDO
();
orderLogisticsDO
.
setId
(
orderLogisticsDTO
.
getId
()
);
orderLogisticsDO
.
setAreaNo
(
orderLogisticsDTO
.
getAreaNo
()
);
orderLogisticsDO
.
setName
(
orderLogisticsDTO
.
getName
()
);
orderLogisticsDO
.
setMobile
(
orderLogisticsDTO
.
getMobile
()
);
orderLogisticsDO
.
setAddress
(
orderLogisticsDTO
.
getAddress
()
);
orderLogisticsDO
.
setLogisticsNo
(
orderLogisticsDTO
.
getLogisticsNo
()
);
return
orderLogisticsDO
;
}
@Override
public
OrderLogisticsDO
convert
(
OrderRecipientDO
orderRecipientDO
)
{
if
(
orderRecipientDO
==
null
)
{
return
null
;
}
OrderLogisticsDO
orderLogisticsDO
=
new
OrderLogisticsDO
();
orderLogisticsDO
.
setCreateTime
(
orderRecipientDO
.
getCreateTime
()
);
orderLogisticsDO
.
setUpdateTime
(
orderRecipientDO
.
getUpdateTime
()
);
orderLogisticsDO
.
setId
(
orderRecipientDO
.
getId
()
);
orderLogisticsDO
.
setAreaNo
(
orderRecipientDO
.
getAreaNo
()
);
orderLogisticsDO
.
setName
(
orderRecipientDO
.
getName
()
);
orderLogisticsDO
.
setMobile
(
orderRecipientDO
.
getMobile
()
);
orderLogisticsDO
.
setAddress
(
orderRecipientDO
.
getAddress
()
);
return
orderLogisticsDO
;
}
@Override
public
List
<
Logistics
>
convertLogistics
(
List
<
OrderLogisticsDO
>
orderLogisticsDOList
)
{
if
(
orderLogisticsDOList
==
null
)
{
return
null
;
}
List
<
Logistics
>
list
=
new
ArrayList
<
Logistics
>(
orderLogisticsDOList
.
size
()
);
for
(
OrderLogisticsDO
orderLogisticsDO
:
orderLogisticsDOList
)
{
list
.
add
(
orderLogisticsDOToLogistics
(
orderLogisticsDO
)
);
}
return
list
;
}
@Override
public
List
<
LogisticsDetail
>
convertLogisticsDetail
(
List
<
OrderLogisticsDetailDO
>
orderLogisticsDOList
)
{
if
(
orderLogisticsDOList
==
null
)
{
return
null
;
}
List
<
LogisticsDetail
>
list
=
new
ArrayList
<
LogisticsDetail
>(
orderLogisticsDOList
.
size
()
);
for
(
OrderLogisticsDetailDO
orderLogisticsDetailDO
:
orderLogisticsDOList
)
{
list
.
add
(
orderLogisticsDetailDOToLogisticsDetail
(
orderLogisticsDetailDO
)
);
}
return
list
;
}
@Override
public
OrderLogisticsInfoBO
convert
(
OrderLogisticsDO
orderLogisticsDO
)
{
if
(
orderLogisticsDO
==
null
)
{
return
null
;
}
OrderLogisticsInfoBO
orderLogisticsInfoBO
=
new
OrderLogisticsInfoBO
();
orderLogisticsInfoBO
.
setId
(
orderLogisticsDO
.
getId
()
);
orderLogisticsInfoBO
.
setAreaNo
(
orderLogisticsDO
.
getAreaNo
()
);
orderLogisticsInfoBO
.
setName
(
orderLogisticsDO
.
getName
()
);
orderLogisticsInfoBO
.
setMobile
(
orderLogisticsDO
.
getMobile
()
);
orderLogisticsInfoBO
.
setAddress
(
orderLogisticsDO
.
getAddress
()
);
orderLogisticsInfoBO
.
setLogistics
(
orderLogisticsDO
.
getLogistics
()
);
orderLogisticsInfoBO
.
setLogisticsNo
(
orderLogisticsDO
.
getLogisticsNo
()
);
return
orderLogisticsInfoBO
;
}
@Override
public
List
<
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderLogisticsInfoBO
.
LogisticsDetail
>
convert
(
List
<
OrderLogisticsDetailDO
>
orderLogisticsDetailDOList
)
{
if
(
orderLogisticsDetailDOList
==
null
)
{
return
null
;
}
List
<
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderLogisticsInfoBO
.
LogisticsDetail
>
list
=
new
ArrayList
<
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderLogisticsInfoBO
.
LogisticsDetail
>(
orderLogisticsDetailDOList
.
size
()
);
for
(
OrderLogisticsDetailDO
orderLogisticsDetailDO
:
orderLogisticsDetailDOList
)
{
list
.
add
(
orderLogisticsDetailDOToLogisticsDetail1
(
orderLogisticsDetailDO
)
);
}
return
list
;
}
@Override
public
OrderLastLogisticsInfoBO
convertOrderLastLogisticsInfoBO
(
OrderLogisticsDO
orderLogisticsDO
)
{
if
(
orderLogisticsDO
==
null
)
{
return
null
;
}
OrderLastLogisticsInfoBO
orderLastLogisticsInfoBO
=
new
OrderLastLogisticsInfoBO
();
orderLastLogisticsInfoBO
.
setId
(
orderLogisticsDO
.
getId
()
);
orderLastLogisticsInfoBO
.
setAreaNo
(
orderLogisticsDO
.
getAreaNo
()
);
orderLastLogisticsInfoBO
.
setName
(
orderLogisticsDO
.
getName
()
);
orderLastLogisticsInfoBO
.
setMobile
(
orderLogisticsDO
.
getMobile
()
);
orderLastLogisticsInfoBO
.
setAddress
(
orderLogisticsDO
.
getAddress
()
);
orderLastLogisticsInfoBO
.
setLogistics
(
orderLogisticsDO
.
getLogistics
()
);
orderLastLogisticsInfoBO
.
setLogisticsNo
(
orderLogisticsDO
.
getLogisticsNo
()
);
return
orderLastLogisticsInfoBO
;
}
@Override
public
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderLastLogisticsInfoBO
.
LogisticsDetail
convertLastLogisticsDetail
(
OrderLogisticsDetailDO
orderLogisticsDetailDO
)
{
if
(
orderLogisticsDetailDO
==
null
)
{
return
null
;
}
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderLastLogisticsInfoBO
.
LogisticsDetail
logisticsDetail
=
new
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderLastLogisticsInfoBO
.
LogisticsDetail
();
logisticsDetail
.
setId
(
orderLogisticsDetailDO
.
getId
()
);
logisticsDetail
.
setOrderLogisticsId
(
orderLogisticsDetailDO
.
getOrderLogisticsId
()
);
logisticsDetail
.
setLogisticsTime
(
orderLogisticsDetailDO
.
getLogisticsTime
()
);
logisticsDetail
.
setLogisticsInformation
(
orderLogisticsDetailDO
.
getLogisticsInformation
()
);
return
logisticsDetail
;
}
protected
Logistics
orderLogisticsDOToLogistics
(
OrderLogisticsDO
orderLogisticsDO
)
{
if
(
orderLogisticsDO
==
null
)
{
return
null
;
}
Logistics
logistics
=
new
Logistics
();
logistics
.
setId
(
orderLogisticsDO
.
getId
()
);
logistics
.
setAreaNo
(
orderLogisticsDO
.
getAreaNo
()
);
logistics
.
setName
(
orderLogisticsDO
.
getName
()
);
logistics
.
setMobile
(
orderLogisticsDO
.
getMobile
()
);
logistics
.
setAddress
(
orderLogisticsDO
.
getAddress
()
);
logistics
.
setLogistics
(
orderLogisticsDO
.
getLogistics
()
);
logistics
.
setLogisticsNo
(
orderLogisticsDO
.
getLogisticsNo
()
);
return
logistics
;
}
protected
LogisticsDetail
orderLogisticsDetailDOToLogisticsDetail
(
OrderLogisticsDetailDO
orderLogisticsDetailDO
)
{
if
(
orderLogisticsDetailDO
==
null
)
{
return
null
;
}
LogisticsDetail
logisticsDetail
=
new
LogisticsDetail
();
logisticsDetail
.
setId
(
orderLogisticsDetailDO
.
getId
()
);
logisticsDetail
.
setOrderLogisticsId
(
orderLogisticsDetailDO
.
getOrderLogisticsId
()
);
logisticsDetail
.
setLogisticsTime
(
orderLogisticsDetailDO
.
getLogisticsTime
()
);
logisticsDetail
.
setLogisticsInformation
(
orderLogisticsDetailDO
.
getLogisticsInformation
()
);
return
logisticsDetail
;
}
protected
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderLogisticsInfoBO
.
LogisticsDetail
orderLogisticsDetailDOToLogisticsDetail1
(
OrderLogisticsDetailDO
orderLogisticsDetailDO
)
{
if
(
orderLogisticsDetailDO
==
null
)
{
return
null
;
}
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderLogisticsInfoBO
.
LogisticsDetail
logisticsDetail
=
new
cn
.
iocoder
.
mall
.
order
.
api
.
bo
.
OrderLogisticsInfoBO
.
LogisticsDetail
();
logisticsDetail
.
setId
(
orderLogisticsDetailDO
.
getId
()
);
logisticsDetail
.
setOrderLogisticsId
(
orderLogisticsDetailDO
.
getOrderLogisticsId
()
);
logisticsDetail
.
setLogisticsTime
(
orderLogisticsDetailDO
.
getLogisticsTime
()
);
logisticsDetail
.
setLogisticsInformation
(
orderLogisticsDetailDO
.
getLogisticsInformation
()
);
return
logisticsDetail
;
}
}
order/order-service-impl/target/generated-sources/annotations/cn/iocoder/mall/order/biz/convert/OrderLogisticsDetailConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.OrderInfoBO.LogisticsDetail
;
import
cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:07+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderLogisticsDetailConvertImpl
implements
OrderLogisticsDetailConvert
{
@Override
public
LogisticsDetail
convertLogisticsDetail
(
OrderLogisticsDetailDO
orderLogisticsDetailDO
)
{
if
(
orderLogisticsDetailDO
==
null
)
{
return
null
;
}
LogisticsDetail
logisticsDetail
=
new
LogisticsDetail
();
logisticsDetail
.
setId
(
orderLogisticsDetailDO
.
getId
()
);
logisticsDetail
.
setOrderLogisticsId
(
orderLogisticsDetailDO
.
getOrderLogisticsId
()
);
logisticsDetail
.
setLogisticsTime
(
orderLogisticsDetailDO
.
getLogisticsTime
()
);
logisticsDetail
.
setLogisticsInformation
(
orderLogisticsDetailDO
.
getLogisticsInformation
()
);
return
logisticsDetail
;
}
}
order/order-service-impl/target/generated-sources/annotations/cn/iocoder/mall/order/biz/convert/OrderRecipientConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.OrderInfoBO.Recipient
;
import
cn.iocoder.mall.order.api.bo.OrderRecipientBO
;
import
cn.iocoder.mall.order.api.dto.OrderCreateDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO
;
import
cn.iocoder.mall.user.api.bo.UserAddressBO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:07+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderRecipientConvertImpl
implements
OrderRecipientConvert
{
@Override
public
OrderRecipientDO
convert
(
OrderCreateDTO
orderCreateDTO
)
{
if
(
orderCreateDTO
==
null
)
{
return
null
;
}
OrderRecipientDO
orderRecipientDO
=
new
OrderRecipientDO
();
return
orderRecipientDO
;
}
@Override
public
OrderRecipientDO
convert
(
UserAddressBO
userAddressBO
)
{
if
(
userAddressBO
==
null
)
{
return
null
;
}
OrderRecipientDO
orderRecipientDO
=
new
OrderRecipientDO
();
orderRecipientDO
.
setId
(
userAddressBO
.
getId
()
);
orderRecipientDO
.
setAreaNo
(
userAddressBO
.
getAreaNo
()
);
orderRecipientDO
.
setName
(
userAddressBO
.
getName
()
);
orderRecipientDO
.
setMobile
(
userAddressBO
.
getMobile
()
);
orderRecipientDO
.
setAddress
(
userAddressBO
.
getAddress
()
);
return
orderRecipientDO
;
}
@Override
public
OrderRecipientBO
convert
(
OrderRecipientDO
orderRecipientDO
)
{
if
(
orderRecipientDO
==
null
)
{
return
null
;
}
OrderRecipientBO
orderRecipientBO
=
new
OrderRecipientBO
();
orderRecipientBO
.
setCreateTime
(
orderRecipientDO
.
getCreateTime
()
);
orderRecipientBO
.
setUpdateTime
(
orderRecipientDO
.
getUpdateTime
()
);
orderRecipientBO
.
setId
(
orderRecipientDO
.
getId
()
);
orderRecipientBO
.
setOrderId
(
orderRecipientDO
.
getOrderId
()
);
orderRecipientBO
.
setAreaNo
(
orderRecipientDO
.
getAreaNo
()
);
orderRecipientBO
.
setName
(
orderRecipientDO
.
getName
()
);
orderRecipientBO
.
setMobile
(
orderRecipientDO
.
getMobile
()
);
orderRecipientBO
.
setType
(
orderRecipientDO
.
getType
()
);
orderRecipientBO
.
setAddress
(
orderRecipientDO
.
getAddress
()
);
return
orderRecipientBO
;
}
@Override
public
List
<
OrderRecipientBO
>
convert
(
List
<
OrderRecipientDO
>
orderRecipientDOList
)
{
if
(
orderRecipientDOList
==
null
)
{
return
null
;
}
List
<
OrderRecipientBO
>
list
=
new
ArrayList
<
OrderRecipientBO
>(
orderRecipientDOList
.
size
()
);
for
(
OrderRecipientDO
orderRecipientDO
:
orderRecipientDOList
)
{
list
.
add
(
convert
(
orderRecipientDO
)
);
}
return
list
;
}
@Override
public
Recipient
convertOrderInfoRecipient
(
OrderRecipientDO
orderRecipientDO
)
{
if
(
orderRecipientDO
==
null
)
{
return
null
;
}
Recipient
recipient
=
new
Recipient
();
recipient
.
setId
(
orderRecipientDO
.
getId
()
);
recipient
.
setOrderId
(
orderRecipientDO
.
getOrderId
()
);
recipient
.
setAreaNo
(
orderRecipientDO
.
getAreaNo
()
);
recipient
.
setName
(
orderRecipientDO
.
getName
()
);
recipient
.
setMobile
(
orderRecipientDO
.
getMobile
()
);
recipient
.
setType
(
orderRecipientDO
.
getType
()
);
recipient
.
setAddress
(
orderRecipientDO
.
getAddress
()
);
return
recipient
;
}
}
order/order-service-impl/target/generated-sources/annotations/cn/iocoder/mall/order/biz/convert/OrderReturnConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
order
.
biz
.
convert
;
import
cn.iocoder.mall.order.api.bo.OrderReturnInfoBO.OrderItem
;
import
cn.iocoder.mall.order.api.bo.OrderReturnInfoBO.ReturnInfo
;
import
cn.iocoder.mall.order.api.bo.OrderReturnListBO.OrderReturn
;
import
cn.iocoder.mall.order.api.dto.OrderReturnApplyDTO
;
import
cn.iocoder.mall.order.api.dto.OrderReturnCreateDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderItemDO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderReturnDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:07+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OrderReturnConvertImpl
implements
OrderReturnConvert
{
@Override
public
OrderReturnDO
convert
(
OrderReturnCreateDTO
orderReturnCreate
)
{
if
(
orderReturnCreate
==
null
)
{
return
null
;
}
OrderReturnDO
orderReturnDO
=
new
OrderReturnDO
();
orderReturnDO
.
setOrderId
(
orderReturnCreate
.
getOrderId
()
);
return
orderReturnDO
;
}
@Override
public
OrderReturnDO
convert
(
OrderReturnApplyDTO
orderReturnApplyDTO
)
{
if
(
orderReturnApplyDTO
==
null
)
{
return
null
;
}
OrderReturnDO
orderReturnDO
=
new
OrderReturnDO
();
orderReturnDO
.
setOrderId
(
orderReturnApplyDTO
.
getOrderId
()
);
orderReturnDO
.
setReason
(
orderReturnApplyDTO
.
getReason
()
);
orderReturnDO
.
setDescribe
(
orderReturnApplyDTO
.
getDescribe
()
);
return
orderReturnDO
;
}
@Override
public
ReturnInfo
convert
(
OrderReturnDO
orderReturnDO
)
{
if
(
orderReturnDO
==
null
)
{
return
null
;
}
ReturnInfo
returnInfo
=
new
ReturnInfo
();
returnInfo
.
setId
(
orderReturnDO
.
getId
()
);
returnInfo
.
setServiceNumber
(
orderReturnDO
.
getServiceNumber
()
);
returnInfo
.
setOrderId
(
orderReturnDO
.
getOrderId
()
);
returnInfo
.
setOrderNo
(
orderReturnDO
.
getOrderNo
()
);
returnInfo
.
setOrderLogisticsId
(
orderReturnDO
.
getOrderLogisticsId
()
);
returnInfo
.
setRefundPrice
(
orderReturnDO
.
getRefundPrice
()
);
returnInfo
.
setReason
(
orderReturnDO
.
getReason
()
);
returnInfo
.
setDescribe
(
orderReturnDO
.
getDescribe
()
);
returnInfo
.
setApprovalTime
(
orderReturnDO
.
getApprovalTime
()
);
returnInfo
.
setLogisticsTime
(
orderReturnDO
.
getLogisticsTime
()
);
returnInfo
.
setReceiverTime
(
orderReturnDO
.
getReceiverTime
()
);
returnInfo
.
setClosingTime
(
orderReturnDO
.
getClosingTime
()
);
returnInfo
.
setServiceType
(
orderReturnDO
.
getServiceType
()
);
returnInfo
.
setStatus
(
orderReturnDO
.
getStatus
()
);
return
returnInfo
;
}
@Override
public
List
<
OrderItem
>
convert
(
List
<
OrderItemDO
>
orderItemDOList
)
{
if
(
orderItemDOList
==
null
)
{
return
null
;
}
List
<
OrderItem
>
list
=
new
ArrayList
<
OrderItem
>(
orderItemDOList
.
size
()
);
for
(
OrderItemDO
orderItemDO
:
orderItemDOList
)
{
list
.
add
(
orderItemDOToOrderItem
(
orderItemDO
)
);
}
return
list
;
}
@Override
public
List
<
OrderReturn
>
convertListBO
(
List
<
OrderReturnDO
>
orderReturnDOList
)
{
if
(
orderReturnDOList
==
null
)
{
return
null
;
}
List
<
OrderReturn
>
list
=
new
ArrayList
<
OrderReturn
>(
orderReturnDOList
.
size
()
);
for
(
OrderReturnDO
orderReturnDO
:
orderReturnDOList
)
{
list
.
add
(
orderReturnDOToOrderReturn
(
orderReturnDO
)
);
}
return
list
;
}
protected
OrderItem
orderItemDOToOrderItem
(
OrderItemDO
orderItemDO
)
{
if
(
orderItemDO
==
null
)
{
return
null
;
}
OrderItem
orderItem
=
new
OrderItem
();
orderItem
.
setSkuId
(
orderItemDO
.
getSkuId
()
);
orderItem
.
setSkuName
(
orderItemDO
.
getSkuName
()
);
orderItem
.
setSkuImage
(
orderItemDO
.
getSkuImage
()
);
orderItem
.
setQuantity
(
orderItemDO
.
getQuantity
()
);
orderItem
.
setPresentTotal
(
orderItemDO
.
getPresentTotal
()
);
return
orderItem
;
}
protected
OrderReturn
orderReturnDOToOrderReturn
(
OrderReturnDO
orderReturnDO
)
{
if
(
orderReturnDO
==
null
)
{
return
null
;
}
OrderReturn
orderReturn
=
new
OrderReturn
();
orderReturn
.
setId
(
orderReturnDO
.
getId
()
);
orderReturn
.
setServiceNumber
(
orderReturnDO
.
getServiceNumber
()
);
orderReturn
.
setOrderId
(
orderReturnDO
.
getOrderId
()
);
orderReturn
.
setOrderNo
(
orderReturnDO
.
getOrderNo
()
);
orderReturn
.
setOrderLogisticsId
(
orderReturnDO
.
getOrderLogisticsId
()
);
orderReturn
.
setRefundPrice
(
orderReturnDO
.
getRefundPrice
()
);
orderReturn
.
setReason
(
orderReturnDO
.
getReason
()
);
orderReturn
.
setDescribe
(
orderReturnDO
.
getDescribe
()
);
orderReturn
.
setApprovalTime
(
orderReturnDO
.
getApprovalTime
()
);
orderReturn
.
setLogisticsTime
(
orderReturnDO
.
getLogisticsTime
()
);
orderReturn
.
setReceiverTime
(
orderReturnDO
.
getReceiverTime
()
);
orderReturn
.
setClosingTime
(
orderReturnDO
.
getClosingTime
()
);
orderReturn
.
setServiceType
(
orderReturnDO
.
getServiceType
()
);
orderReturn
.
setStatus
(
orderReturnDO
.
getStatus
()
);
orderReturn
.
setCreateTime
(
orderReturnDO
.
getCreateTime
()
);
orderReturn
.
setUpdateTime
(
orderReturnDO
.
getUpdateTime
()
);
return
orderReturn
;
}
}
pay/pay-application/target/classes/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
swagger
:
enable
:
true
title
:
支付子系统
description
:
支付子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.pay.application.controller
pay/pay-application/target/classes/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
application
:
name
:
pay-application
cloud
:
sentinel
:
transport
:
port
:
8719
dashboard
:
localhost:12088
metric
:
charset
:
UTF-8
eager
:
false
# server
server
:
port
:
18084
servlet
:
context-path
:
/pay-api/
swagger
:
enable
:
false
management
:
endpoints
:
web
:
exposure
:
include
:
health,info,env,metrics,prometheus
metrics
:
enabled
:
true
pay/pay-application/target/generated-sources/annotations/cn/iocoder/mall/pay/application/convert/PayRefundConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
pay
.
application
.
convert
;
import
cn.iocoder.mall.pay.api.bo.refund.PayRefundBO
;
import
cn.iocoder.mall.pay.application.vo.admins.AdminsPayRefundDetailVO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:47:14+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
PayRefundConvertImpl
implements
PayRefundConvert
{
@Override
public
List
<
AdminsPayRefundDetailVO
>
convertList
(
List
<
PayRefundBO
>
refunds
)
{
if
(
refunds
==
null
)
{
return
null
;
}
List
<
AdminsPayRefundDetailVO
>
list
=
new
ArrayList
<
AdminsPayRefundDetailVO
>(
refunds
.
size
()
);
for
(
PayRefundBO
payRefundBO
:
refunds
)
{
list
.
add
(
payRefundBOToAdminsPayRefundDetailVO
(
payRefundBO
)
);
}
return
list
;
}
protected
AdminsPayRefundDetailVO
payRefundBOToAdminsPayRefundDetailVO
(
PayRefundBO
payRefundBO
)
{
if
(
payRefundBO
==
null
)
{
return
null
;
}
AdminsPayRefundDetailVO
adminsPayRefundDetailVO
=
new
AdminsPayRefundDetailVO
();
adminsPayRefundDetailVO
.
setId
(
payRefundBO
.
getId
()
);
adminsPayRefundDetailVO
.
setTransactionId
(
payRefundBO
.
getTransactionId
()
);
adminsPayRefundDetailVO
.
setRefundCode
(
payRefundBO
.
getRefundCode
()
);
adminsPayRefundDetailVO
.
setAppId
(
payRefundBO
.
getAppId
()
);
adminsPayRefundDetailVO
.
setOrderId
(
payRefundBO
.
getOrderId
()
);
adminsPayRefundDetailVO
.
setCreateIp
(
payRefundBO
.
getCreateIp
()
);
adminsPayRefundDetailVO
.
setOrderDescription
(
payRefundBO
.
getOrderDescription
()
);
adminsPayRefundDetailVO
.
setPrice
(
payRefundBO
.
getPrice
()
);
adminsPayRefundDetailVO
.
setStatus
(
payRefundBO
.
getStatus
()
);
adminsPayRefundDetailVO
.
setFinishTime
(
payRefundBO
.
getFinishTime
()
);
adminsPayRefundDetailVO
.
setNotifyUrl
(
payRefundBO
.
getNotifyUrl
()
);
adminsPayRefundDetailVO
.
setExtensionData
(
payRefundBO
.
getExtensionData
()
);
adminsPayRefundDetailVO
.
setRefundChannel
(
payRefundBO
.
getRefundChannel
()
);
adminsPayRefundDetailVO
.
setRefundTime
(
payRefundBO
.
getRefundTime
()
);
adminsPayRefundDetailVO
.
setNotifyTime
(
payRefundBO
.
getNotifyTime
()
);
adminsPayRefundDetailVO
.
setTradeNo
(
payRefundBO
.
getTradeNo
()
);
adminsPayRefundDetailVO
.
setCreateTime
(
payRefundBO
.
getCreateTime
()
);
return
adminsPayRefundDetailVO
;
}
}
pay/pay-service-impl/target/classes/config/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://192.168.88.14:3306/mall_pay?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
# xxl-job
xxl
:
job
:
admin
:
addresses
:
http://127.0.0.1:18079/
executor
:
appname
:
pay-job-executor
ip
:
port
:
0
logpath
:
/Users/yunai/logs/xxl-job/
logretentiondays
:
1
accessToken
:
# rocketmq
rocketmq
:
name-server
:
192.168.88.14:9876
producer
:
group
:
pay-producer-group
pay/pay-service-impl/target/classes/config/application.properties
0 → 100644
浏览文件 @
fe2305df
#####################
业务模块
#####################
\ No newline at end of file
pay/pay-service-impl/target/classes/config/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://180.167.213.26:13306/mall_pay?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.pay.biz.dataobject
# dubbo
dubbo
:
application
:
name
:
pay-service
registry
:
address
:
zookeeper://127.0.0.1:2181
protocol
:
port
:
-1
name
:
dubbo
scan
:
base-packages
:
cn.iocoder.mall.pay.biz.service
provider
:
filter
:
-exception
PayTransactionService
:
version
:
1.0.0
PayRefundService
:
version
:
1.0.0
# rocketmq
rocketmq
:
name-server
:
127.0.0.1:9876
producer
:
group
:
pay-producer-group
# seata
seata
:
tx-service-group
:
my_test_tx_group
pay/pay-service-impl/target/classes/file.conf
0 → 100644
浏览文件 @
fe2305df
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
=
""
}
}
pay/pay-service-impl/target/classes/mapper/PayAppMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.pay.biz.dao.PayAppMapper"
>
<sql
id=
"FIELDS"
>
id, name, notify_url, refund_notify_url, status, create_time
</sql>
<!--<insert id="insert" parameterType="RoleDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">-->
<!--INSERT INTO role (-->
<!--name, create_time, deleted-->
<!--) VALUES (-->
<!--#{name}, #{createTime}, #{deleted}-->
<!--)-->
<!--</insert>-->
<!--<update id="update" parameterType="RoleDO">-->
<!--UPDATE role-->
<!--<set>-->
<!--<if test="name != null">-->
<!--, name = #{name}-->
<!--</if>-->
<!--<if test="deleted != null">-->
<!--, deleted = #{deleted}-->
<!--</if>-->
<!--</set>-->
<!--WHERE id = #{id}-->
<!--</update>-->
<select
id=
"selectById"
parameterType=
"String"
resultType=
"PayAppDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM app
WHERE id = #{id}
</select>
</mapper>
pay/pay-service-impl/target/classes/mapper/PayNotifyLogMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.pay.biz.dao.PayNotifyLogMapper"
>
<!--<sql id="FIELDS">-->
<!--id, transaction_id, transaction_extension_id, app_id, order_id,-->
<!--status, next_notify_time, last_execute_time, notify_times, max_notify_times,-->
<!--create_time-->
<!--</sql>-->
<insert
id=
"insert"
parameterType=
"PayNotifyLogDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO notify_log (
notify_id, request, response, status
) VALUES (
#{notifyId}, #{request}, #{response}, #{status}
)
</insert>
<!--<update id="update" parameterType="PayTransactionNotifyTaskDO">-->
<!--UPDATE transaction_notify_task-->
<!--<set>-->
<!--<if test="status != null">-->
<!--, status = #{status}-->
<!--</if>-->
<!--<if test="nextNotifyTime != null">-->
<!--, last_notify_time = #{nextNotifyTime}-->
<!--</if>-->
<!--<if test="lastExecuteTime != null">-->
<!--, last_execute_time = #{lastExecuteTime}-->
<!--</if>-->
<!--<if test="notifyTimes != null">-->
<!--, notify_times = #{notifyTimes}-->
<!--</if>-->
<!--</set>-->
<!--WHERE id = #{id}-->
<!--</update>-->
<!--<select id="selectByTransactionCode" parameterType="String" resultType="PayTransactionExtensionDO">-->
<!--SELECT-->
<!--<include refid="FIELDS"/>-->
<!--FROM transaction_extension-->
<!--WHERE transaction_code = #{transactionCode}-->
<!--LIMIT 1-->
<!--</select>-->
</mapper>
pay/pay-service-impl/target/classes/mapper/PayNotifyTaskMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.pay.biz.dao.PayNotifyTaskMapper"
>
<sql
id=
"FIELDS"
>
id, app_id, type,
status, next_notify_time, last_execute_time, notify_times, max_notify_times,
create_time
</sql>
<resultMap
id=
"PayNotifyTaskResultMap"
type=
"PayNotifyTaskDO"
>
<result
property=
"transaction"
column=
"transaction"
javaType=
"cn.iocoder.mall.pay.biz.dataobject.PayNotifyTaskDO$Transaction"
typeHandler=
"cn.iocoder.common.framework.mybatis.JSONTypeHandler"
/>
<result
property=
"refund"
column=
"refund"
javaType=
"cn.iocoder.mall.pay.biz.dataobject.PayNotifyTaskDO$Refund"
typeHandler=
"cn.iocoder.common.framework.mybatis.JSONTypeHandler"
/>
</resultMap>
<insert
id=
"insert"
parameterType=
"PayNotifyTaskDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO notify_task (
app_id, type,
status, next_notify_time, notify_times, max_notify_times,
`transaction`, refund
) VALUES (
#{appId}, #{type},
#{status}, #{nextNotifyTime}, #{notifyTimes}, #{maxNotifyTimes},
#{transaction, typeHandler=cn.iocoder.common.framework.mybatis.JSONTypeHandler},
#{refund, typeHandler=cn.iocoder.common.framework.mybatis.JSONTypeHandler}
)
</insert>
<update
id=
"update"
parameterType=
"PayNotifyTaskDO"
>
UPDATE notify_task
<set>
<if
test=
"status != null"
>
, status = #{status}
</if>
<if
test=
"nextNotifyTime != null"
>
, next_notify_time = #{nextNotifyTime}
</if>
<if
test=
"lastExecuteTime != null"
>
, last_execute_time = #{lastExecuteTime}
</if>
<if
test=
"notifyTimes != null"
>
, notify_times = #{notifyTimes}
</if>
</set>
WHERE id = #{id}
</update>
<select
id=
"selectByNotify"
resultMap=
"PayNotifyTaskResultMap"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM notify_task
WHERE status IN (1, 4, 5)
AND next_notify_time
<![CDATA[ <= ]]>
NOW()
AND last_execute_time > next_notify_time
</select>
</mapper>
pay/pay-service-impl/target/classes/mapper/PayRefundMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.pay.biz.dao.PayRefundMapper"
>
<sql
id=
"FIELDS"
>
id, transaction_id, refund_code, app_id, create_ip, order_id,
order_description, price, status,
finish_time, notify_url, extension_data, refund_channel, refund_time, notify_time,
trade_no, create_time
</sql>
<insert
id=
"insert"
parameterType=
"PayRefundDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO refund (
transaction_id, refund_code, app_id, create_ip, order_id,
order_description, price, status,
finish_time, notify_url, extension_data, refund_channel, refund_time, notify_time,
trade_no, create_time
) VALUES (
#{transactionId}, #{refundCode}, #{appId}, #{createIp}, #{orderId},
#{orderDescription}, #{price}, #{status},
#{finishTime}, #{notifyUrl}, #{extensionData}, #{refundChannel}, #{refundTime}, #{notifyTime},
#{tradeNo}, #{createTime}
)
</insert>
<update
id=
"update"
>
UPDATE refund
<set>
<if
test=
"entity.status != null"
>
, status = #{entity.status}
</if>
<if
test=
"entity.finishTime != null"
>
, finish_time = #{entity.finishTime}
</if>
<if
test=
"entity.extensionData != null"
>
, extension_data = #{entity.extensionData}
</if>
<if
test=
"entity.refundTime != null"
>
, refund_time = #{entity.refundTime}
</if>
<if
test=
"entity.notifyTime != null"
>
, notify_time = #{entity.notifyTime}
</if>
<if
test=
"entity.tradeNo != null"
>
, trade_no = #{entity.tradeNo}
</if>
</set>
WHERE id = #{entity.id}
<if
test=
"whereStatus != null"
>
AND status = #{whereStatus}
</if>
</update>
<select
id=
"selectByRefundCode"
parameterType=
"String"
resultType=
"PayRefundDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM refund
WHERE refund_code = #{refundCode}
LIMIT 1
</select>
<select
id=
"selectById"
parameterType=
"Integer"
resultType=
"PayRefundDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM refund
WHERE id = #{id}
</select>
<select
id=
"selectListByPage"
resultType=
"PayRefundDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM refund
<where>
<if
test=
"createBeginTime != null"
>
AND create_time >= #{createBeginTime}
</if>
<if
test=
"createEndTime != null"
>
AND #{createEndTime} >= create_time
</if>
<if
test=
"finishBeginTime != null"
>
AND finish_time >= #{finishBeginTime}
</if>
<if
test=
"finishEndTime != null"
>
AND #{finishEndTime} >= finish_time
</if>
<if
test=
"status != null"
>
AND status = #{status}
</if>
<if
test=
"payChannel != null"
>
AND pay_channel = #{payChannel}
</if>
</where>
LIMIT #{offset}, #{limit}
</select>
<select
id=
"selectCountByPage"
resultType=
"Integer"
>
SELECT
COUNT(1)
FROM refund
<where>
<if
test=
"createBeginTime != null"
>
AND create_time >= #{createBeginTime}
</if>
<if
test=
"createEndTime != null"
>
AND #{createEndTime} >= create_time
</if>
<if
test=
"finishBeginTime != null"
>
AND finish_time >= #{finishBeginTime}
</if>
<if
test=
"finishEndTime != null"
>
AND #{finishEndTime} >= finish_time
</if>
<if
test=
"status != null"
>
AND status = #{status}
</if>
<if
test=
"payChannel != null"
>
AND pay_channel = #{payChannel}
</if>
</where>
</select>
</mapper>
pay/pay-service-impl/target/classes/mapper/PayTransactionExtensionMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.pay.biz.dao.PayTransactionExtensionMapper"
>
<sql
id=
"FIELDS"
>
id, transaction_id, pay_channel, transaction_code, extension_data,
create_ip, status, create_time
</sql>
<insert
id=
"insert"
parameterType=
"PayTransactionExtensionDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO transaction_extension (
transaction_id, pay_channel, transaction_code, extension_data,
create_ip, status
) VALUES (
#{transactionId}, #{payChannel}, #{transactionCode}, #{extensionData},
#{createIp}, #{status}
)
</insert>
<update
id=
"update"
>
UPDATE transaction_extension
<set>
<if
test=
"entity.extensionData != null"
>
, extension_data = #{entity.extensionData}
</if>
<if
test=
"entity.status != null"
>
, status = #{entity.status}
</if>
</set>
WHERE id = #{entity.id}
<if
test=
"whereStatus != null"
>
AND status = #{whereStatus}
</if>
</update>
<select
id=
"selectByTransactionCode"
parameterType=
"String"
resultType=
"PayTransactionExtensionDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM transaction_extension
WHERE transaction_code = #{transactionCode}
LIMIT 1
</select>
<select
id=
"selectById"
parameterType=
"Integer"
resultType=
"PayTransactionExtensionDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM transaction_extension
WHERE id = #{id}
</select>
</mapper>
pay/pay-service-impl/target/classes/mapper/PayTransactionMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.pay.biz.dao.PayTransactionMapper"
>
<sql
id=
"FIELDS"
>
id, app_id, create_ip, order_id, order_subject,
order_description, order_memo, price, status, expire_time,
finish_time, notify_url, extension_id, pay_channel, payment_time,
notify_time, trade_no, refund_total, create_time
</sql>
<insert
id=
"insert"
parameterType=
"PayTransactionDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO transaction (
app_id, create_ip, order_id, order_subject,
order_description, order_memo, price, status, expire_time,
finish_time, notify_url, extension_id, pay_channel, payment_time,
notify_time, trade_no, create_time
) VALUES (
#{appId}, #{createIp}, #{orderId}, #{orderSubject},
#{orderDescription}, #{orderMemo}, #{price}, #{status}, #{expireTime},
#{finishTime}, #{notifyUrl}, #{extensionId}, #{payChannel}, #{paymentTime},
#{notifyTime}, #{tradeNo}, #{createTime}
)
</insert>
<update
id=
"update"
>
UPDATE transaction
<set>
<if
test=
"entity.status != null"
>
, status = #{entity.status}
</if>
<if
test=
"entity.extensionId != null"
>
, extension_id = #{entity.extensionId}
</if>
<if
test=
"entity.payChannel != null"
>
, pay_channel = #{entity.payChannel}
</if>
<if
test=
"entity.paymentTime != null"
>
, payment_time = #{entity.paymentTime}
</if>
<if
test=
"entity.finishTime != null"
>
, finish_time = #{entity.finishTime}
</if>
<if
test=
"entity.notifyTime != null"
>
, notify_time = #{entity.notifyTime}
</if>
<if
test=
"entity.tradeNo != null"
>
, trade_no = #{entity.tradeNo}
</if>
</set>
WHERE id = #{entity.id}
<if
test=
"whereStatus != null"
>
AND status = #{whereStatus}
</if>
</update>
<update
id=
"updateForRefundTotal"
>
UPDATE `transaction`
SET refund_total = refund_total + ${refundTotalIncr}
WHERE price >= refund_total + ${refundTotalIncr}
</update>
<select
id=
"selectByAppIdAndOrderId"
resultType=
"PayTransactionDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM transaction
WHERE app_id = #{appId}
AND order_id = #{orderId}
</select>
<select
id=
"selectById"
parameterType=
"Integer"
resultType=
"PayTransactionDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM transaction
WHERE id = #{id}
</select>
<select
id=
"selectListByIds"
resultType=
"PayTransactionDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM transaction
WHERE id IN
<foreach
item=
"id"
collection=
"ids"
separator=
","
open=
"("
close=
")"
index=
""
>
#{id}
</foreach>
</select>
<select
id=
"selectListByPage"
resultType=
"PayTransactionDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM transaction
<where>
<if
test=
"createBeginTime != null"
>
AND create_time >= #{createBeginTime}
</if>
<if
test=
"createEndTime != null"
>
AND #{createEndTime} >= create_time
</if>
<if
test=
"paymentBeginTime != null"
>
AND payment_time >= #{paymentBeginTime}
</if>
<if
test=
"paymentEndTime != null"
>
AND #{paymentEndTime} >= payment_time
</if>
<if
test=
"status != null"
>
AND status = #{status}
</if>
<if
test=
"hasRefund == true"
>
AND refund_total > 0
</if>
<if
test=
"hasRefund == false"
>
AND refund_total = 0
</if>
<if
test=
"payChannel != null"
>
AND pay_channel = #{payChannel}
</if>
<if
test=
"orderSubject != null"
>
order_subject LIKE "%"#{orderSubject}"%"
</if>
</where>
LIMIT #{offset}, #{limit}
</select>
<select
id=
"selectCountByPage"
resultType=
"Integer"
>
SELECT
COUNT(1)
FROM transaction
<where>
<if
test=
"createBeginTime != null"
>
AND create_time >= #{createBeginTime}
</if>
<if
test=
"createEndTime != null"
>
AND #{createEndTime} >= create_time
</if>
<if
test=
"paymentBeginTime != null"
>
AND payment_time >= #{paymentBeginTime}
</if>
<if
test=
"paymentEndTime != null"
>
AND #{paymentEndTime} >= payment_time
</if>
<if
test=
"status != null"
>
AND status = #{status}
</if>
<if
test=
"hasRefund == true"
>
AND refund_total > 0
</if>
<if
test=
"hasRefund == false"
>
AND refund_total = 0
</if>
<if
test=
"payChannel != null"
>
AND pay_channel = #{payChannel}
</if>
<if
test=
"orderSubject != null"
>
order_subject LIKE "%"#{orderSubject}"%"
</if>
</where>
</select>
</mapper>
pay/pay-service-impl/target/classes/mybatis-config.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
\ No newline at end of file
pay/pay-service-impl/target/classes/registry.conf
0 → 100644
浏览文件 @
fe2305df
registry
{
type
=
"file"
file
{
name
=
"file.conf"
}
zk
{
cluster
=
"default"
serverAddr
=
"192.168.88.10:2181"
session
.
timeout
=
6000
connect
.
timeout
=
2000
}
}
pay/pay-service-impl/target/generated-sources/annotations/cn/iocoder/mall/pay/biz/convert/PayNotifyConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
pay
.
biz
.
convert
;
import
cn.iocoder.mall.pay.api.message.PayRefundSuccessMessage
;
import
cn.iocoder.mall.pay.api.message.PayTransactionSuccessMessage
;
import
cn.iocoder.mall.pay.biz.dataobject.PayNotifyTaskDO
;
import
cn.iocoder.mall.pay.biz.dataobject.PayNotifyTaskDO.Refund
;
import
cn.iocoder.mall.pay.biz.dataobject.PayNotifyTaskDO.Transaction
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:00+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
PayNotifyConvertImpl
implements
PayNotifyConvert
{
@Override
public
PayTransactionSuccessMessage
convertTransaction
(
PayNotifyTaskDO
payTransactionNotifyTaskDO
)
{
if
(
payTransactionNotifyTaskDO
==
null
)
{
return
null
;
}
PayTransactionSuccessMessage
payTransactionSuccessMessage
=
new
PayTransactionSuccessMessage
();
payTransactionSuccessMessage
.
setOrderId
(
payTransactionNotifyTaskDOTransactionOrderId
(
payTransactionNotifyTaskDO
)
);
payTransactionSuccessMessage
.
setTransactionId
(
payTransactionNotifyTaskDOTransactionTransactionId
(
payTransactionNotifyTaskDO
)
);
payTransactionSuccessMessage
.
setId
(
payTransactionNotifyTaskDO
.
getId
()
);
payTransactionSuccessMessage
.
setAppId
(
payTransactionNotifyTaskDO
.
getAppId
()
);
payTransactionSuccessMessage
.
setNotifyTimes
(
payTransactionNotifyTaskDO
.
getNotifyTimes
()
);
payTransactionSuccessMessage
.
setNotifyUrl
(
payTransactionNotifyTaskDO
.
getNotifyUrl
()
);
return
payTransactionSuccessMessage
;
}
@Override
public
PayRefundSuccessMessage
convertRefund
(
PayNotifyTaskDO
payTransactionNotifyTaskDO
)
{
if
(
payTransactionNotifyTaskDO
==
null
)
{
return
null
;
}
PayRefundSuccessMessage
payRefundSuccessMessage
=
new
PayRefundSuccessMessage
();
payRefundSuccessMessage
.
setOrderId
(
payTransactionNotifyTaskDORefundOrderId
(
payTransactionNotifyTaskDO
)
);
payRefundSuccessMessage
.
setTransactionId
(
payTransactionNotifyTaskDORefundTransactionId
(
payTransactionNotifyTaskDO
)
);
payRefundSuccessMessage
.
setRefundId
(
payTransactionNotifyTaskDORefundRefundId
(
payTransactionNotifyTaskDO
)
);
payRefundSuccessMessage
.
setId
(
payTransactionNotifyTaskDO
.
getId
()
);
payRefundSuccessMessage
.
setAppId
(
payTransactionNotifyTaskDO
.
getAppId
()
);
payRefundSuccessMessage
.
setNotifyTimes
(
payTransactionNotifyTaskDO
.
getNotifyTimes
()
);
payRefundSuccessMessage
.
setNotifyUrl
(
payTransactionNotifyTaskDO
.
getNotifyUrl
()
);
return
payRefundSuccessMessage
;
}
private
String
payTransactionNotifyTaskDOTransactionOrderId
(
PayNotifyTaskDO
payNotifyTaskDO
)
{
if
(
payNotifyTaskDO
==
null
)
{
return
null
;
}
Transaction
transaction
=
payNotifyTaskDO
.
getTransaction
();
if
(
transaction
==
null
)
{
return
null
;
}
String
orderId
=
transaction
.
getOrderId
();
if
(
orderId
==
null
)
{
return
null
;
}
return
orderId
;
}
private
Integer
payTransactionNotifyTaskDOTransactionTransactionId
(
PayNotifyTaskDO
payNotifyTaskDO
)
{
if
(
payNotifyTaskDO
==
null
)
{
return
null
;
}
Transaction
transaction
=
payNotifyTaskDO
.
getTransaction
();
if
(
transaction
==
null
)
{
return
null
;
}
Integer
transactionId
=
transaction
.
getTransactionId
();
if
(
transactionId
==
null
)
{
return
null
;
}
return
transactionId
;
}
private
String
payTransactionNotifyTaskDORefundOrderId
(
PayNotifyTaskDO
payNotifyTaskDO
)
{
if
(
payNotifyTaskDO
==
null
)
{
return
null
;
}
Refund
refund
=
payNotifyTaskDO
.
getRefund
();
if
(
refund
==
null
)
{
return
null
;
}
String
orderId
=
refund
.
getOrderId
();
if
(
orderId
==
null
)
{
return
null
;
}
return
orderId
;
}
private
Integer
payTransactionNotifyTaskDORefundTransactionId
(
PayNotifyTaskDO
payNotifyTaskDO
)
{
if
(
payNotifyTaskDO
==
null
)
{
return
null
;
}
Refund
refund
=
payNotifyTaskDO
.
getRefund
();
if
(
refund
==
null
)
{
return
null
;
}
Integer
transactionId
=
refund
.
getTransactionId
();
if
(
transactionId
==
null
)
{
return
null
;
}
return
transactionId
;
}
private
Integer
payTransactionNotifyTaskDORefundRefundId
(
PayNotifyTaskDO
payNotifyTaskDO
)
{
if
(
payNotifyTaskDO
==
null
)
{
return
null
;
}
Refund
refund
=
payNotifyTaskDO
.
getRefund
();
if
(
refund
==
null
)
{
return
null
;
}
Integer
refundId
=
refund
.
getRefundId
();
if
(
refundId
==
null
)
{
return
null
;
}
return
refundId
;
}
}
pay/pay-service-impl/target/generated-sources/annotations/cn/iocoder/mall/pay/biz/convert/PayRefundConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
pay
.
biz
.
convert
;
import
cn.iocoder.mall.pay.api.bo.refund.PayRefundBO
;
import
cn.iocoder.mall.pay.api.dto.refund.PayRefundSubmitDTO
;
import
cn.iocoder.mall.pay.biz.dataobject.PayRefundDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:00+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
PayRefundConvertImpl
implements
PayRefundConvert
{
@Override
public
PayRefundDO
convert
(
PayRefundSubmitDTO
payRefundSubmitDTO
)
{
if
(
payRefundSubmitDTO
==
null
)
{
return
null
;
}
PayRefundDO
payRefundDO
=
new
PayRefundDO
();
payRefundDO
.
setAppId
(
payRefundSubmitDTO
.
getAppId
()
);
payRefundDO
.
setOrderId
(
payRefundSubmitDTO
.
getOrderId
()
);
payRefundDO
.
setCreateIp
(
payRefundSubmitDTO
.
getCreateIp
()
);
payRefundDO
.
setOrderDescription
(
payRefundSubmitDTO
.
getOrderDescription
()
);
payRefundDO
.
setPrice
(
payRefundSubmitDTO
.
getPrice
()
);
return
payRefundDO
;
}
@Override
public
PayRefundBO
convert
(
PayRefundDO
refund
)
{
if
(
refund
==
null
)
{
return
null
;
}
PayRefundBO
payRefundBO
=
new
PayRefundBO
();
payRefundBO
.
setId
(
refund
.
getId
()
);
payRefundBO
.
setTransactionId
(
refund
.
getTransactionId
()
);
payRefundBO
.
setRefundCode
(
refund
.
getRefundCode
()
);
payRefundBO
.
setAppId
(
refund
.
getAppId
()
);
payRefundBO
.
setOrderId
(
refund
.
getOrderId
()
);
payRefundBO
.
setCreateIp
(
refund
.
getCreateIp
()
);
payRefundBO
.
setOrderDescription
(
refund
.
getOrderDescription
()
);
payRefundBO
.
setPrice
(
refund
.
getPrice
()
);
payRefundBO
.
setStatus
(
refund
.
getStatus
()
);
payRefundBO
.
setFinishTime
(
refund
.
getFinishTime
()
);
payRefundBO
.
setNotifyUrl
(
refund
.
getNotifyUrl
()
);
payRefundBO
.
setExtensionData
(
refund
.
getExtensionData
()
);
payRefundBO
.
setRefundChannel
(
refund
.
getRefundChannel
()
);
payRefundBO
.
setRefundTime
(
refund
.
getRefundTime
()
);
payRefundBO
.
setNotifyTime
(
refund
.
getNotifyTime
()
);
payRefundBO
.
setTradeNo
(
refund
.
getTradeNo
()
);
payRefundBO
.
setCreateTime
(
refund
.
getCreateTime
()
);
return
payRefundBO
;
}
@Override
public
List
<
PayRefundBO
>
convertList
(
List
<
PayRefundDO
>
refunds
)
{
if
(
refunds
==
null
)
{
return
null
;
}
List
<
PayRefundBO
>
list
=
new
ArrayList
<
PayRefundBO
>(
refunds
.
size
()
);
for
(
PayRefundDO
payRefundDO
:
refunds
)
{
list
.
add
(
convert
(
payRefundDO
)
);
}
return
list
;
}
}
pay/pay-service-impl/target/generated-sources/annotations/cn/iocoder/mall/pay/biz/convert/PayTransactionConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
pay
.
biz
.
convert
;
import
cn.iocoder.mall.pay.api.bo.transaction.PayTransactionBO
;
import
cn.iocoder.mall.pay.api.dto.transaction.PayTransactionCreateDTO
;
import
cn.iocoder.mall.pay.api.dto.transaction.PayTransactionSubmitDTO
;
import
cn.iocoder.mall.pay.biz.dataobject.PayTransactionDO
;
import
cn.iocoder.mall.pay.biz.dataobject.PayTransactionExtensionDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:00+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
PayTransactionConvertImpl
implements
PayTransactionConvert
{
@Override
public
PayTransactionDO
convert
(
PayTransactionCreateDTO
payTransactionCreateDTO
)
{
if
(
payTransactionCreateDTO
==
null
)
{
return
null
;
}
PayTransactionDO
payTransactionDO
=
new
PayTransactionDO
();
payTransactionDO
.
setAppId
(
payTransactionCreateDTO
.
getAppId
()
);
payTransactionDO
.
setOrderId
(
payTransactionCreateDTO
.
getOrderId
()
);
payTransactionDO
.
setCreateIp
(
payTransactionCreateDTO
.
getCreateIp
()
);
payTransactionDO
.
setOrderSubject
(
payTransactionCreateDTO
.
getOrderSubject
()
);
payTransactionDO
.
setOrderDescription
(
payTransactionCreateDTO
.
getOrderDescription
()
);
payTransactionDO
.
setOrderMemo
(
payTransactionCreateDTO
.
getOrderMemo
()
);
payTransactionDO
.
setPrice
(
payTransactionCreateDTO
.
getPrice
()
);
payTransactionDO
.
setExpireTime
(
payTransactionCreateDTO
.
getExpireTime
()
);
return
payTransactionDO
;
}
@Override
public
PayTransactionBO
convert
(
PayTransactionDO
payTransactionDO
)
{
if
(
payTransactionDO
==
null
)
{
return
null
;
}
PayTransactionBO
payTransactionBO
=
new
PayTransactionBO
();
payTransactionBO
.
setId
(
payTransactionDO
.
getId
()
);
payTransactionBO
.
setAppId
(
payTransactionDO
.
getAppId
()
);
payTransactionBO
.
setCreateIp
(
payTransactionDO
.
getCreateIp
()
);
payTransactionBO
.
setOrderId
(
payTransactionDO
.
getOrderId
()
);
payTransactionBO
.
setOrderSubject
(
payTransactionDO
.
getOrderSubject
()
);
payTransactionBO
.
setOrderDescription
(
payTransactionDO
.
getOrderDescription
()
);
payTransactionBO
.
setOrderMemo
(
payTransactionDO
.
getOrderMemo
()
);
payTransactionBO
.
setPrice
(
payTransactionDO
.
getPrice
()
);
payTransactionBO
.
setStatus
(
payTransactionDO
.
getStatus
()
);
payTransactionBO
.
setExpireTime
(
payTransactionDO
.
getExpireTime
()
);
payTransactionBO
.
setFinishTime
(
payTransactionDO
.
getFinishTime
()
);
payTransactionBO
.
setExtensionId
(
payTransactionDO
.
getExtensionId
()
);
payTransactionBO
.
setPayChannel
(
payTransactionDO
.
getPayChannel
()
);
payTransactionBO
.
setPaymentTime
(
payTransactionDO
.
getPaymentTime
()
);
payTransactionBO
.
setNotifyTime
(
payTransactionDO
.
getNotifyTime
()
);
payTransactionBO
.
setTradeNo
(
payTransactionDO
.
getTradeNo
()
);
payTransactionBO
.
setCreateTime
(
payTransactionDO
.
getCreateTime
()
);
payTransactionBO
.
setRefundTotal
(
payTransactionDO
.
getRefundTotal
()
);
return
payTransactionBO
;
}
@Override
public
List
<
PayTransactionBO
>
convertList
(
List
<
PayTransactionDO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
PayTransactionBO
>
list1
=
new
ArrayList
<
PayTransactionBO
>(
list
.
size
()
);
for
(
PayTransactionDO
payTransactionDO
:
list
)
{
list1
.
add
(
convert
(
payTransactionDO
)
);
}
return
list1
;
}
@Override
public
PayTransactionExtensionDO
convert
(
PayTransactionSubmitDTO
payTransactionSubmitDTO
)
{
if
(
payTransactionSubmitDTO
==
null
)
{
return
null
;
}
PayTransactionExtensionDO
payTransactionExtensionDO
=
new
PayTransactionExtensionDO
();
payTransactionExtensionDO
.
setPayChannel
(
payTransactionSubmitDTO
.
getPayChannel
()
);
payTransactionExtensionDO
.
setCreateIp
(
payTransactionSubmitDTO
.
getCreateIp
()
);
return
payTransactionExtensionDO
;
}
}
product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductBrandController.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
application
.
controller
.
admins
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder
;
import
cn.iocoder.mall.product.api.ProductBrandService
;
import
cn.iocoder.mall.product.api.bo.ProductBrandBO
;
import
cn.iocoder.mall.product.api.bo.ProductBrangPageBO
;
import
cn.iocoder.mall.product.api.dto.ProductBrandAddDTO
;
import
cn.iocoder.mall.product.api.dto.ProductBrandPageDTO
;
import
cn.iocoder.mall.product.api.dto.ProductBrandUpdateDTO
;
import
cn.iocoder.mall.product.application.convert.ProductBrandConvert
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductBrandVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductBrangPageVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.dubbo.config.annotation.Reference
;
import
org.springframework.web.bind.annotation.*
;
import
static
cn
.
iocoder
.
common
.
framework
.
vo
.
CommonResult
.
success
;
@RestController
@RequestMapping
(
"admins/brand"
)
@Api
(
"商品品牌"
)
public
class
AdminsProductBrandController
{
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.provider.ProductBrandService.version}"
)
private
ProductBrandService
productBrandService
;
@PostMapping
(
"/add"
)
@ApiOperation
(
"创建品牌"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"name"
,
value
=
"品牌名称"
,
required
=
true
,
example
=
"安踏"
),
@ApiImplicitParam
(
name
=
"description"
,
value
=
"品牌描述"
,
required
=
true
,
example
=
"安踏拖鞋"
),
@ApiImplicitParam
(
name
=
"picUrl"
,
value
=
"品牌图片"
,
required
=
true
,
example
=
"http://www.iocoder.cn"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态 1开启 2禁用"
,
required
=
true
,
example
=
"1"
)
})
public
CommonResult
<
AdminsProductBrandVO
>
add
(
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"description"
)
String
description
,
@RequestParam
(
"picUrl"
)
String
picUrl
,
@RequestParam
(
"status"
)
Integer
status
)
{
// 创建 ProductBrandAddDTO 对象
ProductBrandAddDTO
productBrandAddDTO
=
new
ProductBrandAddDTO
().
setName
(
name
).
setDescription
(
description
)
.
setPicUrl
(
picUrl
).
setStatus
(
status
);
// 保存商品
ProductBrandBO
result
=
productBrandService
.
addProductBrand
(
AdminSecurityContextHolder
.
getContext
().
getAdminId
(),
productBrandAddDTO
);
// 返回结果
return
success
(
ProductBrandConvert
.
INSTANCE
.
convert
(
result
));
}
@PostMapping
(
"/update"
)
@ApiOperation
(
"更新商品"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"品牌主键"
,
required
=
true
,
example
=
"1"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"品牌名称"
,
required
=
true
,
example
=
"安踏"
),
@ApiImplicitParam
(
name
=
"description"
,
value
=
"品牌描述"
,
required
=
true
,
example
=
"安踏拖鞋"
),
@ApiImplicitParam
(
name
=
"picUrl"
,
value
=
"品牌图片"
,
required
=
true
,
example
=
"http://www.iocoder.cn"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态 1开启 2禁用"
,
required
=
true
,
example
=
"1"
)
})
public
CommonResult
<
Boolean
>
update
(
@RequestParam
(
"id"
)
Integer
id
,
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"description"
)
String
description
,
@RequestParam
(
"picUrl"
)
String
picUrl
,
@RequestParam
(
"status"
)
Integer
status
)
{
// 创建 productBrandUpdateDTO 对象
ProductBrandUpdateDTO
productBrandUpdateDTO
=
new
ProductBrandUpdateDTO
().
setId
(
id
).
setName
(
name
).
setDescription
(
description
)
.
setPicUrl
(
picUrl
).
setStatus
(
status
);
// 更新商品
productBrandService
.
updateProductBrand
(
AdminSecurityContextHolder
.
getContext
().
getAdminId
(),
productBrandUpdateDTO
);
return
success
(
true
);
}
@GetMapping
(
"/get"
)
@ApiOperation
(
"获取品牌"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"品牌主键"
,
required
=
true
,
example
=
"1"
)
})
public
CommonResult
<
AdminsProductBrandVO
>
add
(
@RequestParam
(
"id"
)
Integer
id
)
{
// 保存商品
ProductBrandBO
result
=
productBrandService
.
getProductBrand
(
id
);
// 返回结果
return
success
(
ProductBrandConvert
.
INSTANCE
.
convert
(
result
));
}
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得品牌分页"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"name"
,
value
=
"品牌名称"
,
required
=
true
,
example
=
"安踏"
),
@ApiImplicitParam
(
name
=
"description"
,
value
=
"品牌描述"
,
required
=
true
,
example
=
"安踏拖鞋"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态 1开启 2禁用"
,
required
=
true
,
example
=
"1"
),
@ApiImplicitParam
(
name
=
"pageNo"
,
value
=
"页码"
,
required
=
true
,
example
=
"1"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"页面大小"
,
required
=
true
,
example
=
"10"
)
})
public
CommonResult
<
AdminsProductBrangPageVO
>
attrPage
(
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"description"
,
required
=
false
)
String
description
,
@RequestParam
(
value
=
"status"
,
required
=
false
)
Integer
status
,
@RequestParam
(
value
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
)
{
// 创建 ProductAttrPageDTO 对象
ProductBrandPageDTO
productBrandPageDTO
=
new
ProductBrandPageDTO
().
setName
(
name
)
.
setDescription
(
description
)
.
setStatus
(
status
)
.
setPageNo
(
pageNo
)
.
setPageSize
(
pageSize
);
// 查询分页
ProductBrangPageBO
result
=
productBrandService
.
getProductBrandPage
(
productBrandPageDTO
);
// 返回结果
return
success
(
ProductBrandConvert
.
INSTANCE
.
convert
(
result
));
}
}
product/product-application/src/main/java/cn/iocoder/mall/product/application/convert/ProductBrandConvert.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
application
.
convert
;
import
cn.iocoder.mall.product.api.bo.ProductBrandBO
;
import
cn.iocoder.mall.product.api.bo.ProductBrangPageBO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductBrandVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductBrangPageVO
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
@Mapper
public
interface
ProductBrandConvert
{
ProductBrandConvert
INSTANCE
=
Mappers
.
getMapper
(
ProductBrandConvert
.
class
);
@Mappings
({})
AdminsProductBrandVO
convert
(
ProductBrandBO
result
);
@Mappings
({})
AdminsProductBrangPageVO
convert
(
ProductBrangPageBO
result
);
}
product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductBrandVO.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
application
.
vo
.
admins
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* 商品品牌 VO
*/
@ApiModel
(
value
=
"商品品牌 VO"
)
@Data
@Accessors
(
chain
=
true
)
public
class
AdminsProductBrandVO
{
/**
* 品牌编号
*/
@ApiModelProperty
(
value
=
"品牌编号"
,
required
=
true
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"名称"
,
required
=
true
,
example
=
"安踏"
)
private
String
name
;
@ApiModelProperty
(
value
=
"描述"
,
required
=
true
,
example
=
"安踏拖鞋"
)
private
String
description
;
@ApiModelProperty
(
value
=
"图片地址"
,
required
=
true
,
example
=
"http://www.iocoder.cn"
)
private
String
picUrl
;
@ApiModelProperty
(
value
=
"状态 1-开启 2-禁用"
,
required
=
true
,
example
=
"1"
)
private
Integer
status
;
}
product/product-application/src/main/java/cn/iocoder/mall/product/application/vo/admins/AdminsProductBrangPageVO.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
application
.
vo
.
admins
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
/**
* 商品品牌分页 BO
*/
@ApiModel
(
"商品品牌分页"
)
@Data
@Accessors
(
chain
=
true
)
public
class
AdminsProductBrangPageVO
{
@ApiModelProperty
(
value
=
"品牌数组"
,
required
=
true
)
private
List
<
AdminsProductBrandVO
>
brands
;
@ApiModelProperty
(
value
=
"总数"
,
required
=
true
)
private
Integer
count
;
}
product/product-application/src/main/resources/application.yaml
浏览文件 @
fe2305df
...
...
@@ -16,8 +16,6 @@ server:
servlet
:
context-path
:
/product-api/
swagger
:
enable
:
false
management
:
...
...
@@ -27,3 +25,10 @@ management:
include
:
health,info,env,metrics,prometheus
metrics
:
enabled
:
true
swagger
:
enable
:
true
title
:
商品子系统
description
:
商品子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.product.application.controller
\ No newline at end of file
product/product-application/target/classes/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
swagger
:
enable
:
true
title
:
商品子系统
description
:
商品子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.product.application.controller
product/product-application/target/classes/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
application
:
name
:
product-application
cloud
:
sentinel
:
transport
:
port
:
8719
dashboard
:
localhost:12088
metric
:
charset
:
UTF-8
eager
:
false
# server
server
:
port
:
18081
servlet
:
context-path
:
/product-api/
management
:
endpoints
:
web
:
exposure
:
include
:
health,info,env,metrics,prometheus
metrics
:
enabled
:
true
swagger
:
enable
:
true
title
:
商品子系统
description
:
商品子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.product.application.controller
\ No newline at end of file
product/product-application/target/generated-sources/annotations/cn/iocoder/mall/product/application/convert/ProductAttrConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
application
.
convert
;
import
cn.iocoder.mall.product.api.bo.ProductAttrBO
;
import
cn.iocoder.mall.product.api.bo.ProductAttrDetailBO
;
import
cn.iocoder.mall.product.api.bo.ProductAttrPageBO
;
import
cn.iocoder.mall.product.api.bo.ProductAttrSimpleBO
;
import
cn.iocoder.mall.product.api.bo.ProductAttrValueBO
;
import
cn.iocoder.mall.product.api.bo.ProductAttrValueDetailBO
;
import
cn.iocoder.mall.product.api.bo.ProductAttrValueSimpleBO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrDetailVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrPageVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrSimpleVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrValueDetailVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrValueSimpleVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrValueVO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:47:10+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
ProductAttrConvertImpl
implements
ProductAttrConvert
{
@Override
public
AdminsProductAttrPageVO
convert2
(
ProductAttrPageBO
result
)
{
if
(
result
==
null
)
{
return
null
;
}
AdminsProductAttrPageVO
adminsProductAttrPageVO
=
new
AdminsProductAttrPageVO
();
adminsProductAttrPageVO
.
setAttrs
(
productAttrDetailBOListToAdminsProductAttrDetailVOList
(
result
.
getAttrs
()
)
);
adminsProductAttrPageVO
.
setCount
(
result
.
getCount
()
);
return
adminsProductAttrPageVO
;
}
@Override
public
List
<
AdminsProductAttrSimpleVO
>
convert
(
List
<
ProductAttrSimpleBO
>
result
)
{
if
(
result
==
null
)
{
return
null
;
}
List
<
AdminsProductAttrSimpleVO
>
list
=
new
ArrayList
<
AdminsProductAttrSimpleVO
>(
result
.
size
()
);
for
(
ProductAttrSimpleBO
productAttrSimpleBO
:
result
)
{
list
.
add
(
productAttrSimpleBOToAdminsProductAttrSimpleVO
(
productAttrSimpleBO
)
);
}
return
list
;
}
@Override
public
AdminsProductAttrVO
convert3
(
ProductAttrBO
productAttrBO
)
{
if
(
productAttrBO
==
null
)
{
return
null
;
}
AdminsProductAttrVO
adminsProductAttrVO
=
new
AdminsProductAttrVO
();
adminsProductAttrVO
.
setId
(
productAttrBO
.
getId
()
);
adminsProductAttrVO
.
setName
(
productAttrBO
.
getName
()
);
adminsProductAttrVO
.
setStatus
(
productAttrBO
.
getStatus
()
);
adminsProductAttrVO
.
setCreateTime
(
productAttrBO
.
getCreateTime
()
);
return
adminsProductAttrVO
;
}
@Override
public
AdminsProductAttrValueVO
convert4
(
ProductAttrValueBO
productAttrValueBO
)
{
if
(
productAttrValueBO
==
null
)
{
return
null
;
}
AdminsProductAttrValueVO
adminsProductAttrValueVO
=
new
AdminsProductAttrValueVO
();
adminsProductAttrValueVO
.
setId
(
productAttrValueBO
.
getId
()
);
adminsProductAttrValueVO
.
setAttrId
(
productAttrValueBO
.
getAttrId
()
);
adminsProductAttrValueVO
.
setName
(
productAttrValueBO
.
getName
()
);
adminsProductAttrValueVO
.
setStatus
(
productAttrValueBO
.
getStatus
()
);
adminsProductAttrValueVO
.
setCreateTime
(
productAttrValueBO
.
getCreateTime
()
);
return
adminsProductAttrValueVO
;
}
protected
AdminsProductAttrValueDetailVO
productAttrValueDetailBOToAdminsProductAttrValueDetailVO
(
ProductAttrValueDetailBO
productAttrValueDetailBO
)
{
if
(
productAttrValueDetailBO
==
null
)
{
return
null
;
}
AdminsProductAttrValueDetailVO
adminsProductAttrValueDetailVO
=
new
AdminsProductAttrValueDetailVO
();
adminsProductAttrValueDetailVO
.
setId
(
productAttrValueDetailBO
.
getId
()
);
adminsProductAttrValueDetailVO
.
setName
(
productAttrValueDetailBO
.
getName
()
);
adminsProductAttrValueDetailVO
.
setStatus
(
productAttrValueDetailBO
.
getStatus
()
);
adminsProductAttrValueDetailVO
.
setCreateTime
(
productAttrValueDetailBO
.
getCreateTime
()
);
return
adminsProductAttrValueDetailVO
;
}
protected
List
<
AdminsProductAttrValueDetailVO
>
productAttrValueDetailBOListToAdminsProductAttrValueDetailVOList
(
List
<
ProductAttrValueDetailBO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
AdminsProductAttrValueDetailVO
>
list1
=
new
ArrayList
<
AdminsProductAttrValueDetailVO
>(
list
.
size
()
);
for
(
ProductAttrValueDetailBO
productAttrValueDetailBO
:
list
)
{
list1
.
add
(
productAttrValueDetailBOToAdminsProductAttrValueDetailVO
(
productAttrValueDetailBO
)
);
}
return
list1
;
}
protected
AdminsProductAttrDetailVO
productAttrDetailBOToAdminsProductAttrDetailVO
(
ProductAttrDetailBO
productAttrDetailBO
)
{
if
(
productAttrDetailBO
==
null
)
{
return
null
;
}
AdminsProductAttrDetailVO
adminsProductAttrDetailVO
=
new
AdminsProductAttrDetailVO
();
adminsProductAttrDetailVO
.
setId
(
productAttrDetailBO
.
getId
()
);
adminsProductAttrDetailVO
.
setName
(
productAttrDetailBO
.
getName
()
);
adminsProductAttrDetailVO
.
setStatus
(
productAttrDetailBO
.
getStatus
()
);
adminsProductAttrDetailVO
.
setCreateTime
(
productAttrDetailBO
.
getCreateTime
()
);
adminsProductAttrDetailVO
.
setValues
(
productAttrValueDetailBOListToAdminsProductAttrValueDetailVOList
(
productAttrDetailBO
.
getValues
()
)
);
return
adminsProductAttrDetailVO
;
}
protected
List
<
AdminsProductAttrDetailVO
>
productAttrDetailBOListToAdminsProductAttrDetailVOList
(
List
<
ProductAttrDetailBO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
AdminsProductAttrDetailVO
>
list1
=
new
ArrayList
<
AdminsProductAttrDetailVO
>(
list
.
size
()
);
for
(
ProductAttrDetailBO
productAttrDetailBO
:
list
)
{
list1
.
add
(
productAttrDetailBOToAdminsProductAttrDetailVO
(
productAttrDetailBO
)
);
}
return
list1
;
}
protected
AdminsProductAttrValueSimpleVO
productAttrValueSimpleBOToAdminsProductAttrValueSimpleVO
(
ProductAttrValueSimpleBO
productAttrValueSimpleBO
)
{
if
(
productAttrValueSimpleBO
==
null
)
{
return
null
;
}
AdminsProductAttrValueSimpleVO
adminsProductAttrValueSimpleVO
=
new
AdminsProductAttrValueSimpleVO
();
adminsProductAttrValueSimpleVO
.
setId
(
productAttrValueSimpleBO
.
getId
()
);
adminsProductAttrValueSimpleVO
.
setName
(
productAttrValueSimpleBO
.
getName
()
);
return
adminsProductAttrValueSimpleVO
;
}
protected
List
<
AdminsProductAttrValueSimpleVO
>
productAttrValueSimpleBOListToAdminsProductAttrValueSimpleVOList
(
List
<
ProductAttrValueSimpleBO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
AdminsProductAttrValueSimpleVO
>
list1
=
new
ArrayList
<
AdminsProductAttrValueSimpleVO
>(
list
.
size
()
);
for
(
ProductAttrValueSimpleBO
productAttrValueSimpleBO
:
list
)
{
list1
.
add
(
productAttrValueSimpleBOToAdminsProductAttrValueSimpleVO
(
productAttrValueSimpleBO
)
);
}
return
list1
;
}
protected
AdminsProductAttrSimpleVO
productAttrSimpleBOToAdminsProductAttrSimpleVO
(
ProductAttrSimpleBO
productAttrSimpleBO
)
{
if
(
productAttrSimpleBO
==
null
)
{
return
null
;
}
AdminsProductAttrSimpleVO
adminsProductAttrSimpleVO
=
new
AdminsProductAttrSimpleVO
();
adminsProductAttrSimpleVO
.
setId
(
productAttrSimpleBO
.
getId
()
);
adminsProductAttrSimpleVO
.
setName
(
productAttrSimpleBO
.
getName
()
);
adminsProductAttrSimpleVO
.
setValues
(
productAttrValueSimpleBOListToAdminsProductAttrValueSimpleVOList
(
productAttrSimpleBO
.
getValues
()
)
);
return
adminsProductAttrSimpleVO
;
}
}
product/product-application/target/generated-sources/annotations/cn/iocoder/mall/product/application/convert/ProductBrandConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
application
.
convert
;
import
cn.iocoder.mall.product.api.bo.ProductBrandBO
;
import
cn.iocoder.mall.product.api.bo.ProductBrangPageBO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductBrandVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductBrangPageVO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:12:33+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
ProductBrandConvertImpl
implements
ProductBrandConvert
{
@Override
public
AdminsProductBrandVO
convert
(
ProductBrandBO
result
)
{
if
(
result
==
null
)
{
return
null
;
}
AdminsProductBrandVO
adminsProductBrandVO
=
new
AdminsProductBrandVO
();
adminsProductBrandVO
.
setId
(
result
.
getId
()
);
adminsProductBrandVO
.
setName
(
result
.
getName
()
);
adminsProductBrandVO
.
setDescription
(
result
.
getDescription
()
);
adminsProductBrandVO
.
setPicUrl
(
result
.
getPicUrl
()
);
adminsProductBrandVO
.
setStatus
(
result
.
getStatus
()
);
return
adminsProductBrandVO
;
}
@Override
public
AdminsProductBrangPageVO
convert
(
ProductBrangPageBO
result
)
{
if
(
result
==
null
)
{
return
null
;
}
AdminsProductBrangPageVO
adminsProductBrangPageVO
=
new
AdminsProductBrangPageVO
();
adminsProductBrangPageVO
.
setBrands
(
productBrandBOListToAdminsProductBrandVOList
(
result
.
getBrands
()
)
);
adminsProductBrangPageVO
.
setCount
(
result
.
getCount
()
);
return
adminsProductBrangPageVO
;
}
protected
List
<
AdminsProductBrandVO
>
productBrandBOListToAdminsProductBrandVOList
(
List
<
ProductBrandBO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
AdminsProductBrandVO
>
list1
=
new
ArrayList
<
AdminsProductBrandVO
>(
list
.
size
()
);
for
(
ProductBrandBO
productBrandBO
:
list
)
{
list1
.
add
(
convert
(
productBrandBO
)
);
}
return
list1
;
}
}
product/product-application/target/generated-sources/annotations/cn/iocoder/mall/product/application/convert/ProductCategoryConvert$AdminsImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
application
.
convert
;
import
cn.iocoder.mall.product.api.bo.ProductCategoryBO
;
import
cn.iocoder.mall.product.application.convert.ProductCategoryConvert.Admins
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductCategoryTreeNodeVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductCategoryVO
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:47:09+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
ProductCategoryConvert
$AdminsImpl
implements
Admins
{
@Override
public
AdminsProductCategoryTreeNodeVO
convert
(
ProductCategoryBO
category
)
{
if
(
category
==
null
)
{
return
null
;
}
AdminsProductCategoryTreeNodeVO
adminsProductCategoryTreeNodeVO
=
new
AdminsProductCategoryTreeNodeVO
();
adminsProductCategoryTreeNodeVO
.
setId
(
category
.
getId
()
);
adminsProductCategoryTreeNodeVO
.
setPid
(
category
.
getPid
()
);
adminsProductCategoryTreeNodeVO
.
setName
(
category
.
getName
()
);
adminsProductCategoryTreeNodeVO
.
setDescription
(
category
.
getDescription
()
);
adminsProductCategoryTreeNodeVO
.
setPicUrl
(
category
.
getPicUrl
()
);
adminsProductCategoryTreeNodeVO
.
setSort
(
category
.
getSort
()
);
adminsProductCategoryTreeNodeVO
.
setStatus
(
category
.
getStatus
()
);
adminsProductCategoryTreeNodeVO
.
setCreateTime
(
category
.
getCreateTime
()
);
return
adminsProductCategoryTreeNodeVO
;
}
@Override
public
AdminsProductCategoryVO
convert2
(
ProductCategoryBO
result
)
{
if
(
result
==
null
)
{
return
null
;
}
AdminsProductCategoryVO
adminsProductCategoryVO
=
new
AdminsProductCategoryVO
();
adminsProductCategoryVO
.
setId
(
result
.
getId
()
);
adminsProductCategoryVO
.
setPid
(
result
.
getPid
()
);
adminsProductCategoryVO
.
setName
(
result
.
getName
()
);
adminsProductCategoryVO
.
setDescription
(
result
.
getDescription
()
);
adminsProductCategoryVO
.
setPicUrl
(
result
.
getPicUrl
()
);
adminsProductCategoryVO
.
setSort
(
result
.
getSort
()
);
adminsProductCategoryVO
.
setStatus
(
result
.
getStatus
()
);
adminsProductCategoryVO
.
setCreateTime
(
result
.
getCreateTime
()
);
return
adminsProductCategoryVO
;
}
}
product/product-application/target/generated-sources/annotations/cn/iocoder/mall/product/application/convert/ProductCategoryConvert$UsersImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
application
.
convert
;
import
cn.iocoder.mall.product.api.bo.ProductCategoryBO
;
import
cn.iocoder.mall.product.application.convert.ProductCategoryConvert.Users
;
import
cn.iocoder.mall.product.application.vo.users.UsersProductCategoryVO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:47:10+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
ProductCategoryConvert
$UsersImpl
implements
Users
{
@Override
public
UsersProductCategoryVO
convertToVO
(
ProductCategoryBO
category
)
{
if
(
category
==
null
)
{
return
null
;
}
UsersProductCategoryVO
usersProductCategoryVO
=
new
UsersProductCategoryVO
();
usersProductCategoryVO
.
setId
(
category
.
getId
()
);
usersProductCategoryVO
.
setName
(
category
.
getName
()
);
usersProductCategoryVO
.
setPicUrl
(
category
.
getPicUrl
()
);
return
usersProductCategoryVO
;
}
@Override
public
List
<
UsersProductCategoryVO
>
convertToVO
(
List
<
ProductCategoryBO
>
categoryList
)
{
if
(
categoryList
==
null
)
{
return
null
;
}
List
<
UsersProductCategoryVO
>
list
=
new
ArrayList
<
UsersProductCategoryVO
>(
categoryList
.
size
()
);
for
(
ProductCategoryBO
productCategoryBO
:
categoryList
)
{
list
.
add
(
convertToVO
(
productCategoryBO
)
);
}
return
list
;
}
}
product/product-application/target/generated-sources/annotations/cn/iocoder/mall/product/application/convert/ProductSpuConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
application
.
convert
;
import
cn.iocoder.mall.product.api.bo.ProductAttrAndValuePairBO
;
import
cn.iocoder.mall.product.api.bo.ProductSpuBO
;
import
cn.iocoder.mall.product.api.bo.ProductSpuDetailBO
;
import
cn.iocoder.mall.product.api.bo.ProductSpuDetailBO.Sku
;
import
cn.iocoder.mall.product.api.bo.ProductSpuPageBO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductAttrAndValuePairVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductSkuDetailVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductSpuDetailVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductSpuPageVO
;
import
cn.iocoder.mall.product.application.vo.admins.AdminsProductSpuVO
;
import
cn.iocoder.mall.product.application.vo.users.UsersProductAttrAndValuePairVO
;
import
cn.iocoder.mall.product.application.vo.users.UsersProductSkuDetailVO
;
import
cn.iocoder.mall.product.application.vo.users.UsersProductSpuDetailVO
;
import
cn.iocoder.mall.product.application.vo.users.UsersProductSpuPageVO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:47:09+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
ProductSpuConvertImpl
implements
ProductSpuConvert
{
@Override
public
AdminsProductSpuDetailVO
convert
(
ProductSpuDetailBO
productSpuDetailBO
)
{
if
(
productSpuDetailBO
==
null
)
{
return
null
;
}
AdminsProductSpuDetailVO
adminsProductSpuDetailVO
=
new
AdminsProductSpuDetailVO
();
adminsProductSpuDetailVO
.
setId
(
productSpuDetailBO
.
getId
()
);
adminsProductSpuDetailVO
.
setName
(
productSpuDetailBO
.
getName
()
);
adminsProductSpuDetailVO
.
setSellPoint
(
productSpuDetailBO
.
getSellPoint
()
);
adminsProductSpuDetailVO
.
setDescription
(
productSpuDetailBO
.
getDescription
()
);
adminsProductSpuDetailVO
.
setCid
(
productSpuDetailBO
.
getCid
()
);
List
<
String
>
list
=
productSpuDetailBO
.
getPicUrls
();
if
(
list
!=
null
)
{
adminsProductSpuDetailVO
.
setPicUrls
(
new
ArrayList
<
String
>(
list
)
);
}
adminsProductSpuDetailVO
.
setVisible
(
productSpuDetailBO
.
getVisible
()
);
adminsProductSpuDetailVO
.
setSort
(
productSpuDetailBO
.
getSort
()
);
adminsProductSpuDetailVO
.
setSkus
(
skuListToAdminsProductSkuDetailVOList
(
productSpuDetailBO
.
getSkus
()
)
);
return
adminsProductSpuDetailVO
;
}
@Override
public
AdminsProductSpuPageVO
convert2
(
ProductSpuPageBO
result
)
{
if
(
result
==
null
)
{
return
null
;
}
AdminsProductSpuPageVO
adminsProductSpuPageVO
=
new
AdminsProductSpuPageVO
();
adminsProductSpuPageVO
.
setList
(
convert3
(
result
.
getList
()
)
);
adminsProductSpuPageVO
.
setTotal
(
result
.
getTotal
()
);
return
adminsProductSpuPageVO
;
}
@Override
public
List
<
AdminsProductSpuVO
>
convert3
(
List
<
ProductSpuBO
>
result
)
{
if
(
result
==
null
)
{
return
null
;
}
List
<
AdminsProductSpuVO
>
list
=
new
ArrayList
<
AdminsProductSpuVO
>(
result
.
size
()
);
for
(
ProductSpuBO
productSpuBO
:
result
)
{
list
.
add
(
productSpuBOToAdminsProductSpuVO
(
productSpuBO
)
);
}
return
list
;
}
@Override
public
UsersProductSpuPageVO
convert3
(
ProductSpuPageBO
result
)
{
if
(
result
==
null
)
{
return
null
;
}
UsersProductSpuPageVO
usersProductSpuPageVO
=
new
UsersProductSpuPageVO
();
return
usersProductSpuPageVO
;
}
@Override
public
UsersProductSpuDetailVO
convert4
(
ProductSpuDetailBO
result
)
{
if
(
result
==
null
)
{
return
null
;
}
UsersProductSpuDetailVO
usersProductSpuDetailVO
=
new
UsersProductSpuDetailVO
();
usersProductSpuDetailVO
.
setId
(
result
.
getId
()
);
usersProductSpuDetailVO
.
setName
(
result
.
getName
()
);
usersProductSpuDetailVO
.
setSellPoint
(
result
.
getSellPoint
()
);
usersProductSpuDetailVO
.
setDescription
(
result
.
getDescription
()
);
usersProductSpuDetailVO
.
setCid
(
result
.
getCid
()
);
List
<
String
>
list
=
result
.
getPicUrls
();
if
(
list
!=
null
)
{
usersProductSpuDetailVO
.
setPicUrls
(
new
ArrayList
<
String
>(
list
)
);
}
usersProductSpuDetailVO
.
setSkus
(
skuListToUsersProductSkuDetailVOList
(
result
.
getSkus
()
)
);
return
usersProductSpuDetailVO
;
}
protected
AdminsProductAttrAndValuePairVO
productAttrAndValuePairBOToAdminsProductAttrAndValuePairVO
(
ProductAttrAndValuePairBO
productAttrAndValuePairBO
)
{
if
(
productAttrAndValuePairBO
==
null
)
{
return
null
;
}
AdminsProductAttrAndValuePairVO
adminsProductAttrAndValuePairVO
=
new
AdminsProductAttrAndValuePairVO
();
adminsProductAttrAndValuePairVO
.
setAttrId
(
productAttrAndValuePairBO
.
getAttrId
()
);
adminsProductAttrAndValuePairVO
.
setAttrName
(
productAttrAndValuePairBO
.
getAttrName
()
);
adminsProductAttrAndValuePairVO
.
setAttrValueId
(
productAttrAndValuePairBO
.
getAttrValueId
()
);
adminsProductAttrAndValuePairVO
.
setAttrValueName
(
productAttrAndValuePairBO
.
getAttrValueName
()
);
return
adminsProductAttrAndValuePairVO
;
}
protected
List
<
AdminsProductAttrAndValuePairVO
>
productAttrAndValuePairBOListToAdminsProductAttrAndValuePairVOList
(
List
<
ProductAttrAndValuePairBO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
AdminsProductAttrAndValuePairVO
>
list1
=
new
ArrayList
<
AdminsProductAttrAndValuePairVO
>(
list
.
size
()
);
for
(
ProductAttrAndValuePairBO
productAttrAndValuePairBO
:
list
)
{
list1
.
add
(
productAttrAndValuePairBOToAdminsProductAttrAndValuePairVO
(
productAttrAndValuePairBO
)
);
}
return
list1
;
}
protected
AdminsProductSkuDetailVO
skuToAdminsProductSkuDetailVO
(
Sku
sku
)
{
if
(
sku
==
null
)
{
return
null
;
}
AdminsProductSkuDetailVO
adminsProductSkuDetailVO
=
new
AdminsProductSkuDetailVO
();
adminsProductSkuDetailVO
.
setId
(
sku
.
getId
()
);
adminsProductSkuDetailVO
.
setSpuId
(
sku
.
getSpuId
()
);
adminsProductSkuDetailVO
.
setPicURL
(
sku
.
getPicURL
()
);
adminsProductSkuDetailVO
.
setAttrs
(
productAttrAndValuePairBOListToAdminsProductAttrAndValuePairVOList
(
sku
.
getAttrs
()
)
);
adminsProductSkuDetailVO
.
setPrice
(
sku
.
getPrice
()
);
adminsProductSkuDetailVO
.
setQuantity
(
sku
.
getQuantity
()
);
return
adminsProductSkuDetailVO
;
}
protected
List
<
AdminsProductSkuDetailVO
>
skuListToAdminsProductSkuDetailVOList
(
List
<
Sku
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
AdminsProductSkuDetailVO
>
list1
=
new
ArrayList
<
AdminsProductSkuDetailVO
>(
list
.
size
()
);
for
(
Sku
sku
:
list
)
{
list1
.
add
(
skuToAdminsProductSkuDetailVO
(
sku
)
);
}
return
list1
;
}
protected
AdminsProductSpuVO
productSpuBOToAdminsProductSpuVO
(
ProductSpuBO
productSpuBO
)
{
if
(
productSpuBO
==
null
)
{
return
null
;
}
AdminsProductSpuVO
adminsProductSpuVO
=
new
AdminsProductSpuVO
();
adminsProductSpuVO
.
setId
(
productSpuBO
.
getId
()
);
adminsProductSpuVO
.
setName
(
productSpuBO
.
getName
()
);
adminsProductSpuVO
.
setSellPoint
(
productSpuBO
.
getSellPoint
()
);
adminsProductSpuVO
.
setDescription
(
productSpuBO
.
getDescription
()
);
adminsProductSpuVO
.
setCid
(
productSpuBO
.
getCid
()
);
List
<
String
>
list
=
productSpuBO
.
getPicUrls
();
if
(
list
!=
null
)
{
adminsProductSpuVO
.
setPicUrls
(
new
ArrayList
<
String
>(
list
)
);
}
adminsProductSpuVO
.
setQuantity
(
productSpuBO
.
getQuantity
()
);
adminsProductSpuVO
.
setVisible
(
productSpuBO
.
getVisible
()
);
adminsProductSpuVO
.
setSort
(
productSpuBO
.
getSort
()
);
return
adminsProductSpuVO
;
}
protected
UsersProductAttrAndValuePairVO
productAttrAndValuePairBOToUsersProductAttrAndValuePairVO
(
ProductAttrAndValuePairBO
productAttrAndValuePairBO
)
{
if
(
productAttrAndValuePairBO
==
null
)
{
return
null
;
}
UsersProductAttrAndValuePairVO
usersProductAttrAndValuePairVO
=
new
UsersProductAttrAndValuePairVO
();
usersProductAttrAndValuePairVO
.
setAttrId
(
productAttrAndValuePairBO
.
getAttrId
()
);
usersProductAttrAndValuePairVO
.
setAttrName
(
productAttrAndValuePairBO
.
getAttrName
()
);
usersProductAttrAndValuePairVO
.
setAttrValueId
(
productAttrAndValuePairBO
.
getAttrValueId
()
);
usersProductAttrAndValuePairVO
.
setAttrValueName
(
productAttrAndValuePairBO
.
getAttrValueName
()
);
return
usersProductAttrAndValuePairVO
;
}
protected
List
<
UsersProductAttrAndValuePairVO
>
productAttrAndValuePairBOListToUsersProductAttrAndValuePairVOList
(
List
<
ProductAttrAndValuePairBO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
UsersProductAttrAndValuePairVO
>
list1
=
new
ArrayList
<
UsersProductAttrAndValuePairVO
>(
list
.
size
()
);
for
(
ProductAttrAndValuePairBO
productAttrAndValuePairBO
:
list
)
{
list1
.
add
(
productAttrAndValuePairBOToUsersProductAttrAndValuePairVO
(
productAttrAndValuePairBO
)
);
}
return
list1
;
}
protected
UsersProductSkuDetailVO
skuToUsersProductSkuDetailVO
(
Sku
sku
)
{
if
(
sku
==
null
)
{
return
null
;
}
UsersProductSkuDetailVO
usersProductSkuDetailVO
=
new
UsersProductSkuDetailVO
();
usersProductSkuDetailVO
.
setId
(
sku
.
getId
()
);
usersProductSkuDetailVO
.
setSpuId
(
sku
.
getSpuId
()
);
usersProductSkuDetailVO
.
setPicURL
(
sku
.
getPicURL
()
);
usersProductSkuDetailVO
.
setAttrs
(
productAttrAndValuePairBOListToUsersProductAttrAndValuePairVOList
(
sku
.
getAttrs
()
)
);
usersProductSkuDetailVO
.
setPrice
(
sku
.
getPrice
()
);
usersProductSkuDetailVO
.
setQuantity
(
sku
.
getQuantity
()
);
return
usersProductSkuDetailVO
;
}
protected
List
<
UsersProductSkuDetailVO
>
skuListToUsersProductSkuDetailVOList
(
List
<
Sku
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
UsersProductSkuDetailVO
>
list1
=
new
ArrayList
<
UsersProductSkuDetailVO
>(
list
.
size
()
);
for
(
Sku
sku
:
list
)
{
list1
.
add
(
skuToUsersProductSkuDetailVO
(
sku
)
);
}
return
list1
;
}
}
product/product-service-api/src/main/java/cn/iocoder/mall/product/api/ProductBrandService.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
api
;
import
cn.iocoder.mall.product.api.bo.ProductBrandBO
;
import
cn.iocoder.mall.product.api.bo.ProductBrangPageBO
;
import
cn.iocoder.mall.product.api.dto.ProductBrandAddDTO
;
import
cn.iocoder.mall.product.api.dto.ProductBrandPageDTO
;
import
cn.iocoder.mall.product.api.dto.ProductBrandUpdateDTO
;
public
interface
ProductBrandService
{
/**
* 获取品牌分页数据
* @param productBrandPageDTO 翻页参数
* @return
*/
ProductBrangPageBO
getProductBrandPage
(
ProductBrandPageDTO
productBrandPageDTO
);
/**
* 获取品牌明细
* @param id 主键
* @return
*/
ProductBrandBO
getProductBrand
(
Integer
id
);
/**
* 添加品牌
* @param productBrandAddDTO 添加参数
* @return
*/
ProductBrandBO
addProductBrand
(
Integer
adminId
,
ProductBrandAddDTO
productBrandAddDTO
);
/**
* 更新品牌
* @param productBrandUpdateDTO 更新参数
* @return
*/
Boolean
updateProductBrand
(
Integer
adminId
,
ProductBrandUpdateDTO
productBrandUpdateDTO
);
}
product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductBrandBO.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
api
.
bo
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
/**
* 商品品牌 VO
*/
@Data
@Accessors
(
chain
=
true
)
public
class
ProductBrandBO
implements
Serializable
{
/**
* 规格编号
*/
private
Integer
id
;
/**
* 名称
*/
private
String
name
;
/**
* 描述
*/
private
String
description
;
/**
* 图片地址
*/
private
String
picUrl
;
/**
* 状态
*
* 1-开启
* 2-禁用
*/
private
Integer
status
;
}
product/product-service-api/src/main/java/cn/iocoder/mall/product/api/bo/ProductBrangPageBO.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
api
.
bo
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 商品品牌分页 BO
*/
@Data
@Accessors
(
chain
=
true
)
public
class
ProductBrangPageBO
implements
Serializable
{
/**
* 品牌数组
*/
private
List
<
ProductBrandBO
>
brands
;
/**
* 总数
*/
private
Integer
count
;
}
product/product-service-api/src/main/java/cn/iocoder/mall/product/api/constant/ProductErrorCodeEnum.java
浏览文件 @
fe2305df
...
...
@@ -30,6 +30,9 @@ public enum ProductErrorCodeEnum {
PRODUCT_ATTR_STATUS_EQUALS
(
1003003003
,
"商品规格已经是该状态"
),
PRODUCT_ATTR_VALUE_EXISTS
(
1003003004
,
"商品规格值已经存在"
),
PRODUCT_ATTR_VALUE_STATUS_EQUALS
(
1003003005
,
"商品规格值已经是该状态"
),
// ========== PRODUCT BRAND模块 ==========
PRODUCT_BRAND_EXIST
(
1003004000
,
"品牌值已经存在"
),
;
private
final
int
code
;
...
...
product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductBrandAddDTO.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
api
.
dto
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
/**
* Product 品牌添加 DTO
*/
@Data
@Accessors
(
chain
=
true
)
public
class
ProductBrandAddDTO
{
/**
* 名称
*/
@NotEmpty
(
message
=
"品牌名不能为空"
)
private
String
name
;
/**
* 描述
*/
@NotEmpty
(
message
=
"品牌描述不能为空"
)
private
String
description
;
/**
* 图片地址
*/
@NotEmpty
(
message
=
"品牌图片地址不能为空"
)
private
String
picUrl
;
/**
* 状态
*
* 1-开启
* 2-禁用
*/
@NotNull
(
message
=
"品牌状态不能为空"
)
private
Integer
status
;
}
product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductBrandPageDTO.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
api
.
dto
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotNull
;
/**
* 商品品牌分页 DTO
*/
@Data
@Accessors
(
chain
=
true
)
public
class
ProductBrandPageDTO
{
/**
* 名称
*/
private
String
name
;
/**
* 描述
*/
private
String
description
;
/**
* 状态 1-开启 2-禁用
*/
private
Integer
status
;
@NotNull
(
message
=
"页码不能为空"
)
private
Integer
pageNo
;
@NotNull
(
message
=
"每页条数不能为空"
)
private
Integer
pageSize
;
}
product/product-service-api/src/main/java/cn/iocoder/mall/product/api/dto/ProductBrandUpdateDTO.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
api
.
dto
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
/**
* Product 品牌添加 DTO
*/
@Data
@Accessors
(
chain
=
true
)
public
class
ProductBrandUpdateDTO
{
/**
* 主键
*/
@NotNull
(
message
=
"品牌主键不能为空"
)
private
Integer
id
;
/**
* 名称
*/
@NotEmpty
(
message
=
"品牌名不能为空"
)
private
String
name
;
/**
* 描述
*/
@NotEmpty
(
message
=
"品牌描述不能为空"
)
private
String
description
;
/**
* 图片地址
*/
@NotEmpty
(
message
=
"品牌图片地址不能为空"
)
private
String
picUrl
;
/**
* 状态
*
* 1-开启
* 2-禁用
*/
@NotNull
(
message
=
"品牌状态不能为空"
)
private
Integer
status
;
}
product/product-service-impl/src/main/java/cn/iocoder/mall/product/convert/ProductBrandConvert.java
0 → 100644
浏览文件 @
fe2305df
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
org.mapstruct.Mapper
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
import
java.util.List
;
@Mapper
public
interface
ProductBrandConvert
{
ProductBrandConvert
INSTANCE
=
Mappers
.
getMapper
(
ProductBrandConvert
.
class
);
@Mappings
({})
List
<
ProductBrandBO
>
convert
(
List
<
ProductBrandDO
>
brands
);
@Mappings
({})
ProductBrandBO
convert
(
ProductBrandDO
brand
);
@Mappings
({})
ProductBrandDO
convert
(
ProductBrandUpdateDTO
brand
);
@Mappings
({})
ProductBrandDO
convert
(
ProductBrandAddDTO
brand
);
}
\ No newline at end of file
product/product-service-impl/src/main/java/cn/iocoder/mall/product/dao/ProductBrandMapper.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
dao
;
import
cn.iocoder.mall.product.dataobject.ProductBrandDO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
ProductBrandMapper
{
/**
* 根据 id 获取数据
* @param id
* @return
*/
ProductBrandDO
selectById
(
@Param
(
"id"
)
Integer
id
);
/**
* 根据 name 获取数据
* @param name
* @return
*/
ProductBrandDO
selectByName
(
@Param
(
"name"
)
String
name
);
/**
* 分页查询
* @param name 名称
* @param description 描述
* @param status 状态 1开启 2禁用
* @param offset 偏移量
* @param limit 数量
* @return
*/
List
<
ProductBrandDO
>
selectListByParams
(
@Param
(
"name"
)
String
name
,
@Param
(
"description"
)
String
description
,
@Param
(
"status"
)
Integer
status
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"limit"
)
Integer
limit
);
/**
* 分页数量统计
* @param name 名称
* @param description 描述
* @param status 状态 1开启 2禁用
* @return
*/
Integer
selectListCountByParams
(
@Param
(
"name"
)
String
name
,
@Param
(
"description"
)
String
description
,
@Param
(
"status"
)
Integer
status
);
/**
* 新增数据
* @param productBrandDO
*/
void
insert
(
ProductBrandDO
productBrandDO
);
/**
* 更新数据
* @param productBrandDO
*/
void
update
(
ProductBrandDO
productBrandDO
);
}
\ No newline at end of file
product/product-service-impl/src/main/java/cn/iocoder/mall/product/dataobject/ProductBrandDO.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
dataobject
;
import
cn.iocoder.common.framework.dataobject.DeletableDO
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* Product 品牌
*/
@Data
@Accessors
(
chain
=
true
)
public
class
ProductBrandDO
extends
DeletableDO
{
/**
* 规格编号
*/
private
Integer
id
;
/**
* 名称
*/
private
String
name
;
/**
* 描述
*/
private
String
description
;
/**
* 图片地址
*/
private
String
picUrl
;
/**
* 状态
*
* 1-开启
* 2-禁用
*/
private
Integer
status
;
}
product/product-service-impl/src/main/java/cn/iocoder/mall/product/service/ProductBrandServiceImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
product
.
service
;
import
cn.iocoder.common.framework.util.ServiceExceptionUtil
;
import
cn.iocoder.mall.product.api.ProductBrandService
;
import
cn.iocoder.mall.product.api.bo.ProductBrandBO
;
import
cn.iocoder.mall.product.api.bo.ProductBrangPageBO
;
import
cn.iocoder.mall.product.api.constant.ProductErrorCodeEnum
;
import
cn.iocoder.mall.product.api.dto.ProductBrandAddDTO
;
import
cn.iocoder.mall.product.api.dto.ProductBrandPageDTO
;
import
cn.iocoder.mall.product.api.dto.ProductBrandUpdateDTO
;
import
cn.iocoder.mall.product.convert.ProductBrandConvert
;
import
cn.iocoder.mall.product.dao.ProductBrandMapper
;
import
cn.iocoder.mall.product.dataobject.ProductBrandDO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* 商品规格 Service 实现类
*
* @see ProductBrandDO
*/
@Service
@org
.
apache
.
dubbo
.
config
.
annotation
.
Service
(
validation
=
"true"
,
version
=
"${dubbo.provider.ProductBrandService.version}"
)
public
class
ProductBrandServiceImpl
implements
ProductBrandService
{
@Autowired
private
ProductBrandMapper
productBrandMapper
;
/**
* 获取品牌分页数据
* @param productBrandPageDTO 分页参数
* @return
*/
@Override
public
ProductBrangPageBO
getProductBrandPage
(
ProductBrandPageDTO
productBrandPageDTO
)
{
ProductBrangPageBO
productBrangPageBO
=
new
ProductBrangPageBO
();
// 查询分页数据
int
offset
=
(
productBrandPageDTO
.
getPageNo
()
-
1
)
*
productBrandPageDTO
.
getPageSize
();
productBrangPageBO
.
setBrands
(
ProductBrandConvert
.
INSTANCE
.
convert
(
productBrandMapper
.
selectListByParams
(
productBrandPageDTO
.
getName
(),
productBrandPageDTO
.
getDescription
(),
productBrandPageDTO
.
getStatus
(),
offset
,
productBrandPageDTO
.
getPageSize
())));
// 查询分页总数
productBrangPageBO
.
setCount
(
productBrandMapper
.
selectListCountByParams
(
productBrandPageDTO
.
getName
(),
productBrandPageDTO
.
getDescription
(),
productBrandPageDTO
.
getStatus
()));
return
productBrangPageBO
;
}
/**
* 获取品牌明细
* @param id 主键
* @return
*/
@Override
public
ProductBrandBO
getProductBrand
(
Integer
id
)
{
ProductBrandBO
productBrandBO
=
new
ProductBrandBO
();
productBrandBO
=
ProductBrandConvert
.
INSTANCE
.
convert
(
productBrandMapper
.
selectById
(
id
));
return
productBrandBO
;
}
/**
* 添加品牌
* @param adminId
* @param productBrandAddDTO 添加参数
* @return
*/
@Override
public
ProductBrandBO
addProductBrand
(
Integer
adminId
,
ProductBrandAddDTO
productBrandAddDTO
)
{
// 校验品牌名不重复
if
(
productBrandMapper
.
selectByName
(
productBrandAddDTO
.
getName
())
!=
null
)
{
throw
ServiceExceptionUtil
.
exception
(
ProductErrorCodeEnum
.
PRODUCT_BRAND_EXIST
.
getCode
());
}
ProductBrandDO
productBrandDO
=
new
ProductBrandDO
();
productBrandDO
=
ProductBrandConvert
.
INSTANCE
.
convert
(
productBrandAddDTO
);
productBrandMapper
.
insert
(
productBrandDO
);
return
ProductBrandConvert
.
INSTANCE
.
convert
(
productBrandDO
);
}
/**
* 更新品牌
* @param adminId
* @param productBrandUpdateDTO 更新参数
* @return
*/
@Override
public
Boolean
updateProductBrand
(
Integer
adminId
,
ProductBrandUpdateDTO
productBrandUpdateDTO
)
{
ProductBrandDO
productBrandDO
=
new
ProductBrandDO
();
productBrandDO
=
ProductBrandConvert
.
INSTANCE
.
convert
(
productBrandUpdateDTO
);
productBrandMapper
.
update
(
productBrandDO
);
return
true
;
}
}
product/product-service-impl/src/main/resources/config/application.yaml
浏览文件 @
fe2305df
...
...
@@ -31,6 +31,8 @@ dubbo:
version
:
1.0.0
ProductSpuService
:
version
:
1.0.0
ProductBrandService
:
version
:
1.0.0
OAuth2Service
:
version
:
1.0.0
...
...
product/product-service-impl/src/main/resources/mapper/ProductBrandMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
\ No newline at end of file
product/product-service-impl/target/classes/config/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
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
product/product-service-impl/target/classes/config/application.yaml
0 → 100644
浏览文件 @
fe2305df
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
product/product-service-impl/target/classes/file.conf
0 → 100644
浏览文件 @
fe2305df
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
=
""
}
}
product/product-service-impl/target/classes/mapper/ProductAttrMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
\ No newline at end of file
product/product-service-impl/target/classes/mapper/ProductAttrValueMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
\ No newline at end of file
product/product-service-impl/target/classes/mapper/ProductBrandMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
\ No newline at end of file
product/product-service-impl/target/classes/mapper/ProductCategoryMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
product/product-service-impl/target/classes/mapper/ProductSkuMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
product/product-service-impl/target/classes/mapper/ProductSpuMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
product/product-service-impl/target/classes/mybatis-config.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
\ No newline at end of file
product/product-service-impl/target/classes/registry.conf
0 → 100644
浏览文件 @
fe2305df
registry
{
type
=
"file"
file
{
name
=
"file.conf"
}
zk
{
cluster
=
"default"
serverAddr
=
"192.168.88.10:2181"
session
.
timeout
=
6000
connect
.
timeout
=
2000
}
}
product/product-service-impl/target/generated-sources/annotations/cn/iocoder/mall/product/convert/ProductAttrConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
product/product-service-impl/target/generated-sources/annotations/cn/iocoder/mall/product/convert/ProductBrandConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
product/product-service-impl/target/generated-sources/annotations/cn/iocoder/mall/product/convert/ProductCategoryConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
product/product-service-impl/target/generated-sources/annotations/cn/iocoder/mall/product/convert/ProductSpuConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-application/target/classes/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
swagger
:
enable
:
false
title
:
营销子系统
description
:
营销子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.promotion.application.controller
promotion/promotion-application/target/classes/application.yaml
0 → 100644
浏览文件 @
fe2305df
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
promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/BannerConvert$AdminsImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/BannerConvert$UsersImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/CouponCardConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/CouponTemplateConvert$AdminsImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/CouponTemplateConvert$UsersImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/CouponTemplateConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
{
}
promotion/promotion-application/target/generated-sources/annotations/cn/iocoder/mall/promotion/application/convert/ProductRecommendConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-service-impl/target/classes/config/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
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}
promotion/promotion-service-impl/target/classes/config/application.yaml
0 → 100644
浏览文件 @
fe2305df
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
promotion/promotion-service-impl/target/classes/file.conf
0 → 100644
浏览文件 @
fe2305df
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
=
""
}
}
promotion/promotion-service-impl/target/classes/mapper/BannerMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
\ No newline at end of file
promotion/promotion-service-impl/target/classes/mapper/CouponCardMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
promotion/promotion-service-impl/target/classes/mapper/CouponTemplateMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
promotion/promotion-service-impl/target/classes/mapper/ProductRecommendMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
\ No newline at end of file
promotion/promotion-service-impl/target/classes/mapper/PromotionActivityMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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>
promotion/promotion-service-impl/target/classes/registry.conf
0 → 100644
浏览文件 @
fe2305df
registry
{
type
=
"file"
file
{
name
=
"file.conf"
}
zk
{
cluster
=
"default"
serverAddr
=
"192.168.88.10:2181"
session
.
timeout
=
6000
connect
.
timeout
=
2000
}
}
promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/BannerConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/CouponCardConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/CouponTemplateConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/ProductRecommendConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
promotion/promotion-service-impl/target/generated-sources/annotations/cn/iocoder/mall/promotion/biz/convert/PromotionActivityConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
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
;
}
}
search/search-application/target/classes/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
swagger
:
enable
:
true
title
:
搜索子系统
description
:
搜索子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.search.application.controller
search/search-application/target/classes/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
application
:
name
:
search-application
cloud
:
sentinel
:
transport
:
port
:
8719
dashboard
:
localhost:12088
metric
:
charset
:
UTF-8
eager
:
false
# server
server
:
port
:
18086
servlet
:
context-path
:
/search-api/
swagger
:
enable
:
false
management
:
endpoints
:
web
:
exposure
:
include
:
health,info,env,metrics,prometheus
metrics
:
enabled
:
true
search/search-service-impl/target/classes/config/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
# es
spring
:
data
:
elasticsearch
:
cluster-name
:
elasticsearch
cluster-nodes
:
192.168.88.14:9300
repositories
:
enable
:
true
# rocketmq
rocketmq
:
name-server
:
192.168.88.14:9876
producer
:
group
:
search-producer-group
search/search-service-impl/target/classes/config/application.yaml
0 → 100644
浏览文件 @
fe2305df
# es
spring
:
data
:
elasticsearch
:
cluster-name
:
elasticsearch
cluster-nodes
:
180.167.213.26:9300
repositories
:
enable
:
true
# dubbo
dubbo
:
application
:
name
:
search-service
registry
:
address
:
zookeeper://127.0.0.1:2181
protocol
:
port
:
-1
name
:
dubbo
scan
:
base-packages
:
cn.iocoder.mall.search.biz.service
provider
:
filter
:
-exception
ProductSearchService
:
version
:
1.0.0
consumer
:
ProductSpuService
:
version
:
1.0.0
ProductCategoryService
:
version
:
1.0.0
CartService
:
version
:
1.0.0
# rocketmq
rocketmq
:
name-server
:
127.0.0.1:9876
producer
:
group
:
search-producer-group
search/search-service-impl/target/generated-sources/annotations/cn/iocoder/mall/search/biz/convert/ProductSearchConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
search
.
biz
.
convert
;
import
cn.iocoder.mall.product.api.bo.ProductSpuDetailBO
;
import
cn.iocoder.mall.search.api.bo.ProductBO
;
import
cn.iocoder.mall.search.biz.dataobject.ESProductDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:12+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
ProductSearchConvertImpl
implements
ProductSearchConvert
{
@Override
public
ESProductDO
convert
(
ProductSpuDetailBO
spu
)
{
if
(
spu
==
null
)
{
return
null
;
}
ESProductDO
eSProductDO
=
new
ESProductDO
();
eSProductDO
.
setId
(
spu
.
getId
()
);
eSProductDO
.
setName
(
spu
.
getName
()
);
eSProductDO
.
setSellPoint
(
spu
.
getSellPoint
()
);
eSProductDO
.
setDescription
(
spu
.
getDescription
()
);
eSProductDO
.
setCid
(
spu
.
getCid
()
);
eSProductDO
.
setCategoryName
(
spu
.
getCategoryName
()
);
List
<
String
>
list
=
spu
.
getPicUrls
();
if
(
list
!=
null
)
{
eSProductDO
.
setPicUrls
(
new
ArrayList
<
String
>(
list
)
);
}
eSProductDO
.
setVisible
(
spu
.
getVisible
()
);
eSProductDO
.
setSort
(
spu
.
getSort
()
);
return
eSProductDO
;
}
@Override
public
List
<
ProductBO
>
convert
(
List
<
ESProductDO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
ProductBO
>
list1
=
new
ArrayList
<
ProductBO
>(
list
.
size
()
);
for
(
ESProductDO
eSProductDO
:
list
)
{
list1
.
add
(
eSProductDOToProductBO
(
eSProductDO
)
);
}
return
list1
;
}
protected
ProductBO
eSProductDOToProductBO
(
ESProductDO
eSProductDO
)
{
if
(
eSProductDO
==
null
)
{
return
null
;
}
ProductBO
productBO
=
new
ProductBO
();
productBO
.
setId
(
eSProductDO
.
getId
()
);
productBO
.
setName
(
eSProductDO
.
getName
()
);
productBO
.
setSellPoint
(
eSProductDO
.
getSellPoint
()
);
productBO
.
setDescription
(
eSProductDO
.
getDescription
()
);
productBO
.
setCid
(
eSProductDO
.
getCid
()
);
productBO
.
setCategoryName
(
eSProductDO
.
getCategoryName
()
);
List
<
String
>
list
=
eSProductDO
.
getPicUrls
();
if
(
list
!=
null
)
{
productBO
.
setPicUrls
(
new
ArrayList
<
String
>(
list
)
);
}
productBO
.
setVisible
(
eSProductDO
.
getVisible
()
);
productBO
.
setSort
(
eSProductDO
.
getSort
()
);
productBO
.
setOriginalPrice
(
eSProductDO
.
getOriginalPrice
()
);
productBO
.
setBuyPrice
(
eSProductDO
.
getBuyPrice
()
);
productBO
.
setQuantity
(
eSProductDO
.
getQuantity
()
);
productBO
.
setPromotionActivityId
(
eSProductDO
.
getPromotionActivityId
()
);
productBO
.
setPromotionActivityTitle
(
eSProductDO
.
getPromotionActivityTitle
()
);
productBO
.
setPromotionActivityType
(
eSProductDO
.
getPromotionActivityType
()
);
return
productBO
;
}
}
system/system-application/target/classes/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
boot
:
admin
:
client
:
enabled
:
false
# 暂时不用了
url
:
http://127.0.0.1:18097
#management:
# endpoints:
# web:
# exposure:
# include: "*"
# server:
# port: 19083 # 配置独立端口。而该端口,不使用 nginx 对外暴露,从而不配置安全认证。也就是说,内网环境可访问,外网环境不可访问。当然,这么做的前提是,认为内网安全。
swagger
:
enable
:
true
# 暂时不去掉
system/system-application/target/classes/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
application
:
name
:
admin-application
cloud
:
sentinel
:
transport
:
port
:
8719
dashboard
:
localhost:12088
metric
:
charset
:
UTF-8
eager
:
false
# server
server
:
port
:
18083
servlet
:
context-path
:
/admin-api/
admins
:
security
:
ignore_urls
:
/admin-api/admins/passport/login, /admin-api/admins/file/get_qiniu_token
# qiniu
qiniu
:
access-key
:
YldfyUC7OewoWM63TPYTairqnq8GMJvNek9EGoID
secret-key
:
zZ7Q8wwZRyaklVvkyLmVydA4WygOBqtc_gTYzalS
bucket
:
onemall
swagger
:
enable
:
true
# 暂时不去掉
title
:
管理员子系统
description
:
管理员子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.admin.application.controller
management
:
endpoints
:
web
:
exposure
:
include
:
health,info,env,metrics,prometheus
metrics
:
enabled
:
true
system/system-application/target/generated-sources/annotations/cn/iocoder/mall/admin/application/convert/AdminConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
application
.
convert
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.common.framework.vo.PageResult
;
import
cn.iocoder.mall.admin.api.bo.admin.AdminBO
;
import
cn.iocoder.mall.admin.api.bo.role.RoleBO
;
import
cn.iocoder.mall.admin.application.vo.admin.AdminInfoVO
;
import
cn.iocoder.mall.admin.application.vo.admin.AdminRoleVO
;
import
cn.iocoder.mall.admin.application.vo.admin.AdminVO
;
import
cn.iocoder.mall.admin.application.vo.admin.AdminVO.Role
;
import
cn.iocoder.mall.admin.sdk.context.AdminSecurityContext
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:11:49+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
AdminConvertImpl
implements
AdminConvert
{
@Override
public
AdminInfoVO
convert
(
AdminSecurityContext
adminSecurityContext
)
{
if
(
adminSecurityContext
==
null
)
{
return
null
;
}
AdminInfoVO
adminInfoVO
=
new
AdminInfoVO
();
adminInfoVO
.
setAdminId
(
adminSecurityContext
.
getAdminId
()
);
Set
<
Integer
>
set
=
adminSecurityContext
.
getRoleIds
();
if
(
set
!=
null
)
{
adminInfoVO
.
setRoleIds
(
new
HashSet
<
Integer
>(
set
)
);
}
return
adminInfoVO
;
}
@Override
public
AdminVO
convert
(
AdminBO
adminBO
)
{
if
(
adminBO
==
null
)
{
return
null
;
}
AdminVO
adminVO
=
new
AdminVO
();
adminVO
.
setId
(
adminBO
.
getId
()
);
adminVO
.
setUsername
(
adminBO
.
getUsername
()
);
adminVO
.
setNickname
(
adminBO
.
getNickname
()
);
adminVO
.
setStatus
(
adminBO
.
getStatus
()
);
adminVO
.
setCreateTime
(
adminBO
.
getCreateTime
()
);
return
adminVO
;
}
@Override
public
CommonResult
<
AdminVO
>
convert2
(
CommonResult
<
AdminBO
>
result
)
{
if
(
result
==
null
)
{
return
null
;
}
CommonResult
<
AdminVO
>
commonResult
=
new
CommonResult
<
AdminVO
>();
commonResult
.
setCode
(
result
.
getCode
()
);
commonResult
.
setMessage
(
result
.
getMessage
()
);
commonResult
.
setData
(
convert
(
result
.
getData
()
)
);
return
commonResult
;
}
@Override
public
List
<
AdminRoleVO
>
convert
(
List
<
RoleBO
>
roleList
)
{
if
(
roleList
==
null
)
{
return
null
;
}
List
<
AdminRoleVO
>
list
=
new
ArrayList
<
AdminRoleVO
>(
roleList
.
size
()
);
for
(
RoleBO
roleBO
:
roleList
)
{
list
.
add
(
roleBOToAdminRoleVO
(
roleBO
)
);
}
return
list
;
}
@Override
public
PageResult
<
AdminVO
>
convertAdminVOPage
(
PageResult
<
AdminBO
>
page
)
{
if
(
page
==
null
)
{
return
null
;
}
PageResult
<
AdminVO
>
pageResult
=
new
PageResult
<
AdminVO
>();
pageResult
.
setList
(
adminBOListToAdminVOList
(
page
.
getList
()
)
);
pageResult
.
setTotal
(
page
.
getTotal
()
);
return
pageResult
;
}
@Override
public
List
<
Role
>
convertAdminVORoleList
(
Collection
<
RoleBO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
Role
>
list1
=
new
ArrayList
<
Role
>(
list
.
size
()
);
for
(
RoleBO
roleBO
:
list
)
{
list1
.
add
(
roleBOToRole
(
roleBO
)
);
}
return
list1
;
}
protected
AdminRoleVO
roleBOToAdminRoleVO
(
RoleBO
roleBO
)
{
if
(
roleBO
==
null
)
{
return
null
;
}
AdminRoleVO
adminRoleVO
=
new
AdminRoleVO
();
adminRoleVO
.
setId
(
roleBO
.
getId
()
);
adminRoleVO
.
setName
(
roleBO
.
getName
()
);
return
adminRoleVO
;
}
protected
List
<
AdminVO
>
adminBOListToAdminVOList
(
List
<
AdminBO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
AdminVO
>
list1
=
new
ArrayList
<
AdminVO
>(
list
.
size
()
);
for
(
AdminBO
adminBO
:
list
)
{
list1
.
add
(
convert
(
adminBO
)
);
}
return
list1
;
}
protected
Role
roleBOToRole
(
RoleBO
roleBO
)
{
if
(
roleBO
==
null
)
{
return
null
;
}
Role
role
=
new
Role
();
role
.
setId
(
roleBO
.
getId
()
);
role
.
setName
(
roleBO
.
getName
()
);
return
role
;
}
}
system/system-application/target/generated-sources/annotations/cn/iocoder/mall/admin/application/convert/DataDictConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
application
.
convert
;
import
cn.iocoder.mall.admin.api.bo.datadict.DataDictBO
;
import
cn.iocoder.mall.admin.application.vo.datadict.DataDictEnumVO.Value
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:11:48+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
DataDictConvertImpl
implements
DataDictConvert
{
@Override
public
List
<
Value
>
convert2
(
List
<
DataDictBO
>
dataDictBOs
)
{
if
(
dataDictBOs
==
null
)
{
return
null
;
}
List
<
Value
>
list
=
new
ArrayList
<
Value
>(
dataDictBOs
.
size
()
);
for
(
DataDictBO
dataDictBO
:
dataDictBOs
)
{
list
.
add
(
dataDictBOToValue
(
dataDictBO
)
);
}
return
list
;
}
protected
Value
dataDictBOToValue
(
DataDictBO
dataDictBO
)
{
if
(
dataDictBO
==
null
)
{
return
null
;
}
Value
value
=
new
Value
();
value
.
setValue
(
dataDictBO
.
getValue
()
);
value
.
setDisplayName
(
dataDictBO
.
getDisplayName
()
);
return
value
;
}
}
system/system-application/target/generated-sources/annotations/cn/iocoder/mall/admin/application/convert/PassportConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
application
.
convert
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO
;
import
cn.iocoder.mall.admin.application.vo.PassportLoginVO
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:11:49+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
PassportConvertImpl
implements
PassportConvert
{
@Override
public
PassportLoginVO
convert
(
OAuth2AccessTokenBO
oauth2AccessTokenBO
)
{
if
(
oauth2AccessTokenBO
==
null
)
{
return
null
;
}
PassportLoginVO
passportLoginVO
=
new
PassportLoginVO
();
passportLoginVO
.
setAccessToken
(
oauth2AccessTokenBO
.
getAccessToken
()
);
passportLoginVO
.
setRefreshToken
(
oauth2AccessTokenBO
.
getRefreshToken
()
);
passportLoginVO
.
setExpiresIn
(
oauth2AccessTokenBO
.
getExpiresIn
()
);
return
passportLoginVO
;
}
@Override
public
CommonResult
<
PassportLoginVO
>
convert
(
CommonResult
<
OAuth2AccessTokenBO
>
oauth2AccessTokenBO
)
{
if
(
oauth2AccessTokenBO
==
null
)
{
return
null
;
}
CommonResult
<
PassportLoginVO
>
commonResult
=
new
CommonResult
<
PassportLoginVO
>();
commonResult
.
setCode
(
oauth2AccessTokenBO
.
getCode
()
);
commonResult
.
setMessage
(
oauth2AccessTokenBO
.
getMessage
()
);
commonResult
.
setData
(
convert
(
oauth2AccessTokenBO
.
getData
()
)
);
return
commonResult
;
}
}
system/system-application/target/generated-sources/annotations/cn/iocoder/mall/admin/application/convert/ResourceConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
application
.
convert
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.mall.admin.api.bo.resource.ResourceBO
;
import
cn.iocoder.mall.admin.application.vo.admin.AdminMenuTreeNodeVO
;
import
cn.iocoder.mall.admin.application.vo.resource.ResourceTreeNodeVO
;
import
cn.iocoder.mall.admin.application.vo.resource.ResourceVO
;
import
cn.iocoder.mall.admin.application.vo.role.RoleResourceTreeNodeVO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:11:49+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
ResourceConvertImpl
implements
ResourceConvert
{
@Override
public
AdminMenuTreeNodeVO
convert
(
ResourceBO
resourceBO
)
{
if
(
resourceBO
==
null
)
{
return
null
;
}
AdminMenuTreeNodeVO
adminMenuTreeNodeVO
=
new
AdminMenuTreeNodeVO
();
adminMenuTreeNodeVO
.
setId
(
resourceBO
.
getId
()
);
adminMenuTreeNodeVO
.
setHandler
(
resourceBO
.
getHandler
()
);
adminMenuTreeNodeVO
.
setPid
(
resourceBO
.
getPid
()
);
adminMenuTreeNodeVO
.
setSort
(
resourceBO
.
getSort
()
);
adminMenuTreeNodeVO
.
setDisplayName
(
resourceBO
.
getDisplayName
()
);
return
adminMenuTreeNodeVO
;
}
@Override
public
ResourceTreeNodeVO
convert2
(
ResourceBO
resourceBO
)
{
if
(
resourceBO
==
null
)
{
return
null
;
}
ResourceTreeNodeVO
resourceTreeNodeVO
=
new
ResourceTreeNodeVO
();
resourceTreeNodeVO
.
setId
(
resourceBO
.
getId
()
);
resourceTreeNodeVO
.
setType
(
resourceBO
.
getType
()
);
resourceTreeNodeVO
.
setSort
(
resourceBO
.
getSort
()
);
resourceTreeNodeVO
.
setDisplayName
(
resourceBO
.
getDisplayName
()
);
resourceTreeNodeVO
.
setPid
(
resourceBO
.
getPid
()
);
resourceTreeNodeVO
.
setHandler
(
resourceBO
.
getHandler
()
);
resourceTreeNodeVO
.
setIcon
(
resourceBO
.
getIcon
()
);
List
<
String
>
list
=
resourceBO
.
getPermissions
();
if
(
list
!=
null
)
{
resourceTreeNodeVO
.
setPermissions
(
new
ArrayList
<
String
>(
list
)
);
}
resourceTreeNodeVO
.
setCreateTime
(
resourceBO
.
getCreateTime
()
);
return
resourceTreeNodeVO
;
}
@Override
public
RoleResourceTreeNodeVO
convert4
(
ResourceBO
resourceBO
)
{
if
(
resourceBO
==
null
)
{
return
null
;
}
RoleResourceTreeNodeVO
roleResourceTreeNodeVO
=
new
RoleResourceTreeNodeVO
();
roleResourceTreeNodeVO
.
setId
(
resourceBO
.
getId
()
);
roleResourceTreeNodeVO
.
setHandler
(
resourceBO
.
getHandler
()
);
roleResourceTreeNodeVO
.
setPid
(
resourceBO
.
getPid
()
);
roleResourceTreeNodeVO
.
setSort
(
resourceBO
.
getSort
()
);
roleResourceTreeNodeVO
.
setDisplayName
(
resourceBO
.
getDisplayName
()
);
return
roleResourceTreeNodeVO
;
}
@Override
public
ResourceVO
convert3
(
ResourceBO
resourceBO
)
{
if
(
resourceBO
==
null
)
{
return
null
;
}
ResourceVO
resourceVO
=
new
ResourceVO
();
resourceVO
.
setId
(
resourceBO
.
getId
()
);
resourceVO
.
setType
(
resourceBO
.
getType
()
);
resourceVO
.
setSort
(
resourceBO
.
getSort
()
);
resourceVO
.
setDisplayName
(
resourceBO
.
getDisplayName
()
);
resourceVO
.
setCreateTime
(
resourceBO
.
getCreateTime
()
);
resourceVO
.
setPid
(
resourceBO
.
getPid
()
);
resourceVO
.
setHandler
(
resourceBO
.
getHandler
()
);
return
resourceVO
;
}
@Override
public
CommonResult
<
ResourceVO
>
convert3
(
CommonResult
<
ResourceBO
>
resourceBO
)
{
if
(
resourceBO
==
null
)
{
return
null
;
}
CommonResult
<
ResourceVO
>
commonResult
=
new
CommonResult
<
ResourceVO
>();
commonResult
.
setCode
(
resourceBO
.
getCode
()
);
commonResult
.
setMessage
(
resourceBO
.
getMessage
()
);
commonResult
.
setData
(
convert3
(
resourceBO
.
getData
()
)
);
return
commonResult
;
}
}
system/system-application/target/generated-sources/annotations/cn/iocoder/mall/admin/application/convert/RoleConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
application
.
convert
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:11:49+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
RoleConvertImpl
implements
RoleConvert
{
}
system/system-service-impl/target/classes/config/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://192.168.88.14:3306/mall_admin?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
system/system-service-impl/target/classes/config/application.properties
0 → 100644
浏览文件 @
fe2305df
##################### 业务模块 #####################
## OAuth2CodeService
modules.oauth2-code-service.access-token-expire-time-millis
=
2880000
modules.oauth2-code-service.refresh-token-expire-time-millis
=
43200000
\ No newline at end of file
system/system-service-impl/target/classes/config/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://180.167.213.26:13306/mall_admin?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
# mybatis
#mybatis:
# config-location: classpath:mybatis-config.xml
# mapper-locations: classpath:mapper/*.xml
# type-aliases-package: cn.iocoder.mall.admin.dataobject
# mybatis-plus
mybatis-plus
:
configuration
:
map-underscore-to-camel-case
:
true
# 虽然默认为 true ,但是还是显示去指定下。
global-config
:
db-config
:
id-type
:
auto
logic-delete-value
:
1
# 逻辑已删除值(默认为 1)
logic-not-delete-value
:
0
# 逻辑未删除值(默认为 0)
mapper-locations
:
classpath*:mapper/*.xml
type-aliases-package
:
cn.iocoder.mall.admin.dataobject
# sms
sms
:
yunPian
:
apiKey
:
aliYun
:
accessKeyId
:
accessSecret
:
# dubbo
dubbo
:
application
:
name
:
admin-service
registry
:
address
:
zookeeper://127.0.0.1:2181
protocol
:
port
:
-1
name
:
dubbo
scan
:
base-packages
:
cn.iocoder.mall.admin.service
provider
:
filter
:
-exception
AdminAccessLogService
:
version
:
1.0.0
AdminService
:
version
:
1.0.0
DataDictService
:
version
:
1.0.0
OAuth2Service
:
version
:
1.0.0
ResourceService
:
version
:
1.0.0
RoleService
:
version
:
1.0.0
SmsService
:
version
:
1.0.0
# logging
logging
:
level
:
# dao 开启 debug 模式 mybatis 输入 sql
cn.iocoder.mall.admin.dao
:
debug
system/system-service-impl/target/classes/mapper/AdminRoleMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.admin.dao.AdminRoleMapper"
>
<insert
id=
"insertList"
>
INSERT INTO admin_role (
admin_id, role_id, create_time, deleted
) VALUES
<foreach
collection=
"adminRoleDOs"
item=
"adminRole"
separator=
","
>
(#{adminRole.adminId}, #{adminRole.roleId}, #{adminRole.createTime}, #{adminRole.deleted})
</foreach>
</insert>
</mapper>
system/system-service-impl/target/classes/mapper/DataDictMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.admin.dao.DataDictMapper"
>
<sql
id=
"FIELDS"
>
id, enum_value, value, display_name, sort,
memo, create_time
</sql>
<select
id=
"selectByEnumValueAndValue"
resultType=
"DataDictDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM data_dict
WHERE enum_value = #{enumValue}
AND value = #{value}
AND deleted = 0
LIMIT 1
</select>
<select
id=
"selectByEnumValueAndValues"
resultType=
"cn.iocoder.mall.admin.dataobject.DataDictDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM data_dict
WHERE deleted = 0
AND enum_value = #{enumValue}
AND `value` IN
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
</select>
<select
id=
"selectByEnumValue"
resultType=
"cn.iocoder.mall.admin.dataobject.DataDictDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM data_dict
WHERE deleted = 0
AND enum_value = #{enumValue}
</select>
</mapper>
system/system-service-impl/target/classes/mapper/ResourceMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.admin.dao.ResourceMapper"
>
<sql
id=
"FIELDS"
>
id, type, sort, display_name, icon, permissions,
create_time, pid, handler
</sql>
<select
id=
"selectListByTypeAndRoleIds"
resultType=
"ResourceDO"
>
SELECT
r.id, r.type, r.sort, r.display_name,
r.create_time, r.pid, r.handler
FROM resource r, role_resource rr
WHERE r.deleted = 0
AND rr.deleted = 0
<if
test=
"type != null"
>
AND r.type = #{type}
</if>
AND rr.role_id IN
<foreach
item=
"roleId"
collection=
"roleIds"
separator=
","
open=
"("
close=
")"
index=
""
>
#{roleId}
</foreach>
AND r.id = rr.resource_id
</select>
</mapper>
system/system-service-impl/target/classes/mapper/RoleResourceMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.admin.dao.RoleResourceMapper"
>
<insert
id=
"insertList"
>
INSERT INTO role_resource (
resource_id, role_id, create_time, deleted
) VALUES
<foreach
collection=
"roleResources"
item=
"roleResource"
separator=
","
>
(#{roleResource.resourceId}, #{roleResource.roleId}, #{roleResource.createTime}, #{roleResource.deleted})
</foreach>
</insert>
</mapper>
system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AccessLogConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
convert
;
import
cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO
;
import
cn.iocoder.mall.admin.api.dto.systemlog.ExceptionLogAddDTO
;
import
cn.iocoder.mall.admin.dataobject.AccessLogDO
;
import
cn.iocoder.mall.admin.dataobject.ExceptionLogDO
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:10:14+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
AccessLogConvertImpl
implements
AccessLogConvert
{
@Override
public
AccessLogDO
convert
(
AccessLogAddDTO
accessLogAddDTO
)
{
if
(
accessLogAddDTO
==
null
)
{
return
null
;
}
AccessLogDO
accessLogDO
=
new
AccessLogDO
();
accessLogDO
.
setTraceId
(
accessLogAddDTO
.
getTraceId
()
);
accessLogDO
.
setUserId
(
accessLogAddDTO
.
getUserId
()
);
accessLogDO
.
setUserType
(
accessLogAddDTO
.
getUserType
()
);
accessLogDO
.
setApplicationName
(
accessLogAddDTO
.
getApplicationName
()
);
accessLogDO
.
setUri
(
accessLogAddDTO
.
getUri
()
);
accessLogDO
.
setQueryString
(
accessLogAddDTO
.
getQueryString
()
);
accessLogDO
.
setMethod
(
accessLogAddDTO
.
getMethod
()
);
accessLogDO
.
setUserAgent
(
accessLogAddDTO
.
getUserAgent
()
);
accessLogDO
.
setIp
(
accessLogAddDTO
.
getIp
()
);
accessLogDO
.
setStartTime
(
accessLogAddDTO
.
getStartTime
()
);
accessLogDO
.
setResponseTime
(
accessLogAddDTO
.
getResponseTime
()
);
accessLogDO
.
setErrorCode
(
accessLogAddDTO
.
getErrorCode
()
);
accessLogDO
.
setErrorMessage
(
accessLogAddDTO
.
getErrorMessage
()
);
return
accessLogDO
;
}
@Override
public
ExceptionLogDO
convert
(
ExceptionLogAddDTO
exceptionLogAddDTO
)
{
if
(
exceptionLogAddDTO
==
null
)
{
return
null
;
}
ExceptionLogDO
exceptionLogDO
=
new
ExceptionLogDO
();
exceptionLogDO
.
setTraceId
(
exceptionLogAddDTO
.
getTraceId
()
);
exceptionLogDO
.
setUserId
(
exceptionLogAddDTO
.
getUserId
()
);
exceptionLogDO
.
setUserType
(
exceptionLogAddDTO
.
getUserType
()
);
exceptionLogDO
.
setApplicationName
(
exceptionLogAddDTO
.
getApplicationName
()
);
exceptionLogDO
.
setUri
(
exceptionLogAddDTO
.
getUri
()
);
exceptionLogDO
.
setQueryString
(
exceptionLogAddDTO
.
getQueryString
()
);
exceptionLogDO
.
setMethod
(
exceptionLogAddDTO
.
getMethod
()
);
exceptionLogDO
.
setUserAgent
(
exceptionLogAddDTO
.
getUserAgent
()
);
exceptionLogDO
.
setIp
(
exceptionLogAddDTO
.
getIp
()
);
exceptionLogDO
.
setExceptionTime
(
exceptionLogAddDTO
.
getExceptionTime
()
);
exceptionLogDO
.
setExceptionName
(
exceptionLogAddDTO
.
getExceptionName
()
);
exceptionLogDO
.
setExceptionMessage
(
exceptionLogAddDTO
.
getExceptionMessage
()
);
exceptionLogDO
.
setExceptionRootCauseMessage
(
exceptionLogAddDTO
.
getExceptionRootCauseMessage
()
);
exceptionLogDO
.
setExceptionStackTrace
(
exceptionLogAddDTO
.
getExceptionStackTrace
()
);
exceptionLogDO
.
setExceptionClassName
(
exceptionLogAddDTO
.
getExceptionClassName
()
);
exceptionLogDO
.
setExceptionFileName
(
exceptionLogAddDTO
.
getExceptionFileName
()
);
exceptionLogDO
.
setExceptionMethodName
(
exceptionLogAddDTO
.
getExceptionMethodName
()
);
exceptionLogDO
.
setExceptionLineNumber
(
exceptionLogAddDTO
.
getExceptionLineNumber
()
);
return
exceptionLogDO
;
}
}
system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/AdminConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
convert
;
import
cn.iocoder.common.framework.vo.PageResult
;
import
cn.iocoder.mall.admin.api.bo.admin.AdminAuthenticationBO
;
import
cn.iocoder.mall.admin.api.bo.admin.AdminBO
;
import
cn.iocoder.mall.admin.api.dto.admin.AdminAddDTO
;
import
cn.iocoder.mall.admin.api.dto.admin.AdminUpdateDTO
;
import
cn.iocoder.mall.admin.dataobject.AdminDO
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:10:13+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
AdminConvertImpl
implements
AdminConvert
{
@Override
public
AdminBO
convert
(
AdminDO
adminDO
)
{
if
(
adminDO
==
null
)
{
return
null
;
}
AdminBO
adminBO
=
new
AdminBO
();
adminBO
.
setId
(
adminDO
.
getId
()
);
adminBO
.
setUsername
(
adminDO
.
getUsername
()
);
adminBO
.
setNickname
(
adminDO
.
getNickname
()
);
adminBO
.
setStatus
(
adminDO
.
getStatus
()
);
adminBO
.
setCreateTime
(
adminDO
.
getCreateTime
()
);
return
adminBO
;
}
@Override
public
AdminAuthenticationBO
convert2
(
AdminDO
admin
)
{
if
(
admin
==
null
)
{
return
null
;
}
AdminAuthenticationBO
adminAuthenticationBO
=
new
AdminAuthenticationBO
();
adminAuthenticationBO
.
setId
(
admin
.
getId
()
);
adminAuthenticationBO
.
setNickname
(
admin
.
getNickname
()
);
return
adminAuthenticationBO
;
}
@Override
public
AdminDO
convert
(
AdminAddDTO
adminAddDTO
)
{
if
(
adminAddDTO
==
null
)
{
return
null
;
}
AdminDO
adminDO
=
new
AdminDO
();
adminDO
.
setUsername
(
adminAddDTO
.
getUsername
()
);
adminDO
.
setNickname
(
adminAddDTO
.
getNickname
()
);
adminDO
.
setPassword
(
adminAddDTO
.
getPassword
()
);
return
adminDO
;
}
@Override
public
AdminDO
convert
(
AdminUpdateDTO
adminUpdateDTO
)
{
if
(
adminUpdateDTO
==
null
)
{
return
null
;
}
AdminDO
adminDO
=
new
AdminDO
();
adminDO
.
setId
(
adminUpdateDTO
.
getId
()
);
adminDO
.
setUsername
(
adminUpdateDTO
.
getUsername
()
);
adminDO
.
setNickname
(
adminUpdateDTO
.
getNickname
()
);
adminDO
.
setPassword
(
adminUpdateDTO
.
getPassword
()
);
return
adminDO
;
}
@Override
public
List
<
AdminBO
>
convert
(
List
<
AdminDO
>
adminBOs
)
{
if
(
adminBOs
==
null
)
{
return
null
;
}
List
<
AdminBO
>
list
=
new
ArrayList
<
AdminBO
>(
adminBOs
.
size
()
);
for
(
AdminDO
adminDO
:
adminBOs
)
{
list
.
add
(
convert
(
adminDO
)
);
}
return
list
;
}
@Override
public
PageResult
<
AdminBO
>
convert
(
IPage
<
AdminDO
>
page
)
{
if
(
page
==
null
)
{
return
null
;
}
PageResult
<
AdminBO
>
pageResult
=
new
PageResult
<
AdminBO
>();
pageResult
.
setList
(
convert
(
page
.
getRecords
()
)
);
pageResult
.
setTotal
(
(
int
)
page
.
getTotal
()
);
return
pageResult
;
}
}
system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/DataDictConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
convert
;
import
cn.iocoder.mall.admin.api.bo.datadict.DataDictBO
;
import
cn.iocoder.mall.admin.api.dto.datadict.DataDictAddDTO
;
import
cn.iocoder.mall.admin.api.dto.datadict.DataDictUpdateDTO
;
import
cn.iocoder.mall.admin.dataobject.DataDictDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:10:13+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
DataDictConvertImpl
implements
DataDictConvert
{
@Override
public
DataDictDO
convert
(
DataDictAddDTO
dataDictAddDTO
)
{
if
(
dataDictAddDTO
==
null
)
{
return
null
;
}
DataDictDO
dataDictDO
=
new
DataDictDO
();
dataDictDO
.
setEnumValue
(
dataDictAddDTO
.
getEnumValue
()
);
dataDictDO
.
setValue
(
dataDictAddDTO
.
getValue
()
);
dataDictDO
.
setDisplayName
(
dataDictAddDTO
.
getDisplayName
()
);
dataDictDO
.
setSort
(
dataDictAddDTO
.
getSort
()
);
dataDictDO
.
setMemo
(
dataDictAddDTO
.
getMemo
()
);
return
dataDictDO
;
}
@Override
public
DataDictDO
convert
(
DataDictUpdateDTO
dataDictUpdateDTO
)
{
if
(
dataDictUpdateDTO
==
null
)
{
return
null
;
}
DataDictDO
dataDictDO
=
new
DataDictDO
();
dataDictDO
.
setId
(
dataDictUpdateDTO
.
getId
()
);
dataDictDO
.
setEnumValue
(
dataDictUpdateDTO
.
getEnumValue
()
);
dataDictDO
.
setValue
(
dataDictUpdateDTO
.
getValue
()
);
dataDictDO
.
setDisplayName
(
dataDictUpdateDTO
.
getDisplayName
()
);
dataDictDO
.
setSort
(
dataDictUpdateDTO
.
getSort
()
);
dataDictDO
.
setMemo
(
dataDictUpdateDTO
.
getMemo
()
);
return
dataDictDO
;
}
@Override
public
DataDictBO
convert
(
DataDictDO
dataDictDO
)
{
if
(
dataDictDO
==
null
)
{
return
null
;
}
DataDictBO
dataDictBO
=
new
DataDictBO
();
dataDictBO
.
setId
(
dataDictDO
.
getId
()
);
dataDictBO
.
setEnumValue
(
dataDictDO
.
getEnumValue
()
);
dataDictBO
.
setValue
(
dataDictDO
.
getValue
()
);
dataDictBO
.
setDisplayName
(
dataDictDO
.
getDisplayName
()
);
dataDictBO
.
setSort
(
dataDictDO
.
getSort
()
);
dataDictBO
.
setMemo
(
dataDictDO
.
getMemo
()
);
dataDictBO
.
setCreateTime
(
dataDictDO
.
getCreateTime
()
);
return
dataDictBO
;
}
@Override
public
List
<
DataDictBO
>
convert
(
List
<
DataDictDO
>
dataDictDOs
)
{
if
(
dataDictDOs
==
null
)
{
return
null
;
}
List
<
DataDictBO
>
list
=
new
ArrayList
<
DataDictBO
>(
dataDictDOs
.
size
()
);
for
(
DataDictDO
dataDictDO
:
dataDictDOs
)
{
list
.
add
(
convert
(
dataDictDO
)
);
}
return
list
;
}
}
system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/OAuth2ConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
convert
;
import
cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO
;
import
cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AuthenticationBO
;
import
cn.iocoder.mall.admin.dataobject.OAuth2AccessTokenDO
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:10:14+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OAuth2ConvertImpl
implements
OAuth2Convert
{
@Override
public
OAuth2AccessTokenBO
convertToAccessToken
(
OAuth2AccessTokenDO
oauth2AccessTokenDO
)
{
if
(
oauth2AccessTokenDO
==
null
)
{
return
null
;
}
OAuth2AccessTokenBO
oAuth2AccessTokenBO
=
new
OAuth2AccessTokenBO
();
oAuth2AccessTokenBO
.
setAccessToken
(
oauth2AccessTokenDO
.
getId
()
);
oAuth2AccessTokenBO
.
setRefreshToken
(
oauth2AccessTokenDO
.
getRefreshToken
()
);
return
oAuth2AccessTokenBO
;
}
@Override
public
OAuth2AuthenticationBO
convertToAuthentication
(
OAuth2AccessTokenDO
oauth2AccessTokenDO
)
{
if
(
oauth2AccessTokenDO
==
null
)
{
return
null
;
}
OAuth2AuthenticationBO
oAuth2AuthenticationBO
=
new
OAuth2AuthenticationBO
();
oAuth2AuthenticationBO
.
setUserId
(
oauth2AccessTokenDO
.
getUserId
()
);
oAuth2AuthenticationBO
.
setUserType
(
oauth2AccessTokenDO
.
getUserType
()
);
return
oAuth2AuthenticationBO
;
}
}
system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/ResourceConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
convert
;
import
cn.iocoder.mall.admin.api.bo.resource.ResourceBO
;
import
cn.iocoder.mall.admin.api.dto.resource.ResourceAddDTO
;
import
cn.iocoder.mall.admin.api.dto.resource.ResourceUpdateDTO
;
import
cn.iocoder.mall.admin.dataobject.ResourceDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:10:13+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
ResourceConvertImpl
implements
ResourceConvert
{
@Override
public
ResourceBO
convert
(
ResourceDO
resourceDO
)
{
if
(
resourceDO
==
null
)
{
return
null
;
}
ResourceBO
resourceBO
=
new
ResourceBO
();
resourceBO
.
setPermissions
(
translateListFromString
(
resourceDO
.
getPermissions
()
)
);
resourceBO
.
setId
(
resourceDO
.
getId
()
);
resourceBO
.
setType
(
resourceDO
.
getType
()
);
resourceBO
.
setSort
(
resourceDO
.
getSort
()
);
resourceBO
.
setDisplayName
(
resourceDO
.
getDisplayName
()
);
resourceBO
.
setPid
(
resourceDO
.
getPid
()
);
resourceBO
.
setHandler
(
resourceDO
.
getHandler
()
);
resourceBO
.
setIcon
(
resourceDO
.
getIcon
()
);
resourceBO
.
setCreateTime
(
resourceDO
.
getCreateTime
()
);
return
resourceBO
;
}
@Override
public
List
<
ResourceBO
>
convert
(
List
<
ResourceDO
>
resourceDOs
)
{
if
(
resourceDOs
==
null
)
{
return
null
;
}
List
<
ResourceBO
>
list
=
new
ArrayList
<
ResourceBO
>(
resourceDOs
.
size
()
);
for
(
ResourceDO
resourceDO
:
resourceDOs
)
{
list
.
add
(
convert
(
resourceDO
)
);
}
return
list
;
}
@Override
public
ResourceDO
convert
(
ResourceAddDTO
resourceAddDTO
)
{
if
(
resourceAddDTO
==
null
)
{
return
null
;
}
ResourceDO
resourceDO
=
new
ResourceDO
();
resourceDO
.
setPermissions
(
translateStringFromList
(
resourceAddDTO
.
getPermissions
()
)
);
resourceDO
.
setType
(
resourceAddDTO
.
getType
()
);
resourceDO
.
setSort
(
resourceAddDTO
.
getSort
()
);
resourceDO
.
setDisplayName
(
resourceAddDTO
.
getDisplayName
()
);
resourceDO
.
setPid
(
resourceAddDTO
.
getPid
()
);
resourceDO
.
setHandler
(
resourceAddDTO
.
getHandler
()
);
resourceDO
.
setIcon
(
resourceAddDTO
.
getIcon
()
);
return
resourceDO
;
}
@Override
public
ResourceDO
convert
(
ResourceUpdateDTO
resourceUpdateDTO
)
{
if
(
resourceUpdateDTO
==
null
)
{
return
null
;
}
ResourceDO
resourceDO
=
new
ResourceDO
();
resourceDO
.
setPermissions
(
translateStringFromList
(
resourceUpdateDTO
.
getPermissions
()
)
);
resourceDO
.
setId
(
resourceUpdateDTO
.
getId
()
);
resourceDO
.
setType
(
resourceUpdateDTO
.
getType
()
);
resourceDO
.
setSort
(
resourceUpdateDTO
.
getSort
()
);
resourceDO
.
setDisplayName
(
resourceUpdateDTO
.
getDisplayName
()
);
resourceDO
.
setPid
(
resourceUpdateDTO
.
getPid
()
);
resourceDO
.
setHandler
(
resourceUpdateDTO
.
getHandler
()
);
resourceDO
.
setIcon
(
resourceUpdateDTO
.
getIcon
()
);
return
resourceDO
;
}
}
system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/RoleConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
convert
;
import
cn.iocoder.common.framework.vo.PageResult
;
import
cn.iocoder.mall.admin.api.bo.role.RoleBO
;
import
cn.iocoder.mall.admin.api.dto.role.RoleAddDTO
;
import
cn.iocoder.mall.admin.api.dto.role.RoleUpdateDTO
;
import
cn.iocoder.mall.admin.dataobject.RoleDO
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:10:13+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
RoleConvertImpl
implements
RoleConvert
{
@Override
public
RoleDO
convert
(
RoleAddDTO
roleAddDTO
)
{
if
(
roleAddDTO
==
null
)
{
return
null
;
}
RoleDO
roleDO
=
new
RoleDO
();
roleDO
.
setName
(
roleAddDTO
.
getName
()
);
return
roleDO
;
}
@Override
public
RoleDO
convert
(
RoleUpdateDTO
roleUpdateDTO
)
{
if
(
roleUpdateDTO
==
null
)
{
return
null
;
}
RoleDO
roleDO
=
new
RoleDO
();
roleDO
.
setId
(
roleUpdateDTO
.
getId
()
);
roleDO
.
setName
(
roleUpdateDTO
.
getName
()
);
return
roleDO
;
}
@Override
public
RoleBO
convert
(
RoleDO
roleDO
)
{
if
(
roleDO
==
null
)
{
return
null
;
}
RoleBO
roleBO
=
new
RoleBO
();
roleBO
.
setId
(
roleDO
.
getId
()
);
roleBO
.
setName
(
roleDO
.
getName
()
);
roleBO
.
setCreateTime
(
roleDO
.
getCreateTime
()
);
return
roleBO
;
}
@Override
public
List
<
RoleBO
>
convert
(
List
<
RoleDO
>
roleDOs
)
{
if
(
roleDOs
==
null
)
{
return
null
;
}
List
<
RoleBO
>
list
=
new
ArrayList
<
RoleBO
>(
roleDOs
.
size
()
);
for
(
RoleDO
roleDO
:
roleDOs
)
{
list
.
add
(
convert
(
roleDO
)
);
}
return
list
;
}
@Override
public
PageResult
<
RoleBO
>
convert
(
IPage
<
RoleDO
>
page
)
{
if
(
page
==
null
)
{
return
null
;
}
PageResult
<
RoleBO
>
pageResult
=
new
PageResult
<
RoleBO
>();
pageResult
.
setList
(
convert
(
page
.
getRecords
()
)
);
pageResult
.
setTotal
(
(
int
)
page
.
getTotal
()
);
return
pageResult
;
}
}
system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsSignConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
convert
;
import
cn.iocoder.mall.admin.api.bo.sms.PageSmsSignBO.Sign
;
import
cn.iocoder.mall.admin.api.bo.sms.SmsSignBO
;
import
cn.iocoder.mall.admin.dataobject.SmsSignDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:10:13+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
SmsSignConvertImpl
implements
SmsSignConvert
{
@Override
public
SmsSignBO
convert
(
SmsSignDO
smsSignDO
)
{
if
(
smsSignDO
==
null
)
{
return
null
;
}
SmsSignBO
smsSignBO
=
new
SmsSignBO
();
smsSignBO
.
setId
(
smsSignDO
.
getId
()
);
smsSignBO
.
setSign
(
smsSignDO
.
getSign
()
);
smsSignBO
.
setApplyStatus
(
smsSignDO
.
getApplyStatus
()
);
smsSignBO
.
setApplyMessage
(
smsSignDO
.
getApplyMessage
()
);
return
smsSignBO
;
}
@Override
public
List
<
Sign
>
convert
(
List
<
SmsSignDO
>
smsSignDOList
)
{
if
(
smsSignDOList
==
null
)
{
return
null
;
}
List
<
Sign
>
list
=
new
ArrayList
<
Sign
>(
smsSignDOList
.
size
()
);
for
(
SmsSignDO
smsSignDO
:
smsSignDOList
)
{
list
.
add
(
smsSignDOToSign
(
smsSignDO
)
);
}
return
list
;
}
protected
Sign
smsSignDOToSign
(
SmsSignDO
smsSignDO
)
{
if
(
smsSignDO
==
null
)
{
return
null
;
}
Sign
sign
=
new
Sign
();
sign
.
setId
(
smsSignDO
.
getId
()
);
sign
.
setPlatform
(
smsSignDO
.
getPlatform
()
);
sign
.
setSign
(
smsSignDO
.
getSign
()
);
sign
.
setApplyStatus
(
smsSignDO
.
getApplyStatus
()
);
sign
.
setApplyMessage
(
smsSignDO
.
getApplyMessage
()
);
sign
.
setUpdateTime
(
smsSignDO
.
getUpdateTime
()
);
sign
.
setCreateTime
(
smsSignDO
.
getCreateTime
()
);
return
sign
;
}
}
system/system-service-impl/target/generated-sources/annotations/cn/iocoder/mall/admin/convert/SmsTemplateConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
admin
.
convert
;
import
cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO.Sign
;
import
cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO.Template
;
import
cn.iocoder.mall.admin.api.bo.sms.SmsTemplateBO
;
import
cn.iocoder.mall.admin.dataobject.SmsSignDO
;
import
cn.iocoder.mall.admin.dataobject.SmsTemplateDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-31T18:10:13+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
SmsTemplateConvertImpl
implements
SmsTemplateConvert
{
@Override
public
SmsTemplateBO
convert
(
SmsTemplateDO
smsTemplateDO
)
{
if
(
smsTemplateDO
==
null
)
{
return
null
;
}
SmsTemplateBO
smsTemplateBO
=
new
SmsTemplateBO
();
smsTemplateBO
.
setId
(
smsTemplateDO
.
getId
()
);
smsTemplateBO
.
setSmsSignId
(
smsTemplateDO
.
getSmsSignId
()
);
smsTemplateBO
.
setTemplate
(
smsTemplateDO
.
getTemplate
()
);
smsTemplateBO
.
setApplyStatus
(
smsTemplateDO
.
getApplyStatus
()
);
smsTemplateBO
.
setApplyMessage
(
smsTemplateDO
.
getApplyMessage
()
);
return
smsTemplateBO
;
}
@Override
public
List
<
Template
>
convert
(
List
<
SmsTemplateDO
>
smsTemplateDOList
)
{
if
(
smsTemplateDOList
==
null
)
{
return
null
;
}
List
<
Template
>
list
=
new
ArrayList
<
Template
>(
smsTemplateDOList
.
size
()
);
for
(
SmsTemplateDO
smsTemplateDO
:
smsTemplateDOList
)
{
list
.
add
(
smsTemplateDOToTemplate
(
smsTemplateDO
)
);
}
return
list
;
}
@Override
public
List
<
Sign
>
convertTemplateSign
(
List
<
SmsSignDO
>
smsSignDOList
)
{
if
(
smsSignDOList
==
null
)
{
return
null
;
}
List
<
Sign
>
list
=
new
ArrayList
<
Sign
>(
smsSignDOList
.
size
()
);
for
(
SmsSignDO
smsSignDO
:
smsSignDOList
)
{
list
.
add
(
smsSignDOToSign
(
smsSignDO
)
);
}
return
list
;
}
protected
Template
smsTemplateDOToTemplate
(
SmsTemplateDO
smsTemplateDO
)
{
if
(
smsTemplateDO
==
null
)
{
return
null
;
}
Template
template
=
new
Template
();
template
.
setId
(
smsTemplateDO
.
getId
()
);
template
.
setSmsSignId
(
smsTemplateDO
.
getSmsSignId
()
);
if
(
smsTemplateDO
.
getPlatform
()
!=
null
)
{
template
.
setPlatform
(
String
.
valueOf
(
smsTemplateDO
.
getPlatform
()
)
);
}
template
.
setTemplateCode
(
smsTemplateDO
.
getTemplateCode
()
);
template
.
setTemplate
(
smsTemplateDO
.
getTemplate
()
);
template
.
setSmsType
(
smsTemplateDO
.
getSmsType
()
);
template
.
setApplyStatus
(
smsTemplateDO
.
getApplyStatus
()
);
template
.
setApplyMessage
(
smsTemplateDO
.
getApplyMessage
()
);
template
.
setUpdateTime
(
smsTemplateDO
.
getUpdateTime
()
);
template
.
setCreateTime
(
smsTemplateDO
.
getCreateTime
()
);
return
template
;
}
protected
Sign
smsSignDOToSign
(
SmsSignDO
smsSignDO
)
{
if
(
smsSignDO
==
null
)
{
return
null
;
}
Sign
sign
=
new
Sign
();
sign
.
setId
(
smsSignDO
.
getId
()
);
sign
.
setSign
(
smsSignDO
.
getSign
()
);
sign
.
setApplyStatus
(
smsSignDO
.
getApplyStatus
()
);
sign
.
setApplyMessage
(
smsSignDO
.
getApplyMessage
()
);
return
sign
;
}
}
user/user-application/target/classes/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
swagger
:
enable
:
true
title
:
用户子系统
description
:
用户子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.user.application.controller
user/user-application/target/classes/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
application
:
name
:
user-application
cloud
:
sentinel
:
transport
:
port
:
8719
dashboard
:
localhost:12088
metric
:
charset
:
UTF-8
eager
:
false
# server
server
:
port
:
18082
servlet
:
context-path
:
/user-api/
swagger
:
enable
:
false
management
:
endpoints
:
web
:
exposure
:
include
:
health,info,env,metrics,prometheus
metrics
:
enabled
:
true
user/user-application/target/generated-sources/annotations/cn/iocoder/mall/user/application/convert/UserAddressConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
user
.
application
.
convert
;
import
cn.iocoder.mall.user.api.dto.UserAddressAddDTO
;
import
cn.iocoder.mall.user.api.dto.UserAddressUpdateDTO
;
import
cn.iocoder.mall.user.application.po.UserAddressAddPO
;
import
cn.iocoder.mall.user.application.po.UserAddressUpdatePO
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:10+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
UserAddressConvertImpl
implements
UserAddressConvert
{
@Override
public
UserAddressAddDTO
convert
(
UserAddressAddPO
userAddressAddPO
)
{
if
(
userAddressAddPO
==
null
)
{
return
null
;
}
UserAddressAddDTO
userAddressAddDTO
=
new
UserAddressAddDTO
();
userAddressAddDTO
.
setAreaNo
(
userAddressAddPO
.
getAreaNo
()
);
userAddressAddDTO
.
setName
(
userAddressAddPO
.
getName
()
);
userAddressAddDTO
.
setMobile
(
userAddressAddPO
.
getMobile
()
);
userAddressAddDTO
.
setAddress
(
userAddressAddPO
.
getAddress
()
);
userAddressAddDTO
.
setHasDefault
(
userAddressAddPO
.
getHasDefault
()
);
return
userAddressAddDTO
;
}
@Override
public
UserAddressUpdateDTO
convert
(
UserAddressUpdatePO
userAddressUpdatePO
)
{
if
(
userAddressUpdatePO
==
null
)
{
return
null
;
}
UserAddressUpdateDTO
userAddressUpdateDTO
=
new
UserAddressUpdateDTO
();
userAddressUpdateDTO
.
setId
(
userAddressUpdatePO
.
getId
()
);
userAddressUpdateDTO
.
setAreaNo
(
userAddressUpdatePO
.
getAreaNo
()
);
userAddressUpdateDTO
.
setName
(
userAddressUpdatePO
.
getName
()
);
userAddressUpdateDTO
.
setMobile
(
userAddressUpdatePO
.
getMobile
()
);
userAddressUpdateDTO
.
setAddress
(
userAddressUpdatePO
.
getAddress
()
);
userAddressUpdateDTO
.
setHasDefault
(
userAddressUpdatePO
.
getHasDefault
()
);
return
userAddressUpdateDTO
;
}
}
user/user-application/target/generated-sources/annotations/cn/iocoder/mall/user/application/convert/UserConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
user
.
application
.
convert
;
import
cn.iocoder.mall.user.api.bo.UserBO
;
import
cn.iocoder.mall.user.api.bo.UserPageBO
;
import
cn.iocoder.mall.user.application.vo.admins.AdminsUserPageVO
;
import
cn.iocoder.mall.user.application.vo.admins.AdminsUserVO
;
import
cn.iocoder.mall.user.application.vo.users.UsersUserVO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:39:10+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
UserConvertImpl
implements
UserConvert
{
@Override
public
AdminsUserPageVO
convert
(
UserPageBO
result
)
{
if
(
result
==
null
)
{
return
null
;
}
AdminsUserPageVO
adminsUserPageVO
=
new
AdminsUserPageVO
();
adminsUserPageVO
.
setList
(
userBOListToAdminsUserVOList
(
result
.
getList
()
)
);
adminsUserPageVO
.
setTotal
(
result
.
getTotal
()
);
return
adminsUserPageVO
;
}
@Override
public
UsersUserVO
convert2
(
UserBO
result
)
{
if
(
result
==
null
)
{
return
null
;
}
UsersUserVO
usersUserVO
=
new
UsersUserVO
();
usersUserVO
.
setId
(
result
.
getId
()
);
usersUserVO
.
setMobile
(
result
.
getMobile
()
);
usersUserVO
.
setNickname
(
result
.
getNickname
()
);
usersUserVO
.
setAvatar
(
result
.
getAvatar
()
);
return
usersUserVO
;
}
protected
AdminsUserVO
userBOToAdminsUserVO
(
UserBO
userBO
)
{
if
(
userBO
==
null
)
{
return
null
;
}
AdminsUserVO
adminsUserVO
=
new
AdminsUserVO
();
adminsUserVO
.
setId
(
userBO
.
getId
()
);
adminsUserVO
.
setMobile
(
userBO
.
getMobile
()
);
adminsUserVO
.
setNickname
(
userBO
.
getNickname
()
);
adminsUserVO
.
setAvatar
(
userBO
.
getAvatar
()
);
adminsUserVO
.
setStatus
(
userBO
.
getStatus
()
);
adminsUserVO
.
setCreateTime
(
userBO
.
getCreateTime
()
);
return
adminsUserVO
;
}
protected
List
<
AdminsUserVO
>
userBOListToAdminsUserVOList
(
List
<
UserBO
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
List
<
AdminsUserVO
>
list1
=
new
ArrayList
<
AdminsUserVO
>(
list
.
size
()
);
for
(
UserBO
userBO
:
list
)
{
list1
.
add
(
userBOToAdminsUserVO
(
userBO
)
);
}
return
list1
;
}
}
user/user-service-impl/target/classes/config/application-test.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://192.168.88.14:3306/mall_user?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
user/user-service-impl/target/classes/config/application.properties
0 → 100644
浏览文件 @
fe2305df
##################### 业务模块 #####################
## MobileCodeService
modules.mobile-code-service.code-expire-time-millis
=
600000
modules.mobile-code-service.send-maximum-quantity-per-day
=
10
modules.mobile-code-service.send-frequency
=
60000
user/user-service-impl/target/classes/config/application.yaml
0 → 100644
浏览文件 @
fe2305df
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://180.167.213.26:13306/mall_user?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
# mybatis-plus
mybatis-plus
:
configuration
:
map-underscore-to-camel-case
:
true
# 虽然默认为 true ,但是还是显示去指定下。
global-config
:
db-config
:
id-type
:
auto
logic-delete-value
:
1
# 逻辑已删除值(默认为 1)
logic-not-delete-value
:
0
# 逻辑未删除值(默认为 0)
mapperLocations
:
classpath*:mapper/*.xml
typeAliasesPackage
:
cn.iocoder.mall.user.biz.dataobject
# dubbo
dubbo
:
application
:
name
:
user-service
registry
:
address
:
zookeeper://127.0.0.1:2181
protocol
:
port
:
-1
name
:
dubbo
scan
:
base-packages
:
cn.iocoder.mall.user.biz.service
provider
:
filter
:
-exception
MobileCodeService
:
version
:
1.0.0
UserAccessLogService
:
version
:
1.0.0
UserAddressService
:
version
:
1.0.0
UserService
:
version
:
1.0.0
consumer
:
OAuth2Service
:
version
:
1.0.0
user/user-service-impl/target/classes/mapper/UserAddress.xml
0 → 100644
浏览文件 @
fe2305df
<?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.user.biz.dao.UserAddressMapper"
>
<sql
id=
"FIELDS"
>
id, user_id, area_no, `name`, mobile, address,
create_time, update_time, has_default, deleted
</sql>
<insert
id=
"insert"
parameterType=
"UserAddressDO"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
INSERT INTO user_address (
user_id, area_no, `name`, mobile, address,
create_time, update_time, has_default, deleted
) VALUES (
#{userId}, #{areaNo}, #{name}, #{mobile}, #{address},
#{createTime}, #{updateTime}, #{hasDefault}, #{deleted}
)
</insert>
<update
id=
"updateById"
>
UPDATE user_address
<set>
<if
test=
"userAddressDO.areaNo != null"
>
, area_no = #{userAddressDO.areaNo}
</if>
<if
test=
"userAddressDO.name != null"
>
, `name` = #{userAddressDO.name}
</if>
<if
test=
"userAddressDO.mobile != null"
>
, mobile = #{userAddressDO.mobile}
</if>
<if
test=
"userAddressDO.address != null"
>
, address = #{userAddressDO.address}
</if>
<if
test=
"userAddressDO.updateTime != null"
>
, update_time = #{userAddressDO.updateTime}
</if>
<if
test=
"userAddressDO.hasDefault != null"
>
, has_default = #{userAddressDO.hasDefault}
</if>
<if
test=
"userAddressDO.deleted != null"
>
, deleted = #{userAddressDO.deleted}
</if>
</set>
WHERE id = #{id}
</update>
<select
id=
"selectByUserIdAndId"
resultType=
"cn.iocoder.mall.user.biz.dataobject.UserAddressDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM user_address
WHERE user_id = #{userId}
AND id = #{id}
</select>
<select
id=
"selectByUserIdAndDeleted"
resultType=
"cn.iocoder.mall.user.biz.dataobject.UserAddressDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM user_address
WHERE deleted = #{deleted}
AND `user_id` = #{userId}
</select>
<select
id=
"selectHasDefault"
resultType=
"cn.iocoder.mall.user.biz.dataobject.UserAddressDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM user_address
WHERE deleted = #{deleted}
AND `user_id` = #{userId}
AND `has_default` = #{hasDefault}
</select>
</mapper>
\ No newline at end of file
user/user-service-impl/target/classes/mapper/UserMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.user.biz.dao.UserMapper"
>
<sql
id=
"FIELDS"
>
id, mobile, nickname, avatar, status,
create_time, deleted
</sql>
<insert
id=
"insert"
parameterType=
"UserDO"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
INSERT INTO users (
id, mobile, status, create_time, deleted
) VALUES (
#{id}, #{mobile}, #{status}, #{createTime}, #{deleted}
)
</insert>
<update
id=
"update"
parameterType=
"UserDO"
>
UPDATE users
<set>
<if
test=
"mobile != null"
>
, mobile = #{mobile}
</if>
<if
test=
"nickname != null"
>
, nickname = #{nickname}
</if>
<if
test=
"avatar != null"
>
, avatar = #{avatar}
</if>
<if
test=
"status != null"
>
, status = #{status}
</if>
<if
test=
"deleted != null"
>
, deleted = #{deleted}
</if>
</set>
WHERE id = #{id}
</update>
<select
id=
"selectById"
parameterType=
"Integer"
resultType=
"UserDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM users
WHERE id = #{id}
AND deleted = 0
</select>
<select
id=
"selectByMobile"
parameterType=
"String"
resultType=
"UserDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM users
WHERE mobile = #{mobile}
AND deleted = 0
</select>
<select
id=
"selectListByNicknameLike"
resultType=
"UserDO"
>
SELECT
<include
refid=
"FIELDS"
/>
FROM users
<where>
<if
test=
"nickname != null"
>
nickname LIKE "%"#{nickname}"%"
</if>
<if
test=
"status != null"
>
status = #{status}
</if>
AND deleted = 0
</where>
LIMIT #{offset}, #{limit}
</select>
<select
id=
"selectCountByNicknameLike"
resultType=
"Integer"
>
SELECT
COUNT(1)
FROM users
<where>
<if
test=
"nickname != null"
>
nickname LIKE "%"#{nickname}"%"
</if>
<if
test=
"status != null"
>
status = #{status}
</if>
AND deleted = 0
</where>
</select>
</mapper>
user/user-service-impl/target/classes/mapper/UserRegisterMapper.xml
0 → 100644
浏览文件 @
fe2305df
<?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.user.biz.dao.UserRegisterMapper"
>
<insert
id=
"insert"
parameterType=
"UserRegisterDO"
>
INSERT INTO user_register (
id, create_time
) VALUES (
#{id}, #{createTime}
)
</insert>
</mapper>
\ No newline at end of file
user/user-service-impl/target/generated-sources/annotations/cn/iocoder/mall/user/biz/convert/OAuth2ConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
user
.
biz
.
convert
;
import
cn.iocoder.mall.user.api.bo.OAuth2AccessTokenBO
;
import
cn.iocoder.mall.user.api.bo.OAuth2AuthenticationBO
;
import
cn.iocoder.mall.user.biz.dataobject.OAuth2AccessTokenDO
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:12:12+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
OAuth2ConvertImpl
implements
OAuth2Convert
{
@Override
public
OAuth2AccessTokenBO
convertToAccessToken
(
OAuth2AccessTokenDO
oauth2AccessTokenDO
)
{
if
(
oauth2AccessTokenDO
==
null
)
{
return
null
;
}
OAuth2AccessTokenBO
oAuth2AccessTokenBO
=
new
OAuth2AccessTokenBO
();
oAuth2AccessTokenBO
.
setAccessToken
(
oauth2AccessTokenDO
.
getId
()
);
oAuth2AccessTokenBO
.
setRefreshToken
(
oauth2AccessTokenDO
.
getRefreshToken
()
);
return
oAuth2AccessTokenBO
;
}
@Override
public
OAuth2AuthenticationBO
convertToAuthentication
(
OAuth2AccessTokenDO
oauth2AccessTokenDO
)
{
if
(
oauth2AccessTokenDO
==
null
)
{
return
null
;
}
OAuth2AuthenticationBO
oAuth2AuthenticationBO
=
new
OAuth2AuthenticationBO
();
oAuth2AuthenticationBO
.
setUserId
(
oauth2AccessTokenDO
.
getUserId
()
);
return
oAuth2AuthenticationBO
;
}
}
user/user-service-impl/target/generated-sources/annotations/cn/iocoder/mall/user/biz/convert/UserAccessLogConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
user
.
biz
.
convert
;
import
cn.iocoder.mall.user.api.dto.UserAccessLogAddDTO
;
import
cn.iocoder.mall.user.biz.dataobject.UserAccessLogDO
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
date
=
"2019-05-24T11:12:12+0800"
,
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
UserAccessLogConvertImpl
implements
UserAccessLogConvert
{
@Override
public
UserAccessLogDO
convert
(
UserAccessLogAddDTO
adminAccessLogAddDTO
)
{
if
(
adminAccessLogAddDTO
==
null
)
{
return
null
;
}
UserAccessLogDO
userAccessLogDO
=
new
UserAccessLogDO
();
userAccessLogDO
.
setUserId
(
adminAccessLogAddDTO
.
getUserId
()
);
userAccessLogDO
.
setUri
(
adminAccessLogAddDTO
.
getUri
()
);
userAccessLogDO
.
setQueryString
(
adminAccessLogAddDTO
.
getQueryString
()
);
userAccessLogDO
.
setMethod
(
adminAccessLogAddDTO
.
getMethod
()
);
userAccessLogDO
.
setUserAgent
(
adminAccessLogAddDTO
.
getUserAgent
()
);
userAccessLogDO
.
setIp
(
adminAccessLogAddDTO
.
getIp
()
);
userAccessLogDO
.
setStartTime
(
adminAccessLogAddDTO
.
getStartTime
()
);
userAccessLogDO
.
setResponseTime
(
adminAccessLogAddDTO
.
getResponseTime
()
);
return
userAccessLogDO
;
}
}
user/user-service-impl/target/generated-sources/annotations/cn/iocoder/mall/user/biz/convert/UserAddressConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
user
.
biz
.
convert
;
import
cn.iocoder.mall.user.api.bo.UserAddressBO
;
import
cn.iocoder.mall.user.api.dto.UserAddressAddDTO
;
import
cn.iocoder.mall.user.api.dto.UserAddressUpdateDTO
;
import
cn.iocoder.mall.user.biz.dataobject.UserAddressDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
<<<<<<<
Updated
upstream
date
=
"2019-05-31T17:43:38+0800"
,
=======
date
=
"2019-05-24T11:27:48+0800"
,
>>>>>>>
Stashed
changes
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
UserAddressConvertImpl
implements
UserAddressConvert
{
@Override
public
UserAddressDO
convert
(
UserAddressAddDTO
userAddressAddDTO
)
{
if
(
userAddressAddDTO
==
null
)
{
return
null
;
}
UserAddressDO
userAddressDO
=
new
UserAddressDO
();
userAddressDO
.
setUserId
(
userAddressAddDTO
.
getUserId
()
);
userAddressDO
.
setAreaNo
(
userAddressAddDTO
.
getAreaNo
()
);
userAddressDO
.
setName
(
userAddressAddDTO
.
getName
()
);
userAddressDO
.
setMobile
(
userAddressAddDTO
.
getMobile
()
);
userAddressDO
.
setAddress
(
userAddressAddDTO
.
getAddress
()
);
userAddressDO
.
setHasDefault
(
userAddressAddDTO
.
getHasDefault
()
);
return
userAddressDO
;
}
@Override
public
UserAddressDO
convert
(
UserAddressUpdateDTO
userAddressUpdateDTO
)
{
if
(
userAddressUpdateDTO
==
null
)
{
return
null
;
}
UserAddressDO
userAddressDO
=
new
UserAddressDO
();
userAddressDO
.
setId
(
userAddressUpdateDTO
.
getId
()
);
userAddressDO
.
setUserId
(
userAddressUpdateDTO
.
getUserId
()
);
userAddressDO
.
setAreaNo
(
userAddressUpdateDTO
.
getAreaNo
()
);
userAddressDO
.
setName
(
userAddressUpdateDTO
.
getName
()
);
userAddressDO
.
setMobile
(
userAddressUpdateDTO
.
getMobile
()
);
userAddressDO
.
setAddress
(
userAddressUpdateDTO
.
getAddress
()
);
userAddressDO
.
setHasDefault
(
userAddressUpdateDTO
.
getHasDefault
()
);
return
userAddressDO
;
}
@Override
public
UserAddressBO
convert
(
UserAddressDO
userAddressDO
)
{
if
(
userAddressDO
==
null
)
{
return
null
;
}
UserAddressBO
userAddressBO
=
new
UserAddressBO
();
userAddressBO
.
setId
(
userAddressDO
.
getId
()
);
userAddressBO
.
setUserId
(
userAddressDO
.
getUserId
()
);
userAddressBO
.
setAreaNo
(
userAddressDO
.
getAreaNo
()
);
userAddressBO
.
setName
(
userAddressDO
.
getName
()
);
userAddressBO
.
setMobile
(
userAddressDO
.
getMobile
()
);
userAddressBO
.
setAddress
(
userAddressDO
.
getAddress
()
);
userAddressBO
.
setHasDefault
(
userAddressDO
.
getHasDefault
()
);
return
userAddressBO
;
}
@Override
public
List
<
UserAddressBO
>
convertUserAddressBOList
(
List
<
UserAddressDO
>
userAddressDOList
)
{
if
(
userAddressDOList
==
null
)
{
return
null
;
}
List
<
UserAddressBO
>
list
=
new
ArrayList
<
UserAddressBO
>(
userAddressDOList
.
size
()
);
for
(
UserAddressDO
userAddressDO
:
userAddressDOList
)
{
list
.
add
(
convert
(
userAddressDO
)
);
}
return
list
;
}
}
user/user-service-impl/target/generated-sources/annotations/cn/iocoder/mall/user/biz/convert/UserConvertImpl.java
0 → 100644
浏览文件 @
fe2305df
package
cn
.
iocoder
.
mall
.
user
.
biz
.
convert
;
import
cn.iocoder.mall.user.api.bo.UserBO
;
import
cn.iocoder.mall.user.api.bo.user.UserAuthenticationBO
;
import
cn.iocoder.mall.user.api.dto.UserUpdateDTO
;
import
cn.iocoder.mall.user.biz.dataobject.UserDO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Generated
;
@Generated
(
value
=
"org.mapstruct.ap.MappingProcessor"
,
<<<<<<<
Updated
upstream
date
=
"2019-05-31T17:43:37+0800"
,
=======
date
=
"2019-05-24T11:27:49+0800"
,
>>>>>>>
Stashed
changes
comments
=
"version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
)
public
class
UserConvertImpl
implements
UserConvert
{
@Override
public
UserBO
convert
(
UserDO
userDO
)
{
if
(
userDO
==
null
)
{
return
null
;
}
UserBO
userBO
=
new
UserBO
();
userBO
.
setId
(
userDO
.
getId
()
);
userBO
.
setMobile
(
userDO
.
getMobile
()
);
userBO
.
setNickname
(
userDO
.
getNickname
()
);
userBO
.
setAvatar
(
userDO
.
getAvatar
()
);
userBO
.
setStatus
(
userDO
.
getStatus
()
);
userBO
.
setCreateTime
(
userDO
.
getCreateTime
()
);
return
userBO
;
}
@Override
public
UserAuthenticationBO
convert2
(
UserDO
userDO
)
{
if
(
userDO
==
null
)
{
return
null
;
}
UserAuthenticationBO
userAuthenticationBO
=
new
UserAuthenticationBO
();
userAuthenticationBO
.
setId
(
userDO
.
getId
()
);
userAuthenticationBO
.
setNickname
(
userDO
.
getNickname
()
);
return
userAuthenticationBO
;
}
@Override
public
UserDO
convert
(
UserUpdateDTO
userUpdateDTO
)
{
if
(
userUpdateDTO
==
null
)
{
return
null
;
}
UserDO
userDO
=
new
UserDO
();
userDO
.
setId
(
userUpdateDTO
.
getId
()
);
userDO
.
setNickname
(
userUpdateDTO
.
getNickname
()
);
userDO
.
setAvatar
(
userUpdateDTO
.
getAvatar
()
);
return
userDO
;
}
@Override
public
List
<
UserBO
>
convert
(
List
<
UserDO
>
userDOs
)
{
if
(
userDOs
==
null
)
{
return
null
;
}
List
<
UserBO
>
list
=
new
ArrayList
<
UserBO
>(
userDOs
.
size
()
);
for
(
UserDO
userDO
:
userDOs
)
{
list
.
add
(
convert
(
userDO
)
);
}
return
list
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论