|
|
|
@ -12,6 +12,7 @@ import com.hfkj.model.ResponseData; |
|
|
|
|
import com.hfkj.qianzhu.channel.QianZhuService; |
|
|
|
|
import com.hfkj.service.CommonService; |
|
|
|
|
import com.hfkj.service.goods.BsOrderGoodsService; |
|
|
|
|
import com.hfkj.service.hlt.HuiLianTongUnionCardService; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
@ -40,6 +41,28 @@ public class CommonController { |
|
|
|
|
@Resource |
|
|
|
|
private BsOrderGoodsService bsOrderGoodsService; |
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/test", method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "test") |
|
|
|
|
public ResponseData test() { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
JSONObject refundObj = HuiLianTongUnionCardService.refund("R240805090735776", "240803201355633339"); |
|
|
|
|
if (!refundObj.getString("respCode").equals("0000")) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, refundObj.getString("respMessage")); |
|
|
|
|
} |
|
|
|
|
JSONObject consumptionResult = HuiLianTongUnionCardService.resolveResponse(refundObj.getString("data")); |
|
|
|
|
if (!(consumptionResult.getBoolean("success") || Objects.equals(consumptionResult.getString("message"), "原交易已撤销,不可再次操作"))) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!"+consumptionResult.getString("message")); |
|
|
|
|
} |
|
|
|
|
return ResponseMsgUtil.success(consumptionResult); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighUserCardController --> oilCardRefund() error!", e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getAllCity", method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "查询所有城市") |
|
|
|
|