mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
新增 软杰道闸系统对接
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package com.jsowell.ruanjie;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.dto.ruanjie.UseCouponDTO;
|
||||
import com.jsowell.thirdparty.ruanjie.service.RJService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 软杰controller
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2023/9/22 9:00
|
||||
*/
|
||||
@Anonymous
|
||||
@RestController
|
||||
@RequestMapping("/ruanjie")
|
||||
public class RJController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private RJService rjService;
|
||||
|
||||
@PostMapping("/useCoupon")
|
||||
public RestApiResponse<?> useCoupon(@RequestBody UseCouponDTO dto) {
|
||||
logger.info("软杰--使用优惠券 params:{}", JSON.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = rjService.useCoupon(dto);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (Exception e) {
|
||||
logger.error("软杰--使用优惠券 error, ", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("软杰--使用优惠券 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user