diff --git a/fuintAdmin/.env.development b/fuintAdmin/.env.development index b3e75d6..5ee09c2 100644 --- a/fuintAdmin/.env.development +++ b/fuintAdmin/.env.development @@ -12,4 +12,4 @@ VUE_APP_PUBLIC_PATH = '/' # 后端接口地址 #VUE_APP_SERVER_URL = 'http://127.0.0.1:8999/' -VUE_APP_SERVER_URL = 'http://192.168.10.70:8999/' +VUE_APP_SERVER_URL = 'http://192.168.10.15:8999' diff --git a/fuintAdmin/.env.production b/fuintAdmin/.env.production index a27ec9d..cbd2d59 100644 --- a/fuintAdmin/.env.production +++ b/fuintAdmin/.env.production @@ -5,10 +5,10 @@ VUE_APP_TITLE = 李学武牡丹瓷官方旗舰店 ENV = 'production' # 李学武牡丹瓷官方旗舰店/生产环境 -VUE_APP_BASE_API = '/dev-api' +VUE_APP_BASE_API = '/prod-api' # 发布目录 VUE_APP_PUBLIC_PATH = '/' # 后端接口地址 -VUE_APP_SERVER_URL = 'http://192.168.10.31:8999/' +VUE_APP_SERVER_URL = 'https://mdc.huamar.com/' diff --git a/fuintAdmin/src/components/Fuint/QrCode/index.vue b/fuintAdmin/src/components/Fuint/QrCode/index.vue index 9684ce6..46c7098 100644 --- a/fuintAdmin/src/components/Fuint/QrCode/index.vue +++ b/fuintAdmin/src/components/Fuint/QrCode/index.vue @@ -6,10 +6,10 @@ <div class="title">小程序:</div> <img class="qr-code" title="二维码" :src="minAppQrCode"> </div> - <div class="qr-detail" v-if="h5QrCode"> - <div class="title">h5:</div> - <img class="qr-code" title="二维码" :src="h5QrCode"> - </div> +<!-- <div class="qr-detail" v-if="h5QrCode">--> +<!-- <div class="title">h5:</div>--> +<!-- <img class="qr-code" title="二维码" :src="h5QrCode">--> +<!-- </div>--> </div> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="close()">关闭</el-button> diff --git a/fuintAdmin/src/views/login.vue b/fuintAdmin/src/views/login.vue index 4fd1bfc..3a1a6ba 100644 --- a/fuintAdmin/src/views/login.vue +++ b/fuintAdmin/src/views/login.vue @@ -85,8 +85,8 @@ export default { codeUrl: "", systemName : process.env.VUE_APP_TITLE, loginForm: { - username: "fuint", - password: "123456", + username: "", + password: "", rememberMe: false, captchaCode: "", uuid: "" diff --git a/fuintAdmin/src/views/store/list.vue b/fuintAdmin/src/views/store/list.vue index a01c4c2..31a12af 100644 --- a/fuintAdmin/src/views/store/list.vue +++ b/fuintAdmin/src/views/store/list.vue @@ -329,13 +329,7 @@ </el-form-item> </el-col> </el-row> - <!-- <el-row> - <el-col :span="24"> - <el-form-item label="店铺详情"> - <editor v-model="form.mtDetails" :min-height="550"/> - </el-form-item> - </el-col> - </el-row> --> + </el-form> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">确定</el-button> diff --git a/fuintBackend/configure/dev/application.properties b/fuintBackend/configure/dev/application.properties deleted file mode 100644 index 24471a7..0000000 --- a/fuintBackend/configure/dev/application.properties +++ /dev/null @@ -1,119 +0,0 @@ -# \u6570\u636E\u5E93\u914D\u7F6E -spring.datasource.url=jdbc:mysql://192.168.10.31:7536/fuint-db1?useUnicode=true&characterEncoding=UTF8&useSSL=false -spring.datasource.username=root -spring.datasource.password=a8EYUSoT8wHbuRkX - -# Redis\u914D\u7F6E -spring.session.store-type=redis -spring.session.redis.namespace=fuint -# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09 -spring.redis.database=0 -# Redis\u670D\u52A1\u5668\u5730\u5740(\u751F\u4EA7) -spring.redis.host=192.168.10.31 -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3 -spring.redis.port=7679 -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09 -spring.redis.password= -# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.pool.max-active=-1 -# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.pool.max-wait=-1 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.pool.max-idle=8 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.pool.min-idle=0 -# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 -spring.redis.timeout=0 - -# \u7CFB\u7EDF\u540D\u79F0 -system.name = fuint\u4F1A\u5458\u8425\u9500\u7BA1\u7406\u7CFB\u7EDF - -# \u524D\u7AEFh5\u5730\u5740 -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.path=/static/uploadImages/ - -# \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D -images.upload.url=http://localhost:8080 - -# \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09 -images.upload.maxSize=5 - -################## \u5B9A\u65F6\u811A\u672C\u914D\u7F6E ######################### -# \u5B9A\u65F6\u53D1\u9001\u6D88\u606F -message.job.switch = 1 -message.job.time = 0 0/1 * * * ? - -# \u5361\u5238\u5230\u671F\u5904\u7406 -couponExpire.job.switch = 1 -couponExpire.job.time = 0 0/1 * * * ? - -# \u8BA2\u5355\u8D85\u65F6\u53D6\u6D88 -orderCancel.job.switch = 1 -orderCancel.job.time = 0 0/1 * * * ? - -# \u5206\u4F63\u63D0\u6210\u8BA1\u7B97 -commission.job.switch = 1 -commission.job.time = 0 0/1 * * * ? - -################## \u963F\u91CC\u4E91\u77ED\u4FE1\u914D\u7F6E ####################### -# \u77ED\u4FE1\u63A5\u53E3\u6A21\u5F0F[0-\u5173\u95ED 1-\u6253\u5F00] -aliyun.sms.mode = 0 -aliyun.sms.accessKeyId=LTAI4GJMjV123oXsrQJLnPZt -aliyun.sms.accessKeySecret=eGVBL30u5Ypj234d7XODlwYKWTaGT -# \u963F\u91CC\u4E91\u77ED\u4FE1\u7B7E\u540D -aliyun.sms.signName=\u5EF6\u79BE\u6280\u672F - - - -################## \u963F\u91CC\u4E91OSS\u5B58\u50A8\u914D\u7F6E###################### -# \u6A21\u5F0F[0-\u5173\u95ED 1-\u6253\u5F00] -aliyun.oss.mode = 0 -aliyun.oss.accessKeyId = LTAI4FxWczZd7sojZBYonMnV -aliyun.oss.accessKeySecret = LJXig28y5CMMV8jORlGZ08MNLXGzg1 -aliyun.oss.endpoint = https://oss-cn-zhangjiakou.aliyuncs.com -aliyun.oss.bucketName = fuint-application -# \u4E0A\u4F20\u6587\u4EF6\u5939 -aliyun.oss.folder = uploads -# \u8BBF\u95EE\u57DF\u540D -aliyun.oss.domain = https://wine-east-img.oss-cn-zhangjiakou.aliyuncs.com - -################## \u5FAE\u4FE1\u76F8\u5173\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 -wxpay.mchId=1485526382 -wxpay.apiV2=f5aacf8f7ff800f4cd039f2514c5d7da - -#\u5FAE\u4FE1\u5C0F\u7A0B\u5E8Fappid: wx53b5ac263b9cdb5b -#\u5FAE\u4FE1\u5C0F\u7A0B\u5E8FAppSecret: baa127ca662344cf9b0b8e52b26bac9d -#\u5FAE\u4FE1\u652F\u4ED8: 1485526382 -#\u5FAE\u4FE1\u652F\u4ED8mchKey: HUAMARYUN20171104QAZWSXEDCRFVTGB -#\u5FAE\u4FE1\u652F\u4ED8apiv2\u5BC6\u94A5\uFF1Af5aacf8f7ff800f4cd039f2514c5d7da -#\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 -alipay.privateKey = \u5E94\u7528\u79C1\u94A5 -alipay.publicKey = \u652F\u4ED8\u5B9D\u516C\u94A5\uFF08\u901A\u8FC7\u5E94\u7528\u516C\u94A5\u4E0A\u4F20\u5230\u652F\u4ED8\u5B9D\u5F00\u653E\u5E73\u53F0\u6362\u53D6\u652F\u4ED8\u5B9D\u516C\u94A5\uFF09 -alipay.serverUrl=https://openapi.alipay.com/gateway.do -alipay.domain=https://www.huamar.com/fuint-application/clientApi/pay/aliPayCallback - -################ \u5FAE\u4FE1\u8BA2\u9605\u6A21\u677F\u6D88\u606F\u914D\u7F6E ###################### -weixin.subMessage.orderCreated=[{'key':'time', 'name':'\u8BA2\u5355\u65F6\u95F4'},{'key':'orderSn', 'name':'\u8BA2\u5355\u53F7'},{'key':'remark', 'name':'\u5907\u6CE8\u4FE1\u606F'}] -weixin.subMessage.deliverGoods=[{'key':'receiver', 'name':'\u6536\u8D27\u4EBA'}, {'key':'orderSn', 'name':'\u8BA2\u5355\u53F7'}, {'key':'expressCompany', 'name':'\u5FEB\u9012\u516C\u53F8'}, {'key':'expressNo', 'name':'\u5FEB\u9012\u5355\u53F7'}] -weixin.subMessage.couponExpire=[{'key':'name', 'name':'\u5361\u5238\u540D\u79F0'}, {'key':'expireTime', 'name':'\u5230\u671F\u65F6\u95F4'},{'key':'tips', 'name':'\u6E29\u99A8\u63D0\u793A'}] -weixin.subMessage.couponArrival=[{'key':'name', 'name':'\u5361\u5238\u540D\u79F0'},{'key':'amount', 'name':'\u91D1\u989D'},{'key':'tips', 'name':'\u6E29\u99A8\u63D0\u793A'}] -weixin.subMessage.balanceChange=[{'key':'amount', 'name':'\u53D8\u52A8\u91D1\u989D'},{'key':'time', 'name':'\u53D8\u52A8\u65F6\u95F4'},{'key':'tips', 'name':'\u6E29\u99A8\u63D0\u793A'}] -weixin.subMessage.couponConfirm=[{'key':'name', 'name':'\u5361\u5238\u540D\u79F0'},{'key':'time', 'name':'\u6838\u9500\u65F6\u95F4'}] -weixin.subMessage.pointChange=[{'key':'amount', 'name':'\u53D8\u52A8\u6570\u91CF'},{'key':'time', 'name':'\u53D8\u52A8\u65F6\u95F4'},{'key':'remark', 'name':'\u5907\u6CE8\u4FE1\u606F'}] diff --git a/fuintBackend/configure/prod/application.properties b/fuintBackend/configure/prod/application.properties deleted file mode 100644 index ed74b26..0000000 --- a/fuintBackend/configure/prod/application.properties +++ /dev/null @@ -1,108 +0,0 @@ -# \u6570\u636E\u5E93\u914D\u7F6E -spring.datasource.url=jdbc:mysql://192.168.10.31:7536/fuint-db?useUnicode=true&characterEncoding=UTF8&useSSL=false -spring.datasource.username=root -spring.datasource.password=a8EYUSoT8wHbuRkX - -# Redis\u914D\u7F6E -spring.session.store-type=redis -spring.session.redis.namespace=fuint -# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09 -spring.redis.database=0 -# Redis\u670D\u52A1\u5668\u5730\u5740(\u751F\u4EA7) -spring.redis.host=192.168.10.31 -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3 -spring.redis.port=7679 -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09 -spring.redis.password= -# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.pool.max-active=-1 -# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.pool.max-wait=-1 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.pool.max-idle=8 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.pool.min-idle=0 -# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 -spring.redis.timeout=0 - -# \u7CFB\u7EDF\u540D\u79F0 -system.name = fuint\u4F1A\u5458\u8425\u9500\u7BA1\u7406\u7CFB\u7EDF - -# \u524D\u7AEFh5\u5730\u5740 -website.url=https://www.fuint.cn/h5/ - -# \u4E0A\u4F20\u56FE\u7247\u672C\u5730\u5730\u5740 -images.root=/www/wwwroot/www.xxx.com -images.path=/static/uploadImages/ - -# \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D -images.upload.url=http://localhost:8080 - -# \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09 -images.upload.maxSize=5 - -################## \u5B9A\u65F6\u811A\u672C\u914D\u7F6E ######################### -# \u5B9A\u65F6\u53D1\u9001\u6D88\u606F -message.job.switch = 1 -message.job.time = 0 0/1 * * * ? - -# \u5361\u5238\u5230\u671F\u5904\u7406 -couponExpire.job.switch = 1 -couponExpire.job.time = 0 0/1 * * * ? - -# \u8BA2\u5355\u8D85\u65F6\u53D6\u6D88 -orderCancel.job.switch = 1 -orderCancel.job.time = 0 0/1 * * * ? - -# \u5206\u4F63\u63D0\u6210\u8BA1\u7B97 -commission.job.switch = 1 -commission.job.time = 0 0/1 * * * ? - -################## \u963F\u91CC\u4E91\u77ED\u4FE1\u914D\u7F6E ####################### -# \u77ED\u4FE1\u63A5\u53E3\u6A21\u5F0F[0-\u5173\u95ED 1-\u6253\u5F00] -aliyun.sms.mode = 0 -aliyun.sms.accessKeyId=LTAI4GJMjV123oXsrQJLnPZt -aliyun.sms.accessKeySecret=eGVBL30u5Ypj234d7XODlwYKWTaGT -# \u963F\u91CC\u4E91\u77ED\u4FE1\u7B7E\u540D -aliyun.sms.signName=\u5EF6\u79BE\u6280\u672F - -################## \u963F\u91CC\u4E91OSS\u5B58\u50A8\u914D\u7F6E###################### -# \u6A21\u5F0F[0-\u5173\u95ED 1-\u6253\u5F00] -aliyun.oss.mode = 0 -aliyun.oss.accessKeyId = LTAI4GJMjVhBa212rQJLnPZt -aliyun.oss.accessKeySecret = eGVBL30u53456gXd7XODlwYKWTaGT -aliyun.oss.endpoint = https://oss-cn-shenzhen.aliyuncs.com -aliyun.oss.bucketName = fuint-application -# \u4E0A\u4F20\u6587\u4EF6\u5939 -aliyun.oss.folder = uploads -# \u8BBF\u95EE\u57DF\u540D -aliyun.oss.domain = https://fuint-application.oss-cn-shenzhen.aliyuncs.com - -################## \u5FAE\u4FE1\u76F8\u5173\u914D\u7F6E ########################## -# \u516C\u4F17\u53F7\u914D\u7F6E -weixin.official.appId=wxf4327ef05c27a0 -weixin.official.appSecret=1f55e8749332234d9a074873d8e6a3 - -# \u5C0F\u7A0B\u5E8F\u914D\u7F6E -wxpay.appId = wxb6af3741234162bc -wxpay.appSecret = 76a538bfa5b55a4564d5f2be5540 -wxpay.mchId=1636980812 -wxpay.apiV2=34354320201030y323e432342343 -wxpay.certPath=/usr/local/fuint/cert/apiclient_cert.p12 -wxpay.domain=https://www.fuint.cn/fuint-application - -################## \u652F\u4ED8\u5B9D\u652F\u4ED8\u76F8\u5173\u914D\u7F6E ###################### -alipay.appId = \u5E94\u7528\u7F16\u53F7 -alipay.privateKey = \u5E94\u7528\u79C1\u94A5 -alipay.publicKey = \u652F\u4ED8\u5B9D\u516C\u94A5\uFF08\u901A\u8FC7\u5E94\u7528\u516C\u94A5\u4E0A\u4F20\u5230\u652F\u4ED8\u5B9D\u5F00\u653E\u5E73\u53F0\u6362\u53D6\u652F\u4ED8\u5B9D\u516C\u94A5\uFF09 -alipay.serverUrl=https://openapi.alipay.com/gateway.do -alipay.domain=https://www.fuint.cn/fuint-application/clientApi/pay/aliPayCallback - -################ \u5FAE\u4FE1\u8BA2\u9605\u6A21\u677F\u6D88\u606F\u914D\u7F6E ###################### -weixin.subMessage.orderCreated=[{'key':'time', 'name':'\u8BA2\u5355\u65F6\u95F4'},{'key':'orderSn', 'name':'\u8BA2\u5355\u53F7'},{'key':'remark', 'name':'\u5907\u6CE8\u4FE1\u606F'}] -weixin.subMessage.deliverGoods=[{'key':'receiver', 'name':'\u6536\u8D27\u4EBA'}, {'key':'orderSn', 'name':'\u8BA2\u5355\u53F7'}, {'key':'expressCompany', 'name':'\u5FEB\u9012\u516C\u53F8'}, {'key':'expressNo', 'name':'\u5FEB\u9012\u5355\u53F7'}] -weixin.subMessage.couponExpire=[{'key':'name', 'name':'\u5361\u5238\u540D\u79F0'}, {'key':'expireTime', 'name':'\u5230\u671F\u65F6\u95F4'},{'key':'tips', 'name':'\u6E29\u99A8\u63D0\u793A'}] -weixin.subMessage.couponArrival=[{'key':'name', 'name':'\u5361\u5238\u540D\u79F0'},{'key':'amount', 'name':'\u91D1\u989D'},{'key':'tips', 'name':'\u6E29\u99A8\u63D0\u793A'}] -weixin.subMessage.balanceChange=[{'key':'amount', 'name':'\u53D8\u52A8\u91D1\u989D'},{'key':'time', 'name':'\u53D8\u52A8\u65F6\u95F4'},{'key':'tips', 'name':'\u6E29\u99A8\u63D0\u793A'}] -weixin.subMessage.couponConfirm=[{'key':'name', 'name':'\u5361\u5238\u540D\u79F0'},{'key':'time', 'name':'\u6838\u9500\u65F6\u95F4'}] -weixin.subMessage.pointChange=[{'key':'amount', 'name':'\u53D8\u52A8\u6570\u91CF'},{'key':'time', 'name':'\u53D8\u52A8\u65F6\u95F4'},{'key':'remark', 'name':'\u5907\u6CE8\u4FE1\u606F'}] \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/enums/MerchantTypeEnum.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/enums/MerchantTypeEnum.java index cbb8ef9..bfe2a5d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/enums/MerchantTypeEnum.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/enums/MerchantTypeEnum.java @@ -7,9 +7,9 @@ package com.fuint.common.enums; * CopyRight https://www.fuint.cn */ public enum MerchantTypeEnum { - RESTAURANT("restaurant", "餐饮:餐厅、奶茶、酒店等"), - RETAIL("retail", "零售:超市、生鲜、卖场等"), - SERVICE("service", "服务:美容、足浴、汽车4s店等"), + RESTAURANT("restaurant", "家装等"), + RETAIL("retail", "零售等"), + SERVICE("service", "服务等"), OTHER("other", "其他"); private String key; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/WeixinService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/WeixinService.java index 6ec3dab..48b13cf 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/WeixinService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/WeixinService.java @@ -70,6 +70,16 @@ public interface WeixinService { * */ JSONObject getWxProfile(Integer merchantId, String code) throws BusinessCheckException; + /** + * 获取微信小程序openId + * @param appid + * @param appSecret + * @param code + * @return + * @throws BusinessCheckException + */ + JSONObject getOpenidByCodeNew(String appid, String appSecret, String code) ; + /** * 获取微信openId * diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/SendSmsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/SendSmsServiceImpl.java index fd03ba0..8167da8 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/SendSmsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/SendSmsServiceImpl.java @@ -72,7 +72,7 @@ public class SendSmsServiceImpl implements SendSmsService { * */ @Override public Map<Boolean,List<String>> sendSms(Integer merchantId, String templateUname, List<String> phones, Map<String, String> contentParams) { - logger.info("使用短信平台发送短信....."); + logger.info("使用短信平台发送短信.....,{}",contentParams); Map<Boolean, List<String>> result = new HashMap<>(); Integer mode = Integer.parseInt(env.getProperty("aliyun.sms.mode")); if (mode.intValue() != 1) { 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 0fc1bd9..aff2e4a 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 @@ -130,7 +130,6 @@ public class WeixinServiceImpl implements WeixinService { tokenKey = tokenKey + merchantId; } } - String wxTokenUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"; String url = String.format(wxTokenUrl, wxAppId, wxAppSecret); String token = ""; @@ -344,6 +343,33 @@ public class WeixinServiceImpl implements WeixinService { return null; } + /** + * 小程序获取Openid的实现 + * @param appid + * @param appSecret + * @param code + * @return + */ + public JSONObject getOpenidByCodeNew(String appid, String appSecret, String code) { + JSONObject json = null; + try { + StringBuilder builder = new StringBuilder(); + //这里的url 为请求微信小程序登陆接口的url,请求方法为get 可储存在常量中以方便调用 + String url = "https://api.weixin.qq.com/sns/jscode2session"; + // 构建请求参数 + builder.append(url).append("?").append("appid=").append(appid) + .append("&secret=").append(appSecret).append("&js_code=").append(code) + .append("&grant_type=authorization_code"); + System.out.println(builder); + //通过http请求的工具类发送get请求 并拿到返回结果 + String result = HttpRESTDataClient.requestGet(builder.toString()); + json = JSONObject.parseObject(result); + }catch (Exception e){ + e.printStackTrace(); + } + return json; + } + /** * 获取公众号openId * @@ -558,8 +584,10 @@ public class WeixinServiceImpl implements WeixinService { getApiConfig(storeId, PlatformTypeEnum.MP_WEIXIN.getCode()); WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig(); Map<String, String> params = OrderQueryModel.builder() - .appid(wxPayApiConfig.getAppId()) - .mch_id(wxPayApiConfig.getMchId()) + .appid(wxPayApiConfig.getSlAppId()) + .mch_id(wxPayApiConfig.getSlMchId()) + .sub_appid(wxPayApiConfig.getAppId()) + .sub_mch_id(wxPayApiConfig.getMchId()) .transaction_id(transactionId) .out_trade_no(orderSn) .nonce_str(WxPayKit.generateStr()) @@ -621,7 +649,7 @@ public class WeixinServiceImpl implements WeixinService { .build() .createSign(wxPayApiConfig.getPartnerKey(), SignType.MD5); logger.info("WeixinService doRefund params: {}", params); - String refundStr = WxPayApi.orderRefundByProtocol(false, params, wxPayApiConfig.getCertPath(), wxPayApiConfig.getMchId(), ""); + String refundStr = WxPayApi.orderRefundByProtocol(false, params, wxPayApiConfig.getCertPath(), wxPayApiConfig.getSlMchId(), ""); logger.info("WeixinService doRefund return: {}", refundStr); Map<String, String> result = WxPayKit.xmlToMap(refundStr); String returnCode = result.get("return_code"); @@ -1026,6 +1054,21 @@ public class WeixinServiceImpl implements WeixinService { .trade_type(reqData.get("trade_type")) .build() .createSign(wxPayApiConfig.getPartnerKey(), SignType.MD5); +// .sub_appid("wxf0c4d6db59cce4ac") +// .sub_mch_id("1682335892") +// .sub_openid(reqData.get("openid")) +// .appid("wx3380e7abe43b767a") +// .mch_id("1682295854") +// .nonce_str(WxPayKit.generateStr()) +// .body(reqData.get("body")) +// .attach(reqData.get("body")) +// .out_trade_no(reqData.get("out_trade_no")) +// .total_fee(reqData.get("total_fee")) +// .spbill_create_ip(ip) +// .notify_url(wxPayApiConfig.getDomain() + CALL_BACK_URL) +// .trade_type(reqData.get("trade_type")) +// .build() +// .createSign(wxPayApiConfig.getPartnerKey(), SignType.MD5); String xmlResult = WxPayApi.pushOrder(false, params); logger.info("调用微信支付下单接口返回xml:{}", xmlResult); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMerchantController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMerchantController.java index 1d50440..17f9d03 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMerchantController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMerchantController.java @@ -8,6 +8,7 @@ import com.fuint.common.enums.StatusEnum; import com.fuint.common.service.MerchantService; import com.fuint.common.service.SettingService; import com.fuint.common.util.CommonUtil; +import com.fuint.common.util.RedisUtil; import com.fuint.common.util.TokenUtil; import com.fuint.framework.exception.BusinessCheckException; import com.fuint.framework.pagination.PaginationRequest; @@ -49,6 +50,8 @@ public class BackendMerchantController extends BaseController { * */ private SettingService settingService; + private static final String FUINT_ACCESS_TOKEN_PRE = "FUINT_ACCESS_TOKEN"; + /** * 分页查询商户列表 * @@ -74,6 +77,12 @@ public class BackendMerchantController extends BaseController { } if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) { merchantId = accountInfo.getMerchantId().toString(); + //删除店铺小程序token + String minAppTokenKey = FUINT_ACCESS_TOKEN_PRE + "minApp"+merchantId; + RedisUtil.remove(minAppTokenKey); + //删除店铺公众号token + String mpTokenKey = FUINT_ACCESS_TOKEN_PRE + "mp"+merchantId; + RedisUtil.remove(mpTokenKey); } PaginationRequest paginationRequest = new PaginationRequest(); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStoreController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStoreController.java index d1e7a1b..e2f45c8 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStoreController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStoreController.java @@ -228,7 +228,6 @@ public class BackendStoreController extends BaseController { String bankCardNo = params.get("bankCardNo") == null ? "" : CommonUtil.replaceXSS(params.get("bankCardNo").toString()); String status = params.get("status") != null ? params.get("status").toString() : StatusEnum.ENABLED.getKey(); String merchantId = params.get("merchantId").toString(); - String mtDetails = params.get("mtDetails").toString(); if ((StringUtil.isEmpty(latitude) || StringUtil.isEmpty(longitude)) && StringUtil.isNotEmpty(address)) { Map<String, Object> latAndLng = CommonUtil.getLatAndLngByAddress(address); @@ -262,7 +261,6 @@ public class BackendStoreController extends BaseController { storeInfo.setAlipayAppId(alipayAppId); storeInfo.setAlipayPrivateKey(alipayPrivateKey); storeInfo.setAlipayPublicKey(alipayPublicKey); - storeInfo.setMtDetails(mtDetails); if (StringUtil.isNotEmpty(merchantId)) { storeInfo.setMerchantId(Integer.parseInt(merchantId)); } diff --git a/fuintBackend/fuint-application/src/main/resources/application-dev.properties b/fuintBackend/fuint-application/src/main/resources/application-dev.properties index f2a687a..dbe34c1 100644 --- a/fuintBackend/fuint-application/src/main/resources/application-dev.properties +++ b/fuintBackend/fuint-application/src/main/resources/application-dev.properties @@ -1,5 +1,5 @@ # \u6570\u636E\u5E93\u914D\u7F6E -spring.datasource.url=jdbc:mysql://192.168.10.31:7536/mu-dan-ci-shop?useUnicode=true&characterEncoding=UTF8&useSSL=false +spring.datasource.url=jdbc:mysql://120.46.137.193:13306/mu-dan-ci-shop?useUnicode=true&characterEncoding=UTF8&useSSL=false spring.datasource.username=root spring.datasource.password=a8EYUSoT8wHbuRkX @@ -9,11 +9,11 @@ spring.session.redis.namespace=fuint # Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09 spring.redis.database=0 # Redis\u670D\u52A1\u5668\u5730\u5740(\u751F\u4EA7) -spring.redis.host=120.46.159.203 +spring.redis.host=192.168.10.31 # Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3 -spring.redis.port=16379 +spring.redis.port=7679 # Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09 -spring.redis.password=a8EYUSoT8wHbuRkX +spring.redis.password= # \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 spring.redis.pool.max-active=-1 # \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 @@ -38,7 +38,7 @@ images.root=/target/classes images.path=/static/uploadImages/ # \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D -images.upload.url=http://192.168.10.70:8999 +images.upload.url=http://192.168.10.89:8999 # \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09 images.upload.maxSize=5 @@ -85,28 +85,20 @@ 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 +weixin.official.appId=wxf0c4d6db59cce4ac +weixin.official.appSecret=fb9850e82b576d65039801f82b00e61c # \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 -#\u5FAE\u4FE1\u652F\u4ED8mchKey: HUAMARYUN20171104QAZWSXEDCRFVTGB -#\u5FAE\u4FE1\u652F\u4ED8apiv2\u5BC6\u94A5\uFF1Af5aacf8f7ff800f4cd039f2514c5d7da -#\u5FAE\u4FE1\u652F\u4ED8apiv3\u5BC6\u94A5\uFF1Af5aacf8f7ff800f4cd039f2514c5d7da - +wxpay.appId = wxf0c4d6db59cce4ac +wxpay.appSecret = fb9850e82b576d65039801f82b00e61c +wxpay.mchId=1682335892 +#\u670D\u52A1\u5546 +wxpay.slAppId=wx3380e7abe43b767a +wxpay.slMchId=1682295854 +wxpay.apiV2=cK1iA6nK3dH1nN2vY6vH4gA2yU5zZ5pH +\u5FAE\u4FE1\u652F\u4ED8apiv2\u5BC6\u94A5 +wxpay.certPath=/apiclient_cert.p12 +wxpay.domain=https://mdc.huamar.com/clientApi/pay/weixinCallback ################## \u652F\u4ED8\u5B9D\u652F\u4ED8\u76F8\u5173\u914D\u7F6E ###################### diff --git a/fuintBackend/fuint-application/src/main/resources/application-prod.properties b/fuintBackend/fuint-application/src/main/resources/application-prod.properties index 6c81ec5..c35210c 100644 --- a/fuintBackend/fuint-application/src/main/resources/application-prod.properties +++ b/fuintBackend/fuint-application/src/main/resources/application-prod.properties @@ -1,5 +1,5 @@ # \u6570\u636E\u5E93\u914D\u7F6E -spring.datasource.url=jdbc:mysql://192.168.10.31:7536/fuint-db?useUnicode=true&characterEncoding=UTF8&useSSL=false +spring.datasource.url=jdbc:mysql://120.46.137.193:13306/mu-dan-ci-shop?useUnicode=true&characterEncoding=UTF8&useSSL=false spring.datasource.username=root spring.datasource.password=a8EYUSoT8wHbuRkX @@ -9,9 +9,9 @@ spring.session.redis.namespace=fuint # Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09 spring.redis.database=0 # Redis\u670D\u52A1\u5668\u5730\u5740(\u751F\u4EA7) -spring.redis.host=192.168.10.31 +spring.redis.host=127.0.0.1 # Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3 -spring.redis.port=7679 +spring.redis.port=6379 # Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09 spring.redis.password= # \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 @@ -26,20 +26,20 @@ spring.redis.pool.min-idle=0 spring.redis.timeout=0 # \u7CFB\u7EDF\u540D\u79F0 -system.name = fuint\u4F1A\u5458\u8425\u9500\u7BA1\u7406\u7CFB\u7EDF +system.name = \u674E\u5B66\u6B66\u7261\u4E39\u74F7\u5B98\u65B9\u65D7\u8230\u5E97 # \u524D\u7AEFh5\u5730\u5740 website.url=https://www.fuint.cn/h5/ # \u4E0A\u4F20\u56FE\u7247\u672C\u5730\u5730\u5740 -#images.root=/www/wwwroot/www.xxx.com +images.root=/home/ images.path=/static/uploadImages/ # \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D -images.upload.url=http://192.168.10.31:8999 +images.upload.url=https://mdc.huamar.com # \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09 -images.upload.maxSize=5 +images.upload.maxSize=50 ################## \u5B9A\u65F6\u811A\u672C\u914D\u7F6E ######################### # \u5B9A\u65F6\u53D1\u9001\u6D88\u606F @@ -80,18 +80,21 @@ aliyun.oss.domain = https://fuint-application.oss-cn-shenzhen.aliyuncs.com ################## \u5FAE\u4FE1\u76F8\u5173\u914D\u7F6E ########################## # \u516C\u4F17\u53F7\u914D\u7F6E -weixin.official.appId=wxf4327ef05c27a0 -weixin.official.appSecret=1f55e8749332234d9a074873d8e6a3 +weixin.official.appId=wxf0c4d6db59cce4ac +weixin.official.appSecret=fb9850e82b576d65039801f82b00e61c # \u5C0F\u7A0B\u5E8F\u914D\u7F6E -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 +wxpay.appId = wxf0c4d6db59cce4ac +wxpay.appSecret = fb9850e82b576d65039801f82b00e61c +wxpay.mchId=1682335892 +#\u670D\u52A1\u5546 +wxpay.slAppId=wx3380e7abe43b767a +wxpay.slMchId=1682295854 +wxpay.apiV2=cK1iA6nK3dH1nN2vY6vH4gA2yU5zZ5pH +\u5FAE\u4FE1\u652F\u4ED8apiv2\u5BC6\u94A5 +wxpay.certPath=/home/cert/apiclient_cert.p12 +wxpay.domain=https://mdc.huamar.com/fuint-application/clientApi/pay/weixinCallback + ################## \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.properties b/fuintBackend/fuint-application/src/main/resources/application.properties index 167b3ca..7ffb82e 100644 --- a/fuintBackend/fuint-application/src/main/resources/application.properties +++ b/fuintBackend/fuint-application/src/main/resources/application.properties @@ -1,8 +1,7 @@ # \u57FA\u672C\u914D\u7F6E server.port=8999 -env.profile=dev -env.properties.path=./configure +env.profile=prod # \u6570\u636E\u5E93\u914D\u7F6E spring.datasource.type=com.zaxxer.hikari.HikariDataSource