gzy 4 months ago
commit 46b5c2dbc8

@ -19,6 +19,8 @@ public class WxPayBean {
private String appSecret;
private String mchId;
private String apiV2;
private String slAppId;
private String slMchId;
private String certPath;
private String domain; // 填写完整的回调地址
@ -70,6 +72,22 @@ public class WxPayBean {
this.domain = domain;
}
public String getSlAppId() {
return slAppId;
}
public void setSlAppId(String slAppId) {
this.slAppId = slAppId;
}
public String getSlMchId() {
return slMchId;
}
public void setSlMchId(String slMchId) {
this.slMchId = slMchId;
}
@Override
public String toString() {
return "WxPayBean [appId=" + appId + ", appSecret=" + appSecret + ", mchId=" + mchId + ", apiV2="

@ -36,4 +36,19 @@ public enum YesOrNoEnum {
public void setValue(String value) {
this.value = value;
}
/**
* valuekey
*
* @return
*/
public static String getKeyName(String value) {
final YesOrNoEnum[] values = YesOrNoEnum.values();
for (YesOrNoEnum order : values) {
if (value.equals(order.getValue())) {
return order.getKey();
}
}
return null;
}
}

@ -3,6 +3,7 @@ package com.fuint.common.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.common.Constants;
@ -60,7 +61,7 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
private MtOrderMapper mtOrderMapper;
private MtGoodsMapper mtGoodsMapper;
private MtUserMapper mtUserMapper;
private MtOrderGoodsMapper mtOrderGoodsMapper;
private MtCartMapper mtCartMapper;
@ -2237,8 +2238,20 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
}
}
String userName = rowContent.get(6);
if (ObjectUtil.isNotEmpty(userName)){
MtUser m= mtUserMapper.selectOne(new QueryWrapper<MtUser>().lambda().eq(MtUser::getMobile,userName));
if(ObjectUtil.isNotEmpty(m)){
order.setUserId(m.getId());
}
}
String isVisitor = rowContent.get(7);
order.setIsVisitor(isVisitor);
if(StringUtil.isNotEmpty(isVisitor)){
String keyName = YesOrNoEnum.getKeyName(isVisitor);
if(StringUtil.isNotEmpty(keyName)){
order.setIsVisitor(keyName);
}
}
String amount = rowContent.get(8);
if(StringUtil.isNotEmpty(amount)){
order.setAmount(new BigDecimal(amount));

@ -607,8 +607,10 @@ public class WeixinServiceImpl implements WeixinService {
getApiConfig(storeId, platform);
WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig();
Map<String, String> params = RefundModel.builder()
.appid(wxPayApiConfig.getAppId())
.mch_id(wxPayApiConfig.getMchId())
.sub_appid(wxPayApiConfig.getAppId())
.sub_mch_id(wxPayApiConfig.getMchId())
.appid(wxPayApiConfig.getSlAppId())
.mch_id(wxPayApiConfig.getSlMchId())
.nonce_str(WxPayKit.generateStr())
.transaction_id("")
.out_trade_no(orderSn)
@ -924,8 +926,10 @@ public class WeixinServiceImpl implements WeixinService {
getApiConfig(storeId, platform);
WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig();
Map<String, String> params = MicroPayModel.builder()
.appid(wxPayApiConfig.getAppId())
.mch_id(wxPayApiConfig.getMchId())
.sub_appid(wxPayApiConfig.getAppId())
.sub_mch_id(wxPayApiConfig.getMchId())
.appid(wxPayApiConfig.getSlAppId())
.mch_id(wxPayApiConfig.getSlMchId())
.nonce_str(WxPayKit.generateStr())
.body(reqData.get("body"))
.attach(reqData.get("body"))
@ -1007,8 +1011,11 @@ public class WeixinServiceImpl implements WeixinService {
WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig();
Map<String, String> params = UnifiedOrderModel
.builder()
.appid(wxPayApiConfig.getAppId())
.mch_id(wxPayApiConfig.getMchId())
.sub_appid(wxPayApiConfig.getAppId())
.sub_mch_id(wxPayApiConfig.getMchId())
.sub_openid(reqData.get("openid"))
.appid(wxPayApiConfig.getSlAppId())
.mch_id(wxPayApiConfig.getSlMchId())
.nonce_str(WxPayKit.generateStr())
.body(reqData.get("body"))
.attach(reqData.get("body"))
@ -1017,7 +1024,6 @@ public class WeixinServiceImpl implements WeixinService {
.spbill_create_ip(ip)
.notify_url(wxPayApiConfig.getDomain() + CALL_BACK_URL)
.trade_type(reqData.get("trade_type"))
.openid(reqData.get("openid"))
.build()
.createSign(wxPayApiConfig.getPartnerKey(), SignType.MD5);
String xmlResult = WxPayApi.pushOrder(false, params);
@ -1067,8 +1073,11 @@ public class WeixinServiceImpl implements WeixinService {
sceneInfo.setH5Info(h5Info);
Map<String, String> params = UnifiedOrderModel
.builder()
.appid(wxPayApiConfig.getAppId())
.mch_id(wxPayApiConfig.getMchId())
.sub_appid(wxPayApiConfig.getAppId())
.sub_mch_id(wxPayApiConfig.getMchId())
.sub_openid(reqData.get("openid"))
.appid(wxPayApiConfig.getSlAppId())
.mch_id(wxPayApiConfig.getSlMchId())
.nonce_str(WxPayKit.generateStr())
.body(reqData.get("body"))
.attach(reqData.get("body"))
@ -1119,6 +1128,8 @@ public class WeixinServiceImpl implements WeixinService {
String apiV2 = wxPayBean.getApiV2();
String certPath = wxPayBean.getCertPath();
String appId = wxPayBean.getAppId();
String slAppId = wxPayBean.getSlAppId();
String slMchId = wxPayBean.getSlMchId();
logger.info("微信支付店铺信息:{}", JsonUtil.toJSONString(mtStore));
if (mtStore != null && StringUtil.isNotEmpty(mtStore.getWxApiV2()) && StringUtil.isNotEmpty(mtStore.getWxMchId())) {
mchId = mtStore.getWxMchId();
@ -1131,6 +1142,8 @@ public class WeixinServiceImpl implements WeixinService {
}
}
apiConfig = WxPayApiConfig.builder()
.slAppId(slAppId)
.slMchId(slMchId)
.appId(appId)
.mchId(mchId)
.partnerKey(apiV2)

@ -615,7 +615,7 @@ public class BackendOrderController extends BaseController {
* @throws
*/
@ApiOperation(value = "上传文件")
@RequestMapping(value = "/importData", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
@RequestMapping(value = "/importData", method = RequestMethod.POST)
@CrossOrigin
public ResponseObject uploadFile(HttpServletRequest request, @RequestParam("file") MultipartFile file) throws Exception {
String token = request.getHeader("Access-Token");

@ -32,13 +32,13 @@ system.name = \u674E\u5B66\u6B66\u7261\u4E39\u74F7\u5B98\u65B9\u65D7\u8230\u5E97
website.url=https://www.huamar.com/h5/
# \u4E0A\u4F20\u56FE\u7247\u672C\u5730\u5730\u5740
#images.root=D:/daima/yshi/fuintBackend/fuint-application/target/classes
images.root=D:/download
images.path=/profile/
#images.path=/static/uploadImages/
images.root=/target/classes
#images.root=D:/download
#images.path=/profile/
images.path=/static/uploadImages/
# \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D
images.upload.url=http://192.168.10.110:8999
images.upload.url=http://192.168.10.70:8999
# \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09
images.upload.maxSize=5
@ -84,15 +84,22 @@ aliyun.oss.domain = https://wine-east-img.oss-cn-zhangjiakou.aliyuncs.com
################## \u5FAE\u4FE1\u76F8\u5173\u914D\u7F6E ##########################
# \u516C\u4F17\u53F7\u914D\u7F6E
# \u516C\u4F17\u53F7\u914D\u7F6E
weixin.official.appId=wxf4327ef05c27a0
weixin.official.appSecret=1f55e8749332234d9a074873d8e6a3
# \u5C0F\u7A0B\u5E8F\u914D\u7F6E
wxpay.appId = wx53b5ac263b9cdb5b
wxpay.appSecret = baa127ca662344cf9b0b8e52b26bac9d
# \u5FAE\u4FE1\u652F\u4ED8
wxpay.mchId=1485526382
wxpay.apiV2=f5aacf8f7ff800f4cd039f2514c5d7da
wxpay.slAppId=1485526382
wxpay.slMchId=f5aacf8f7ff800f4cd039f2514c5d7da
wxpay.certPath=D:/apiclient_cert.p12
wxpay.domain=https://yanghaodong.51vip.biz
#\u5FAE\u4FE1\u5C0F\u7A0B\u5E8Fappid: wx53b5ac263b9cdb5b
#\u5FAE\u4FE1\u5C0F\u7A0B\u5E8FAppSecret: baa127ca662344cf9b0b8e52b26bac9d
#\u5FAE\u4FE1\u652F\u4ED8: 1485526382
@ -101,8 +108,6 @@ wxpay.apiV2=f5aacf8f7ff800f4cd039f2514c5d7da
#\u5FAE\u4FE1\u652F\u4ED8apiv3\u5BC6\u94A5\uFF1Af5aacf8f7ff800f4cd039f2514c5d7da
wxpay.certPath=D:/apiclient_cert.p12
wxpay.domain=https://yanghaodong.51vip.biz
################## \u652F\u4ED8\u5B9D\u652F\u4ED8\u76F8\u5173\u914D\u7F6E ######################
alipay.appId = \u5E94\u7528\u7F16\u53F7

@ -36,7 +36,7 @@ website.url=https://www.fuint.cn/h5/
images.path=/static/uploadImages/
# \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D
images.upload.url=http://192.168.10.31:8999l
images.upload.url=http://192.168.10.31:8999
# \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09
images.upload.maxSize=5
@ -88,6 +88,8 @@ wxpay.appId = wxb6af3741234162bc
wxpay.appSecret = 76a538bfa5b55a4564d5f2be5540
wxpay.mchId=1636980812
wxpay.apiV2=34354320201030y323e432342343
wxpay.slAppId=1485526382
wxpay.slMchId=f5aacf8f7ff800f4cd039f2514c5d7da
wxpay.certPath=/usr/local/fuint/cert/apiclient_cert.p12
wxpay.domain=https://www.fuint.cn/fuint-application

@ -1,5 +1,7 @@
package com.fuint.framework.web;
import java.io.Serializable;
/**
*
*
@ -7,8 +9,8 @@ package com.fuint.framework.web;
*
* CopyRight https://www.fuint.cn
*/
public class ResponseObject {
public class ResponseObject implements Serializable {
private static final long serialVersionUID = 2515641477316172528L;
private int code;
private String message;
private Object data;

@ -57,7 +57,7 @@ public class MtOrder implements Serializable {
private String verifyCode;
@ApiModelProperty("是否游客")
private String isVisitor;
private String isVisitor="N";
@ApiModelProperty("订单金额")
private BigDecimal amount;
@ -90,19 +90,19 @@ public class MtOrder implements Serializable {
private String remark;
@ApiModelProperty("创建时间")
private Date createTime;
private Date createTime = new Date();
@ApiModelProperty("更新时间")
private Date updateTime;
private Date updateTime = new Date();
@ApiModelProperty("订单状态")
private String status;
private String status ="B";
@ApiModelProperty("支付时间")
private Date payTime;
private Date payTime = new Date();
@ApiModelProperty("支付状态")
private String payStatus;
private String payStatus="B";
@ApiModelProperty("操作员工")
private Integer staffId;

Loading…
Cancel
Save