|
|
@ -10,9 +10,12 @@ import com.hai.common.exception.SysCode; |
|
|
|
import com.hai.common.security.SessionObject; |
|
|
|
import com.hai.common.security.SessionObject; |
|
|
|
import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
import com.hai.config.HuiLianTongConfig; |
|
|
|
import com.hai.config.HuiLianTongConfig; |
|
|
|
|
|
|
|
import com.hai.dao.HighGasOrderPushMapper; |
|
|
|
import com.hai.entity.HighCoupon; |
|
|
|
import com.hai.entity.HighCoupon; |
|
|
|
|
|
|
|
import com.hai.entity.HighGasOrderPush; |
|
|
|
import com.hai.entity.HighMerchant; |
|
|
|
import com.hai.entity.HighMerchant; |
|
|
|
import com.hai.entity.HighUser; |
|
|
|
import com.hai.entity.HighUser; |
|
|
|
|
|
|
|
import com.hai.enum_type.OrderPushType; |
|
|
|
import com.hai.model.ResponseData; |
|
|
|
import com.hai.model.ResponseData; |
|
|
|
import com.hai.model.UserInfoModel; |
|
|
|
import com.hai.model.UserInfoModel; |
|
|
|
import com.hai.service.HighOpenApiService; |
|
|
|
import com.hai.service.HighOpenApiService; |
|
|
@ -52,6 +55,9 @@ public class HighOpenApiController { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private HighUserService highUserService; |
|
|
|
private HighUserService highUserService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private HighGasOrderPushMapper highGasOrderPushMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private SecConfigService secConfigService; |
|
|
|
private SecConfigService secConfigService; |
|
|
|
|
|
|
|
|
|
|
@ -186,6 +192,16 @@ public class HighOpenApiController { |
|
|
|
|
|
|
|
|
|
|
|
// 商户派发电子券
|
|
|
|
// 商户派发电子券
|
|
|
|
JSONObject returnParam = HuiLianTongConfig.couJointDist(token, object.getString("orderNo"), object.getString("couTypeCode"), object.getInteger("distCouCount"), object.getString("phone"), object.getString("thirdUserId")); |
|
|
|
JSONObject returnParam = HuiLianTongConfig.couJointDist(token, object.getString("orderNo"), object.getString("couTypeCode"), object.getInteger("distCouCount"), object.getString("phone"), object.getString("thirdUserId")); |
|
|
|
|
|
|
|
System.out.println("派发电子券" + returnParam); |
|
|
|
|
|
|
|
// 推送记录
|
|
|
|
|
|
|
|
HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); |
|
|
|
|
|
|
|
highGasOrderPush.setType(OrderPushType.type6.getType()); |
|
|
|
|
|
|
|
highGasOrderPush.setOrderNo(object.getString("orderNo")); |
|
|
|
|
|
|
|
highGasOrderPush.setCreateTime(new Date()); |
|
|
|
|
|
|
|
highGasOrderPush.setCode(returnParam.getString("result")); |
|
|
|
|
|
|
|
highGasOrderPush.setRequestContent(JSONObject.toJSONString(object)); |
|
|
|
|
|
|
|
highGasOrderPush.setReturnContent(returnParam.toJSONString()); |
|
|
|
|
|
|
|
highGasOrderPushMapper.insert(highGasOrderPush); |
|
|
|
if (returnParam == null || !returnParam.getString("result").equals("success")) { |
|
|
|
if (returnParam == null || !returnParam.getString("result").equals("success")) { |
|
|
|
log.error("HighOpenApiController -> couJointDist() error!","商户派发电子券失败"); |
|
|
|
log.error("HighOpenApiController -> couJointDist() error!","商户派发电子券失败"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户派发电子券失败"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户派发电子券失败"); |
|
|
|