|
@@ -16,6 +16,7 @@ import com.kmall.common.utils.Constant;
|
|
|
import com.kmall.common.utils.Query;
|
|
|
import com.kmall.common.utils.wechat.WechatRefundApiResult;
|
|
|
import com.kmall.common.utils.wechat.WechatUtil;
|
|
|
+import io.swagger.models.auth.In;
|
|
|
import org.apache.commons.collections.MapUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -400,9 +401,21 @@ public class ApiOrderController extends ApiBaseAction {
|
|
|
orderRefund.setRefundMoney(orderInfo.getActual_price());
|
|
|
|
|
|
if(mallOrderRefund !=null){
|
|
|
+ if(mallOrderRefund.getRefundType() == Integer.parseInt(Dict.RefundStatus.item_2.getItem()) ){
|
|
|
+ return toResponsFail("该订单已退款成功,请勿重复申请");
|
|
|
+ }
|
|
|
+ if(mallOrderRefund.getRefundType() == Integer.parseInt(Dict.RefundStatus.item_5.getItem()) ){
|
|
|
+ return toResponsFail("该订单在退款处理中,请勿重复申请");
|
|
|
+ }
|
|
|
+ if(mallOrderRefund.getRefundType() == Integer.parseInt(Dict.RefundStatus.item_1.getItem()) ){
|
|
|
+ return toResponsFail("该订单在退款申请中,请勿重复申请");
|
|
|
+ }
|
|
|
orderRefund.setId(mallOrderRefund.getId());
|
|
|
apiOrderRefundService.update(orderRefund);
|
|
|
- return toResponsMsgSuccess("该订单已申请过退款,重新申请成功");
|
|
|
+ if(mallOrderRefund.getRefundType() == Integer.parseInt(Dict.RefundStatus.item_4.getItem()) ||
|
|
|
+ mallOrderRefund.getRefundType() == Integer.parseInt(Dict.RefundStatus.item_3.getItem())){
|
|
|
+ return toResponsMsgSuccess("重新申请订单成功");
|
|
|
+ }
|
|
|
}else{
|
|
|
orderRefund.setCreateTime(new Date());
|
|
|
apiOrderRefundService.save(orderRefund);
|