Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
sibu-v-mall
/
sibu-v-mall-third-api
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
5181991b
由
刘嘉
编写于
2018-04-16 14:25:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加查询还有哪些订单 整单是售后完成,但订单状态不是[退款/退货成功]状态的
1 个父辈
a56a404a
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
123 行增加
和
8 行删除
com.sibu.orderHelper.dao/src/main/java/com/sibu/orderHelper/integral/dao/IMRefundOrderDao.java
com.sibu.orderHelper.integralMall/src/main/java/com/sibu/orderHelper/integralMall/controller/order/IMOrderRefundController.java
com.sibu.orderHelper.integralMall/src/main/resources/mapper/IMRefundOrderMapper.xml
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/model/RefundUnsuccessfulBean.java
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/IIMRefundOrderService.java
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/impl/IMRefundOrderService.java
com.sibu.orderHelper.dao/src/main/java/com/sibu/orderHelper/integral/dao/IMRefundOrderDao.java
查看文件 @
5181991
package
com
.
sibu
.
orderHelper
.
integral
.
dao
;
import
java.util.List
;
import
java.util.Map
;
import
com.sibu.orderHelper.integral.request.RefundListPagerRequest
;
import
com.sibu.orderHelper.integral.request.UpdateDeliveryInfoRequest
;
...
...
@@ -130,4 +131,17 @@ public interface IMRefundOrderDao {
IMOrderRefundBean
findOneRefundingByOrderIdAndOrder1Id
(
@Param
(
"orderId"
)
String
orderId
,
@Param
(
"order1Id"
)
String
order1Id
);
/**
* 查询整单是售后完成
* @return
*/
List
<
IMOrderRefundBean
>
searchSuccessRefundOrderList
();
/**
* 根据条件查询退款表成功的子订单数量
* @param orderCode
* @return
*/
Integer
countRefundOrderListByOrderCode
(
@Param
(
"orderCode"
)
String
orderCode
);
}
...
...
com.sibu.orderHelper.integralMall/src/main/java/com/sibu/orderHelper/integralMall/controller/order/IMOrderRefundController.java
查看文件 @
5181991
...
...
@@ -5,12 +5,17 @@ import com.sibu.orderHelper.common.constants.AppConstants;
import
com.sibu.orderHelper.common.data.BaseResponse
;
import
com.sibu.orderHelper.common.data.Pager
;
import
com.sibu.orderHelper.common.data.ResponseUtil
;
import
com.sibu.orderHelper.common.model.response.CommonResponse
;
import
com.sibu.orderHelper.common.model.response.ResponseRender
;
import
com.sibu.orderHelper.common.util.MD5Util
;
import
com.sibu.orderHelper.common.util.StringUtil
;
import
com.sibu.orderHelper.enums.IMOrderRefundGoodsDeliverEnum
;
import
com.sibu.orderHelper.enums.OrderRefundTypeEnum
;
import
com.sibu.orderHelper.integral.model.IMOrderRefundBean
;
import
com.sibu.orderHelper.integral.model.IMRefundProcedureRecord
;
import
com.sibu.orderHelper.integral.model.RefundUnsuccessfulBean
;
import
com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse
;
import
com.sibu.orderHelper.integral.reponse.DoingOrderListResponse
;
import
com.sibu.orderHelper.integral.reponse.GetApplyRefundOrderInitInfoResponse
;
import
com.sibu.orderHelper.integral.reponse.ValueTextResponse
;
import
com.sibu.orderHelper.integral.request.CancelRefundRequest
;
...
...
@@ -32,10 +37,7 @@ import org.apache.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.validation.ValidationException
;
...
...
@@ -382,4 +384,28 @@ public class IMOrderRefundController extends BaseController {
}
}
/**
* 查询哪些订单 整单是售后完成,但订单状态不是[退款/退货成功]状态的
* @param str
* @return
*/
@RequestMapping
(
value
=
"/imorder/refund/searchRefundOrderList"
)
@ResponseBody
public
CommonResponse
<
List
<
RefundUnsuccessfulBean
>>
searchRefundOrderList
(
String
str
)
throws
Exception
{
try
{
if
(
StringUtil
.
isNull
(
str
)){
return
ResponseRender
.
renderErrData
(
"请输入验证码"
);
}
if
(!
"056839532496493e933a6e2ece2fb749"
.
equals
(
MD5Util
.
MD5ToNewWeSale
(
str
))){
return
ResponseRender
.
renderErrData
(
"请输入正确验证码"
);
}
}
catch
(
Exception
e
){
log
.
error
(
e
);
throw
new
ApiDataException
(
2
,
"md5错误"
,
e
);
}
//获取售后完成的退款记录
List
<
IMOrderRefundBean
>
iMOrderRefundBeanList
=
iMRefundOrderService
.
searchSuccessRefundOrderList
();
return
ResponseRender
.
renderData
(
iMRefundOrderService
.
searchUnsuccessfulRefundOrderList
(
iMOrderRefundBeanList
));
}
}
...
...
com.sibu.orderHelper.integralMall/src/main/resources/mapper/IMRefundOrderMapper.xml
查看文件 @
5181991
...
...
@@ -345,4 +345,13 @@ refund_id,
and ofitem.order1_id=#{order1Id}
and of.refund_id = ofitem.refund_id
</select>
<select
id=
"searchSuccessRefundOrderList"
resultMap=
"BaseResultMap"
>
SELECT * FROM im_order_refund WHERE refund_status = 7 GROUP BY order_code
</select>
<select
id=
"countRefundOrderListByOrderCode"
parameterType=
"java.lang.String"
resultType=
"java.lang.Integer"
>
SELECT COUNT(*) FROM im_refund_order_item r1,im_order_refund r WHERE r1.refund_id = r.refund_id
AND r.refund_status = 7 AND r.order_code = #{orderCode}
</select>
</mapper>
\ No newline at end of file
...
...
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/model/RefundUnsuccessfulBean.java
0 → 100644
查看文件 @
5181991
package
com
.
sibu
.
orderHelper
.
integral
.
model
;
import
jdk.nashorn.internal.objects.annotations.Setter
;
import
lombok.Data
;
import
lombok.ToString
;
@Data
@ToString
public
class
RefundUnsuccessfulBean
{
private
String
orderCode
;
private
Integer
orderStatus
;
private
Integer
refundNum
;
private
Integer
order1Num
;
}
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/IIMRefundOrderService.java
查看文件 @
5181991
...
...
@@ -6,10 +6,8 @@ import com.sibu.orderHelper.common.data.StatusBean;
import
com.sibu.orderHelper.common.model.response.CommonResponse
;
import
com.sibu.orderHelper.integral.model.IMOrderRefundBean
;
import
com.sibu.orderHelper.integral.model.IMRefundProcedureRecord
;
import
com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse
;
import
com.sibu.orderHelper.integral.reponse.GetApplyRefundOrderInitInfoResponse
;
import
com.sibu.orderHelper.integral.reponse.GetModifyApplyRefundOrderInitInfoResponse
;
import
com.sibu.orderHelper.integral.reponse.RefundOrderResponse
;
import
com.sibu.orderHelper.integral.model.RefundUnsuccessfulBean
;
import
com.sibu.orderHelper.integral.reponse.*
;
import
com.sibu.orderHelper.integral.request.*
;
import
com.sibu.orderHelper.integral.request.group.Modify
;
import
org.springframework.validation.BindingResult
;
...
...
@@ -145,4 +143,18 @@ public interface IIMRefundOrderService {
* 如果不存在退单,则恢复退单前订单状态
*/
void
ifNoneRefundingOrderThenRestorePreOrderStatus
(
String
orderId
,
String
memberId
)
throws
Exception
;
/**
* 查询整单是售后完成
* @return
*/
List
<
IMOrderRefundBean
>
searchSuccessRefundOrderList
();
/**
*整单是售后完成,但订单状态不是[退款/退货成功]状态的
* @param list
* @return
*/
List
<
RefundUnsuccessfulBean
>
searchUnsuccessfulRefundOrderList
(
List
<
IMOrderRefundBean
>
list
)
throws
Exception
;
}
...
...
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/impl/IMRefundOrderService.java
查看文件 @
5181991
...
...
@@ -783,6 +783,40 @@ public class IMRefundOrderService extends BaseServiceImpl implements IIMRefundOr
}
}
@Override
public
List
<
IMOrderRefundBean
>
searchSuccessRefundOrderList
()
{
return
imRefundOrderDao
.
searchSuccessRefundOrderList
();
}
@Override
public
List
<
RefundUnsuccessfulBean
>
searchUnsuccessfulRefundOrderList
(
List
<
IMOrderRefundBean
>
list
)
throws
Exception
{
List
<
RefundUnsuccessfulBean
>
refundUnsuccessfulBeanList
=
new
ArrayList
<>();
if
(!
StringUtil
.
isNull
(
list
)
&&
!
list
.
isEmpty
()){
for
(
int
i
=
0
;
i
<
list
.
size
()
;
i
++){
DoingOrderDetailResponse
doingOrderDetailResponse
=
iimDoingOrderService
.
getIMOrderDetailByOrderCode
(
list
.
get
(
i
).
getOrderCode
());
if
(!
StringUtil
.
isNull
(
doingOrderDetailResponse
)
&&
(
doingOrderDetailResponse
.
getOrderStatus
()
==
PayOrderStatus
.
WaitPay
.
getCode
()
||
doingOrderDetailResponse
.
getOrderStatus
()
==
PayOrderStatus
.
WaitShip
.
getCode
()
||
doingOrderDetailResponse
.
getOrderStatus
()
==
PayOrderStatus
.
HasReceived
.
getCode
()
||
doingOrderDetailResponse
.
getOrderStatus
()
==
PayOrderStatus
.
HasDelive
.
getCode
()
||
doingOrderDetailResponse
.
getOrderStatus
()
==
PayOrderStatus
.
RefundDoing
.
getCode
()
||
doingOrderDetailResponse
.
getOrderStatus
()
==
PayOrderStatus
.
RefundFail
.
getCode
()
||
doingOrderDetailResponse
.
getOrderStatus
()
==
PayOrderStatus
.
Finished
.
getCode
())){
Integer
refundNum
=
imRefundOrderDao
.
countRefundOrderListByOrderCode
(
doingOrderDetailResponse
.
getOrderCode
());
if
(
refundNum
.
intValue
()
==
doingOrderDetailResponse
.
getOrder1s
().
size
()){
RefundUnsuccessfulBean
entity
=
new
RefundUnsuccessfulBean
();
entity
.
setOrder1Num
(
doingOrderDetailResponse
.
getOrder1s
().
size
());
entity
.
setOrderCode
(
doingOrderDetailResponse
.
getOrderCode
());
entity
.
setOrderStatus
(
doingOrderDetailResponse
.
getOrderStatus
());
entity
.
setRefundNum
(
refundNum
.
intValue
());
refundUnsuccessfulBeanList
.
add
(
entity
);
}
}
}
}
return
refundUnsuccessfulBeanList
;
}
/**
* 插入退单行明细
*/
...
...
请
注册
或
登录
后发表评论