| | |
| | | if ("2".equalsIgnoreCase(ios)) {
|
| | | down = DOWNURL;
|
| | | }
|
| | | if (!state.equals(wxState)) {// 不是微信返回的!
|
| | | if (state == null || !state.equals(wxState)) {// 不是微信返回的!
|
| | | // request.setAttribute("error", "1");
|
| | | return "redirect:" + down;
|
| | | }
|
| | | |
| | | if (code == null) {// 用户取消了登陆!
|
| | | return "redirect:" + down;
|
| | | }
|
| | |
| | | @RequestMapping(value = "getWebConfig", method = RequestMethod.POST)
|
| | | public void getWebConfig(AcceptData acceptData, String url, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | if (url != null && (url.contains("s.click") || url.contains("taobao.com") || url.contains("tmall.com"))) {
|
| | | if (url != null && (url.contains("s.click") || url.contains("taobao.com") || url.contains("tmall.com")|| url.contains("m.tb.cn"))) {
|
| | | data.put("baichuan", true);// 采用阿里百川的方式加载webview
|
| | | data.put("goodsDetail", true);// 需要拦截商品详情
|
| | | } else {
|
| | |
| | | BigDecimal money = notify.getMoney();
|
| | | switch (t) {
|
| | | case HongBaoV2.TYPE_ZIGOU:
|
| | | userNotificationService.orderFanliStatisticed(uid, orderId, goodsCount, MsgOrderDetail.STATE_FK,
|
| | | null, money);
|
| | | userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, commonOrder.getPayment(),
|
| | | money, goodsCount, state);
|
| | | break;
|
| | |
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.exception.PushException;
|
| | | import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgOrderDetailService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserOrderMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.push.PushService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.factory.msg.MsgOrderDetailFactory;
|
| | |
|
| | | @Service
|
| | |
| | | @Resource
|
| | | private MsgOrderDetailService msgOrderDetailService;
|
| | |
|
| | | @Resource
|
| | | private PushService pushService;
|
| | |
|
| | | @Override
|
| | | public void orderFanLiStatistic(Long uid, String orderId, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createFanLiOrder(uid, orderId, goodsCount, orderState, payMoney,
|
| | | money, null);
|
| | | try {
|
| | |
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (payMoney == null || payMoney.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getFanliOrderStatisticedTitle(),
|
| | | Constant.znxConfig.getFanliOrderStatisticedMsg().replace("[订单号]", orderId), null, null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | private HongBaoV2Service hongBaoV2Service;
|
| | |
|
| | | @Override
|
| | | public void processOrder(Map<String, List<TaoBaoOrder>> orders) {
|
| | | public synchronized void processOrder(Map<String, List<TaoBaoOrder>> orders) {
|
| | | List<TaoBaoUnionConfig> configList = taoBaoUnionConfigService.getConfigByTypeCache(PidUser.TYPE_FANLI_ANDROID);
|
| | |
|
| | | // 分离出返利订单与分享赚订单
|
| | |
| | | JSONObject json = new JSONObject();
|
| | | json.put("type", "ZNX");
|
| | | json.put("content", contentJson);
|
| | | json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
|
| | | json.put("miPushUrl", String.format("%s.ui.main.MainActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName()));
|
| | |
|
| | | // 版本推送
|
| | |
| | | JSONObject json = new JSONObject();
|
| | | json.put("type", "ZNX");
|
| | | json.put("content", contentJson);
|
| | | json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
|
| | | json.put("miPushUrl", String.format("%s.ui.main.MainActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName()));
|
| | |
|
| | | // 版本推送
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderFanliStatisticed(Long uid, String orderId, int goodsCount, int orderState, BigDecimal payMoney,
|
| | | BigDecimal money) {
|
| | | if (Constant.IS_TEST)
|
| | | return;
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getFanliOrderStatisticedTitle(),
|
| | | Constant.znxConfig.getFanliOrderStatisticedMsg().replace("[订单号]", orderId), null, null);
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void tiChengStatisticed(Long uid, String orderId, BigDecimal money) {
|
| | | if (Constant.IS_TEST)
|
| | | return;
|
| | |
| | | */
|
| | | public void tiChengShareRecieved(Long uid, int orderCount, int goodsCount, BigDecimal balance, BigDecimal money);
|
| | |
|
| | | /**
|
| | | * 订单被统计
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param goodsCount-商品数
|
| | | * @param orderState-订单状态
|
| | | * @param payMoney-付款金额
|
| | | * @param money-佣金
|
| | | */
|
| | | public void orderFanliStatisticed(Long uid, String orderId, int goodsCount, int orderState, BigDecimal payMoney,
|
| | | BigDecimal money);
|
| | |
|
| | | /**
|
| | | * 提成订单被统计
|
| | |
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class PushUtils {
|
| | | |
| | |
|
| | | @Resource
|
| | | private PushService pushService;
|
| | |
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | public static int allPushXiaoMi(MessageInfo info, JSONObject json, PushRecord pushRecord) throws Exception {
|
| | | |
| | | if(Constant.IS_TEST)
|
| | |
|
| | | if (Constant.IS_TEST)
|
| | | return 1;
|
| | |
|
| | | |
| | | JSONObject mapXm = JSONObject.fromObject(json);
|
| | | String android = XiaoMiPushUtil.allPushAndroidForXM(info, mapXm);
|
| | |
|
| | |
| | | * @return
|
| | | */
|
| | | public static int singlePushXiaoMi(MessageInfo info, JSONObject json, PushRecord pushRecord) {
|
| | | if(Constant.IS_TEST)
|
| | | if (Constant.IS_TEST)
|
| | | return 1;
|
| | |
|
| | | JSONObject mapXm = JSONObject.fromObject(json);
|
| | |
| | | {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.dg.vegas.tlj.instance.report");
|
| | | JSONArray array=new JSONArray();
|
| | | array.add("ZrIIvF%2Fnd7SlL5Bg59eTK6J7%2BkHL3AEW");
|
| | | map.put("rights_id", array.toString());
|
| | | map.put("rights_id", "ZrIIvF%2Fnd7SlL5Bg59eTK6J7%2BkHL3AEW");
|
| | |
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey( TaoBaoConstant.TAOBAO_AUTH_APPKEY);
|