From 497ce9c14177f4ae518e2a9ca25e4004e84a6dfc Mon Sep 17 00:00:00 2001 From: zhangshengli <18103773227@163.com> Date: Wed, 31 Jul 2024 13:47:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=A1=86=E6=9E=B6=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=961?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fuint/common/enums/YesOrNoEnum.java | 15 +++++++++++++++ .../common/service/impl/OrderServiceImpl.java | 17 +++++++++++++++-- .../controller/BackendOrderController.java | 2 +- .../main/resources/application-dev.properties | 10 +++++----- .../resources/application-prod.properties | 2 +- .../template/订单导入模板.xlsx | Bin 9001 -> 9225 bytes .../fuint/framework/web/ResponseObject.java | 6 ++++-- .../com/fuint/repository/model/MtOrder.java | 14 +++++++------- 8 files changed, 48 insertions(+), 18 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/enums/YesOrNoEnum.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/enums/YesOrNoEnum.java index 0d4c355..f54d289 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/enums/YesOrNoEnum.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/enums/YesOrNoEnum.java @@ -36,4 +36,19 @@ public enum YesOrNoEnum { public void setValue(String value) { this.value = value; } + + /** + * 根据value获取key + * + * @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; + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java index ac0b79c..0df408e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java @@ -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 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 implem } } String userName = rowContent.get(6); + if (ObjectUtil.isNotEmpty(userName)){ + MtUser m= mtUserMapper.selectOne(new QueryWrapper().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)); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendOrderController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendOrderController.java index d591330..1ccbdc0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendOrderController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendOrderController.java @@ -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"); diff --git a/fuintBackend/fuint-application/src/main/resources/application-dev.properties b/fuintBackend/fuint-application/src/main/resources/application-dev.properties index ae6a85e..457d47f 100644 --- a/fuintBackend/fuint-application/src/main/resources/application-dev.properties +++ b/fuintBackend/fuint-application/src/main/resources/application-dev.properties @@ -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 diff --git a/fuintBackend/fuint-application/src/main/resources/application-prod.properties b/fuintBackend/fuint-application/src/main/resources/application-prod.properties index 3aff22f..071a7bc 100644 --- a/fuintBackend/fuint-application/src/main/resources/application-prod.properties +++ b/fuintBackend/fuint-application/src/main/resources/application-prod.properties @@ -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 diff --git a/fuintBackend/fuint-application/src/main/resources/template/订单导入模板.xlsx b/fuintBackend/fuint-application/src/main/resources/template/订单导入模板.xlsx index 8b93e0381b0569231c484868183b85fcaaa0ee09..f7541e1c217fdbb3c8410326f6079ff21c949cb2 100644 GIT binary patch literal 9225 zcma)iWk6iZvM%lf2^JiJJHa8iYX(bj2~GwE7~I{0JA~jG+})kv1PSg=kO08~cSzpZ z*_*rHd9Q!;%&b*kSFfto)iw1sKpqwj1?r&%DXob-eEz2)L%tY;i~x2Z8!#&XB8CIG zfb>gjL`(;o9U2OX4+aVf^Y3DYHa0BIR=|(Z9dfYjn1M&WN0@eH7Vm@OfT0;{l1v&c zeFs3ISw%5Z9j)}9_lO-l#~br>mjtFf8QLcsRy6mc!ppBV+$X;j2Lw+y`M!G6o9e^S zT5YX<{9*HICy9gVP)^qk5q=rwv|(;J_Wcg5M5Q;ABrnrt3f+*uNL8TJx@e593IiFD zqD464YSADe@A+0MwDenkQZnRO%zErW<;y1ytUP~@r+UX_O{^~=AY($`;~J{2V!0Wh_FZb%N;foq*?%4rLiyyU9;W3-~Qkg zh~E2|sYXxa6BRy%9f>a!CewCEQqT@d+N`)Sy&`(D)Jyk6nPt%Dr>vov<1=F& zMyJ;FuW9CSd2^uA80`Uny=7}@EqPP(RCzHJIuvHaoyKQRM@s*Qtm)je?kilqY6(k{N^btvY!%#P55ruk za9tS)`mTgP=VPlOOq~L0o2(b$Tg&GnXWuMR+Z*m@vpHl<;>#pg{x4tqMP3)VD^koy z-Y3oqR1Gv7Hn5+djr@=zS%b!$YKXj-I79!ZD|(4YeCZ*sz=F8q=|5cI0JaBNJvbvb zT35b{4JYsj{$6~*BPFs#S70vU9JL!2ab!_WcCuuQidr^b{PxInh+fY*J2B|{>2dQm zRnZ%EXX#SKGGmnBNS{7xRV&sX^v-kBY%pmR;lK}~vT43gc?{wgm#BzJq)M$u!?!Uf za#jou>m~ZjVe!LH7PT4`^Q+B^iOxw2OZT6#;(mZj#8VCv@1`+|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i{36S;H zG~*{=kPq%6>CZAtAw%3lcb{KyZF`zm^R`fNLCt|W;QNfU>UZCT*|N~o7!QPWMd#$8 z$yQE#waRk{WCM2)he4BJmkiGqDKc|#{aICn@CymJ=g&}6P&A%}5pT)PjD6&!oQqSv zo~6&{v~T#tkheCmdyDwwWKvLMy;9PVCXvp_p%1ZFJNl4|x#i$$V%VAxs1+5BRW^=d zC3iiwy`At0bo*uMH3E5b@OCozFt0sx2!XuFxHu`4k9bgS4nA0fu#4-Xy%nmNaeQvK zHY$nVQ2e!`jeyx)x!l+qUYYtheR#-JExIiELM&(?Ai!Vf?*903%b{JC+}e-Vo~(B> zFXI9o?+Ld%A{-KOcnISgf{A+T9I93rK{B{YG`NGn&t))Fb{v zk^8Y7u#|TW7&3$u**zubuGYYo<8Sj{xD9S7l$2UX8?yPqtt@>0g`jC+1&v%!ag_Et zJY$5v1o`1E>BlpuXa1F9VPKh|W$&L~O8B?`{(bz1R}_@x|7zf`aW0GM@oM{zd*Y(zYLgu1^>0f{s$BQfFS<_|3CfqU+w(bcKyQ=8QOn-#NV2*zgqdV zmGp;|_t0S(^ih6oEd6TWS6Tmu0SSVi2L2HFze0aiGk-uMi2nusRonb(;jeY}4?F+> sB867pU#sq~@W1B7Kf^o8{sjL$Ln_N7K)nk9pg=!?(88WT@!Plm19hQv=Kufz diff --git a/fuintBackend/fuint-framework/src/main/java/com/fuint/framework/web/ResponseObject.java b/fuintBackend/fuint-framework/src/main/java/com/fuint/framework/web/ResponseObject.java index 8bcb287..bdb499b 100644 --- a/fuintBackend/fuint-framework/src/main/java/com/fuint/framework/web/ResponseObject.java +++ b/fuintBackend/fuint-framework/src/main/java/com/fuint/framework/web/ResponseObject.java @@ -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; diff --git a/fuintBackend/fuint-repository/src/main/java/com/fuint/repository/model/MtOrder.java b/fuintBackend/fuint-repository/src/main/java/com/fuint/repository/model/MtOrder.java index 102b6c7..9afef18 100644 --- a/fuintBackend/fuint-repository/src/main/java/com/fuint/repository/model/MtOrder.java +++ b/fuintBackend/fuint-repository/src/main/java/com/fuint/repository/model/MtOrder.java @@ -36,7 +36,7 @@ public class MtOrder implements Serializable { private String payType; @ApiModelProperty("订单模式") - private String orderMode; + private String orderMode ; @ApiModelProperty("订单号") private String orderSn; @@ -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; From 7004c068211476218e72fa54a7243c3c3d2fd4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=9F=E6=9D=83=E4=BC=9F?= <872046794@qq.com> Date: Wed, 31 Jul 2024 13:50:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fuint/common/bean/WxPayBean.java | 18 +++++++++++ .../service/impl/WeixinServiceImpl.java | 31 +++++++++++++------ .../main/resources/application-dev.properties | 9 ++++-- .../resources/application-prod.properties | 2 ++ 4 files changed, 49 insertions(+), 11 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/bean/WxPayBean.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/bean/WxPayBean.java index 44cbe3a..1004b31 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/bean/WxPayBean.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/bean/WxPayBean.java @@ -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=" diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/WeixinServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/WeixinServiceImpl.java index f81fafb..0fc1bd9 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/WeixinServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/WeixinServiceImpl.java @@ -607,8 +607,10 @@ public class WeixinServiceImpl implements WeixinService { getApiConfig(storeId, platform); WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig(); Map 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 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 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 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) diff --git a/fuintBackend/fuint-application/src/main/resources/application-dev.properties b/fuintBackend/fuint-application/src/main/resources/application-dev.properties index 457d47f..f2a687a 100644 --- a/fuintBackend/fuint-application/src/main/resources/application-dev.properties +++ b/fuintBackend/fuint-application/src/main/resources/application-dev.properties @@ -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 diff --git a/fuintBackend/fuint-application/src/main/resources/application-prod.properties b/fuintBackend/fuint-application/src/main/resources/application-prod.properties index 071a7bc..6c81ec5 100644 --- a/fuintBackend/fuint-application/src/main/resources/application-prod.properties +++ b/fuintBackend/fuint-application/src/main/resources/application-prod.properties @@ -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