- 退款流程基本走完

This commit is contained in:
sin 2019-05-09 22:46:30 +08:00
parent 3677aab9ae
commit ddf2f0ea1f
13 changed files with 333 additions and 59 deletions

View File

@ -1,4 +1,5 @@
import { list } from '../../services/orderRefunds'; import { message } from 'antd';
import { list, agree, refuse, confirmReceipt, confirmRefund } from '../../services/orderRefunds';
export default { export default {
namespace: 'orderRefunds', namespace: 'orderRefunds',
@ -18,6 +19,54 @@ export default {
payload: response.data, payload: response.data,
}); });
}, },
*agree({ payload }, { call }) {
const { callback, params } = payload;
const response = yield call(agree, params);
if (response.code !== 0) {
message.error('操作失败!');
} else {
message.success('操作成功!');
if (callback) {
callback(response);
}
}
},
*refuse({ payload }, { call }) {
const { callback, params } = payload;
const response = yield call(refuse, params);
if (response.code !== 0) {
message.error('操作失败!');
} else {
message.success('操作成功!');
if (callback) {
callback(response);
}
}
},
*confirmReceipt({ payload }, { call }) {
const { callback, params } = payload;
const response = yield call(confirmReceipt, params);
if (response.code !== 0) {
message.error('操作失败!');
} else {
message.success('操作成功!');
if (callback) {
callback(response);
}
}
},
*confirmRefund({ payload }, { call }) {
const { callback, params } = payload;
const response = yield call(confirmRefund, params);
if (response.code !== 0) {
message.error('操作失败!');
} else {
message.success('操作成功!');
if (callback) {
callback(response);
}
}
},
}, },
reducers: { reducers: {

View File

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import moment from 'moment'; import moment from 'moment';
import { Card, Tabs, Table } from 'antd'; import { Card, Tabs, Modal, Table, Divider } from 'antd';
import PageHeaderWrapper from '../../components/PageHeaderWrapper'; import PageHeaderWrapper from '../../components/PageHeaderWrapper';
import DictionaryText from '../../components/Dictionary/DictionaryText'; import DictionaryText from '../../components/Dictionary/DictionaryText';
import TableSearch from './TableSearch'; import TableSearch from './TableSearch';
@ -19,29 +19,46 @@ 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, pageSize: 10 }, {});
} }
handleSearch = searchParams => { handleSearch = searchParams => {
const { orderRefunds } = this.props; const { orderRefunds } = this.props;
const { index, pageSize } = orderRefunds; const { index, pageSize } = orderRefunds;
this.queryList({ index, pageSize }, searchParams); this.queryList(
{ index, pageSize },
{
...searchParams,
...this.tabsValue,
}
);
}; };
queryList = ({ index = 0, pageSize = 10 }, searchParams) => { queryList = (pageParams, searchParams) => {
const { dispatch } = this.props; const { dispatch } = this.props;
this.pageParams = pageParams;
this.searchParams = searchParams;
dispatch({ dispatch({
type: 'orderRefunds/list', type: 'orderRefunds/list',
payload: { payload: {
index, ...pageParams,
pageSize,
...searchParams, ...searchParams,
}, },
}); });
}; };
handleTabsChange = value => { handleTabsChange = value => {
console.log(value); this.tabsValue = {
status: value,
};
this.queryList(
{ index: 1, pageSize: 10 },
{
...this.searchParams,
status: value,
}
);
}; };
handleTableChange = pagination => { handleTableChange = pagination => {
@ -49,11 +66,116 @@ class OrderRefundsList extends PureComponent {
this.queryList({ pageSize, index: current }, {}); this.queryList({ pageSize, index: current }, {});
}; };
handleAgreeClick = ({ id }) => {
const { dispatch } = this.props;
const self = this;
Modal.confirm({
title: '提示消息',
content: '确认同意!',
onOk() {
dispatch({
type: 'orderRefunds/agree',
payload: {
params: {
id,
},
callback: () => {
self.queryList(self.pageParams, self.searchParams);
},
},
});
},
onCancel() {
console.log('Cancel');
},
});
};
handleRefuse = ({ id }) => {
const { dispatch } = this.props;
const self = this;
Modal.confirm({
title: '提示消息',
content: '确认拒绝!',
onOk() {
dispatch({
type: 'orderRefunds/refuse',
payload: {
params: {
id,
},
callback: () => {
self.queryList(self.pageParams, self.searchParams);
},
},
});
},
onCancel() {
console.log('Cancel');
},
});
};
handleConfirmReceipt = ({ id }) => {
const { dispatch } = this.props;
const self = this;
Modal.confirm({
title: '提示消息',
content: '确认收货!',
onOk() {
dispatch({
type: 'orderRefunds/confirmReceipt',
payload: {
params: {
id,
},
callback: () => {
self.queryList(self.pageParams, self.searchParams);
},
},
});
},
onCancel() {
console.log('Cancel');
},
});
};
handleConfirmRefund = ({ id }) => {
const { dispatch } = this.props;
const self = this;
Modal.confirm({
title: '提示消息',
content: '确认退款!',
onOk() {
dispatch({
type: 'orderRefunds/confirmRefund',
payload: {
params: {
id,
},
callback: () => {
self.queryList(self.pageParams, self.searchParams);
},
},
});
},
onCancel() {
console.log('Cancel');
},
});
};
render() { render() {
const { orderRefunds } = this.props; const { orderRefunds, loading } = this.props;
const { list, totalCount, index, pageSize } = orderRefunds; const { list, totalCount, index, pageSize } = orderRefunds;
const columns = [ const columns = [
{
title: '订单号',
dataIndex: 'orderId',
key: 'orderId',
},
{ {
title: '服务编号', title: '服务编号',
dataIndex: 'serviceNumber', dataIndex: 'serviceNumber',
@ -111,12 +233,31 @@ class OrderRefundsList extends PureComponent {
}, },
{ {
title: '操作', title: '操作',
render() { render: row => {
return ( const { status } = row;
<div> let buttons;
<a>同意</a> if (status === 1) {
</div> buttons = (
); <div>
<a onClick={this.handleAgreeClick.bind(this, row)}>同意</a>
<Divider type="vertical" />
<a onClick={this.handleRefuse.bind(this, row)}>拒绝</a>
</div>
);
} else if (status === 2) {
buttons = (
<div>
<a onClick={this.handleConfirmReceipt.bind(this, row)}>确认收货</a>
</div>
);
} else if (status === 5) {
buttons = (
<div>
<a onClick={this.handleConfirmRefund.bind(this, row)}>退款</a>
</div>
);
}
return buttons;
}, },
}, },
]; ];
@ -137,11 +278,14 @@ class OrderRefundsList extends PureComponent {
<Tabs defaultActiveKey={null} onChange={this.handleTabsChange}> <Tabs defaultActiveKey={null} onChange={this.handleTabsChange}>
<Tabs.TabPane tab="全部" key={null} /> <Tabs.TabPane tab="全部" key={null} />
<Tabs.TabPane tab="待处理" key={1} /> <Tabs.TabPane tab="待处理" key={1} />
<Tabs.TabPane tab="已处理" key={2} /> <Tabs.TabPane tab="待收货" key={2} />
<Tabs.TabPane tab="已完成" key={4} /> <Tabs.TabPane tab="已收货" key={5} />
<Tabs.TabPane tab="已完成" key={6} />
<Tabs.TabPane tab="已拒绝" key={3} />
</Tabs> </Tabs>
<Table <Table
loading={loading}
rowKey="id" rowKey="id"
dataSource={list} dataSource={list}
columns={columns} columns={columns}

View File

@ -9,12 +9,13 @@ 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, form, handleSearch } = props.form; const { handleSearch } = props;
const { getFieldDecorator, validateFields, form } = props.form;
function onSubmit(e) { function onSubmit(e) {
e.preventDefault(); e.preventDefault();
form.validateFields((err, fields) => { validateFields((err, fields) => {
const buildTime = (fieldValue, key) => { const buildTime = (fieldValue, key) => {
const res = {}; const res = {};
if (fieldValue && fieldValue.length >= 2) { if (fieldValue && fieldValue.length >= 2) {
@ -68,6 +69,11 @@ const TableSearch = Form.create()(props => {
{getFieldDecorator('orderNo')(<Input placeholder="请输入订单号" />)} {getFieldDecorator('orderNo')(<Input placeholder="请输入订单号" />)}
</FormItem> </FormItem>
</Col> </Col>
<Col md={8} sm={24}>
<FormItem label="服务号">
{getFieldDecorator('serviceNumber')(<Input placeholder="请输入服务号" />)}
</FormItem>
</Col>
</Row> </Row>
<Row gutter={{ md: 8, lg: 24, xl: 48 }}> <Row gutter={{ md: 8, lg: 24, xl: 48 }}>

View File

@ -8,8 +8,26 @@ export async function list(params) {
}); });
} }
export async function orderPage(params) { export async function agree(params) {
return request(`/order-api/admins/order/page?${stringify(params)}`, { return request(`/order-api/admins/order_return/agree?${stringify(params)}`, {
method: 'GET', method: 'POST',
});
}
export async function refuse(params) {
return request(`/order-api/admins/order_return/refuse?${stringify(params)}`, {
method: 'POST',
});
}
export async function confirmReceipt(params) {
return request(`/order-api/admins/order_return/confirm_receipt?${stringify(params)}`, {
method: 'POST',
});
}
export async function confirmRefund(params) {
return request(`/order-api/admins/order_return/confirm_refund?${stringify(params)}`, {
method: 'POST',
}); });
} }

View File

@ -14,18 +14,26 @@ body {
border-right: 1px solid #ccc2bf; border-right: 1px solid #ccc2bf;
} }
#app, .van-goods-action, .van-overflow-hidden { @media screen and (min-width: 769px) {
max-width: 600px!important; #app, .van-goods-action, .van-overflow-hidden {
margin: 0 auto; max-width: 600px!important;
margin: 0 auto;
}
.van-tabbar, .van-submit-bar {
max-width: 600px!important;
position:fixed;
margin:auto;
left:0;
right:0;
}
}
.wap-wrap {
font-size: 0.32rem;
width: 100%;
} }
.van-tabbar, .van-submit-bar {
max-width: 600px!important;
position:fixed;
margin:auto;
left:0;
right:0;
}
#maxWidth { #maxWidth {

View File

@ -46,13 +46,13 @@ public class AdminOrderReturnController {
return orderReturnService.orderReturnRefuse(id); return orderReturnService.orderReturnRefuse(id);
} }
@PostMapping("confirm_commodity") @PostMapping("confirm_receipt")
public CommonResult confirmCommodity(@RequestParam("id") Integer id) { public CommonResult confirmReceipt(@RequestParam("id") Integer id) {
return orderReturnService.confirmReceipt(id); return orderReturnService.confirmReceipt(id);
} }
@PostMapping("confirm_order") @PostMapping("confirm_refund")
public CommonResult confirmOrder(HttpServletRequest request, @RequestParam("id") Integer id) { public CommonResult confirmRefund(HttpServletRequest request, @RequestParam("id") Integer id) {
String ip = HttpUtil.getIp(request); String ip = HttpUtil.getIp(request);
return orderReturnService.refund(id, ip); return orderReturnService.refund(id, ip);
} }

View File

@ -2,6 +2,7 @@ package cn.iocoder.mall.order.application.po.admin;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
@ -26,14 +27,24 @@ public class OrderReturnQueryPO implements Serializable {
* 订单编号 * 订单编号
*/ */
private Integer orderNo; private Integer orderNo;
/**
* 服务号
*/
private String serviceNumber;
/** /**
* 创建时间 - 开始 * 创建时间 - 开始
*/ */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startCreateTime; private Date startCreateTime;
/** /**
* 创建时间 - 结束 * 创建时间 - 结束
*/ */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endCreateTime; private Date endCreateTime;
/**
* 状态
*/
private Integer status;
/// ///
/// 分页信息 /// 分页信息

View File

@ -25,6 +25,10 @@ public class OrderReturnQueryDTO implements Serializable {
* 订单编号 * 订单编号
*/ */
private Integer orderNo; private Integer orderNo;
/**
* 服务号
*/
private String serviceNumber;
/** /**
* 创建时间 - 开始 * 创建时间 - 开始
*/ */
@ -33,6 +37,10 @@ public class OrderReturnQueryDTO implements Serializable {
* 创建时间 - 结束 * 创建时间 - 结束
*/ */
private Date endCreateTime; private Date endCreateTime;
/**
* 状态
*/
private Integer status;
/// ///
/// 分页信息 /// 分页信息

View File

@ -30,7 +30,7 @@ public interface OrderReturnMapper {
* @param orderReturnDO * @param orderReturnDO
* @return * @return
*/ */
int updateByOrderId(OrderReturnDO orderReturnDO); int updateById(OrderReturnDO orderReturnDO);
/** /**
* 查询 - 根据 orderId * 查询 - 根据 orderId

View File

@ -63,6 +63,10 @@ public class OrderReturnDO extends BaseDO {
* 同意时间 * 同意时间
*/ */
private Date approvalTime; private Date approvalTime;
/**
* 拒绝时间
*/
private Date refuseTime;
/** /**
* 物流时间填写物流单号时间 * 物流时间填写物流单号时间
*/ */
@ -90,8 +94,7 @@ public class OrderReturnDO extends BaseDO {
* - 3申请失败 * - 3申请失败
* - 4退货中 * - 4退货中
* - 5已收货 * - 5已收货
* - 6拒绝退款 * - 6退货成功
* - 7退货成功
*/ */
private Integer status; private Integer status;
} }

View File

@ -3,15 +3,14 @@ package cn.iocoder.mall.order.biz.service;
import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.constant.DeletedStatusEnum;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.admin.api.DataDictService;
import cn.iocoder.mall.admin.api.bo.DataDictBO;
import cn.iocoder.mall.order.api.OrderLogisticsService; import cn.iocoder.mall.order.api.OrderLogisticsService;
import cn.iocoder.mall.order.api.OrderReturnService; import cn.iocoder.mall.order.api.OrderReturnService;
import cn.iocoder.mall.order.api.bo.OrderLastLogisticsInfoBO; import cn.iocoder.mall.order.api.bo.OrderLastLogisticsInfoBO;
import cn.iocoder.mall.order.api.bo.OrderReturnInfoBO; import cn.iocoder.mall.order.api.bo.OrderReturnInfoBO;
import cn.iocoder.mall.order.api.bo.OrderReturnListBO; import cn.iocoder.mall.order.api.bo.OrderReturnListBO;
import cn.iocoder.mall.order.api.constant.OrderErrorCodeEnum; import cn.iocoder.mall.order.api.constant.*;
import cn.iocoder.mall.order.api.constant.OrderReturnStatusEnum;
import cn.iocoder.mall.order.api.constant.OrderStatusEnum;
import cn.iocoder.mall.order.api.constant.PayAppId;
import cn.iocoder.mall.order.api.dto.OrderReturnApplyDTO; import cn.iocoder.mall.order.api.dto.OrderReturnApplyDTO;
import cn.iocoder.mall.order.api.dto.OrderReturnQueryDTO; import cn.iocoder.mall.order.api.dto.OrderReturnQueryDTO;
import cn.iocoder.mall.order.biz.convert.OrderReturnConvert; import cn.iocoder.mall.order.biz.convert.OrderReturnConvert;
@ -55,6 +54,9 @@ public class OrderReturnServiceImpl implements OrderReturnService {
private OrderLogisticsService orderLogisticsService; private OrderLogisticsService orderLogisticsService;
@Reference(validation = "true", version = "${dubbo.consumer.PayRefundService.version}") @Reference(validation = "true", version = "${dubbo.consumer.PayRefundService.version}")
private PayRefundService payRefundService; private PayRefundService payRefundService;
@Reference(validation = "true", version = "${dubbo.consumer.DataDictService.version}")
private DataDictService dataDictService;
@Override @Override
public CommonResult orderReturnApply(OrderReturnApplyDTO orderReturnDTO) { public CommonResult orderReturnApply(OrderReturnApplyDTO orderReturnDTO) {
@ -156,9 +158,10 @@ public class OrderReturnServiceImpl implements OrderReturnService {
.error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode()); .error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode());
} }
orderReturnMapper.updateByOrderId( orderReturnMapper.updateById(
new OrderReturnDO() new OrderReturnDO()
.setId(id) .setId(id)
.setApprovalTime(new Date())
.setStatus(OrderReturnStatusEnum.APPLICATION_SUCCESSFUL.getValue()) .setStatus(OrderReturnStatusEnum.APPLICATION_SUCCESSFUL.getValue())
); );
return CommonResult.success(null); return CommonResult.success(null);
@ -171,9 +174,10 @@ public class OrderReturnServiceImpl implements OrderReturnService {
return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode()); return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode());
} }
orderReturnMapper.updateByOrderId( orderReturnMapper.updateById(
new OrderReturnDO() new OrderReturnDO()
.setId(id) .setId(id)
.setRefuseTime(new Date())
.setStatus(OrderReturnStatusEnum.APPLICATION_FAIL.getValue()) .setStatus(OrderReturnStatusEnum.APPLICATION_FAIL.getValue())
); );
return CommonResult.success(null); return CommonResult.success(null);
@ -186,9 +190,10 @@ public class OrderReturnServiceImpl implements OrderReturnService {
return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode()); return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode());
} }
orderReturnMapper.updateByOrderId( orderReturnMapper.updateById(
new OrderReturnDO() new OrderReturnDO()
.setId(id) .setId(id)
.setReceiverTime(new Date())
.setStatus(OrderReturnStatusEnum.ORDER_RECEIPT.getValue()) .setStatus(OrderReturnStatusEnum.ORDER_RECEIPT.getValue())
); );
return CommonResult.success(null); return CommonResult.success(null);
@ -207,13 +212,24 @@ public class OrderReturnServiceImpl implements OrderReturnService {
// TODO: 2019/5/8 sin 退货+退款退回商品签收后支付系统退款 // TODO: 2019/5/8 sin 退货+退款退回商品签收后支付系统退款
// TODO: 2019/5/8 sin 事务一致性 [重要] // TODO: 2019/5/8 sin 事务一致性 [重要]
CommonResult<DataDictBO> dataDictResult = dataDictService
.getDataDict(DictKeyConstants.ORDER_RETURN_REASON, orderReturnDO.getReason());
if (dataDictResult.isError()) {
return ServiceExceptionUtil.error(OrderErrorCodeEnum.DICT_SERVER_INVOKING_FAIL.getCode());
}
// 支付退款 // 支付退款
String orderDescription = dataDictResult.getData()
.getDisplayName() + "(" + orderReturnDO.getDescribe() + ")";
CommonResult payResult = payRefundService.submitRefund( CommonResult payResult = payRefundService.submitRefund(
new PayRefundSubmitDTO() new PayRefundSubmitDTO()
.setAppId(PayAppId.APP_ID_SHOP_ORDER) .setAppId(PayAppId.APP_ID_SHOP_ORDER)
.setOrderId(String.valueOf(orderReturnDO.getOrderId())) .setOrderId(String.valueOf(orderReturnDO.getOrderId()))
.setPrice(orderReturnDO.getRefundPrice()) .setPrice(orderReturnDO.getRefundPrice())
.setOrderDescription("") .setOrderDescription(orderDescription)
.setCreateIp(ip) .setCreateIp(ip)
); );
@ -222,9 +238,10 @@ public class OrderReturnServiceImpl implements OrderReturnService {
} }
// 更新 订单退货 信息 // 更新 订单退货 信息
orderReturnMapper.updateByOrderId( orderReturnMapper.updateById(
new OrderReturnDO() new OrderReturnDO()
.setId(id) .setId(id)
.setClosingTime(new Date())
.setStatus(OrderReturnStatusEnum.RETURN_SUCCESS.getValue()) .setStatus(OrderReturnStatusEnum.RETURN_SUCCESS.getValue())
); );
@ -232,13 +249,16 @@ public class OrderReturnServiceImpl implements OrderReturnService {
orderMapper.updateById( orderMapper.updateById(
new OrderDO() new OrderDO()
.setId(orderReturnDO.getOrderId()) .setId(orderReturnDO.getOrderId())
.setClosingTime(new Date())
.setStatus(OrderStatusEnum.COMPLETED.getValue()) .setStatus(OrderStatusEnum.COMPLETED.getValue())
); );
// 更新订单 // 更新订单
orderItemMapper.updateByOrderId( orderItemMapper.updateByOrderId(
orderReturnDO.getOrderId(), orderReturnDO.getOrderId(),
new OrderItemDO().setStatus(OrderStatusEnum.COMPLETED.getValue()) new OrderItemDO()
.setClosingTime(new Date())
.setStatus(OrderStatusEnum.COMPLETED.getValue())
); );
return CommonResult.success(null); return CommonResult.success(null);
} }

View File

@ -12,6 +12,7 @@
reason, reason,
`describe`, `describe`,
approval_time, approval_time,
refuse_time,
logistics_time, logistics_time,
receiver_time, receiver_time,
closing_time, closing_time,
@ -28,13 +29,13 @@
INSERT INTO `order_return` ( INSERT INTO `order_return` (
service_number, order_id, order_no, order_logistics_id, service_number, order_id, order_no, order_logistics_id,
refund_price, reason, `describe`, refund_price, reason, `describe`,
approval_time, logistics_time, receiver_time, closing_time, approval_time, refuse_time, logistics_time, receiver_time, closing_time,
service_type, status, service_type, status,
create_time, update_time) create_time, update_time)
VALUES ( VALUES (
#{serviceNumber}, #{orderId}, #{orderNo}, #{orderLogisticsId}, #{serviceNumber}, #{orderId}, #{orderNo}, #{orderLogisticsId},
${refundPrice}, #{reason}, #{describe}, ${refundPrice}, #{reason}, #{describe},
#{approvalTime}, #{logisticsTime}, #{receiverTime}, #{closingTime}, #{approvalTime}, #{refuse_time}, #{logisticsTime}, #{receiverTime}, #{closingTime},
#{serviceType}, #{status}, #{createTime}, #{updateTime}) #{serviceType}, #{status}, #{createTime}, #{updateTime})
</insert> </insert>
@ -58,20 +59,20 @@
<if test="approvalTime != null"> <if test="approvalTime != null">
, approval_time = #{approvalTime} , approval_time = #{approvalTime}
</if> </if>
<if test="refuseTime != null">
, refuse_time = #{refuseTime}
</if>
<if test="logisticsTime != null"> <if test="logisticsTime != null">
, logistics_time = #{logisticsTime} , logistics_time = #{logisticsTime}
</if> </if>
<if test="receiverTime != null"> <if test="receiverTime != null">
, receiver_time = #{receiverTime} , receiver_time = #{receiverTime}
</if> </if>
<if test="deliveryTime != null">
, delivery_time = #{deliveryTime}
</if>
<if test="closingTime != null"> <if test="closingTime != null">
, closing_time = #{closingTime} , closing_time = #{closingTime}
</if> </if>
<if test="returnType != null"> <if test="serviceType != null">
, return_type = #{returnType} , service_type = #{serviceType}
</if> </if>
<if test="status != null"> <if test="status != null">
, status = #{status} , status = #{status}
@ -88,10 +89,10 @@
<!-- <!--
更新 - 根据 id 更新 更新 - 根据 id 更新
--> -->
<update id="updateByOrderId" parameterType="OrderReturnDO"> <update id="updateById" parameterType="OrderReturnDO">
UPDATE `order_return` UPDATE `order_return`
<include refid="updateFieldSql"/> <include refid="updateFieldSql"/>
WHERE order_id = #{orderId} WHERE id = #{id}
</update> </update>
<!-- <!--
@ -109,6 +110,12 @@
列表查询 - where 列表查询 - where
--> -->
<sql id="selectListWhere"> <sql id="selectListWhere">
<if test="status != null">
AND status = #{status}
</if>
<if test="serviceNumber != null">
AND service_number = #{serviceNumber}
</if>
<if test="orderId != null"> <if test="orderId != null">
AND order_id = #{orderId} AND order_id = #{orderId}
</if> </if>

View File

@ -67,7 +67,7 @@ public class AdminSecurityInterceptor extends HandlerInterceptorAdapter {
} }
// 校验是否需要已授权 // 校验是否需要已授权
// TODO sin 暂时不校验 // TODO sin 暂时不校验
// checkPermission(request, authentication); checkPermission(request, authentication);
// 返回成功 // 返回成功
return super.preHandle(request, response, handler); return super.preHandle(request, response, handler);
} }