update 算法应用Service

This commit is contained in:
Lemon
2024-12-18 11:28:25 +08:00
parent ac62831a53
commit a681a5fe9c
2 changed files with 65 additions and 23 deletions

View File

@@ -0,0 +1,39 @@
package com.jsowell.api.thirdparty;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.thirdparty.platform.service.impl.ChargeAlgorithmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 算法应用Controller
*
* @author Lemon
* @Date 2024/12/17 15:20:36
*/
@Anonymous
@RestController
@RequestMapping("/chargealgorithm")
public class ChargeAlgorithmController extends BaseController {
@Autowired
private ChargeAlgorithmService chargeAlgorithmService;
@GetMapping("/pushOrderInfo/{orderCode}")
public RestApiResponse<?> pushOrderInfo(@PathVariable("orderCode") String orderCode) {
RestApiResponse<?> response = null;
try {
String result = chargeAlgorithmService.pushOrderInfo(orderCode);
response = new RestApiResponse<>(result);
}catch (Exception e) {
logger.error("算法应用推送订单信息 error, ", e);
response = new RestApiResponse<>(e);
}
return response;
}
}