From 3a0cd34915a92255beab1372f9ae89233041c87d Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 13 Jun 2023 10:49:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=9F=A5=E8=AF=A2=E9=97=A8?= =?UTF-8?q?=E5=BA=97=E5=92=8C=E7=A7=AF=E5=88=86=E8=BF=94=E5=88=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cweb/controller/TestController.java | 65 +++++---- service/pom.xml | 7 + .../java/com/hfkj/unipush/UniPushService.java | 125 ++++++++++++++++++ 3 files changed, 171 insertions(+), 26 deletions(-) create mode 100644 service/src/main/java/com/hfkj/unipush/UniPushService.java diff --git a/cweb/src/main/java/com/cweb/controller/TestController.java b/cweb/src/main/java/com/cweb/controller/TestController.java index 202bcd2..cc769ab 100644 --- a/cweb/src/main/java/com/cweb/controller/TestController.java +++ b/cweb/src/main/java/com/cweb/controller/TestController.java @@ -2,61 +2,48 @@ package com.cweb.controller; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.alipay.api.AlipayClient; -import com.alipay.api.DefaultAlipayClient; -import com.alipay.api.request.AlipaySystemOauthTokenRequest; -import com.alipay.api.response.AlipaySystemOauthTokenResponse; import com.hfkj.channel.alipay.utils.AlipayRequest; -import com.hfkj.channel.alipay.utils.AlipayUtils; -import com.hfkj.channel.lakala.*; +import com.hfkj.channel.lakala.LaKaLaLedgerService; +import com.hfkj.channel.lakala.LaKaLaWalletService; import com.hfkj.channel.lakala.config.LaKaLaConfig; import com.hfkj.channel.saas.SaasActivityService; import com.hfkj.channel.saas.SaasMerService; -import com.hfkj.channel.saas.config.SaasConfig; -import com.hfkj.channel.saas.utils.GenerateAgreementUtil; import com.hfkj.channel.saas.utils.SaasCommon; -import com.hfkj.channel.saas.saasenum.FileImgType; import com.hfkj.channel.saas.utils.SaasMerRequest; import com.hfkj.channel.weixin.WeiXinMerService; import com.hfkj.channel.weixin.utils.WxUtils; import com.hfkj.channel.weixin.utils.sdk.WXPayConstants; import com.hfkj.common.utils.DateUtil; import com.hfkj.common.utils.HttpsUtils; -import com.hfkj.common.utils.ImageUtils; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.config.CommonSysConst; import com.hfkj.config.device.SoundService; import com.hfkj.config.mqtt.MqttProviderService; -import com.hfkj.dao.BsStoreMapper; -import com.hfkj.dao.BsStoreMapperExt; import com.hfkj.entity.*; import com.hfkj.model.MerBasisModel; import com.hfkj.model.ResponseData; import com.hfkj.service.*; -import com.hfkj.sysenum.*; +import com.hfkj.sysenum.MerStatusEnum; +import com.hfkj.sysenum.PlatformTypeEnum; +import com.hfkj.sysenum.StoreCreateTypeEnum; +import com.hfkj.sysenum.StoreStatusEnum; import com.hfkj.tts.HWYunSisService; -import freemarker.template.Configuration; -import freemarker.template.Template; -import freemarker.template.TemplateException; +import com.hfkj.unipush.UniPushService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import net.coobird.thumbnailator.Thumbnails; -import org.apache.commons.collections4.ListUtils; import org.apache.commons.collections4.MapUtils; -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; +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.bind.annotation.ResponseBody; import javax.annotation.Resource; -import java.io.*; +import java.io.File; import java.math.BigDecimal; import java.util.*; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.function.Consumer; @Controller @RequestMapping(value = "/test") @@ -648,7 +635,7 @@ public class TestController { @RequestMapping(value="/ttsCustomDemo",method = RequestMethod.GET) @ResponseBody - @ApiOperation(value = "updateReview") + @ApiOperation(value = "ttsCustomDemo") public ResponseData ttsCustomDemo() { try { @@ -660,4 +647,30 @@ public class TestController { } } + + @RequestMapping(value="/uniPush",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "uniPush") + public ResponseData uniPush(@RequestParam(name = "cid", required = true) String cid) { + try { + + + JSONObject object = new JSONObject(); + + object.put("cid" , cid); + object.put("title" , "测试测试"); + object.put("body" , "惠支付收款88.8元"); + + UniPushService.androidTemplate(object); + + + + return ResponseMsgUtil.success("audience"); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/service/pom.xml b/service/pom.xml index 91fd332..395fc6e 100644 --- a/service/pom.xml +++ b/service/pom.xml @@ -378,6 +378,11 @@ huaweicloud-java-sdk-sis 1.8.1 + + com.getui.push + restful-sdk + 1.0.0.13 +