From 0be0167cc2ef2140e654147438e5e673a30398d6 Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Thu, 8 Mar 2018 16:16:46 +0800 Subject: [PATCH] new act --- .../impls/ActMonDelaySettleServiceImp.java | 6 +++--- .../appclient/web/RetailAppController.java | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/activities/monsettledelay/core/impls/ActMonDelaySettleServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/activities/monsettledelay/core/impls/ActMonDelaySettleServiceImp.java index dc807f40d..17a3e5af2 100644 --- a/src/main/java/au/com/royalpay/payment/manage/activities/monsettledelay/core/impls/ActMonDelaySettleServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/activities/monsettledelay/core/impls/ActMonDelaySettleServiceImp.java @@ -39,12 +39,12 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService{ String clientType = device.getString("client_type"); deviceSupport.findRegister(clientType); int client_id = device.getIntValue("client_id"); - BigDecimal total_redpack = actMonDelaySettleRedPackMapper.getTotalRedPack(client_id); JSONObject res = new JSONObject(); res.put("total_redpack",total_redpack); - res.put("des","你有一份奖励待领取"); - res.put("url", PlatformEnvironment.getEnv().concatUrl("/act/mondelay/desc")); + res.put("desc","你有一份奖励待领取"); + res.put("url", PlatformEnvironment.getEnv().concatUrl("/api/v1.0/retail/app/act/mondelay/desc")); + res.put("show",true); return res; } diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java index 368ed4069..971fad7cd 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java @@ -1,6 +1,7 @@ package au.com.royalpay.payment.manage.appclient.web; import au.com.royalpay.payment.core.exceptions.ParamInvalidException; +import au.com.royalpay.payment.manage.activities.monsettledelay.core.ActMonDelaySettleService; import au.com.royalpay.payment.manage.appclient.beans.AppClientBean; import au.com.royalpay.payment.manage.appclient.beans.AppQueryBean; import au.com.royalpay.payment.manage.appclient.core.RetailAppService; @@ -26,6 +27,7 @@ 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.RequestParam; +import org.springframework.web.servlet.ModelAndView; import java.math.BigDecimal; import java.util.List; @@ -48,6 +50,8 @@ public class RetailAppController { private BillOrderService billOrderService; @Resource private BillService billService; + @Resource + private ActMonDelaySettleService actMonDelaySettleService; @RequestMapping(value = "/token", method = RequestMethod.PUT) public void updateDevToken(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject token) { @@ -322,4 +326,18 @@ public class RetailAppController { result.put("analysis",billOrderService.analysis(bill_id,device.getIntValue("client_id"),queryBillOrderBean)); return result; } + + + @RequestMapping(value = "/act",method = RequestMethod.GET) + public JSONObject getIndexAct(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device){ + return actMonDelaySettleService.getActNotice(device); + } + + @RequestMapping(value = "/act/mondelay/desc", method = RequestMethod.GET) + public ModelAndView getActDetail(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { + ModelAndView mav = new ModelAndView("activity/mondelay/mondelay"); + mav.addAllObjects(actMonDelaySettleService.getActDetail(device)); + return mav; + } + }