master
commit
e135508572
@ -1,2 +1,2 @@ |
|||||||
fileUrl=/home/project/hsg/filesystem |
fileUrl=/home/project/youtao/filesystem |
||||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
cmsPath=/home/project/youtao/filesystem/cmsPath |
||||||
|
@ -1,48 +1,41 @@ |
|||||||
package com.hfkj.controller.notify; |
package com.hfkj.controller.notify; |
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject; |
import com.alibaba.fastjson.JSONObject; |
||||||
import com.hfkj.service.taobao.TaoBaoService; |
|
||||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
||||||
import io.swagger.annotations.ApiOperation; |
import io.swagger.annotations.ApiOperation; |
||||||
import org.slf4j.Logger; |
import org.slf4j.Logger; |
||||||
import org.slf4j.LoggerFactory; |
import org.slf4j.LoggerFactory; |
||||||
import org.springframework.stereotype.Controller; |
import org.springframework.stereotype.Controller; |
||||||
import org.springframework.web.bind.annotation.RequestBody; |
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.ResponseBody; |
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse; |
|
||||||
import java.io.PrintWriter; |
|
||||||
|
|
||||||
@Controller |
@Controller |
||||||
@RequestMapping(value = "/taoBaoNotify") |
@RequestMapping(value = "/taoBaoNotify") |
||||||
@Api(value = "淘宝业务通知") |
@Api(value = "淘宝业务通知") |
||||||
public class TaoBaoNotify { |
public class TaoBaoNotify { |
||||||
|
|
||||||
private static Logger log = LoggerFactory.getLogger(TaoBaoService.class); |
private static Logger log = LoggerFactory.getLogger(TaoBaoNotify.class); |
||||||
|
|
||||||
@RequestMapping(value = "/notify", method = RequestMethod.POST) |
@RequestMapping(value = "/notify", method = RequestMethod.GET) |
||||||
@ApiOperation(value = "回调") |
@ApiOperation(value = "回调") |
||||||
@ResponseBody |
@ResponseBody |
||||||
public void notify(@RequestBody String reqBodyStr, HttpServletResponse response) { |
public void notify(@RequestParam("code") String code) { |
||||||
try { |
try { |
||||||
|
|
||||||
JSONObject dataObject = JSONObject.parseObject(reqBodyStr, JSONObject.class); |
System.out.println("============token回调任务Start============="); |
||||||
|
System.out.println("============token回调任务code=============" + code); |
||||||
log.info("============淘宝回调任务Start============="); |
JSONObject object = new JSONObject(); |
||||||
log.info("淘宝-回调参数: " + dataObject); |
object.put("code", code); |
||||||
log.info("============淘宝回调任务End============="); |
// JSONObject jsonObject = TaoBaoService.getToken(code);
|
||||||
|
// if (jsonObject.getBoolean("success")) {
|
||||||
|
// String token = jsonObject.getString("token_result");
|
||||||
|
// JSONObject tokenResult = JSONObject.parseObject(token);
|
||||||
|
// System.out.println("============token回调任务jsonObject=============" + tokenResult);
|
||||||
|
// }
|
||||||
|
|
||||||
response.setCharacterEncoding("UTF-8"); |
|
||||||
response.setContentType("text/html;charset=utf-8"); |
|
||||||
PrintWriter writer= response.getWriter(); |
|
||||||
writer.write("SUCCESS"); |
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) { |
} catch (Exception e) { |
||||||
log.error("WechatPayController --> wechatNotify() error!", e); |
log.error("TaoBaoNotify --> notify() error!", e); |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,2 +1,2 @@ |
|||||||
fileUrl=/home/project/hsg/filesystem |
fileUrl=/home/project/youtao/filesystem |
||||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
cmsPath=/home/project/youtao/filesystem/cmsPath |
||||||
|
@ -0,0 +1,11 @@ |
|||||||
|
filesystem=/home/project/youtao/filesystem |
||||||
|
domain=https://yuanqiyoutao.com |
||||||
|
|
||||||
|
taoBaoPostUrl = https://eco.taobao.com/router/rest |
||||||
|
taoBaoAppKey = 34807616 |
||||||
|
taoBaoAppSecret = f04baedca9cd794665dfa04a2fcbfd86 |
||||||
|
|
||||||
|
|
||||||
|
meiTuanPostUrl = https://openapi.meituan.com/api/ |
||||||
|
meiTuanAppKey = d876dc3766053f3cde609e5f11a26aba |
||||||
|
meiTuanAppSecret = 7cdb8439a4c3fae7a092705bde95d4ef |
Loading…
Reference in new issue