记得上下班打卡 | git大法好,push需谨慎

Commit 7b46d39f authored by 张国柄's avatar 张国柄

~JOB;

parent 6ee73f70
...@@ -35,14 +35,10 @@ public class PlatformTaskHandler { ...@@ -35,14 +35,10 @@ public class PlatformTaskHandler {
try { try {
String result = feignPlatformApiClient.overtimeRefund().getData(); String result = feignPlatformApiClient.overtimeRefund().getData();
log.info("overtimeRefund:结果:"+result); log.info("overtimeRefund:结果:"+result);
ReturnT<String> success = ReturnT.SUCCESS; return new ReturnT<>(ReturnT.SUCCESS_CODE, result);
success.setMsg(result);
return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.SUCCESS_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
...@@ -51,14 +47,10 @@ public class PlatformTaskHandler { ...@@ -51,14 +47,10 @@ public class PlatformTaskHandler {
try { try {
String result = feignPlatformAlipayBackClient.alipayActiveCallback().getData(); String result = feignPlatformAlipayBackClient.alipayActiveCallback().getData();
log.info("alipayActiveCallback:结果:"+result); log.info("alipayActiveCallback:结果:"+result);
ReturnT<String> success = ReturnT.SUCCESS; return new ReturnT<>(ReturnT.SUCCESS_CODE, result);
success.setMsg(result);
return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.SUCCESS_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
...@@ -69,14 +61,10 @@ public class PlatformTaskHandler { ...@@ -69,14 +61,10 @@ public class PlatformTaskHandler {
ResponseDto<String> dto = feignPlatformCandyTaskClient.mgtIssueCoupons(); ResponseDto<String> dto = feignPlatformCandyTaskClient.mgtIssueCoupons();
String dtoStr = JsonUtils.toJson(dto); String dtoStr = JsonUtils.toJson(dto);
log.info("result of handler:{}", dtoStr); log.info("result of handler:{}", dtoStr);
ReturnT<String> success = ReturnT.SUCCESS; return new ReturnT<>(ReturnT.SUCCESS_CODE, dtoStr);
success.setMsg(dtoStr);
return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.SUCCESS_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
...@@ -87,14 +75,10 @@ public class PlatformTaskHandler { ...@@ -87,14 +75,10 @@ public class PlatformTaskHandler {
ResponseDto<String> dto = feignPlatformCandyTaskClient.dueProcessForRedeem(); ResponseDto<String> dto = feignPlatformCandyTaskClient.dueProcessForRedeem();
String dtoStr = JsonUtils.toJson(dto); String dtoStr = JsonUtils.toJson(dto);
log.info("result of handler:{}", dtoStr); log.info("result of handler:{}", dtoStr);
ReturnT<String> success = ReturnT.SUCCESS; return new ReturnT<>(ReturnT.SUCCESS_CODE, dtoStr);
success.setMsg(dtoStr);
return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.SUCCESS_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
...@@ -105,14 +89,10 @@ public class PlatformTaskHandler { ...@@ -105,14 +89,10 @@ public class PlatformTaskHandler {
ResponseDto<String> dto = feignPlatformCandyTaskClient.dueProcessForCommon(); ResponseDto<String> dto = feignPlatformCandyTaskClient.dueProcessForCommon();
String dtoStr = JsonUtils.toJson(dto); String dtoStr = JsonUtils.toJson(dto);
log.info("result of handler:{}", dtoStr); log.info("result of handler:{}", dtoStr);
ReturnT<String> success = ReturnT.SUCCESS; return new ReturnT<>(ReturnT.SUCCESS_CODE, dtoStr);
success.setMsg(dtoStr);
return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.SUCCESS_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
...@@ -123,14 +103,10 @@ public class PlatformTaskHandler { ...@@ -123,14 +103,10 @@ public class PlatformTaskHandler {
ResponseDto<String> dto = feignPlatformCandyTaskClient.dueProcessForUser(); ResponseDto<String> dto = feignPlatformCandyTaskClient.dueProcessForUser();
String dtoStr = JsonUtils.toJson(dto); String dtoStr = JsonUtils.toJson(dto);
log.info("result of handler:{}", dtoStr); log.info("result of handler:{}", dtoStr);
ReturnT<String> success = ReturnT.SUCCESS; return new ReturnT<>(ReturnT.SUCCESS_CODE, dtoStr);
success.setMsg(dtoStr);
return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.SUCCESS_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
//运费 //运费
...@@ -140,14 +116,10 @@ public class PlatformTaskHandler { ...@@ -140,14 +116,10 @@ public class PlatformTaskHandler {
ResponseDto<Object> dto = feignPlatformFreightClient.getFreightCharge(); ResponseDto<Object> dto = feignPlatformFreightClient.getFreightCharge();
String dtoStr = JsonUtils.toJson(dto); String dtoStr = JsonUtils.toJson(dto);
log.info("result of handler:{}", dtoStr); log.info("result of handler:{}", dtoStr);
ReturnT<String> success = ReturnT.SUCCESS; return new ReturnT<>(ReturnT.SUCCESS_CODE, dtoStr);
success.setMsg(dtoStr);
return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.SUCCESS_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
...@@ -159,14 +131,10 @@ public class PlatformTaskHandler { ...@@ -159,14 +131,10 @@ public class PlatformTaskHandler {
ResponseDto<String> dto = feignPlatformCandyTaskClient.doTask(); ResponseDto<String> dto = feignPlatformCandyTaskClient.doTask();
String dtoStr = JsonUtils.toJson(dto); String dtoStr = JsonUtils.toJson(dto);
log.info("result of handler:{}", dtoStr); log.info("result of handler:{}", dtoStr);
ReturnT<String> success = ReturnT.SUCCESS; return new ReturnT<>(ReturnT.SUCCESS_CODE, dtoStr);
success.setMsg(dtoStr);
return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.SUCCESS_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
} }
...@@ -26,7 +26,8 @@ public class SweetCityVoteTaskHandler { ...@@ -26,7 +26,8 @@ public class SweetCityVoteTaskHandler {
log.info("jobParam = " + jobParam); log.info("jobParam = " + jobParam);
String[] paramArray = jobParam.split(","); String[] paramArray = jobParam.split(",");
ReturnT<String> success = ReturnT.SUCCESS; ReturnT<String> success = new ReturnT<>();
success.setCode(ReturnT.SUCCESS_CODE);
for (String type : paramArray) { for (String type : paramArray) {
log.info("type = " + type); log.info("type = " + type);
...@@ -38,9 +39,7 @@ public class SweetCityVoteTaskHandler { ...@@ -38,9 +39,7 @@ public class SweetCityVoteTaskHandler {
return success; return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.FAIL_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
......
...@@ -42,7 +42,8 @@ public class SweetTaskHandler { ...@@ -42,7 +42,8 @@ public class SweetTaskHandler {
log.info("jobParam = " + jobParam); log.info("jobParam = " + jobParam);
String[] paramArray = jobParam.split(","); String[] paramArray = jobParam.split(",");
ReturnT<String> success = ReturnT.SUCCESS; ReturnT<String> success = new ReturnT<>();
success.setCode(ReturnT.SUCCESS_CODE);
for (String id : paramArray) { for (String id : paramArray) {
log.info("id = " + id); log.info("id = " + id);
...@@ -54,9 +55,7 @@ public class SweetTaskHandler { ...@@ -54,9 +55,7 @@ public class SweetTaskHandler {
return success; return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.FAIL_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
} }
...@@ -24,14 +24,10 @@ public class SweetWechatTaskHandler { ...@@ -24,14 +24,10 @@ public class SweetWechatTaskHandler {
try { try {
Object data = feignSweetWechatClient.send().getData(); Object data = feignSweetWechatClient.send().getData();
log.info("sendWechatMsgHandler:结果:{}", data); log.info("sendWechatMsgHandler:结果:{}", data);
ReturnT<String> success = ReturnT.SUCCESS; return new ReturnT<>(ReturnT.SUCCESS_CODE, String.valueOf(data));
success.setMsg(String.valueOf(data));
return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.FAIL_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
...@@ -42,7 +38,8 @@ public class SweetWechatTaskHandler { ...@@ -42,7 +38,8 @@ public class SweetWechatTaskHandler {
log.info("jobParam = " + jobParam); log.info("jobParam = " + jobParam);
String[] paramArray = jobParam.split(":"); String[] paramArray = jobParam.split(":");
ReturnT<String> success = ReturnT.SUCCESS; ReturnT<String> success = new ReturnT<>();
success.setCode(ReturnT.SUCCESS_CODE);
for (String typeAndTargetId : paramArray) { for (String typeAndTargetId : paramArray) {
String[] typeAndTargetIdArray = typeAndTargetId.split(","); String[] typeAndTargetIdArray = typeAndTargetId.split(",");
...@@ -56,9 +53,7 @@ public class SweetWechatTaskHandler { ...@@ -56,9 +53,7 @@ public class SweetWechatTaskHandler {
return success; return success;
} catch (Exception e) { } catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e); log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL; return new ReturnT<>(ReturnT.FAIL_CODE, e.getLocalizedMessage());
fail.setMsg(e.getLocalizedMessage());
return fail;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment