嗨森逛服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hai-server/hai-bweb/src/main/java/com/bweb/controller/HighTestController.java

1 lines
5.5 KiB

package com.bweb.controller; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.WxUtils; import com.hai.config.*; import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.*; import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantStoreModel; import com.hai.model.ResponseData; import com.hai.model.ResultProfitSharing; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.util.EntityUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Controller; 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 javax.net.ssl.SSLContext; import java.io.FileInputStream; import java.math.BigDecimal; import java.security.KeyStore; import java.util.*; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private HltUnionCardVipService hltUnionCardVipService; @Resource private HighTestService highTestService; // @RequestMapping(value = "/getBackendToken", method = RequestMethod.GET) // @ResponseBody // @ApiOperation(value = "获取访问令牌backendToken") // public ResponseData getBackendToken() { // try { // return ResponseMsgUtil.success(null); // } catch (Exception e) { // log.error("HighOrderController --> getBackendToken() error!", e); // return ResponseMsgUtil.exception(e); // } // } // // @RequestMapping(value = "/TCheckEMsgUnionCardVipRights", method = RequestMethod.GET) // @ResponseBody // @ApiOperation(value = "请求会员体系") // public ResponseData TCheckEMsgUnionCardVipRights(@RequestParam(name = "phone", required = true) String phone) { // try { // JSONObject consumptionRecord = HuiLianTongUnionCardConfig.TCheckEMsgUnionCardVipRights(phone); // JSONObject cardInfoObject = HuiLianTongUnionCardConfig.resolveResponse(consumptionRecord.getString("data")); // return ResponseMsgUtil.success(cardInfoObject); // } catch (Exception e) { // log.error("HighOrderController --> getBackendToken() error!", e); // return ResponseMsgUtil.exception(e); // } // } // // // @RequestMapping(value = "/GetMembershipLevel", method = RequestMethod.GET) // @ResponseBody // @ApiOperation(value = "请求会员体系") // public ResponseData GetMembershipLevel(@RequestParam(name = "phone", required = true) String phone , @RequestParam(name = "regionId", required = true) String regionId ) { // try { // return ResponseMsgUtil.success(hltUnionCardVipService.GetMembershipLevel(phone , regionId)); // } catch (Exception e) { // log.error("HighOrderController --> getBackendToken() error!", e); // return ResponseMsgUtil.exception(e); // } // } // // // @RequestMapping(value="/resolveResponse",method = RequestMethod.GET) // @ResponseBody // @ApiOperation(value = "解析") // public ResponseData resolveResponse( // @RequestParam(name = "data", required = false) String data // ) { // try { // JSONObject cardInfoObject = HuiLianTongUnionCardConfig.resolveResponse(data); // return ResponseMsgUtil.success(cardInfoObject); // // } catch (Exception e) { // log.error("getUserByTelephone",e); // return ResponseMsgUtil.exception(e); // } // } // // @RequestMapping(value="/getReadFile",method = RequestMethod.GET) // @ResponseBody // @ApiOperation(value = "存入用户信息") // public ResponseData getReadFile() { // try { // highTestService.getReadFile(); // return ResponseMsgUtil.success(null); // } catch (Exception e) { // log.error("getUserByTelephone",e); // return ResponseMsgUtil.exception(e); // } // } // @RequestMapping(value="/getUserDiscount",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "赠送优惠券") public ResponseData getUserDiscount(@RequestParam(name = "id", required = true) Long id) { try { highTestService.getUserDiscount(id); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("getUserByTelephone",e); return ResponseMsgUtil.exception(e); } } }