Commit 9cd5930b by ping.wu

CustomerClient 修改

parent 124da5f5
......@@ -90,7 +90,7 @@ public interface CouponService {
/**
* 获取卡券服务麦咖啡商户密钥
*/
String getMCCafeAppSecret(String partnerId);
// String getMCCafeAppSecret(String partnerId);
/**
* 通过code校验券是否存在,返回商品券信息pid、price、code
......
......@@ -28,7 +28,7 @@ public interface UserService {
/**
* 获取用户手机号一键授权登陆
*/
BaseResponse<UserLoginVo> getPhoneNumber(GetPhoneNumberVo phoneNumberVo);
// BaseResponse<UserLoginVo> getPhoneNumber(GetPhoneNumberVo phoneNumberVo);
/**
* 发送验证码信息
......@@ -38,45 +38,45 @@ public interface UserService {
/**
* 用户通过手机号注册
*/
BaseResponse registerByMobile(RegisterByMobileVo registerByMobileVo);
// BaseResponse registerByMobile(RegisterByMobileVo registerByMobileVo);
/**
* 用户修改手机号
*/
BaseResponse editMobile(EditMobileVo editMobileVo);
// BaseResponse editMobile(EditMobileVo editMobileVo);
/**
* 获取用户收获地址
*/
BaseResponse getDeliveryAddress(QueryDeliveryAddressVo queryDeliveryAddressVo);
// BaseResponse getDeliveryAddress(QueryDeliveryAddressVo queryDeliveryAddressVo);
/**
* 保存用户收货地址
*/
BaseResponse addDeliveryAddress(AddDeliveryAddressVo addDeliveryAddressVo);
// BaseResponse addDeliveryAddress(AddDeliveryAddressVo addDeliveryAddressVo);
/**
* 删除用户收货地址
*/
BaseResponse deleteDeliveryAddress(DeleteDeliveryAddressVo deleteDeliveryAddressVo);
// BaseResponse deleteDeliveryAddress(DeleteDeliveryAddressVo deleteDeliveryAddressVo);
/**
* 获取用户会话sessionId 开放给其他小程序使用(拼团,会员)
*/
BaseResponse<OpenUserInfoVo> getOpenSessionid(GetUserLoginSessionIdVo getUserLoginSessionIdVo);
// BaseResponse<OpenUserInfoVo> getOpenSessionid(GetUserLoginSessionIdVo getUserLoginSessionIdVo);
/**
* 更新用户昵称接口
*/
BaseResponse updateNickName(UpdateNickNameVo updateNickNameVo);
// BaseResponse updateNickName(UpdateNickNameVo updateNickNameVo);
/**
*
*/
BaseResponse getOpenUserInfo(GetOpenUserInfoVo getOpenUserInfoVo);
// BaseResponse getOpenUserInfo(GetOpenUserInfoVo getOpenUserInfoVo);
BaseResponse<RegisterByUnionIdResponseVo> registerByUnionId(RegisterByUnionIdRequestVo registerByUnionIdRequestVo);
// BaseResponse<RegisterByUnionIdResponseVo> registerByUnionId(RegisterByUnionIdRequestVo registerByUnionIdRequestVo);
Map<String, Object> getUserInfoMapBySessionId(String sessionId);
......
......@@ -110,8 +110,8 @@ public class CouponServiceImpl implements CouponService {
private RedisCache redisCache;
@Autowired
private CardBinClient cardBinClient;
@Autowired
private CardBinMCCafeClient cardBinMCCafeClient;
// @Autowired
// private CardBinMCCafeClient cardBinMCCafeClient;
@Autowired
private StoreItemClient storeItemClient;
@Autowired
......@@ -351,21 +351,21 @@ public class CouponServiceImpl implements CouponService {
return appSecret;
}
@Override
public String getMCCafeAppSecret(String partnerId) {
// 获取券服务的密钥
String couponAppSecret = RedisUtil.getCouponAppSecret(partnerId);
String appSecret = redisCache.getValue(couponAppSecret);
if (StringUtils.isBlank(appSecret)) {
GetAppKeyResponseDto getAppKeyResponseDto = cardBinMCCafeClient.getMCCafeAppKey(GetAppKeyRequestDto.builder().partnerId(partnerId).appId(appid).build());
if (Objects.equals(String.valueOf(getAppKeyResponseDto.getStatusCode()), ResponseResult.SUCCESS.getCode())
&& getAppKeyResponseDto.getData() != null) {
redisCache.save(couponAppSecret, getAppKeyResponseDto.getData().getAppKey());
appSecret = getAppKeyResponseDto.getData().getAppKey();
}
}
return appSecret;
}
// @Override
// public String getMCCafeAppSecret(String partnerId) {
// // 获取券服务的密钥
// String couponAppSecret = RedisUtil.getCouponAppSecret(partnerId);
// String appSecret = redisCache.getValue(couponAppSecret);
// if (StringUtils.isBlank(appSecret)) {
// GetAppKeyResponseDto getAppKeyResponseDto = cardBinMCCafeClient.getMCCafeAppKey(GetAppKeyRequestDto.builder().partnerId(partnerId).appId(appid).build());
// if (Objects.equals(String.valueOf(getAppKeyResponseDto.getStatusCode()), ResponseResult.SUCCESS.getCode())
// && getAppKeyResponseDto.getData() != null) {
// redisCache.save(couponAppSecret, getAppKeyResponseDto.getData().getAppKey());
// appSecret = getAppKeyResponseDto.getData().getAppKey();
// }
// }
// return appSecret;
// }
/**
* key = 活动code , value = 返回是否匹配点餐方式
......
package cn.freemud.service.thirdparty;
import cn.freemud.aop.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.BuryingPointBigDto;
import cn.freemud.entities.dto.BuryingPointResDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @program: micro_progeram_service
* @description: 大数据
* @author: xinqi.wang
* @create: 2019-02-22 11:12
**/
@FeignClient(name = "BIGDATACLIENT", url = "${saas.bigdataclient.feign.url}")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface BigDataFeiginClient {
@PostMapping("/collector/v2/buryPoint")
public BuryingPointResDto syncLoginData(BuryingPointBigDto buryingPointBigDto);
}
\ No newline at end of file
//package cn.freemud.service.thirdparty;
//
//import cn.freemud.aop.IgnoreFeignLogAnnotation;
//import cn.freemud.constant.ResponseCodeConstant;
//import cn.freemud.constant.ResponseCodeKeyConstant;
//import cn.freemud.entities.dto.BuryingPointBigDto;
//import cn.freemud.entities.dto.BuryingPointResDto;
//import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//
///**
// * @program: micro_progeram_service
// * @description: 大数据
// * @author: xinqi.wang
// * @create: 2019-02-22 11:12
// **/
//@FeignClient(name = "BIGDATACLIENT", url = "${saas.bigdataclient.feign.url}")
//@RequestMapping(produces = {"application/json;charset=UTF-8"})
//public interface BigDataFeiginClient {
//
// @PostMapping("/collector/v2/buryPoint")
// public BuryingPointResDto syncLoginData(BuryingPointBigDto buryingPointBigDto);
//
//
//}
//
\ No newline at end of file
package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.BatchQueryActivityInfoRequestDto;
import cn.freemud.entities.dto.BatchQueryActivityInfoResponseDto;
import cn.freemud.entities.dto.GetAppKeyRequestDto;
import cn.freemud.entities.dto.GetAppKeyResponseDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
//测试环境:http://115.159.65.101:8082 生产环境:https://onlinecoupon.sandload.cn
@FeignClient(name = "CARDBINMCCafeCLIENT",url="fff")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface CardBinMCCafeClient {
/**
* 获取麦咖啡券码密钥
* @param requestDto
* @return
*/
@PostMapping("/mccafe/getAppKey")
GetAppKeyResponseDto getMCCafeAppKey(GetAppKeyRequestDto requestDto);
/**
* 麦咖啡活动信息批量查询
* @param requestDto
* @return
*/
@PostMapping(value = "/mccafe/batchQueryActivityInfo")
BatchQueryActivityInfoResponseDto batchQueryMCCafeActivityInfo(BatchQueryActivityInfoRequestDto requestDto);
}
//package cn.freemud.service.thirdparty;
//
//import cn.freemud.entities.dto.BatchQueryActivityInfoRequestDto;
//import cn.freemud.entities.dto.BatchQueryActivityInfoResponseDto;
//import cn.freemud.entities.dto.GetAppKeyRequestDto;
//import cn.freemud.entities.dto.GetAppKeyResponseDto;
//import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//
////测试环境:http://115.159.65.101:8082 生产环境:https://onlinecoupon.sandload.cn
//@FeignClient(name = "CARDBINMCCafeCLIENT",url="fff")
//@RequestMapping(produces = {"application/json;charset=UTF-8"})
//public interface CardBinMCCafeClient {
// /**
// * 获取麦咖啡券码密钥
// * @param requestDto
// * @return
// */
// @PostMapping("/mccafe/getAppKey")
// GetAppKeyResponseDto getMCCafeAppKey(GetAppKeyRequestDto requestDto);
//
// /**
// * 麦咖啡活动信息批量查询
// * @param requestDto
// * @return
// */
// @PostMapping(value = "/mccafe/batchQueryActivityInfo")
// BatchQueryActivityInfoResponseDto batchQueryMCCafeActivityInfo(BatchQueryActivityInfoRequestDto requestDto);
//
//
//}
......@@ -19,9 +19,8 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
// 测试http://115.159.65.101:8002 线上http://10.51.0.37:8002
//@FeignClient(name = "COUPON",url="${saas.couponclient.feign.url}")
@FeignClient(name = "COUPON-ADAPTER", url = "${saas.couponadapterclient.feign.url}")
@FeignClient(name = "OPEN-STORE-COUPON-ADAPTER-SERVICE", url = "${saas.couponadapterclient.feign.url}")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface CouponAdapterClient {
......
......@@ -20,40 +20,40 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
// 测试http://115.159.65.101:8002 线上http://10.51.0.37:8002
@FeignClient(name = "COUPON",url="${saas.couponadapterclient.feign.url}")
@FeignClient(name = "OPEN-STORE-COUPON-ADAPTER-SERVICE",url="${saas.couponadapterclient.feign.url}")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface CouponClient {
/**
* 领取优惠券
*/
@PostMapping("/coupon/create")
CouponBaseResponseDto create(CouponCreateDto couponCreateDto);
/**
* 查询用户优惠券列表
*/
@PostMapping("/coupon/list")
CouponListResponseDto list(CouponListDto couponListDto);
/**
* 优惠券核销
*/
@Deprecated
@PostMapping("/coupon/verification")
CouponBaseResponseDto verification(CouponVerificationDto couponVerificationDto);
/**
* 核销验证接口
*/
@PostMapping("/check/user/coupon")
CouponBaseResponseDto verifyCheck(VerifyCheckRequestDto verifyCheckRequestDto);
/**
* 核销成功通知接口
*/
@PostMapping("/coupon/verification/notice")
CouponBaseResponseDto verifyNotice(VerifyNoticeRequestDto verifyNoticeRequestDto);
// /**
// * 领取优惠券
// */
// @PostMapping("/coupon/create")
// CouponBaseResponseDto create(CouponCreateDto couponCreateDto);
//
// /**
// * 查询用户优惠券列表
// */
// @PostMapping("/coupon/list")
// CouponListResponseDto list(CouponListDto couponListDto);
//
// /**
// * 优惠券核销
// */
// @Deprecated
// @PostMapping("/coupon/verification")
// CouponBaseResponseDto verification(CouponVerificationDto couponVerificationDto);
//
// /**
// * 核销验证接口
// */
// @PostMapping("/check/user/coupon")
// CouponBaseResponseDto verifyCheck(VerifyCheckRequestDto verifyCheckRequestDto);
//
// /**
// * 核销成功通知接口
// */
// @PostMapping("/coupon/verification/notice")
// CouponBaseResponseDto verifyNotice(VerifyNoticeRequestDto verifyNoticeRequestDto);
/**
* 麦咖啡校验券是否可用
......
package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.CouponCodeResponseDto;
import cn.freemud.entities.dto.CouponCodeVerificationDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
@FeignClient(name = "COUPON",url="${saas.couponofflineclient.feign.url}")
public interface CouponOfflineClient {
@PostMapping("/api")
CouponCodeResponseDto verification(CouponCodeVerificationDto couponCodeVerificationDto);
}
//package cn.freemud.service.thirdparty;
//
//import cn.freemud.entities.dto.CouponCodeResponseDto;
//import cn.freemud.entities.dto.CouponCodeVerificationDto;
//import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.web.bind.annotation.PostMapping;
//
//@FeignClient(name = "COUPON",url="${saas.couponofflineclient.feign.url}")
//public interface CouponOfflineClient {
//
// @PostMapping("/api")
// CouponCodeResponseDto verification(CouponCodeVerificationDto couponCodeVerificationDto);
//}
......@@ -26,10 +26,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
@FeignClient(name = "customer-application-service",url = "${saas.newcustomerclient.feign.url}")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface CustomerApplicationClient {
@PostMapping(value = "/membercard/getPaidRule")
BaseResponse<GetPaidRuleResponseDto> getPaidRule(GetPaidRuleRequestDto getPaidRuleRequestDto);
@PostMapping(value = "/user/getSessionUserInfo")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR})
BaseResponse<CustomerInfoVo>getSessionUserInfo(GetSessionUserInfoDto getSessionUserInfoDto);
}
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @Title: CustomerExtendClient
* @Package cn.freemud.service.thirdparty
* @Description:
* @author: song.cai
* @date: 2019/2/20 16:42
* @version V1.0
* @Copyright: 2019 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.*;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@FeignClient(name = "CUSTOMER-SERVICE", url = "${saas.customerclient.feign.url}")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface CustomerClient {
/**
* 根据聚道注册会员
*/
@PostMapping(value = "/customerservice/registerByChannel")
MemberRegisterResponseDto registerByChannel(@RequestBody MemberRegisterRequestDto memberRegisterRequestDto);
/**
* 根据渠道信息查询顾客信息
*/
@PostMapping(value = "/customerservice/getMemberByChannel")
GetMemberInfoByChannelResponseDto getMemberInfoByChannel(@RequestBody GetMemberInfoByChannelRequestDto getMemberInfoByChannelRequestDto);
/**
* 修改unionid
*/
@PostMapping(value = "/customerservice/updateMemberChannel")
JSONObject updateUserUnionId(@RequestBody UpdateMemUnionIdRequestDto updateMemUnionIdRequestDto);
/**
* 根据会员id获取会员信息
*/
@PostMapping(value = "/customerservice/getMemberById")
GetMemberInfoByIdResponseDto getMemberInfoById(@RequestBody GetMemberInfoByIdRequestDto getMemberInfoByIdRequestDto);
/**
* 修改顾客信息
*/
@PostMapping(value = "/customerservice/update")
JSONObject editMemberInfo(@RequestBody EditMemberInfoRequestDto editMemberInfoRequestDto);
/**
* 获取用户收货地址列表
*/
@PostMapping(value = "/customerservice/address/getAddressList")
GetReceiveAddressListResponseDto getReceiveAddressList(@RequestBody GetReceiveAddressListDto getReceiveListDto);
/**
* 新增收货地址
*/
@PostMapping(value = "/customerservice/address/add")
AddReceiveAddressResponseDto addReceiveAddress(@RequestBody AddReceiveAddressDto addReceiveDto);
/**
* 修改收货地址
*/
@PostMapping(value = "/customerservice/address/update")
UpdateReceiveAddressResponseDto updateReceiveAddress(@RequestBody UpdateReceiveAddressDto updateReceiveAddressDto);
/**
* 删除收货地址
*/
@PostMapping(value = "/customerservice/address/delete")
DeleteReceiveAddressResponseDto deleteReceiveAddress(@RequestBody DeleteReceiveAddressDto deleteReceiveAddressDto);
/**
* 查询收货地址详情
*/
@PostMapping(value = "/customerservice/address/get")
QueryReceiveAddressResponseDto queryReceiveAddressById(@RequestBody QueryReceiveAddressDto queryReceiveAddressDto);
}
///**
// * All rights Reserved, Designed By www.freemud.cn
// *
// * @Title: CustomerExtendClient
// * @Package cn.freemud.service.thirdparty
// * @Description:
// * @author: song.cai
// * @date: 2019/2/20 16:42
// * @version V1.0
// * @Copyright: 2019 www.freemud.cn Inc. All rights reserved.
// * 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
// */
//
//package cn.freemud.service.thirdparty;
//
//import cn.freemud.entities.dto.*;
//import com.alibaba.fastjson.JSONObject;
//import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//
//@FeignClient(name = "CUSTOMER-SERVICE", url = "${saas.customerclient.feign.url}")
//@RequestMapping(produces = {"application/json;charset=UTF-8"})
//public interface CustomerClient {
// /**
// * 根据聚道注册会员
// */
// @PostMapping(value = "/customerservice/registerByChannel")
// MemberRegisterResponseDto registerByChannel(@RequestBody MemberRegisterRequestDto memberRegisterRequestDto);
//
// /**
// * 根据渠道信息查询顾客信息
// */
// @PostMapping(value = "/customerservice/getMemberByChannel")
// GetMemberInfoByChannelResponseDto getMemberInfoByChannel(@RequestBody GetMemberInfoByChannelRequestDto getMemberInfoByChannelRequestDto);
//
// /**
// * 修改unionid
// */
// @PostMapping(value = "/customerservice/updateMemberChannel")
// JSONObject updateUserUnionId(@RequestBody UpdateMemUnionIdRequestDto updateMemUnionIdRequestDto);
//
// /**
// * 根据会员id获取会员信息
// */
// @PostMapping(value = "/customerservice/getMemberById")
// GetMemberInfoByIdResponseDto getMemberInfoById(@RequestBody GetMemberInfoByIdRequestDto getMemberInfoByIdRequestDto);
//
// /**
// * 修改顾客信息
// */
// @PostMapping(value = "/customerservice/update")
// JSONObject editMemberInfo(@RequestBody EditMemberInfoRequestDto editMemberInfoRequestDto);
//
//
// /**
// * 获取用户收货地址列表
// */
// @PostMapping(value = "/customerservice/address/getAddressList")
// GetReceiveAddressListResponseDto getReceiveAddressList(@RequestBody GetReceiveAddressListDto getReceiveListDto);
//
// /**
// * 新增收货地址
// */
// @PostMapping(value = "/customerservice/address/add")
// AddReceiveAddressResponseDto addReceiveAddress(@RequestBody AddReceiveAddressDto addReceiveDto);
//
// /**
// * 修改收货地址
// */
// @PostMapping(value = "/customerservice/address/update")
// UpdateReceiveAddressResponseDto updateReceiveAddress(@RequestBody UpdateReceiveAddressDto updateReceiveAddressDto);
//
// /**
// * 删除收货地址
// */
// @PostMapping(value = "/customerservice/address/delete")
// DeleteReceiveAddressResponseDto deleteReceiveAddress(@RequestBody DeleteReceiveAddressDto deleteReceiveAddressDto);
//
//
// /**
// * 查询收货地址详情
// */
// @PostMapping(value = "/customerservice/address/get")
// QueryReceiveAddressResponseDto queryReceiveAddressById(@RequestBody QueryReceiveAddressDto queryReceiveAddressDto);
//}
......@@ -183,12 +183,12 @@ public class CouponServiceTest {
// System.out.println(JSON.toJSONString(responseDto));
// }
@Test
public String getAppSecret(String partner) {
String appSecret = couponService.getMCCafeAppSecret(partner);
System.out.println(appSecret);
return appSecret;
}
// @Test
// public String getAppSecret(String partner) {
// String appSecret = couponService.getMCCafeAppSecret(partner);
// System.out.println(appSecret);
// return appSecret;
// }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment