Commit 8eba73db by 查志伟

去掉废弃代码

parent 3d93c743
//package cn.freemud.config;
//
//import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
//import lombok.extern.log4j.Log4j2;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author : xh.Z
// * @email : fisherman0510@163.com
// * @Date : 2021/4/26 下午6:21
// * @description : xxl-job 配置
// */
//@Configuration
//@Log4j2
//public class XxlJobConfig {
//
// @Value("${xxl.job.admin.addresses}")
// private String adminAddresses;
//
// @Value("${xxl.job.executor.appname}")
// private String appName;
//
// //@Value("${xxl.job.executor.ip}")
// private String ip;
//
// //@Value("${xxl.job.executor.port}")
// private int port;
//
// //@Value("${xxl.job.accessToken}")
// private String accessToken;
//
// @Value("${xxl.job.executor.logpath:/data/applogs/xxl-job/jobhandler}")
// private String logPath;
//
// @Value("${xxl.job.executor.logretentiondays:-1}")
// private int logRetentionDays;
//
//
// @Bean(initMethod = "start", destroyMethod = "destroy")
// public XxlJobSpringExecutor xxlJobExecutor() {
// XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
// xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
// xxlJobSpringExecutor.setAppName(appName);
// xxlJobSpringExecutor.setIp(ip);
// xxlJobSpringExecutor.setPort(port);
// xxlJobSpringExecutor.setAccessToken(accessToken);
// xxlJobSpringExecutor.setLogPath(logPath);
// xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
//
// return xxlJobSpringExecutor;
// }
//}
package cn.freemud.constant;
public class ExtJsonConstant {
private String FOODJSON= "{\n" +
"\"extEnable\": true,\n" +
"\"extAppid\": \"wxaf1b67249de514a3\",\n" +
"\"directCommit\": false,\n" +
"\"ext\": {\n" +
"\"appid\": \"{{appid}}\",\n" +
"\"partnerId\": \"{{partnerId}}\",\n" +
"\"name\": \"wechat\",\n" +
"\"attr\": {\n" +
"\"host\": \"\",\n" +
"\"users\": [\n" +
"\"user_1\",\n" +
"\"user_2\"\n" +
"]\n" +
"}";
private String GROUPON="";
}
package cn.freemud.controller.test;
import lombok.Data;
/**
* All rights Reserved, Designed By www.freemud.com
*
* @version V1.0
* @Title:
* @Package: cn.freemud.controller.test
* @Descripttion:
* @author: shuhu.hou
* @date: 2019/7/9
* @Copyright: 2017 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目.
*/
@Data
public class PlatformBaseRequest {
/**
* 版本号
*/
private String ver;
/**
* 由非码颁发商户唯一标识
*/
private String partnerId;
/**
* 由非码颁发平台唯一标识
*/
private String appId;
/**
* 业务请求参数json格式字符串
*/
private String requestBody;
/**
* SHA256WithRSA 加密签名
*/
private String sign;
}
package cn.freemud.controller.test;
import lombok.Data;
/**
* All rights Reserved, Designed By www.freemud.com
*
* @version V1.0
* @Title:
* @Package: cn.freemud.controller.test
* @Descripttion:
* @author: shuhu.hou
* @date: 2019/7/9
* @Copyright: 2017 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目.
*/
@Data
public class PlatformBaseResponse {
/**
* 版本号
*/
private String ver;
/**
* 返回状态码
*/
private String statusCode;
/**
* 返回信息
*/
private String message;
/**
* 业务响应参数
*/
private String responseBody;
/**
* 返回签名
*/
private String sign;
}
package cn.freemud.controller.test;
import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.wechat.GetAuthorizerRequestDto;
import cn.freemud.entities.dto.wechat.GetTokenResponseDto;
import cn.freemud.service.thirdparty.EcologyAdminApplicationClient;
import cn.freemud.service.thirdparty.WeChatClient;
import cn.freemud.utils.HttpUtil;
import com.alibaba.fastjson.JSONObject;
import com.freemud.sdk.api.assortment.order.request.order.GroupBuyRequest;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* All rights Reserved, Designed By www.freemud.com
*
* @version V1.0
* @Title:
* @Package: cn.freemud.controller
* @Descripttion:
* @author: shuhu.hou
* @date: 2019/7/8
* @Copyright: 2017 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目.
*/
@RestController
@Validated
public class TestController {
@Autowired
private EcologyAdminApplicationClient ecologyAdminApplicationClient;
@Autowired
private WeChatClient weChatClient;
// @ApiAnnotation(logMessage = "orderStatusChange")
// @PostMapping("/orderStatusChange")
// public PlatformBaseResponse orderStatusChange(@Validated @LogParams @RequestBody PlatformBaseRequest checkBeforeCreateOrderRequestVo) {
// PlatformBaseResponse platformBaseResponse = new PlatformBaseResponse();
// platformBaseResponse.setStatusCode("100");
// return platformBaseResponse;
// }
//
// @ApiAnnotation(logMessage = "refundStatusChange")
// @PostMapping("/refundStatusChange")
// public PlatformBaseResponse refundStatusChange(@Validated @LogParams @RequestBody PlatformBaseRequest checkBeforeCreateOrderRequestVo) {
// PlatformBaseResponse platformBaseResponse = new PlatformBaseResponse();
// platformBaseResponse.setStatusCode("100");
// return platformBaseResponse;
// }
//
// @ApiAnnotation(logMessage = "testOrderDelivery")
// @PostMapping("/testOrderDelivery")
// public PlatformBaseResponse testOrderDelivery(@Validated @LogParams @RequestBody PlatformBaseRequest platformBaseRequest) {
// PlatformBaseResponse platformBaseResponse = new PlatformBaseResponse();
// platformBaseResponse.setStatusCode("100");
// return platformBaseResponse;
// }
}
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @Title: MemberClientFallbackFactory
* @Package cn.freemud.hystrix
* @Description:
* @author: liming.guo
* @date: 2018/6/25 16:39
* @version V1.0
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package cn.freemud.hystrix;
import org.springframework.stereotype.Component;
@Component
public class MemberClientFallbackFactory {
// @Override
// public GetMemberInfoResponseDto getUserInfo(GetMemberInfoDto memberInfoDto) {
// return getDefaultFallbackBean(GetMemberInfoResponseDto::new,"getUserInfo");
// }
//
// @Override
// public GetMemberInfoResponseDto getUserInfoByMemberId(GetMemberInfoByMemberIdDto getMemberInfoByMemberIdDto) {
// return getDefaultFallbackBean(GetMemberInfoResponseDto::new,"getUserInfoByMemberId");
// }
//
// @Override
// public UserRegisterResponse registerbychannel(MemberRegisterDto memberRegisterDto) {
// return getDefaultFallbackBean(UserRegisterResponse::new,"registerbychannel");
// }
//
// @Override
// public JSONObject editUserInfo(EditMemberInfo editMemberInfo) {
//// return getDefaultFallbackBean(UserRegisterResponse::new,"registerbychannel");
// return null;
// }
//
// private static <T> T getDefaultFallbackBean(Supplier<T> supplier,String methodName) {
// T target = supplier.get();
// Class clazz = target.getClass();
// Map<String, String> map = Maps.newTreeMap();
// map.put("code", ResponseResult.SYSTEM_BUSINESS_ERROR.getCode());
// map.put("message",methodName+ "请求服务异常");
// return new Gson().fromJson(new Gson().toJson(map), (Class<T>) clazz);
// }
}
package cn.freemud.request.wechat.dto;
import lombok.Getter;
import java.net.MalformedURLException;
import java.net.URL;
public class SignMessageBuilder {
private String canonicalUrl;
@Getter
private String nonceStr;
@Getter
private long timestamp = 0;
private String httpBody;
private String httpMethod;
public SignMessageBuilder url(URL url) {
this.canonicalUrl = url.getPath();
if (url.getQuery() != null) {
this.canonicalUrl += url.getQuery();
}
return this;
}
public SignMessageBuilder requestUrl(String requestUrl) throws MalformedURLException {
this.url(new URL(requestUrl));
return this;
}
public SignMessageBuilder canonicalUrl(String canonicalUrl) {
this.canonicalUrl = canonicalUrl;
return this;
}
public SignMessageBuilder nonceStr(String nonceStr) {
this.nonceStr = nonceStr;
return this;
}
public SignMessageBuilder timestamp(long timestamp) {
this.timestamp = timestamp;
return this;
}
public SignMessageBuilder httpBody(String httpBody) {
this.httpBody = httpBody;
return this;
}
public SignMessageBuilder httpMethod(String httpMethod) {
this.httpMethod = httpMethod;
return this;
}
public String buildMchSignMessage() {
if (timestamp == 0) {
throw new IllegalStateException("timestamp cannot be empty");
}
if (nonceStr == null) {
throw new IllegalStateException("nonceStr cannot be empty");
}
if (canonicalUrl == null) {
throw new IllegalStateException("canonicalUrl cannot be empty");
}
if (httpMethod == null) {
throw new IllegalStateException("httpMethod cannot be empty");
}
if (httpMethod.equals("GET") && httpBody == null) {
httpBody = "";
}
return httpMethod + "\n"
+ canonicalUrl + "\n"
+ timestamp + "\n"
+ nonceStr + "\n"
+ httpBody + "\n";
}
public String buildWechatpaySignMessage() {
if (timestamp == 0) {
throw new IllegalStateException("timestamp cannot be empty");
}
if (nonceStr == null) {
throw new IllegalStateException("nonceStr cannot be empty");
}
if (httpBody == null) {
httpBody = "";
}
return "" + timestamp + "\n"
+ nonceStr + "\n"
+ httpBody + "\n";
}
}
package cn.freemud.request.wechat.dto;
import lombok.Data;
import java.util.List;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.6.0
* @Title: SyncStatusDto
* @Package cn.freemud.entities.dto
* @Description: 订单微信上送DTO
* @author: lox
* @date: 2019/3/12 15:00
* @Copyright: 2019 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
@Data
public class SyncStatusDto {
/**
* 服务商商户号
*/
private String sp_mchid;
/**
* 子商户号
*/
private String sub_mchid;
/**
* 服务商APPID
*/
private String sp_appid;
/**
* 子商户APPID,非必填
*/
private String sub_appid;
/**
* 门店编号
*/
private String out_shop_no;
/**
* 用户标识,非必填
*/
private String openid;
/**
* 用户子标识 ,非必填
*/
private String sub_openid;
/**
* 登录票据(微信用户登录接口返回的登 录票据 公众号,填写access_token; 小程序,填写session_key;)
*/
private String login_token;
/**
* 点餐入口(公众号:点餐页面完整URL 小程序:点餐页面path路径 )
*/
private String order_entry;
/**
* 总价,单位为分
*/
private int total_amount;
/**
* 优惠金额,单位为分
*/
private int discount_amount;
/**
* 实际支付,单位为分
*/
private int user_amount;
/**
* 订单状态 (CREATE_DEAL—用户下单;PAY_SUCCESS—支付完成)
*/
private String status;
/**
* 状态发生变化的 时间
*/
private String action_time;
/**
* 支付时间 (status为PAY_SUCCESS时 必填)
*/
private String pay_time;
/**
* 微信支付订单号(status 为 PAY_SUCCESS时必填)
*/
private String transaction_id;
/**
* 服务商支付订单号(status为PAY_SUCCESS时 必填)
*/
private String out_trade_no;
/**
* 服务商订单号
*/
private String out_order_no;
/**
* 菜品列表
*/
private List<DishInfo> dish_list;
/**
* 桌位号,非必填
*/
private String out_table_no;
/**
* 消费人数
*/
private int people_count;
@Data
public static class DishInfo{
/**
* 商户菜品ID
*/
private String out_dish_no;
/**
* 菜品名称
*/
private String name;
/**
* 菜品单价,单位为分
*/
private int price;
/**
* 菜品单位 (BY_SHARE-按份,BY_WEIGHT-按重量)
*/
private String unit;
/**
* 菜品数量
*/
private float count;
/**
* 菜品折扣,百分值,8折填80,非必填
*/
private int discount;
/**
* 菜品分类 非必填
*/
private String type;
/**
* 菜品优先级(当前菜品在服务商平台的顺序, 值越小越靠前,取值(1~100)),非必填
*/
private int priority;
}
}
package cn.freemud.service; package cn.freemud.service;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.vo.*; import cn.freemud.entities.vo.GetMallPayConfigVo;
import cn.freemud.entities.vo.GetPayCodeVo;
import cn.freemud.entities.vo.GetPayConfigVo;
import cn.freemud.entities.vo.GetPaySuccessDataV2Request;
import cn.freemud.entities.vo.order.PayConfigVo; import cn.freemud.entities.vo.order.PayConfigVo;
import cn.freemud.entities.vo.order.PaySuccessDataVo; import cn.freemud.entities.vo.order.PaySuccessDataVo;
import cn.freemud.entities.vo.order.QueryByKeysReq; import cn.freemud.entities.vo.order.QueryByKeysReq;
...@@ -10,7 +13,6 @@ import cn.freemud.enums.AggregationTypeEnum; ...@@ -10,7 +13,6 @@ import cn.freemud.enums.AggregationTypeEnum;
import cn.freemud.enums.OrderTackCodeFactory; import cn.freemud.enums.OrderTackCodeFactory;
import cn.freemud.enums.TakeCodeOrderType; import cn.freemud.enums.TakeCodeOrderType;
import cn.freemud.manager.OrderTackCodeManager; import cn.freemud.manager.OrderTackCodeManager;
import cn.freemud.service.business.impl.OrderBusinessServiceImpl;
import cn.freemud.service.impl.PayServiceImpl; import cn.freemud.service.impl.PayServiceImpl;
import cn.freemud.service.thirdparty.OrderServiceClient; import cn.freemud.service.thirdparty.OrderServiceClient;
import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformIappWxappStore; import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformIappWxappStore;
...@@ -36,7 +38,6 @@ public class ExposureOrderService { ...@@ -36,7 +38,6 @@ public class ExposureOrderService {
private final PayServiceImpl payService; private final PayServiceImpl payService;
private final OrderTackCodeManager orderTackCodeManager; private final OrderTackCodeManager orderTackCodeManager;
private final OrderBusinessServiceImpl orderBusinessService;
private final OrderCenterSdkAdapter orderCenterSdkAdapter; private final OrderCenterSdkAdapter orderCenterSdkAdapter;
private final OrderServiceClient orderServiceClient; private final OrderServiceClient orderServiceClient;
......
//package cn.freemud.service;
//
//import cn.freemud.base.entity.BaseResponse;
//import cn.freemud.entities.vo.AppCreateOrderVo;
//import cn.freemud.entities.vo.CreateOrderVo;
//import cn.freemud.entities.vo.CreatePrepayVo;
//import cn.freemud.entities.vo.PaysuccessNoticeMessage;
//
//import java.util.Map;
//
///**
// * All rights Reserved, Designed By www.freemud.cn
// *
// * @version V1.6.0
// * @Title: OrderAdapterService
// * @Description: 订单业务适配
// * @author: qin.zhou
// * @date: 2019/9/818:20
// * @Copyright: ${DATE.YARE} www.freemud.cn Inc. All rights reserved.
// * 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
// */
//public interface OrderAdapterService {
//
// /**
// * 创建订单
// * @param createOrderVo
// * @return
// */
// BaseResponse createOrderNew(CreateOrderVo createOrderVo);
//
// /**
// * 创建订单
// * @param param
// * @return
// */
// BaseResponse createOrderUniversal(Map<String, Object> param);
//
// /**
// * 麦咖啡创建订单
// * @param createOrderVo
// * @return
// */
// BaseResponse createMCCafeOrder(CreateOrderVo createOrderVo);
//
// /**
// * 创建预支付
// */
// BaseResponse createPrepay(CreatePrepayVo createPrepayVo);
//
// /**
// * APP下单,下单带商品信息,不经过购物车服务
// */
// @Deprecated
// BaseResponse appCreateOrder(AppCreateOrderVo createOrderVo);
//
// /**
// * 支付回调处理
// */
// String paySuccessCallback(PaysuccessNoticeMessage message);
//
// /**
// * 支付回调处理
// */
// String mcCafePaySuccessCallback(PaysuccessNoticeMessage message);
//
//}
//package cn.freemud.service;
//
//
//import com.freemud.sdk.api.assortment.orderdistributor.request.DisRequest;
//
///**
// * All rights Reserved, Designed By www.freemud.cn
// *
// * @version V1.0
// * @Title: ${FILE_NAME}
// * @Package com.freemud.mail.core
// * @Description: $MQ分发器服务接口
// * @author: aiqi.gong
// * @date: 2019/3/21 18:37
// * @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
// * 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
// */
//public interface OrderDistributeMQService {
//
// /**
// * 消息分发
// * @param disRequest 消息体
// */
// void messageDistribute(DisRequest disRequest);
//
//}
package cn.freemud.xxljob;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import org.springframework.stereotype.Component;
/**
* @author : xh.Z
* @email : fisherman0510@163.com
* @Date : 2021/4/26 下午8:27
* @description : 测试 xxl-job 能否跑成功
*/
@Component
//@JobHandler("orderCountJobHandlerTest")
//@Log4j2
public class OrderCountJobHandlerTest extends IJobHandler {
@Override
public ReturnT<String> execute(String param) throws Exception {
return ReturnT.SUCCESS;
}
}
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