Compare commits
5 Commits
copilot/de
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90c3d53188 | ||
|
|
ecd3e82216 | ||
|
|
c0db88091f | ||
|
|
85bd27424d | ||
|
|
ddcdf658cf |
@@ -40,6 +40,9 @@ public class WxMaKefuMessage implements Serializable {
|
||||
@SerializedName("miniprogrampage")
|
||||
private KfMaPage maPage;
|
||||
|
||||
@SerializedName("aimsgcontext")
|
||||
private AiMsgContext aiMsgContext;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@@ -90,6 +93,16 @@ public class WxMaKefuMessage implements Serializable {
|
||||
private String thumbMediaId;
|
||||
}
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public static class AiMsgContext implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("msgid")
|
||||
private String msgId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得文本消息builder.
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@ public class WxMaExpressOrderCargo implements Serializable {
|
||||
* 描述: 单位是千克(kg)
|
||||
* </pre>
|
||||
*/
|
||||
private Integer weight;
|
||||
private Double weight;
|
||||
|
||||
/**
|
||||
* 包裹长度
|
||||
@@ -44,7 +44,7 @@ public class WxMaExpressOrderCargo implements Serializable {
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("space_x")
|
||||
private Integer spaceLength;
|
||||
private Double spaceLength;
|
||||
|
||||
/**
|
||||
* 包裹宽度
|
||||
@@ -54,7 +54,7 @@ public class WxMaExpressOrderCargo implements Serializable {
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("space_y")
|
||||
private Integer spaceWidth;
|
||||
private Double spaceWidth;
|
||||
|
||||
/**
|
||||
* 包裹高度
|
||||
@@ -64,7 +64,7 @@ public class WxMaExpressOrderCargo implements Serializable {
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("space_z")
|
||||
private Integer spaceHeight;
|
||||
private Double spaceHeight;
|
||||
|
||||
/**
|
||||
* 包裹中商品详情列表
|
||||
|
||||
@@ -8,6 +8,7 @@ import cn.binarywang.wx.miniapp.bean.WxMaKefuMessage;
|
||||
public class BaseBuilder<T> {
|
||||
protected String msgType;
|
||||
protected String toUser;
|
||||
protected String aiMsgContextMsgId;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public T toUser(String toUser) {
|
||||
@@ -15,6 +16,12 @@ public class BaseBuilder<T> {
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public T aiMsgContextMsgId(String msgId) {
|
||||
this.aiMsgContextMsgId = msgId;
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造器方法.
|
||||
*/
|
||||
@@ -22,6 +29,9 @@ public class BaseBuilder<T> {
|
||||
WxMaKefuMessage m = new WxMaKefuMessage();
|
||||
m.setMsgType(this.msgType);
|
||||
m.setToUser(this.toUser);
|
||||
if (this.aiMsgContextMsgId != null) {
|
||||
m.setAiMsgContext(new WxMaKefuMessage.AiMsgContext(this.aiMsgContextMsgId));
|
||||
}
|
||||
return m;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,10 +116,10 @@ public class WxMaExpressServiceImplTest {
|
||||
goodsCount ++;
|
||||
}
|
||||
cargo.setCount(detailList.size());
|
||||
cargo.setWeight(5);
|
||||
cargo.setSpaceHeight(10);
|
||||
cargo.setSpaceLength(10);
|
||||
cargo.setSpaceWidth(10);
|
||||
cargo.setWeight(1.2);
|
||||
cargo.setSpaceHeight(10.0);
|
||||
cargo.setSpaceLength(20.0);
|
||||
cargo.setSpaceWidth(15.0);
|
||||
cargo.setDetailList(detailList);
|
||||
|
||||
|
||||
|
||||
@@ -66,4 +66,14 @@ public class WxMaKefuMessageTest {
|
||||
"\"link\":{\"title\":\"title\",\"description\":\"description\",\"url\":\"https://mp.weixin.qq.com/s?__biz=MzI0MDA2OTY5NQ==\",\"thumb_url\":\"thumbUrl\"}}");
|
||||
}
|
||||
|
||||
public void testTextBuilderWithAiMsgContext() {
|
||||
WxMaKefuMessage reply = WxMaKefuMessage.newTextBuilder()
|
||||
.toUser("OPENID")
|
||||
.content("回复内容")
|
||||
.aiMsgContextMsgId("MSG_ID_123")
|
||||
.build();
|
||||
assertThat(reply.toJson())
|
||||
.isEqualTo("{\"touser\":\"OPENID\",\"msgtype\":\"text\",\"text\":{\"content\":\"回复内容\"},\"aimsgcontext\":{\"msgid\":\"MSG_ID_123\"}}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class WxPayApplyment4SubCreateRequest implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 4104022969945059126L;
|
||||
|
||||
/**
|
||||
* 业务申请编号
|
||||
@@ -78,7 +78,7 @@ public class WxPayApplyment4SubCreateRequest implements Serializable {
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public static class ContactInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = -9087348002744428474L;
|
||||
|
||||
/**
|
||||
* 超级管理员类型
|
||||
@@ -211,7 +211,7 @@ public class WxPayApplyment4SubCreateRequest implements Serializable {
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public static class SubjectInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = -6651911735969445765L;
|
||||
|
||||
/**
|
||||
* 主体类型
|
||||
@@ -242,6 +242,13 @@ public class WxPayApplyment4SubCreateRequest implements Serializable {
|
||||
@SerializedName("certificate_letter_copy")
|
||||
private String certificateLetterCopy;
|
||||
|
||||
/**
|
||||
* 小微辅助证明材料
|
||||
* 主体类型为小微商户时,小微辅助证明材料必填
|
||||
*/
|
||||
@SerializedName("micro_biz_info")
|
||||
private MicroBizInfo microBizInfo;
|
||||
|
||||
/**
|
||||
* 金融机构许可证信息
|
||||
*/
|
||||
@@ -393,6 +400,88 @@ public class WxPayApplyment4SubCreateRequest implements Serializable {
|
||||
private List<String> financeLicensePics;
|
||||
}
|
||||
|
||||
/**
|
||||
* 小微辅助证明材料
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public static class MicroBizInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2327302539406612422L;
|
||||
|
||||
/**
|
||||
* 小微经营类型
|
||||
* 枚举值:
|
||||
* MICRO_TYPE_STORE:门店场所
|
||||
* MICRO_TYPE_MOBILE:流动经营/便民服务
|
||||
* MICRO_TYPE_ONLINE:线上商品/服务交易
|
||||
* 示例值:MICRO_TYPE_STORE
|
||||
*/
|
||||
@SerializedName("micro_biz_type")
|
||||
private MicroBizTypeEnum microBizType;
|
||||
|
||||
/**
|
||||
* 门店名称
|
||||
* 1、填写规范:
|
||||
* 门店场所:填写门店名称
|
||||
* 流动经营/便民服务:填写经营/服务名称
|
||||
* 线上商品/服务交易:填写线上店铺名称
|
||||
* 2、格式规范:
|
||||
* 长度为1-50个字符
|
||||
* 前后不能有空格、制表符、换行符
|
||||
* 不能仅含数字、特殊字符
|
||||
* 仅能填写数字、英文字母、汉字及特殊字符
|
||||
* 仅支持utf-8格式
|
||||
* 示例值:大郎烧饼
|
||||
*/
|
||||
@SerializedName("micro_name")
|
||||
private String microName;
|
||||
|
||||
/**
|
||||
* 门店省市编码
|
||||
* 1、只能由数字组成
|
||||
* 2、详细参见微信支付提供的省市对照表
|
||||
* 3、填写规范:
|
||||
* 门店场所:填写门店省市编码
|
||||
* 流动经营/便民服务:填写经营/服务所在地省市编码
|
||||
* 线上商品/服务交易:填写卖家所在地省市编码
|
||||
* 示例值:440305
|
||||
*/
|
||||
@SerializedName("micro_address_code")
|
||||
private String microAddressCode;
|
||||
|
||||
/**
|
||||
* 门店地址
|
||||
* 1、填写规范:
|
||||
* 门店场所:填写店铺详细地址,具体区/县及街道门牌号或大厦楼层
|
||||
* 流动经营/便民服务:填写"无"
|
||||
* 线上商品/服务交易:填写电商平台名称
|
||||
* 2、格式规范:
|
||||
* 长度为4-512个字符
|
||||
* 前后不能有空格、制表符、换行符
|
||||
* 不能仅含数字、特殊字符
|
||||
* 仅能填写数字、英文字母、汉字及特殊字符
|
||||
* 仅支持utf-8格式
|
||||
* 示例值:广东省深圳市南山区xx大厦x层xxxx室
|
||||
*/
|
||||
@SerializedName("micro_address")
|
||||
private String microAddress;
|
||||
|
||||
/**
|
||||
* 门店门头照片/经营场景照片
|
||||
* 1、门店场所:请上传门头正面照片(要求门店招牌、门框完整、清晰、可辨识);若为停车场等无固定门头照片的经营场所,可上传岗亭/出入闸口;
|
||||
* 2、流动经营/便民服务:填写媒体文件ID列表,最多5张;
|
||||
* 3、线上商品/服务交易:请上传线上店铺网页截图(清晰度足够识别店铺名称的首页截图);
|
||||
* 4、请填写通过《图片上传API》预先上传图片生成好的MediaID
|
||||
* 示例值:0P3ng6KTIW4-Q_l2FjKLZuhHjBWoMAjmVtCz7ScmhEIThCaV-4BBgVwtNkCHO_XXqK5dE5YdOmFJBZR9FwczhJehHhAZN6BKXQPcs-VvdSo
|
||||
*/
|
||||
@SerializedName("micro_pics")
|
||||
private List<String> microPics;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@@ -603,7 +692,7 @@ public class WxPayApplyment4SubCreateRequest implements Serializable {
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public static class BusinessInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = -8605049544105644011L;
|
||||
|
||||
/**
|
||||
* 商户简称
|
||||
@@ -876,7 +965,7 @@ public class WxPayApplyment4SubCreateRequest implements Serializable {
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public static class SettlementInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = -5025743467243760522L;
|
||||
|
||||
/**
|
||||
* 入驻结算规则ID
|
||||
@@ -937,7 +1026,7 @@ public class WxPayApplyment4SubCreateRequest implements Serializable {
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public static class BankAccountInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = -5853122395888860086L;
|
||||
|
||||
/**
|
||||
* 账户类型
|
||||
@@ -995,7 +1084,7 @@ public class WxPayApplyment4SubCreateRequest implements Serializable {
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public static class AdditionInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = -7526912529114022379L;
|
||||
|
||||
/**
|
||||
* 法人开户承诺函
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface BusinessOperationTransferService {
|
||||
* 发起运营工具商家转账
|
||||
*
|
||||
* 请求方式:POST(HTTPS)
|
||||
* 请求地址:https://api.mch.weixin.qq.com/v3/fund-app/operation/mch-transfer/transfer-bills
|
||||
* 请求地址:https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/transfer-bills
|
||||
*
|
||||
* 文档地址:<a href="https://pay.weixin.qq.com/doc/v3/merchant/4012711988">运营工具-商家转账API</a>
|
||||
* </pre>
|
||||
@@ -37,7 +37,7 @@ public interface BusinessOperationTransferService {
|
||||
* 查询运营工具转账结果
|
||||
*
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://api.mch.weixin.qq.com/v3/fund-app/operation/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}
|
||||
* 请求地址:https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}
|
||||
*
|
||||
* 文档地址:<a href="https://pay.weixin.qq.com/doc/v3/merchant/4012711988">运营工具-商家转账API</a>
|
||||
* </pre>
|
||||
@@ -53,7 +53,7 @@ public interface BusinessOperationTransferService {
|
||||
* 通过商户单号查询运营工具转账结果
|
||||
*
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://api.mch.weixin.qq.com/v3/fund-app/operation/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}
|
||||
* 请求地址:https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}
|
||||
*
|
||||
* 文档地址:<a href="https://pay.weixin.qq.com/doc/v3/merchant/4012711988">运营工具-商家转账API</a>
|
||||
* </pre>
|
||||
@@ -69,7 +69,7 @@ public interface BusinessOperationTransferService {
|
||||
* 通过微信转账单号查询运营工具转账结果
|
||||
*
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://api.mch.weixin.qq.com/v3/fund-app/operation/mch-transfer/transfer-bills/transfer-bill-no/{transfer_bill_no}
|
||||
* 请求地址:https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/transfer-bills/transfer-bill-no/{transfer_bill_no}
|
||||
*
|
||||
* 文档地址:<a href="https://pay.weixin.qq.com/doc/v3/merchant/4012711988">运营工具-商家转账API</a>
|
||||
* </pre>
|
||||
|
||||
@@ -33,7 +33,7 @@ public class BusinessOperationTransferServiceImpl implements BusinessOperationTr
|
||||
request.setAppid(this.wxPayService.getConfig().getAppId());
|
||||
}
|
||||
|
||||
String url = String.format("%s/v3/fund-app/operation/mch-transfer/transfer-bills", this.wxPayService.getPayBaseUrl());
|
||||
String url = String.format("%s/v3/fund-app/mch-transfer/transfer-bills", this.wxPayService.getPayBaseUrl());
|
||||
|
||||
// 如果传入了用户姓名,需要进行RSA加密
|
||||
if (StringUtils.isNotEmpty(request.getUserName())) {
|
||||
@@ -58,7 +58,7 @@ public class BusinessOperationTransferServiceImpl implements BusinessOperationTr
|
||||
|
||||
@Override
|
||||
public BusinessOperationTransferQueryResult queryOperationTransferByOutBillNo(String outBillNo) throws WxPayException {
|
||||
String url = String.format("%s/v3/fund-app/operation/mch-transfer/transfer-bills/out-bill-no/%s",
|
||||
String url = String.format("%s/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/%s",
|
||||
this.wxPayService.getPayBaseUrl(), outBillNo);
|
||||
String response = wxPayService.getV3(url);
|
||||
return GSON.fromJson(response, BusinessOperationTransferQueryResult.class);
|
||||
@@ -66,7 +66,7 @@ public class BusinessOperationTransferServiceImpl implements BusinessOperationTr
|
||||
|
||||
@Override
|
||||
public BusinessOperationTransferQueryResult queryOperationTransferByTransferBillNo(String transferBillNo) throws WxPayException {
|
||||
String url = String.format("%s/v3/fund-app/operation/mch-transfer/transfer-bills/transfer-bill-no/%s",
|
||||
String url = String.format("%s/v3/fund-app/mch-transfer/transfer-bills/transfer-bill-no/%s",
|
||||
this.wxPayService.getPayBaseUrl(), transferBillNo);
|
||||
String response = wxPayService.getV3(url);
|
||||
return GSON.fromJson(response, BusinessOperationTransferQueryResult.class);
|
||||
|
||||
Reference in New Issue
Block a user