Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
6169709e
提交
6169709e
authored
5月 08, 2019
作者:
YunaiV
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
e6c578f5
b5078b3f
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
96 行增加
和
10 行删除
+96
-10
OrderRefundsList.js
admin-web/src/pages/OrderRefunds/OrderRefundsList.js
+9
-3
TableSearch.js
admin-web/src/pages/OrderRefunds/TableSearch.js
+43
-3
AdminOrderReturnController.java
...ication/controller/admins/AdminOrderReturnController.java
+7
-4
OrderReturnNonExistentException.java
.../order/api/exception/OrderReturnNonExistentException.java
+10
-0
OrderReturnMapper.java
...java/cn/iocoder/mall/order/biz/dao/OrderReturnMapper.java
+8
-0
OrderReturnServiceImpl.java
...ocoder/mall/order/biz/service/OrderReturnServiceImpl.java
+9
-0
OrderReturnMapper.xml
...vice-impl/src/main/resources/mapper/OrderReturnMapper.xml
+10
-0
没有找到文件。
admin-web/src/pages/OrderRefunds/OrderRefundsList.js
浏览文件 @
6169709e
...
@@ -19,9 +19,15 @@ import dictionary from '../../utils/dictionary';
...
@@ -19,9 +19,15 @@ import dictionary from '../../utils/dictionary';
class
OrderRefundsList
extends
PureComponent
{
class
OrderRefundsList
extends
PureComponent
{
componentDidMount
()
{
componentDidMount
()
{
// 查询 list
// 查询 list
this
.
queryList
({
index
:
1
});
this
.
queryList
({
index
:
1
}
,
{}
);
}
}
handleSearch
=
searchParams
=>
{
const
{
orderRefunds
}
=
this
.
props
;
const
{
index
,
pageSize
}
=
orderRefunds
;
this
.
queryList
({
index
,
pageSize
},
searchParams
);
};
queryList
=
({
index
=
0
,
pageSize
=
10
},
searchParams
)
=>
{
queryList
=
({
index
=
0
,
pageSize
=
10
},
searchParams
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
}
=
this
.
props
;
dispatch
({
dispatch
({
...
@@ -40,7 +46,7 @@ class OrderRefundsList extends PureComponent {
...
@@ -40,7 +46,7 @@ class OrderRefundsList extends PureComponent {
handleTableChange
=
pagination
=>
{
handleTableChange
=
pagination
=>
{
const
{
pageSize
,
current
}
=
pagination
;
const
{
pageSize
,
current
}
=
pagination
;
this
.
queryList
({
pageSize
,
index
:
current
});
this
.
queryList
({
pageSize
,
index
:
current
}
,
{}
);
};
};
render
()
{
render
()
{
...
@@ -125,7 +131,7 @@ class OrderRefundsList extends PureComponent {
...
@@ -125,7 +131,7 @@ class OrderRefundsList extends PureComponent {
<
PageHeaderWrapper
>
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
div
className
=
{
styles
.
tableListForm
}
>
<
div
className
=
{
styles
.
tableListForm
}
>
<
TableSearch
/>
<
TableSearch
handleSearch
=
{
this
.
handleSearch
}
/
>
<
/div
>
<
/div
>
<
Tabs
defaultActiveKey
=
{
null
}
onChange
=
{
this
.
handleTabsChange
}
>
<
Tabs
defaultActiveKey
=
{
null
}
onChange
=
{
this
.
handleTabsChange
}
>
...
...
admin-web/src/pages/OrderRefunds/TableSearch.js
浏览文件 @
6169709e
...
@@ -9,11 +9,51 @@ const FormItem = Form.Item;
...
@@ -9,11 +9,51 @@ const FormItem = Form.Item;
* @type {React.ComponentClass<RcBaseFormProps & Omit<FormComponentProps, keyof FormComponentProps>>}
* @type {React.ComponentClass<RcBaseFormProps & Omit<FormComponentProps, keyof FormComponentProps>>}
*/
*/
const
TableSearch
=
Form
.
create
()(
props
=>
{
const
TableSearch
=
Form
.
create
()(
props
=>
{
const
{
getFieldDecorator
}
=
props
.
form
;
const
{
getFieldDecorator
,
form
,
handleSearch
}
=
props
.
form
;
function
onSubmit
()
{}
function
onSubmit
(
e
)
{
e
.
preventDefault
();
function
handleFormReset
()
{}
form
.
validateFields
((
err
,
fields
)
=>
{
const
buildTime
=
(
fieldValue
,
key
)
=>
{
const
res
=
{};
if
(
fieldValue
&&
fieldValue
.
length
>=
2
)
{
const
keySuffix
=
key
.
substring
(
0
,
1
).
toUpperCase
()
+
key
.
substring
(
1
);
res
[
`start
${
keySuffix
}
`
]
=
fieldValue
[
0
].
format
(
'YYYY-MM-DD HH:mm:ss'
);
res
[
`end
${
keySuffix
}
`
]
=
fieldValue
[
1
].
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
return
res
;
};
const
timeFields
=
[
'createTime'
];
const
buildSearchParams
=
fields2
=>
{
let
res
=
{};
Object
.
keys
(
fields
).
map
(
objectKey
=>
{
const
fieldValue
=
fields2
[
objectKey
];
if
(
timeFields
.
indexOf
(
objectKey
)
!==
-
1
)
{
// 处理时间
res
=
{
...
res
,
...
buildTime
(
fieldValue
,
objectKey
),
};
}
else
if
(
fieldValue
!==
undefined
)
{
res
[
objectKey
]
=
fieldValue
;
}
return
true
;
});
return
res
;
};
const
searchParams
=
buildSearchParams
(
fields
);
if
(
handleSearch
)
{
handleSearch
(
searchParams
);
}
});
}
function
handleFormReset
()
{
form
.
resetFields
();
}
return
(
return
(
<
Form
onSubmit
=
{
onSubmit
}
layout
=
"inline"
>
<
Form
onSubmit
=
{
onSubmit
}
layout
=
"inline"
>
...
...
order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/admins/AdminOrderReturnController.java
浏览文件 @
6169709e
...
@@ -10,10 +10,7 @@ import io.swagger.annotations.Api;
...
@@ -10,10 +10,7 @@ import io.swagger.annotations.Api;
import
org.apache.dubbo.config.annotation.Reference
;
import
org.apache.dubbo.config.annotation.Reference
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
* 订单退货
* 订单退货
...
@@ -35,4 +32,10 @@ public class AdminOrderReturnController {
...
@@ -35,4 +32,10 @@ public class AdminOrderReturnController {
OrderReturnQueryDTO
queryDTO
=
OrderReturnConvert
.
INSTANCE
.
convert
(
queryPO
);
OrderReturnQueryDTO
queryDTO
=
OrderReturnConvert
.
INSTANCE
.
convert
(
queryPO
);
return
orderReturnService
.
orderReturnList
(
queryDTO
);
return
orderReturnService
.
orderReturnList
(
queryDTO
);
}
}
@PostMapping
(
"agree"
)
public
CommonResult
agree
(
@RequestParam
(
"id"
)
Integer
id
)
{
CommonResult
commonResult
=
orderReturnService
.
agree
(
id
);
return
commonResult
;
}
}
}
order/order-service-api/src/main/java/cn/iocoder/mall/order/api/exception/OrderReturnNonExistentException.java
0 → 100644
浏览文件 @
6169709e
package
cn
.
iocoder
.
mall
.
order
.
api
.
exception
;
/**
* 订单退回 - 不存在
*
* @author Sin
* @time 2019/5/8 6:17 PM
*/
public
class
OrderReturnNonExistentException
{
}
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dao/OrderReturnMapper.java
浏览文件 @
6169709e
...
@@ -57,4 +57,12 @@ public interface OrderReturnMapper {
...
@@ -57,4 +57,12 @@ public interface OrderReturnMapper {
* @return
* @return
*/
*/
List
<
OrderReturnDO
>
selectList
(
OrderReturnQueryDTO
queryDTO
);
List
<
OrderReturnDO
>
selectList
(
OrderReturnQueryDTO
queryDTO
);
/**
* 查询 - 根据 id 查询
*
* @param id
* @return
*/
OrderReturnDO
selectById
(
Integer
id
);
}
}
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java
浏览文件 @
6169709e
...
@@ -140,4 +140,13 @@ public class OrderReturnServiceImpl implements OrderReturnService {
...
@@ -140,4 +140,13 @@ public class OrderReturnServiceImpl implements OrderReturnService {
.
setTotalCount
(
totalCount
)
.
setTotalCount
(
totalCount
)
);
);
}
}
@Override
public
CommonResult
agree
(
Integer
id
)
{
OrderReturnDO
orderReturnDO
=
orderReturnMapper
.
selectById
(
id
);
if
(
orderReturnDO
==
null
)
{
}
return
null
;
}
}
}
order/order-service-impl/src/main/resources/mapper/OrderReturnMapper.xml
浏览文件 @
6169709e
...
@@ -145,4 +145,14 @@
...
@@ -145,4 +145,14 @@
<bind
name=
"limitIndex"
value=
"pageSize * (index - 1)"
/>
<bind
name=
"limitIndex"
value=
"pageSize * (index - 1)"
/>
LIMIT #{limitIndex}, #{pageSize}
LIMIT #{limitIndex}, #{pageSize}
</select>
</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>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论