diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/web/StatusCheckController.java b/src/main/java/au/com/royalpay/payment/manage/dev/web/StatusCheckController.java deleted file mode 100644 index 4a7a1f67c..000000000 --- a/src/main/java/au/com/royalpay/payment/manage/dev/web/StatusCheckController.java +++ /dev/null @@ -1,40 +0,0 @@ -package au.com.royalpay.payment.manage.dev.web; - -import au.com.royalpay.payment.manage.support.wechatclients.KangaLandWechatApiImpl; -import au.com.royalpay.payment.manage.support.wechatclients.RedpackWechatApiImpl; -import au.com.royalpay.payment.tools.connections.mpsupport.beans.WxOauthType; -import au.com.royalpay.payment.tools.env.PlatformEnvironment; -import au.com.royalpay.payment.tools.env.RequestEnvironment; -import au.com.royalpay.payment.tools.exceptions.ForbiddenException; -import au.com.royalpay.payment.tools.permission.wechat.WechatMapping; -import com.alibaba.fastjson.JSONObject; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -/** - * Created by davep on 2016-09-04. - */ -@RestController -@RequestMapping("/dev/status") -public class StatusCheckController { - - @RequestMapping(method = RequestMethod.GET) - public JSONObject checkSystemStatus(){ - return new JSONObject(); - } - - @WechatMapping(value = "wx_test",method = RequestMethod.GET,oauthType = WxOauthType.USERINFO,addonMp = {RedpackWechatApiImpl.class,KangaLandWechatApiImpl.class}) - public void checkWxTest(){ - - } - - @RequestMapping(value = "/stopping",method = RequestMethod.PUT) - public void beforeStop(){ - if (RequestEnvironment.getClientIp().equals("127.0.0.1")){ - PlatformEnvironment.getEnv().taskEnabled(false); - }else{ - throw new ForbiddenException(); - } - } -} diff --git a/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/ActRedPackServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/ActRedPackServiceImpl.java index 01d672b37..bd62b227d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/ActRedPackServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/ActRedPackServiceImpl.java @@ -187,7 +187,7 @@ public class ActRedPackServiceImpl implements ActRedPackService { wechatRedpack.setWishing(wishing); wechatRedpack.setRemark("开业红包活动"); logger.info("==============Send RedPacket Service:" + wechatRedpack.toString() + "========="); - String redPacketId = redpackApi.sendRedpack(wechatRedpack).getString("redpack_id"); + String redPacketId = redpackApi.sendRedpack(wechatRedpack).getString("out_biz_no"); prizeDetail.put("red_packet_id", redPacketId); prizeDetail.put("status", 1); actRedPacketsCustomerOrdersMapper.update(prizeDetail); diff --git a/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/PartnerLMServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/PartnerLMServiceImp.java index 8940e1214..a7a00d2f0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/PartnerLMServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/PartnerLMServiceImp.java @@ -274,7 +274,7 @@ public class PartnerLMServiceImp implements PartnerLMService { String rpOpenId = customerRelation.getString(redpackApi.getOpenIdKey()); wechatRedpack.setSendName(sendName).setOpenId(rpOpenId).setActName(actName) .setRemark("商家激励计划").setAmount(new BigDecimal(luckyMoney).setScale(2, ROUND_DOWN)).setWishing(wishing).setNotifyUrl(notifyUrl); - String redPacketId = redpackApi.sendRedpack(wechatRedpack).getString("redpack_id"); + String redPacketId = redpackApi.sendRedpack(wechatRedpack).getString("out_biz_no"); send.put("red_packet_id", redPacketId); actPartnerLMLogMapper.saveLog(send); } diff --git a/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/RedpackServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/RedpackServiceImpl.java index 807dbde2c..c8338c05c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/RedpackServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/redpack/core/impls/RedpackServiceImpl.java @@ -127,12 +127,12 @@ public class RedpackServiceImpl implements RedpackService { } try { WechatRedpack redpack = newRedpack(config, orderOpenId); - String redpackId = mpWechatApiProvider.getApi("Redpack").sendRedpack(redpack).getString("redpack_id"); + String redpackId = mpWechatApiProvider.getApi("Redpack").sendRedpack(redpack).getString("out_biz_no"); JSONObject obj = redpack.toJSON(); - obj.put("redpack_id",redpackId); + obj.put("redpack_id", redpackId); obj.put("create_time", new Date()); obj.put("status", 0); - obj.put("order_id",orderId); + obj.put("order_id", orderId); obj.put("client_id", clientId); redPackLogMapper.saveLog(obj); } catch (RedPackException e) { @@ -186,7 +186,7 @@ public class RedpackServiceImpl implements RedpackService { for (int i = 0; i < redpack_counts; i++) { BigDecimal amount = amountFrom.equals(amountTo) ? amountFrom : amountFrom.add(BigDecimal.valueOf(RandomUtils.nextInt(amountTo.subtract(amountFrom).multiply(hundred).intValue())).divide(hundred, - 2, BigDecimal.ROUND_DOWN)); + 2, BigDecimal.ROUND_DOWN)); JSONObject prize = new JSONObject(); String prefix = DateFormatUtils.format(new Date(), "yyyyMMddHHmmssSSS"); String red_packet_order_id = prefix + RandomStringUtils.random(28 - prefix.length(), true, true); @@ -269,8 +269,8 @@ public class RedpackServiceImpl implements RedpackService { ran -= prizeType.getIntValue("weight"); if (ran < 0) { String lock = Long.toString(System.currentTimeMillis(), 36) + RandomStringUtils.random(5, true, true); - int lockedCount = actPartnerLMLogMapper.lockPrize(act_id, lock, prizeType.getString("type_id"), open_id, client_id, orderId, orderAmount.doubleValue(), - new Date()); + int lockedCount = actPartnerLMLogMapper.lockPrize(act_id, lock, prizeType.getString("type_id"), open_id, client_id, orderId, + orderAmount.doubleValue(), new Date()); if (lockedCount > 0) { JSONObject invitationClient = actClientInvitationCodeMapper.getInvitationClient(act_id, client_id); if (invitationClient != null && invitationClient.getBoolean("auto_send")) { @@ -301,9 +301,9 @@ public class RedpackServiceImpl implements RedpackService { throw new RedPackException("ServerError", "Customer openid for redpack not available!"); } String rpOpenId = customerRelation.getString(redpackApi.getOpenIdKey()); - wechatRedpack.setSendName(sendName).setOpenId(rpOpenId).setActName(act.getString("act_name")) - .setRemark("店长激励计划").setAmount(totalAmount).setWishing(wishing).setNotifyUrl(null); - String redPacketId = mpWechatApiProvider.getApi("Redpack").sendRedpack(wechatRedpack).getString("redpack_id"); + wechatRedpack.setSendName(sendName).setOpenId(rpOpenId).setActName(act.getString("act_name")).setRemark("店长激励计划") + .setAmount(totalAmount).setWishing(wishing).setNotifyUrl(null); + String redPacketId = mpWechatApiProvider.getApi("Redpack").sendRedpack(wechatRedpack).getString("out_biz_no"); for (JSONObject prizeDetail : reallySend) { prizeDetail.put("red_packet_id", redPacketId); @@ -389,8 +389,8 @@ public class RedpackServiceImpl implements RedpackService { ran -= prizeType.getIntValue("weight"); if (ran < 0) { String lock = Long.toString(System.currentTimeMillis(), 36) + RandomStringUtils.random(5, true, true); - int lockedCount = actPartnerLMLogMapper.lockPrize(act_id, lock, prizeType.getString("type_id"), open_id, client_id, orderId, orderAmount.doubleValue(), - new Date()); + int lockedCount = actPartnerLMLogMapper.lockPrize(act_id, lock, prizeType.getString("type_id"), open_id, client_id, orderId, + orderAmount.doubleValue(), new Date()); if (lockedCount > 0) { JSONObject invitationClient = actClientInvitationCodeMapper.getInvitationClient(act_id, client_id); if (invitationClient != null && invitationClient.getBoolean("auto_send")) { @@ -412,8 +412,6 @@ public class RedpackServiceImpl implements RedpackService { String wishing = "恭喜获得ROYALPAY店长福利红包"; String notifyUrl = "https://mpay.royalpay.com.au/sys/lucky_money/partner/" + red_packet_order_id + "notify"; - - WechatRedpack wechatRedpack = new WechatRedpack(); JSONObject customerRelation = customerMapper.findCustomerByOpenId(open_id); MpWechatApi redpackApi = mpWechatApiProvider.getApi("Redpack"); @@ -421,9 +419,9 @@ public class RedpackServiceImpl implements RedpackService { throw new RedPackException("ServerError", "Customer openid for redpack not available!"); } String rpOpenId = customerRelation.getString(redpackApi.getOpenIdKey()); - wechatRedpack.setSendName(sendName).setOpenId(rpOpenId).setActName(actName) - .setRemark("店长激励计划").setAmount(luckyMoeny).setWishing(wishing).setNotifyUrl(notifyUrl); - String redPacketId = mpWechatApiProvider.getApi("Redpack").sendRedpack(wechatRedpack).getString("redpack_id"); + wechatRedpack.setSendName(sendName).setOpenId(rpOpenId).setActName(actName).setRemark("店长激励计划").setAmount(luckyMoeny).setWishing(wishing) + .setNotifyUrl(notifyUrl); + String redPacketId = mpWechatApiProvider.getApi("Redpack").sendRedpack(wechatRedpack).getString("out_biz_no"); prizeDetail.put("red_packet_id", redPacketId); prizeDetail.put("status", 1); actPartnerLMLogMapper.update(prizeDetail); @@ -447,9 +445,10 @@ public class RedpackServiceImpl implements RedpackService { break; } AlipayRedpack alipayRedpack = new AlipayRedpack(); - alipayRedpack.setPayeeAccount(alipayUserId).setAmount(prizeDetail.getBigDecimal("red_packet_amount")).setPayerShowName("RoyalPay福利社"). - setRemark("RoyalPay店长活动-" + (rate.intValue() > 1 ? rate.intValue() + "倍" : "") + "红包奖励" + specialDocuments); - String redPacketId = mpAlipayRedpackApi.sendRedpack(alipayRedpack).getString("redpack_id"); + alipayRedpack.setPayeeAccount(alipayUserId).setAmount(prizeDetail.getBigDecimal("red_packet_amount")).setPayerShowName("RoyalPay福利社") + .setRemark("RoyalPay店长活动-" + (rate.intValue() > 1 ? rate.intValue() + "倍" : "") + "红包奖励" + specialDocuments); + JSONObject mpAlipayJson = mpAlipayRedpackApi.sendRedpack(alipayRedpack); + String redPacketId = mpAlipayJson.getString("out_biz_no"); prizeDetail.put("red_packet_id", redPacketId); prizeDetail.put("status", 5); actPartnerLMLogMapper.update(prizeDetail); diff --git a/src/main/java/au/com/royalpay/payment/manage/task/RedPackTaskManager.java b/src/main/java/au/com/royalpay/payment/manage/task/RedPackTaskManager.java index 76bc2607b..2d022a230 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/RedPackTaskManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/RedPackTaskManager.java @@ -31,9 +31,6 @@ public class RedPackTaskManager { @Scheduled(cron = "0 0/10 * * * ?") public void updateAlipayRedPackStatus() { - - logger.info("kira---------redpack Check"); - logger.debug("kira---------redpack Check"); redpackService.updateAlipayRedPacketsStatus("3"); } diff --git a/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/events/listeners/NoticeRefundAuditListener.java b/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/events/listeners/NoticeRefundAuditListener.java index 2c06da71f..a24801b26 100644 --- a/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/events/listeners/NoticeRefundAuditListener.java +++ b/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/events/listeners/NoticeRefundAuditListener.java @@ -37,7 +37,7 @@ public class NoticeRefundAuditListener implements ApplicationListener -##Button(初审)

@@ -253,7 +252,5 @@

-##Button(分配BD后审批) -##待加 \ No newline at end of file diff --git a/src/main/ui/partner_register.html b/src/main/ui/partner_register.html index e49474948..3a5dc375a 100644 --- a/src/main/ui/partner_register.html +++ b/src/main/ui/partner_register.html @@ -269,7 +269,7 @@ - + diff --git a/src/main/ui/static/images/logo.svg b/src/main/ui/static/images/logo.svg new file mode 100644 index 000000000..c79a7dbee --- /dev/null +++ b/src/main/ui/static/images/logo.svg @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/ui/static/templates/cashier_aggregate_payment.js b/src/main/ui/static/templates/cashier_aggregate_payment.js index 78c904f00..2ab527f50 100644 --- a/src/main/ui/static/templates/cashier_aggregate_payment.js +++ b/src/main/ui/static/templates/cashier_aggregate_payment.js @@ -174,7 +174,6 @@ $(function () { data.customerrate = true; } data.coupons = dataCache.coupons; - data.price = data.price*100; $.ajax({ url: '/partner/cashiers/payment/'+ window.client_moniker +'/'+window.cashier_id+'/orders/', method: 'post',