更新 整单是售后完成,但订单状态不是[退款/退货成功]状态的订单状态
正在显示
5 个修改的文件
包含
64 行增加
和
0 行删除
... | @@ -141,4 +141,10 @@ public interface IMDoingOrderDao { | ... | @@ -141,4 +141,10 @@ public interface IMDoingOrderDao { |
141 | 141 | ||
142 | //根据订单号获取订单详情 | 142 | //根据订单号获取订单详情 |
143 | DoingOrderDetailResponse getIMOrderDetailByMap(Map<String, Object> param); | 143 | DoingOrderDetailResponse getIMOrderDetailByMap(Map<String, Object> param); |
144 | |||
145 | /** | ||
146 | * 更新 整单是售后完成,但订单状态不是[退款/退货成功]状态的订单 | ||
147 | * @param params | ||
148 | */ | ||
149 | void updateOrderStatusByMap(Map<String,Object> params); | ||
144 | } | 150 | } | ... | ... |
... | @@ -41,6 +41,8 @@ import org.springframework.web.bind.annotation.*; | ... | @@ -41,6 +41,8 @@ import org.springframework.web.bind.annotation.*; |
41 | 41 | ||
42 | import javax.annotation.Resource; | 42 | import javax.annotation.Resource; |
43 | import javax.validation.ValidationException; | 43 | import javax.validation.ValidationException; |
44 | import java.util.ArrayList; | ||
45 | import java.util.Arrays; | ||
44 | import java.util.List; | 46 | import java.util.List; |
45 | 47 | ||
46 | /** | 48 | /** |
... | @@ -408,4 +410,36 @@ public class IMOrderRefundController extends BaseController { | ... | @@ -408,4 +410,36 @@ public class IMOrderRefundController extends BaseController { |
408 | return ResponseRender.renderData(iMRefundOrderService.searchUnsuccessfulRefundOrderList(iMOrderRefundBeanList)); | 410 | return ResponseRender.renderData(iMRefundOrderService.searchUnsuccessfulRefundOrderList(iMOrderRefundBeanList)); |
409 | } | 411 | } |
410 | 412 | ||
413 | /** | ||
414 | * 更新 整单是售后完成,但订单状态不是[退款/退货成功]状态的订单 | ||
415 | * @param str | ||
416 | * @return | ||
417 | * @throws Exception | ||
418 | */ | ||
419 | @RequestMapping(value = "/imorder/refund/updateRefundOrserList") | ||
420 | @ResponseBody | ||
421 | public String updateRefundOrserList(String str)throws Exception{ | ||
422 | try { | ||
423 | if(StringUtil.isNull(str)){ | ||
424 | return ResponseUtil.error("请输入验证码"); | ||
425 | } | ||
426 | if(!"056839532496493e933a6e2ece2fb749".equals(MD5Util.MD5ToNewWeSale(str))){ | ||
427 | return ResponseUtil.error("请输入正确验证码"); | ||
428 | } | ||
429 | }catch (Exception e){ | ||
430 | log.error(e); | ||
431 | throw new ApiDataException(2, "md5错误", e); | ||
432 | } | ||
433 | ArrayList<String> refundList = new ArrayList<String>(Arrays.asList("S0021522258815331", "S011201804020733100665", "S013201803292002548637","S013201803292039238172", | ||
434 | "S013201803292219146602","S0271521047077511","S0311520709106971","S0351522263111238","S0361521792447158","S044201803310813456331","S0451522105234726","S072201803300917554787", | ||
435 | "S080201804021438156843","S081201803301321268318","S081201804030739055230","S0821522257785998","S0861522258771557","S090201804031350228548","S0951520712293242","S0951520728488229", | ||
436 | "S0981520746819299","S1011521674243505","S101201804011152207744","S101201804031500247525","S104201804011607091004","S105201803301418465847","S1071522277200968","S1091522264482792","S128201803301118156510", | ||
437 | "S1331517178633710","S134201804031337248413","S1351520719407884","S140201804020046231224","S1431520742518876","S1461521418597350","S150201803311058501300","S1511520709284202","S1521522272052514","S152201804021256497637", | ||
438 | "S1601519799639608","S1671520732763386","S184201803292124104484","S188201804020053046208","S190201804011804461777","S193201804030028274818","S194201803311353117388","S194201803311359137016","S1991520825026133","S206201803311740362678", | ||
439 | "S209201804022048206544","S209201804031335482106","S211201804022049010278","S214201804031505302202","S232201803292037135511","S232201803292207590857","S2331522025154721","S2351522257613518","S2401522452902291","S244201804022243354657", | ||
440 | "S245201803300618376176","S252201803301009364387","S252201804020812593582","S254201804021129432187")); | ||
441 | iimDoingOrderService.updateRefundOrderList(refundList); | ||
442 | return ResponseUtil.success("更新成功"); | ||
443 | } | ||
444 | |||
411 | } | 445 | } | ... | ... |
... | @@ -851,4 +851,8 @@ | ... | @@ -851,4 +851,8 @@ |
851 | where do.main_order_code = #{mainOrderCode} and do.order_from = #{orderFrom} AND do.delete_flag=1 | 851 | where do.main_order_code = #{mainOrderCode} and do.order_from = #{orderFrom} AND do.delete_flag=1 |
852 | </select> | 852 | </select> |
853 | 853 | ||
854 | <update id="updateOrderStatusByMap" parameterType="java.util.Map"> | ||
855 | update ${doingOrderTable} set order_status = 7 WHERE order_code = #{orderCode} | ||
856 | </update> | ||
857 | |||
854 | </mapper> | 858 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -98,5 +98,12 @@ public interface IIMDoingOrderService { | ... | @@ -98,5 +98,12 @@ public interface IIMDoingOrderService { |
98 | //判断main_order_code与ordercode获取订单信息 | 98 | //判断main_order_code与ordercode获取订单信息 |
99 | DoingOrderDetailResponse getIMOrderDetailByOrderCodeOrMainOrderCode(String orderCode) throws Exception; | 99 | DoingOrderDetailResponse getIMOrderDetailByOrderCodeOrMainOrderCode(String orderCode) throws Exception; |
100 | 100 | ||
101 | /** | ||
102 | * 更新 整单是售后完成,但订单状态不是[退款/退货成功]状态的订单 | ||
103 | * @param list | ||
104 | * @throws Exception | ||
105 | */ | ||
106 | void updateRefundOrderList(List<String> list)throws Exception; | ||
107 | |||
101 | 108 | ||
102 | } | 109 | } | ... | ... |
... | @@ -1321,5 +1321,18 @@ public class IMDoingOrderService extends BaseServiceImpl implements IIMDoingOrde | ... | @@ -1321,5 +1321,18 @@ public class IMDoingOrderService extends BaseServiceImpl implements IIMDoingOrde |
1321 | return doingOrderDetailResponse; | 1321 | return doingOrderDetailResponse; |
1322 | } | 1322 | } |
1323 | 1323 | ||
1324 | @Override | ||
1325 | public void updateRefundOrderList(List<String> list) throws Exception { | ||
1326 | for(int i = 0;i<list.size();i++){ | ||
1327 | Map<String,Object> params = new HashMap<>(); | ||
1328 | String redisMysqlDbConfig = this.getRedisConfigByOrderCode(list.get(i)); | ||
1329 | String tableName = DbUtil.getDatabaseByOrderCode(list.get(i), 16); | ||
1330 | params.put("doingOrderTable", "im_doing_order_" + tableName); | ||
1331 | params.put("orderCode", list.get(i)); | ||
1332 | DBContextHolder.setDBType(redisMysqlDbConfig); | ||
1333 | iMDoingOrderDao.updateOrderStatusByMap(params); | ||
1334 | } | ||
1335 | } | ||
1336 | |||
1324 | 1337 | ||
1325 | } | 1338 | } | ... | ... |
-
请 注册 或 登录 后发表评论