-
使用已有账户登录
+
+ 使用已有账户登录
@@ -86,26 +114,40 @@ export default {
password: "",
confirmPassword: "",
code: "",
- uuid: ""
+ uuid: "",
},
registerRules: {
username: [
{ required: true, trigger: "blur", message: "请输入您的账号" },
- { min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' }
+ {
+ min: 2,
+ max: 20,
+ message: "用户账号长度必须介于 2 和 20 之间",
+ trigger: "blur",
+ },
],
password: [
{ required: true, trigger: "blur", message: "请输入您的密码" },
- { min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" },
- { pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }
+ {
+ min: 5,
+ max: 20,
+ message: "用户密码长度必须介于 5 和 20 之间",
+ trigger: "blur",
+ },
+ {
+ pattern: /^[^<>"'|\\]+$/,
+ message: "不能包含非法字符:< > \" ' \\\ |",
+ trigger: "blur",
+ },
],
confirmPassword: [
{ required: true, trigger: "blur", message: "请再次输入您的密码" },
- { required: true, validator: equalToPassword, trigger: "blur" }
+ { required: true, validator: equalToPassword, trigger: "blur" },
],
- code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+ code: [{ required: true, trigger: "change", message: "请输入验证码" }],
},
loading: false,
- captchaEnabled: true
+ captchaEnabled: true,
};
},
created() {
@@ -113,8 +155,9 @@ export default {
},
methods: {
getCode() {
- getCodeImg().then(res => {
- this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
+ getCodeImg().then((res) => {
+ this.captchaEnabled =
+ res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.registerForm.uuid = res.uuid;
@@ -122,27 +165,37 @@ export default {
});
},
handleRegister() {
- this.$refs.registerForm.validate(valid => {
+ this.$refs.registerForm.validate((valid) => {
if (valid) {
this.loading = true;
- register(this.registerForm).then(res => {
- const username = this.registerForm.username;
- this.$alert("
恭喜你,您的账号 " + username + " 注册成功!", '系统提示', {
- dangerouslyUseHTMLString: true,
- type: 'success'
- }).then(() => {
- this.$router.push("/login");
- }).catch(() => {});
- }).catch(() => {
- this.loading = false;
- if (this.captchaEnabled) {
- this.getCode();
- }
- })
+ register(this.registerForm)
+ .then((res) => {
+ const username = this.registerForm.username;
+ this.$alert(
+ "
恭喜你,您的账号 " +
+ username +
+ " 注册成功!",
+ "系统提示",
+ {
+ dangerouslyUseHTMLString: true,
+ type: "success",
+ }
+ )
+ .then(() => {
+ this.$router.push("/login");
+ })
+ .catch(() => {});
+ })
+ .catch(() => {
+ this.loading = false;
+ if (this.captchaEnabled) {
+ this.getCode();
+ }
+ });
}
});
- }
- }
+ },
+ },
};
diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js
index b251fd7a..5dcf1e43 100644
--- a/ruoyi-ui/vue.config.js
+++ b/ruoyi-ui/vue.config.js
@@ -1,15 +1,15 @@
-'use strict'
-const path = require('path')
+"use strict";
+const path = require("path");
function resolve(dir) {
- return path.join(__dirname, dir)
+ return path.join(__dirname, dir);
}
-const CompressionPlugin = require('compression-webpack-plugin')
+const CompressionPlugin = require("compression-webpack-plugin");
-const name = process.env.VUE_APP_TITLE || '租研舍管理系统' // 网页标题
+const name = process.env.VUE_APP_TITLE || "未信用秒租管理系统"; // 网页标题
-const port = process.env.port || process.env.npm_config_port || 80 // 端口
+const port = process.env.port || process.env.npm_config_port || 80; // 端口
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
@@ -20,111 +20,111 @@ module.exports = {
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
- outputDir: 'dist',
+ outputDir: "dist",
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
- assetsDir: 'static',
+ assetsDir: "static",
// 是否开启eslint保存检测,有效值:ture | false | 'error'
- lintOnSave: process.env.NODE_ENV === 'development',
+ lintOnSave: process.env.NODE_ENV === "development",
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
productionSourceMap: false,
// webpack-dev-server 相关配置
devServer: {
- host: '0.0.0.0',
- port: port,
+ host: "localhost",
+ port: 81,
open: true,
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- target: `http://localhost:8080`,
+ target: `http://y787tf.natappfree.cc`,
+ // target: `http://124.222.144.55/dev-api`,
changeOrigin: true,
pathRewrite: {
- ['^' + process.env.VUE_APP_BASE_API]: ''
- }
- }
+ ["^" + process.env.VUE_APP_BASE_API]: "",
+ },
+ },
},
- disableHostCheck: true
+ disableHostCheck: true,
},
css: {
loaderOptions: {
sass: {
- sassOptions: { outputStyle: "expanded" }
- }
- }
+ sassOptions: { outputStyle: "expanded" },
+ },
+ },
},
configureWebpack: {
name: name,
resolve: {
alias: {
- '@': resolve('src')
- }
+ "@": resolve("src"),
+ },
},
plugins: [
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
new CompressionPlugin({
- cache: false, // 不启用文件缓存
- test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式
- filename: '[path][base].gz[query]', // 压缩后的文件名
- algorithm: 'gzip', // 使用gzip压缩
- minRatio: 0.8, // 压缩比例,小于 80% 的文件不会被压缩
- deleteOriginalAssets: false // 压缩后删除原文件
- })
+ cache: false, // 不启用文件缓存
+ test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式
+ filename: "[path][base].gz[query]", // 压缩后的文件名
+ algorithm: "gzip", // 使用gzip压缩
+ minRatio: 0.8, // 压缩比例,小于 80% 的文件不会被压缩
+ deleteOriginalAssets: false, // 压缩后删除原文件
+ }),
],
},
chainWebpack(config) {
- config.plugins.delete('preload') // TODO: need test
- config.plugins.delete('prefetch') // TODO: need test
+ config.plugins.delete("preload"); // TODO: need test
+ config.plugins.delete("prefetch"); // TODO: need test
// set svg-sprite-loader
+ config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end();
config.module
- .rule('svg')
- .exclude.add(resolve('src/assets/icons'))
- .end()
- config.module
- .rule('icons')
+ .rule("icons")
.test(/\.svg$/)
- .include.add(resolve('src/assets/icons'))
+ .include.add(resolve("src/assets/icons"))
.end()
- .use('svg-sprite-loader')
- .loader('svg-sprite-loader')
+ .use("svg-sprite-loader")
+ .loader("svg-sprite-loader")
.options({
- symbolId: 'icon-[name]'
+ symbolId: "icon-[name]",
})
- .end()
+ .end();
- config.when(process.env.NODE_ENV !== 'development', config => {
- config
- .plugin('ScriptExtHtmlWebpackPlugin')
- .after('html')
- .use('script-ext-html-webpack-plugin', [{
+ config.when(process.env.NODE_ENV !== "development", (config) => {
+ config
+ .plugin("ScriptExtHtmlWebpackPlugin")
+ .after("html")
+ .use("script-ext-html-webpack-plugin", [
+ {
// `runtime` must same as runtimeChunk name. default is `runtime`
- inline: /runtime\..*\.js$/
- }])
- .end()
+ inline: /runtime\..*\.js$/,
+ },
+ ])
+ .end();
- config.optimization.splitChunks({
- chunks: 'all',
- cacheGroups: {
- libs: {
- name: 'chunk-libs',
- test: /[\\/]node_modules[\\/]/,
- priority: 10,
- chunks: 'initial' // only package third parties that are initially dependent
- },
- elementUI: {
- name: 'chunk-elementUI', // split elementUI into a single package
- test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
- priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
- },
- commons: {
- name: 'chunk-commons',
- test: resolve('src/components'), // can customize your rules
- minChunks: 3, // minimum common number
- priority: 5,
- reuseExistingChunk: true
- }
- }
- })
- config.optimization.runtimeChunk('single')
- })
- }
-}
+ config.optimization.splitChunks({
+ chunks: "all",
+ cacheGroups: {
+ libs: {
+ name: "chunk-libs",
+ test: /[\\/]node_modules[\\/]/,
+ priority: 10,
+ chunks: "initial", // only package third parties that are initially dependent
+ },
+ elementUI: {
+ name: "chunk-elementUI", // split elementUI into a single package
+ test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
+ priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
+ },
+ commons: {
+ name: "chunk-commons",
+ test: resolve("src/components"), // can customize your rules
+ minChunks: 3, // minimum common number
+ priority: 5,
+ reuseExistingChunk: true,
+ },
+ },
+ });
+ config.optimization.runtimeChunk("single");
+ });
+ },
+};
From c4944acb5e69cab33e92ba3e365cc21ea930079f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=BD=AD?=
Date: Sun, 22 Sep 2024 22:20:36 +0800
Subject: [PATCH 22/34] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E6=88=B7?=
=?UTF-8?q?=E3=80=81=E6=B8=A0=E9=81=93=E3=80=81=E7=94=A8=E6=88=B7=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E3=80=82=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/ruoyi/common/core/domain/http/Merchant.java | 4 ++++
.../src/main/resources/mapper/system/MerchantMapper.xml | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.java
index a0b0fb0d..4798f21d 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.java
@@ -109,6 +109,10 @@ public class Merchant extends BaseEntity
@Excel(name = "标签")
private String label;
+ /** 商户是否开启二要素 0 否 1 是 */
+ @Excel(name = "商户是否开启二要素")
+ private Boolean merchantAuth;
+
/** 无社保 */
@Excel(name = "无社保")
private Boolean socialSecurityNo;
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml
index e113672b..67305a04 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml
@@ -4,6 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
@@ -26,6 +27,7 @@
+
@@ -67,7 +69,7 @@
- select id, merchant_type, merchant_name, merchant_describe, merchant_company, logo, status, limit_num, limit_type,is_balance_monitoring,balance_monitoring,ispass, customer_info_filter_type,channel_limit_type,period,hit_url,regist_url,age_limit_start, age_limit_end, phone_limit,label, social_security_no, social_security_low, social_security_high, car_no, car_have, guarantee_slip_low, guarantee_slip_centre, guarantee_slip_high, education_middle, education_high_school, education_polytechnic, education_junior_college, education_undergraduate_course, education_postgraduate, accumulation_fund_low, accumulation_fund_high, hourse_no, hourse_full_payment, hourse_mortgaging, office_worker, civil_servant, private_property_owners, self_employed_person, other_occupations, hua_bei_low, hua_bei_middle, hua_bei_high, bai_tiao_low, bai_tiao_middle, bai_tiao_high, zhi_ma, create_time, update_time, remark from merchant
+ select id, merchant_type, merchant_name, merchant_describe, merchant_company, logo, status, limit_num, limit_type,is_balance_monitoring,balance_monitoring,ispass, customer_info_filter_type,channel_limit_type,period,hit_url,regist_url,age_limit_start, age_limit_end, phone_limit,label,merchant_auth, social_security_no, social_security_low, social_security_high, car_no, car_have, guarantee_slip_low, guarantee_slip_centre, guarantee_slip_high, education_middle, education_high_school, education_polytechnic, education_junior_college, education_undergraduate_course, education_postgraduate, accumulation_fund_low, accumulation_fund_high, hourse_no, hourse_full_payment, hourse_mortgaging, office_worker, civil_servant, private_property_owners, self_employed_person, other_occupations, hua_bei_low, hua_bei_middle, hua_bei_high, bai_tiao_low, bai_tiao_middle, bai_tiao_high, zhi_ma, create_time, update_time, remark from merchant
select id, merchant_name from merchant
@@ -96,6 +98,7 @@
and age_limit_end = #{ageLimitEnd}
and phone_limit = #{phoneLimit}
and label = #{label}
+ and merchant_auth = #{merchantAuth}
and social_security_no = #{socialSecurityNo}
and social_security_low = #{socialSecurityLow}
and social_security_high = #{socialSecurityHigh}
@@ -158,6 +161,7 @@
age_limit_end,
phone_limit,
label,
+ merchantAuth,
social_security_no,
social_security_low,
social_security_high,
@@ -214,6 +218,7 @@
#{ageLimitEnd},
#{phoneLimit},
#{label},
+ #{merchantAuth},
#{socialSecurityNo},
#{socialSecurityLow},
#{socialSecurityHigh},
@@ -274,6 +279,7 @@
age_limit_end = #{ageLimitEnd},
phone_limit = #{phoneLimit},
label = #{label},
+ merchant_auth = #{merchantAuth},
social_security_no = #{socialSecurityNo},
social_security_low = #{socialSecurityLow},
social_security_high = #{socialSecurityHigh},
From b7c042dd44668be5384ff6f4d6e517318896cdf5 Mon Sep 17 00:00:00 2001
From: liyang_v
Date: Sun, 22 Sep 2024 23:01:47 +0800
Subject: [PATCH 23/34] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/views/merchant/index.vue | 20 ++++++++++++--------
ruoyi-ui/vue.config.js | 2 +-
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/ruoyi-ui/src/views/merchant/index.vue b/ruoyi-ui/src/views/merchant/index.vue
index 968dde56..5977a887 100644
--- a/ruoyi-ui/src/views/merchant/index.vue
+++ b/ruoyi-ui/src/views/merchant/index.vue
@@ -317,7 +317,7 @@
准入渠道
禁入渠道
-
+ :value="item.id + ''">
@@ -778,7 +778,7 @@ export default {
huaBeiMiddle: 0,
huaBeiHigh: 0,
zhiMa: null,
- channelLimnit: []
+ channelLimit: []
};
this.resetForm("form");
},
@@ -811,7 +811,11 @@ export default {
getMerchant(id).then((response) => {
this.form = response.data;
this.form.period = this.form.period ? this.form.period.split(",") : [];
- this.form.period = this.form.channelLimnit ? this.form.channelLimnit.split(",") : [];
+ this.form.channelLimit = this.form.channelLimit ? this.form.channelLimit.split(",") : [];
+ let checkedCount = this.form.period.length;
+ this.checkAll = checkedCount === this.cityOptions.length;
+ this.isIndeterminate =
+ checkedCount > 0 && checkedCount < this.cityOptions.length;
this.open = true;
this.title = "修改商户";
});
@@ -825,8 +829,8 @@ export default {
if (params.period) {
params.period = params.period.join(",");
}
- if (params.channelLimnit) {
- params.channelLimnit = params.channelLimnit.join(",");
+ if (params.channelLimit) {
+ params.channelLimit = params.channelLimit.join(",");
}
updateMerchant(params).then((response) => {
this.$modal.msgSuccess("修改成功");
@@ -838,8 +842,8 @@ export default {
if (params.period) {
params.period = params.period.join(",");
}
- if (params.channelLimnit) {
- params.channelLimnit = params.channelLimnit.join(",");
+ if (params.channelLimit) {
+ params.channelLimit = params.channelLimit.join(",");
}
addMerchant(params).then((response) => {
this.$modal.msgSuccess("新增成功");
diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js
index 5dcf1e43..06b80296 100644
--- a/ruoyi-ui/vue.config.js
+++ b/ruoyi-ui/vue.config.js
@@ -35,7 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- target: `http://y787tf.natappfree.cc`,
+ target: `http://r6a2wb.natappfree.cc`,
// target: `http://124.222.144.55/dev-api`,
changeOrigin: true,
pathRewrite: {
From bfb9d1c53bca0cc1992e9b78a647aa05a19c9997 Mon Sep 17 00:00:00 2001
From: zhp <746006956@qq.com>
Date: Mon, 23 Sep 2024 00:59:45 +0800
Subject: [PATCH 24/34] =?UTF-8?q?2024-09-23=20=E5=95=86=E6=88=B7=E5=AF=B9?=
=?UTF-8?q?=E6=8E=A5=E6=96=87=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../common/core/constant/RedisConstant.java | 5 +++
.../core/domain/http/CustomerApplyLog.java | 3 ++
.../common/core/domain/http/Merchant.java | 3 ++
.../ruoyi/common/core/utils/SecureUtils.java | 9 +++-
.../impl/SysPublicHalfServiceImpl.java | 14 +++---
.../CustomerApplyLogController.java | 9 ++++
.../system/controller/MerchantController.java | 11 +++++
.../system/domain/dto/ApplyCallback.java | 11 +++++
.../system/domain/dto/ApplyCallbackDto.java | 23 ++++++++++
.../service/ICustomerApplyLogService.java | 9 ++++
.../system/service/IMerchantService.java | 7 +++
.../impl/CustomerApplyLogServiceImpl.java | 45 +++++++++++++++++++
.../service/impl/MerchantServiceImpl.java | 32 +++++++++++++
13 files changed, 174 insertions(+), 7 deletions(-)
create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/ApplyCallback.java
create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/ApplyCallbackDto.java
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/RedisConstant.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/RedisConstant.java
index 04e517d6..c659d279 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/RedisConstant.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/RedisConstant.java
@@ -29,4 +29,9 @@ public class RedisConstant {
* H5登录验证码
*/
public final static String H5_LOGIN_CACHE = CacheConstants.PROJET+"H5:login:cache:";
+
+ /**
+ * H5申请幂等校验
+ */
+ public final static String H5_APPLY_CHECK = CacheConstants.PROJET+"H5:apply:check";
}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/CustomerApplyLog.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/CustomerApplyLog.java
index 62c456f2..bee75de3 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/CustomerApplyLog.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/CustomerApplyLog.java
@@ -45,4 +45,7 @@ public class CustomerApplyLog extends BaseEntity
@Excel(name = "成交金额 分")
private BigDecimal price;
+ @Excel(name = "订单号")
+ private String orderNo;
+
}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.java
index a0b0fb0d..a8963333 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.java
@@ -109,6 +109,9 @@ public class Merchant extends BaseEntity
@Excel(name = "标签")
private String label;
+ @Excel(name = "下游渠道标识")
+ private String channelSign;
+
/** 无社保 */
@Excel(name = "无社保")
private Boolean socialSecurityNo;
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/SecureUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/SecureUtils.java
index 30aa15f8..b01e92ce 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/SecureUtils.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/SecureUtils.java
@@ -327,7 +327,14 @@ public class SecureUtils {
String s = "{\"accumulationFund\":1,\"age\":18,\"car\":1,\"career\":1,\"city\":\"重庆\",\"cityCode\":1000,\"creditCard\":1,\"education\":1,\"guarantee\":1,\"hourse\":1,\"idCardMd5\":\"331d17d1ca8a091410e3238fab16a863\",\"monthlyIncome\":5000,\"nameMd5\":\"331d17d1ca8a091410e3238fab16a863\",\"phoneMd5\":\"331d17d1ca8a091410e3238fab16a863\",\"sex\":0,\"socialSecurity\":1,\"zhiMa\":600}";
String s1 = "{\"accumulationFund\":1,\"age\":18,\"car\":1,\"career\":1,\"city\":\"重庆\",\"cityCode\":1000,\"creditCard\":1,\"education\":1,\"guarantee\":1,\"hourse\":1,\"idCard\":\"341202199306023511\",\"idCardMd5\":\"331d17d1ca8a091410e3238fab16a863\",\"monthlyIncome\":5000,\"name\":\"朱三\",\"nameMd5\":\"331d17d1ca8a091410e3238fab16a863\",\"phone\":\"15205600635\",\"phoneMd5\":\"331d17d1ca8a091410e3238fab16a863\",\"sex\":0,\"socialSecurity\":1,\"zhiMa\":600}";
- System.out.println(AesEncode(s,"LwLjtU1Bt8dcxxjY"));
+ String s3 = "{\n" +
+ " \"orderNo\":\"111111\",\n" +
+ " \"md5\":\"aaaaaa\",\n" +
+ " \"price\":100.00,\n" +
+ " \"orderStatus\":\"2\"\n" +
+ "}";
+
+ System.out.println(AesEncode(s3,"LwLjtU1Bt8dcxxjY"));
}
/**
* 解密
diff --git a/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java b/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java
index 6d139db9..8d9fafe4 100644
--- a/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java
+++ b/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java
@@ -13,6 +13,7 @@ import com.ruoyi.common.core.domain.http.Channel;
import com.ruoyi.common.core.domain.http.Customer;
import com.ruoyi.common.core.domain.http.CustomerApplyLog;
import com.ruoyi.common.core.domain.http.Merchant;
+import com.ruoyi.common.core.utils.LocalDateTimeUtils;
import com.ruoyi.common.core.utils.ProbitUtil;
import com.ruoyi.common.core.utils.SecureUtils;
import com.ruoyi.common.core.utils.StringUtils;
@@ -239,15 +240,16 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
result.put("data",map);
return AjaxResult.success(result);
}
- String url = channel.getHtmlLocation() + "token="+remoteCustomerService.getCustomerToken(customer.getPhone());
+ String url = channel.getHtmlLocation() + "?token="+remoteCustomerService.getCustomerToken(customer.getPhone());
map.put("url",url);
map.put("regist",true);
result.put("data",map);
- CustomerApplyLog customerApplyLog = new CustomerApplyLog();
- customerApplyLog.setCustomerId(customerInfoByPhoneMd5.getData().getId());
- customerApplyLog.setChannelId(channel.getId());
- customerApplyLog.setOrderStatus(0l);
- remoteCustomerApplyLogService.add(customerApplyLog);
+ //CustomerApplyLog customerApplyLog = new CustomerApplyLog();
+// customerApplyLog.setCustomerId(customerInfoByPhoneMd5.getData().getId());
+// customerApplyLog.setChannelId(channel.getId());
+// customerApplyLog.setOrderStatus(0l);
+ //+"&orderNo="+ LocalDateTimeUtils.getStringFromLocalDateTime()
+ //remoteCustomerApplyLogService.add(customerApplyLog);
//返回上游信息
return AjaxResult.success(result);
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java
index f0ff1b2e..b267eb88 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java
@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.domain.R;
+import com.ruoyi.system.domain.dto.ApplyCallback;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.log.annotation.Log;
@@ -122,4 +123,12 @@ public class CustomerApplyLogController extends BaseController
{
return toAjax(customerApplyLogService.deleteCustomerApplyLogByIds(ids));
}
+
+ /**
+ * 下游数据回调
+ */
+ @PostMapping("/applyCallback")
+ public AjaxResult applyCallback(@RequestBody ApplyCallback applyCallback){
+ return customerApplyLogService.applyCallBack(applyCallback);
+ }
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java
index 85908f20..a94c8251 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.domain.R;
+import com.ruoyi.system.domain.dto.ApplyCallback;
import com.ruoyi.system.service.IChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -132,4 +133,14 @@ public class MerchantController extends BaseController
public AjaxResult getMatchMerchantList(HttpServletRequest request){
return merchantService.getMatchMerchantList(request);
}
+
+ /**
+ * H5申请商户
+ */
+ @GetMapping("/h5applyMerchant")
+ public AjaxResult H5applyMerchant(@RequestParam("merchantId") Long merchantId,HttpServletRequest request){
+ return merchantService.H5applyMerchant(merchantId,request);
+ }
+
+
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/ApplyCallback.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/ApplyCallback.java
new file mode 100644
index 00000000..3e50a26d
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/ApplyCallback.java
@@ -0,0 +1,11 @@
+package com.ruoyi.system.domain.dto;
+
+import lombok.Data;
+
+@Data
+public class ApplyCallback {
+
+ private String sign;
+
+ private String Data;
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/ApplyCallbackDto.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/ApplyCallbackDto.java
new file mode 100644
index 00000000..a00cb9ef
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/ApplyCallbackDto.java
@@ -0,0 +1,23 @@
+package com.ruoyi.system.domain.dto;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class ApplyCallbackDto {
+
+
+ //订单号
+ private String orderNo;
+
+ //md5
+ private String md5;
+
+ //订单价格
+ private BigDecimal price;
+
+ //订单状态
+ private Integer orderStatus;
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICustomerApplyLogService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICustomerApplyLogService.java
index 5219e5d5..8dd4788f 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICustomerApplyLogService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICustomerApplyLogService.java
@@ -5,6 +5,8 @@ import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.http.CustomerApplyLog;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.system.domain.dto.ApplyCallback;
/**
* 客户申请记录Service接口
@@ -75,4 +77,11 @@ public interface ICustomerApplyLogService extends IService
* @return
*/
R getCustomerApply(Long customerID);
+
+ /**
+ * 申请回调
+ * @param applyCallback
+ * @return
+ */
+ AjaxResult applyCallBack(ApplyCallback applyCallback);
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMerchantService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMerchantService.java
index f38f5b01..cf1b4ff7 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMerchantService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMerchantService.java
@@ -84,4 +84,11 @@ public interface IMerchantService extends IService
*/
public List findAllMerchantList();
+ /**
+ * H5申请订单
+ * @param merchantId
+ * @param request
+ * @return
+ */
+ AjaxResult H5applyMerchant(Long merchantId, HttpServletRequest request);
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerApplyLogServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerApplyLogServiceImpl.java
index e6576316..58133de9 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerApplyLogServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerApplyLogServiceImpl.java
@@ -2,17 +2,24 @@ package com.ruoyi.system.service.impl;
import java.util.List;
+import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.utils.LocalDateTimeUtils;
+import com.ruoyi.common.core.utils.SecureUtils;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.system.domain.dto.ApplyCallback;
+import com.ruoyi.system.domain.dto.ApplyCallbackDto;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CustomerApplyLogMapper;
import com.ruoyi.common.core.domain.http.CustomerApplyLog;
import com.ruoyi.system.service.ICustomerApplyLogService;
+import org.springframework.util.StringUtils;
/**
* 客户申请记录Service业务层处理
@@ -21,6 +28,7 @@ import com.ruoyi.system.service.ICustomerApplyLogService;
* @date 2024-09-15
*/
@Service
+@Slf4j
public class CustomerApplyLogServiceImpl extends ServiceImpl implements IService,ICustomerApplyLogService
{
@Autowired
@@ -131,4 +139,41 @@ public class CustomerApplyLogServiceImpl extends ServiceImpl0);
}
+
+ /**
+ * 申请回调
+ */
+ @Override
+ public AjaxResult applyCallBack(ApplyCallback applyCallback) {
+ String s = SecureUtils.AesUtil.AesDecode(applyCallback.getData(), applyCallback.getSign());
+ if (StringUtils.isEmpty(s)){
+ return AjaxResult.error("解密异常");
+ }
+ ApplyCallbackDto applyCallbackDto;
+ try {
+ applyCallbackDto = JSONObject.parseObject(s, ApplyCallbackDto.class);
+ log.info("渠道:{},回调数据:{}",applyCallback.getSign(),applyCallbackDto);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return AjaxResult.error("数据转换异常");
+ }
+ try {
+ CustomerApplyLog customerApplyLog = customerApplyLogMapper.selectOne(new LambdaQueryWrapper().eq(CustomerApplyLog::getOrderNo, applyCallbackDto.getOrderNo()));
+ if (applyCallbackDto.getOrderStatus()!=null) {
+ customerApplyLog.setOrderStatus(applyCallbackDto.getOrderStatus().longValue());
+ }
+ if (applyCallbackDto.getPrice()!=null){
+ if (customerApplyLog.getPrice()==null){
+ customerApplyLog.setPrice(applyCallbackDto.getPrice());
+ }else {
+ customerApplyLog.setPrice(customerApplyLog.getPrice().add(applyCallbackDto.getPrice()));
+ }
+ }
+ customerApplyLogMapper.updateById(customerApplyLog);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return AjaxResult.error("数据异常");
+ }
+ return AjaxResult.success("回调成功");
+ }
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
index 652391e3..16a7612d 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
@@ -2,19 +2,24 @@ package com.ruoyi.system.service.impl;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Date;
import java.util.List;
+import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.core.constant.RedisConstant;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.http.Customer;
+import com.ruoyi.common.core.domain.http.CustomerApplyLog;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.redis.service.CustomerTokenService;
+import com.ruoyi.common.redis.service.RedisService;
import com.ruoyi.system.domain.dto.MerchantListDto;
import com.ruoyi.system.mapper.CustomerApplyLogMapper;
import com.ruoyi.system.mapper.CustomerMapper;
@@ -42,6 +47,7 @@ public class MerchantServiceImpl extends ServiceImpl i
private final CustomerTokenService customerTokenService;
private final ICustomerApplyLogService customerApplyLogService;
private final CustomerMapper customerMapper;
+ private final RedisService redisService;
/**
* 查询商户
@@ -154,6 +160,32 @@ public class MerchantServiceImpl extends ServiceImpl i
return AjaxResult.success(merchantListDtos);
}
+ @Override
+ public AjaxResult H5applyMerchant(Long merchantId, HttpServletRequest request) {
+ //获取用户
+ String authorization = request.getHeader("Authorization");
+ Long customerId = customerTokenService.getCustomerId(authorization, false);
+ Boolean aBoolean = redisService.hasKey(RedisConstant.H5_APPLY_CHECK + customerId);
+ if (aBoolean){
+ return AjaxResult.error("请勿重复点击");
+ }
+ Customer customer = customerMapper.selectById(customerId);
+ Merchant merchant = merchantMapper.selectById(merchantId);
+ redisService.setCacheObject(RedisConstant.H5_APPLY_CHECK+customerId,1,10l, TimeUnit.SECONDS);
+ //生成订单号
+ String orderNo = System.currentTimeMillis()+""+merchantId+""+customerId;
+ //记录申请订单
+ CustomerApplyLog customerApplyLog = new CustomerApplyLog();
+ customerApplyLog.setCustomerId(customerId);
+ customerApplyLog.setMerchantId(merchantId);
+ customerApplyLog.setChannelId(customer.getChannelId());
+ customerApplyLog.setOrderStatus(0l);
+ customerApplyLog.setOrderNo(orderNo);
+ customerApplyLog.setCreateTime(new Date());
+ customerApplyLogService.save(customerApplyLog);
+ return AjaxResult.success("点击成功","orderNo="+orderNo+"&sign="+merchant.getChannelSign());
+ }
+
/**
* 获取前筛符合的商户
* @param customer
From ee2c83f19544edcd6fad7d7609394bc34f3857e0 Mon Sep 17 00:00:00 2001
From: zhp <746006956@qq.com>
Date: Tue, 24 Sep 2024 01:05:22 +0800
Subject: [PATCH 25/34] =?UTF-8?q?2024-09-24=20=E7=94=9F=E4=BA=A7=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-auth/src/main/resources/bootstrap.yml | 4 ++--
ruoyi-gateway/src/main/resources/bootstrap.yml | 8 ++++----
ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml | 4 ++--
ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml | 4 ++--
ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml | 4 ++--
ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml | 4 ++--
.../ruoyi-system/src/main/resources/bootstrap.yml | 4 ++--
.../ruoyi-monitor/src/main/resources/bootstrap.yml | 4 ++--
8 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/ruoyi-auth/src/main/resources/bootstrap.yml b/ruoyi-auth/src/main/resources/bootstrap.yml
index afca9c53..c83ed94f 100644
--- a/ruoyi-auth/src/main/resources/bootstrap.yml
+++ b/ruoyi-auth/src/main/resources/bootstrap.yml
@@ -14,11 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
diff --git a/ruoyi-gateway/src/main/resources/bootstrap.yml b/ruoyi-gateway/src/main/resources/bootstrap.yml
index 40a39544..d08317f9 100644
--- a/ruoyi-gateway/src/main/resources/bootstrap.yml
+++ b/ruoyi-gateway/src/main/resources/bootstrap.yml
@@ -14,11 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
@@ -30,12 +30,12 @@ spring:
eager: true
transport:
# 控制台地址
- dashboard: 124.222.144.55:8718
+ dashboard: 47.109.135.151:8718
# nacos配置持久化
datasource:
ds1:
nacos:
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
dataId: sentinel-ruoyi-gateway
groupId: DEFAULT_GROUP
data-type: json
diff --git a/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml
index 16b1d276..ab6bb0f6 100644
--- a/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml
@@ -14,11 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
diff --git a/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml
index f0abebbe..fc025647 100644
--- a/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml
@@ -14,11 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml
index abc49b6f..82f5eac8 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml
@@ -14,11 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
diff --git a/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml
index fe4ea145..955c5fe1 100644
--- a/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml
@@ -14,11 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
index a5456dc2..17605768 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
@@ -14,11 +14,11 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
diff --git a/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml b/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml
index 6f4f8acf..41be8c9c 100644
--- a/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml
+++ b/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml
@@ -14,10 +14,10 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
# 配置文件格式
file-extension: yml
# 共享配置
From 8ed3fe7ea3e555ea84ce07495e3c380252dbed51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=BD=AD?=
Date: Tue, 24 Sep 2024 21:29:21 +0800
Subject: [PATCH 26/34] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B8=A0=E9=81=93?=
=?UTF-8?q?=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/ruoyi/system/service/impl/ChannelServiceImpl.java | 2 +-
.../src/main/resources/mapper/system/ChannelMapper.xml | 7 ++++++-
.../src/main/resources/mapper/system/MerchantMapper.xml | 7 ++++++-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java
index 8ea8d736..3e061400 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java
@@ -141,7 +141,7 @@ public class ChannelServiceImpl implements IChannelService
* 获取所有的渠道列表
* @return
*/
- @Cacheable(value = "channel",key = "'channel:all'")
+ //@Cacheable(value = "channel",key = "'channel:all'")
public List findAllChannelList(){
return channelMapper.findAllChannelList();
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ChannelMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ChannelMapper.xml
index 5254043c..f48c126a 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ChannelMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ChannelMapper.xml
@@ -19,6 +19,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
+
+
select id, channel_name, channel_sign,channel_type, score, html_name, html_location, ips, period, create_time, update_time, remark from channel
@@ -103,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
\ No newline at end of file
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml
index 67305a04..79121827 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml
@@ -20,6 +20,7 @@
+
@@ -69,7 +70,7 @@
- select id, merchant_type, merchant_name, merchant_describe, merchant_company, logo, status, limit_num, limit_type,is_balance_monitoring,balance_monitoring,ispass, customer_info_filter_type,channel_limit_type,period,hit_url,regist_url,age_limit_start, age_limit_end, phone_limit,label,merchant_auth, social_security_no, social_security_low, social_security_high, car_no, car_have, guarantee_slip_low, guarantee_slip_centre, guarantee_slip_high, education_middle, education_high_school, education_polytechnic, education_junior_college, education_undergraduate_course, education_postgraduate, accumulation_fund_low, accumulation_fund_high, hourse_no, hourse_full_payment, hourse_mortgaging, office_worker, civil_servant, private_property_owners, self_employed_person, other_occupations, hua_bei_low, hua_bei_middle, hua_bei_high, bai_tiao_low, bai_tiao_middle, bai_tiao_high, zhi_ma, create_time, update_time, remark from merchant
+ select id, merchant_type, merchant_name, merchant_describe, merchant_company, logo, status, limit_num, limit_type,is_balance_monitoring,balance_monitoring,ispass, customer_info_filter_type,channel_limit_type,channel_limit,period,hit_url,regist_url,age_limit_start, age_limit_end, phone_limit,label,merchant_auth, social_security_no, social_security_low, social_security_high, car_no, car_have, guarantee_slip_low, guarantee_slip_centre, guarantee_slip_high, education_middle, education_high_school, education_polytechnic, education_junior_college, education_undergraduate_course, education_postgraduate, accumulation_fund_low, accumulation_fund_high, hourse_no, hourse_full_payment, hourse_mortgaging, office_worker, civil_servant, private_property_owners, self_employed_person, other_occupations, hua_bei_low, hua_bei_middle, hua_bei_high, bai_tiao_low, bai_tiao_middle, bai_tiao_high, zhi_ma, create_time, update_time, remark from merchant
select id, merchant_name from merchant
@@ -91,6 +92,7 @@
and ispass = #{ispass}
and customer_info_filter_type = #{customerInfoFilterType}
and channel_limit_type = #{channelLimitType}
+ and channel_limit = #{channelLimit}
and period = #{period}
and hit_url = #{hitUrl}
and regist_url = #{registUrl}
@@ -154,6 +156,7 @@
ispass,
customer_info_filter_type,
channel_limit_type,
+ channel_limit,
period,
hit_url,
regist_url,
@@ -211,6 +214,7 @@
#{ispass},
#{customerInfoFilterType},
#{channelLimitType},
+ #{channelLimit},
#{period},
#{hitUrl},
#{registUrl},
@@ -272,6 +276,7 @@
ispass = #{ispass},
customer_info_filter_type = #{customerInfoFilterType},
channel_limit_type = #{channelLimitType},
+ channel_limit = #{channelLimit},
period = #{period},
hit_url = #{hitUrl},
regist_url = #{registUrl},
From f1f65151e678ec2684b5fae74a3feb0e21f48d04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=BD=AD?=
Date: Tue, 24 Sep 2024 21:52:43 +0800
Subject: [PATCH 27/34] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E6=88=B7?=
=?UTF-8?q?=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/mapper/system/MerchantMapper.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml
index 79121827..efdc36d7 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/MerchantMapper.xml
@@ -164,7 +164,7 @@
age_limit_end,
phone_limit,
label,
- merchantAuth,
+ merchant_auth,
social_security_no,
social_security_low,
social_security_high,
From 6394a58bef2893be12bccefd4607d2d839278209 Mon Sep 17 00:00:00 2001
From: zhp <746006956@qq.com>
Date: Tue, 24 Sep 2024 23:58:11 +0800
Subject: [PATCH 28/34] =?UTF-8?q?2024-09-24=20=E7=94=9F=E4=BA=A7=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../api/RemoteCustomerApplyLogService.java | 7 ++++---
.../ruoyi/system/api/RemoteCustomerService.java | 3 ++-
.../RemoteCustomerApplyLogFallbackFactory.java | 3 ++-
.../factory/RemoteCustomerFallbackFactory.java | 2 +-
ruoyi-auth/src/main/resources/bootstrap.yml | 8 ++++----
.../com/ruoyi/common/core/domain/GetSumDto.java | 9 +++++++++
ruoyi-gateway/src/main/resources/bootstrap.yml | 12 ++++++------
.../main/java/com/ruoyi/btc/config/Config.java | 16 ++++++++++++++++
.../service/impl/SysPublicAllServiceImpl.java | 5 ++++-
.../service/impl/SysPublicHalfServiceImpl.java | 17 ++++++++++++-----
.../ruoyi-btc/src/main/resources/bootstrap.yml | 8 ++++----
.../file/service/LocalSysFileServiceImpl.java | 2 ++
.../ruoyi-file/src/main/resources/bootstrap.yml | 8 ++++----
.../ruoyi-gen/src/main/resources/bootstrap.yml | 8 ++++----
.../ruoyi-job/src/main/resources/bootstrap.yml | 8 ++++----
.../controller/CustomerApplyLogController.java | 9 +++++----
.../system/controller/CustomerController.java | 4 ++--
.../system/domain/dto/MerchantListDto.java | 9 ++++++---
.../ruoyi/system/service/ICustomerService.java | 7 +++++++
.../system/service/impl/ChannelServiceImpl.java | 2 ++
.../service/impl/CustomerServiceImpl.java | 4 ++--
.../service/impl/MerchantServiceImpl.java | 1 +
.../src/main/resources/bootstrap.yml | 8 ++++----
.../src/main/resources/bootstrap.yml | 4 ++--
24 files changed, 109 insertions(+), 55 deletions(-)
create mode 100644 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/GetSumDto.java
create mode 100644 ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/config/Config.java
diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerApplyLogService.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerApplyLogService.java
index b4432b65..1ad4b31e 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerApplyLogService.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerApplyLogService.java
@@ -2,6 +2,7 @@ package com.ruoyi.system.api;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
+import com.ruoyi.common.core.domain.GetSumDto;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.http.CustomerApplyLog;
import com.ruoyi.common.core.domain.http.Merchant;
@@ -24,12 +25,12 @@ public interface RemoteCustomerApplyLogService
* 获取商户今日已申请数
*
*
- * @param merchantId
+ * @param getSumDto
* @param source 请求来源
* @return 结果
*/
- @GetMapping("/log/sum")
- public R sum(@PathVariable("merchantId") Long merchantId,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+ @PostMapping("/log/sum")
+ public R sum(@RequestBody GetSumDto getSumDto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 获取用户今日是否是否已申请
diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerService.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerService.java
index 757a544c..a5f67da4 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerService.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerService.java
@@ -55,8 +55,9 @@ public interface RemoteCustomerService
/**
* 获取用户token
* @param phone
+ * @param channelId
* @return
*/
@GetMapping("/customer/getCustomerToken")
- public String getCustomerToken(@RequestParam("phone") String phone);
+ public String getCustomerToken(@RequestParam("phone") String phone,@RequestParam("channelId")Long channelId);
}
diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteCustomerApplyLogFallbackFactory.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteCustomerApplyLogFallbackFactory.java
index 80eca3bf..d88ba8b0 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteCustomerApplyLogFallbackFactory.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteCustomerApplyLogFallbackFactory.java
@@ -1,6 +1,7 @@
package com.ruoyi.system.api.factory;
import com.ruoyi.common.core.constant.SecurityConstants;
+import com.ruoyi.common.core.domain.GetSumDto;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.http.CustomerApplyLog;
import com.ruoyi.common.core.domain.http.Merchant;
@@ -32,7 +33,7 @@ public class RemoteCustomerApplyLogFallbackFactory implements FallbackFactory sum(@PathVariable("merchantId") Long merchantId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source)
+ public R sum(GetSumDto getSumDto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source)
{
return R.fail("获取商户已申请数失败:" + throwable.getMessage());
}
diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteCustomerFallbackFactory.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteCustomerFallbackFactory.java
index ab1a6186..2ad2a2d0 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteCustomerFallbackFactory.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteCustomerFallbackFactory.java
@@ -46,7 +46,7 @@ public class RemoteCustomerFallbackFactory implements FallbackFactory merchants = new ArrayList<>();
for (Merchant merchant:listR.getData()) {
//限量判定
- R sum = remoteCustomerApplyLogService.sum(merchant.getId(), SecurityConstants.INNER);
+ GetSumDto dto = new GetSumDto();
+ dto.setMerchantId(merchant.getId());
+ R sum = remoteCustomerApplyLogService.sum(dto, SecurityConstants.INNER);
if (merchant.getLimitType()==1&&merchant.getLimitNum()<=sum.getData()){
continue;
}
diff --git a/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java b/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java
index 8d9fafe4..6ec1bd7e 100644
--- a/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java
+++ b/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java
@@ -3,17 +3,18 @@ package com.ruoyi.btc.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.btc.config.Config;
import com.ruoyi.btc.domain.ComPublicHalfDto;
import com.ruoyi.btc.domain.CustomerInfoDto;
import com.ruoyi.btc.service.ISysPublicHalfService;
import com.ruoyi.common.core.constant.CacheConstants;
import com.ruoyi.common.core.constant.SecurityConstants;
+import com.ruoyi.common.core.domain.GetSumDto;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.http.Channel;
import com.ruoyi.common.core.domain.http.Customer;
-import com.ruoyi.common.core.domain.http.CustomerApplyLog;
import com.ruoyi.common.core.domain.http.Merchant;
-import com.ruoyi.common.core.utils.LocalDateTimeUtils;
+import com.ruoyi.common.core.utils.EncryptUtil;
import com.ruoyi.common.core.utils.ProbitUtil;
import com.ruoyi.common.core.utils.SecureUtils;
import com.ruoyi.common.core.utils.StringUtils;
@@ -24,7 +25,6 @@ import com.ruoyi.system.api.RemoteCustomerService;
import com.ruoyi.system.api.RemoteMerchantService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
-import org.springframework.web.bind.annotation.RequestParam;
import java.util.*;
import java.util.stream.Collectors;
@@ -42,6 +42,7 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
private final RemoteMerchantService remoteMerchantService;
private final RemoteCustomerApplyLogService remoteCustomerApplyLogService;
private final RedisService redisService;
+ private final Config config;
/**
* 半流程通用撞库
@@ -81,6 +82,7 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
customer.setLastLoginTime(new Date());
customer.setIsAuth(false);
customer.setStatus(2);
+ customer.setPhoneMd5(customerInfoDto.getPhoneMd5());
R customerInfoByPhoneMd5 = remoteCustomerService.getCustomerInfoByPhoneMd5(customerInfoDto.getPhoneMd5(), SecurityConstants.INNER);
if (customerInfoByPhoneMd5.getCode()==200){
remoteCustomerService.updateByPhoneMd5(customer,SecurityConstants.INNER);
@@ -111,7 +113,9 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
List merchants = new ArrayList<>();
for (Merchant merchant:listR.getData()) {
//限量判定
- R sum = remoteCustomerApplyLogService.sum(merchant.getId(), SecurityConstants.INNER);
+ GetSumDto dto = new GetSumDto();
+ dto.setMerchantId(merchant.getId());
+ R sum = remoteCustomerApplyLogService.sum(dto, SecurityConstants.INNER);
if (merchant.getLimitType()==1&&merchant.getLimitNum()<=sum.getData()){
continue;
}
@@ -224,6 +228,9 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
customer.setStatus(1);
R customerInfoByPhoneMd5 = remoteCustomerService.getCustomerInfoByPhoneMd5(customerInfoDto.getPhoneMd5(), SecurityConstants.INNER);
if (customerInfoByPhoneMd5.getCode()==200){
+ customer.setPhone(EncryptUtil.AESencode(customer.getPhone(), config.getAESkey()));
+ customer.setIdCard(EncryptUtil.AESencode(customer.getIdCard(),config.getAESkey()));
+ customer.setActurlName(EncryptUtil.AESencode(customer.getActurlName(),config.getAESkey()));
remoteCustomerService.updateByPhoneMd5(customer,SecurityConstants.INNER);
}else {
remoteCustomerService.add(customer,SecurityConstants.INNER);
@@ -240,7 +247,7 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
result.put("data",map);
return AjaxResult.success(result);
}
- String url = channel.getHtmlLocation() + "?token="+remoteCustomerService.getCustomerToken(customer.getPhone());
+ String url = channel.getHtmlLocation()+"?sign="+channel.getChannelSign() + "&token="+remoteCustomerService.getCustomerToken(customer.getPhone(),channel.getId() );
map.put("url",url);
map.put("regist",true);
result.put("data",map);
diff --git a/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml
index ab6bb0f6..93c2745e 100644
--- a/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
config:
# 配置中心地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/LocalSysFileServiceImpl.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/LocalSysFileServiceImpl.java
index 150a1deb..8e1b317e 100644
--- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/LocalSysFileServiceImpl.java
+++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/LocalSysFileServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.file.service;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
@@ -13,6 +14,7 @@ import com.ruoyi.file.utils.FileUploadUtils;
*/
@Primary
@Service
+@Slf4j
public class LocalSysFileServiceImpl implements ISysFileService
{
/**
diff --git a/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml
index fc025647..15a8f393 100644
--- a/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
config:
# 配置中心地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml
index 82f5eac8..e7776f1a 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
config:
# 配置中心地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml
index 955c5fe1..99a0a25b 100644
--- a/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
config:
# 配置中心地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java
index b267eb88..4b152964 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java
@@ -4,6 +4,7 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.constant.SecurityConstants;
+import com.ruoyi.common.core.domain.GetSumDto;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.domain.dto.ApplyCallback;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,13 +48,13 @@ public class CustomerApplyLogController extends BaseController
* 获取商户今日已申请数
*
*
- * @param merchantId
+ * @param getSumDto
* @param source 请求来源
* @return 结果
*/
- @GetMapping("/sum")
- public R sum(@PathVariable("merchantId") Long merchantId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source){
- return R.ok(customerApplyLogService.getApplySum(merchantId));
+ @PostMapping("/sum")
+ public R sum(@RequestBody GetSumDto getSumDto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source){
+ return R.ok(customerApplyLogService.getApplySum(getSumDto.getMerchantId()));
}
/**
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerController.java
index 27401a16..ca7bb8e9 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerController.java
@@ -88,7 +88,7 @@ public class CustomerController extends BaseController
* @return 结果
*/
@PostMapping("/updateByPhoneMd5")
- public R updateByPhoneMd5(Customer customer ,@RequestHeader(SecurityConstants.FROM_SOURCE) String source){
+ public R updateByPhoneMd5(@RequestBody Customer customer ,@RequestHeader(SecurityConstants.FROM_SOURCE) String source){
return customerService.updateByPhoneMd5(customer);
}
@@ -143,7 +143,7 @@ public class CustomerController extends BaseController
* @return
*/
@GetMapping("/getCustomerToken")
- public String getCustomerToken(@RequestParam("phone") String phone) {
+ public String getCustomerToken(@RequestParam("phone") String phone,@RequestParam("channelId")Long channelId) {
return customerService.getCustomerToken(phone);
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MerchantListDto.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MerchantListDto.java
index 9c16869f..466fd550 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MerchantListDto.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MerchantListDto.java
@@ -6,11 +6,14 @@ import lombok.Data;
public class MerchantListDto {
//商户名
- String merchantName;
+ private String merchantName;
//商户跳转地址
- String merchantUrl;
+ private String merchantUrl;
//商户描述
- String merchantDescribe;
+ private String merchantDescribe;
+
+ //商户ID
+ private Long merchantId;
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICustomerService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICustomerService.java
index e20e4ace..11dd7587 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICustomerService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICustomerService.java
@@ -86,6 +86,13 @@ public interface ICustomerService extends IService
*/
String getCustomerToken(String phone);
+ /**
+ * 注册并返回token
+ * @param phone
+ * @return
+ */
+ public String registAndretrunToken(String phone,Long channelId);
+
/**
* h5用户登录
* @param phone
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java
index 3e061400..f33685b0 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ChannelServiceImpl.java
@@ -40,7 +40,9 @@ public class ChannelServiceImpl implements IChannelService
log.info("初始化渠道数据开始");
List channels = channelMapper.selectList(new LambdaQueryWrapper());
for (Channel channel:channels) {
+ redisService.deleteObject(CacheConstants.CHANNEL_ID+channel.getId());
redisService.setCacheObject(CacheConstants.CHANNEL_ID+channel.getId(),channel);
+ redisService.deleteObject(CacheConstants.CHANNEL_SIGN+channel.getChannelSign());
redisService.setCacheObject(CacheConstants.CHANNEL_SIGN+channel.getChannelSign(),channel);
}
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java
index 0e6b8f36..89e0cc42 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java
@@ -149,8 +149,8 @@ public class CustomerServiceImpl extends ServiceImpl i
@Override
public String getCustomerToken(String phone) {
- log.info("获取用户token,手机号:{},加密结果:{}", phone, EncryptUtil.AESencode(phone, systemConfig.getAESkey()));
- Customer customer = this.getOne(new LambdaQueryWrapper().eq(Customer::getPhone, EncryptUtil.AESencode(phone, systemConfig.getAESkey())));
+ log.info("获取用户token,手机号:{}", phone);
+ Customer customer = this.getOne(new LambdaQueryWrapper().eq(Customer::getPhone, phone));
log.info("获取用户token,用户信息:{}", customer);
//获取到用户登陆的token
String token = customerTokenService.getToken(customer.getId());
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
index 16a7612d..5dafce35 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
@@ -155,6 +155,7 @@ public class MerchantServiceImpl extends ServiceImpl i
merchantListDto.setMerchantName(merchant.getMerchantName());
merchantListDto.setMerchantDescribe(merchant.getMerchantDescribe());
merchantListDto.setMerchantUrl(merchant.getHitUrl());
+ merchantListDto.setMerchantId(merchant.getId());
merchantListDtos.add(merchantListDto);
}
return AjaxResult.success(merchantListDtos);
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
index 17605768..f9f159f2 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
config:
# 配置中心地址
- server-addr: 47.109.135.151:8848
- namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
+ server-addr: 124.222.144.55:8848
+ namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml b/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml
index 41be8c9c..6f4f8acf 100644
--- a/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml
+++ b/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml
@@ -14,10 +14,10 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 47.109.135.151:8848
+ server-addr: 124.222.144.55:8848
config:
# 配置中心地址
- server-addr: 47.109.135.151:8848
+ server-addr: 124.222.144.55:8848
# 配置文件格式
file-extension: yml
# 共享配置
From 709a83bccf7eb291c1e20db46359a698bb245908 Mon Sep 17 00:00:00 2001
From: zhp <746006956@qq.com>
Date: Wed, 25 Sep 2024 10:58:17 +0800
Subject: [PATCH 29/34] =?UTF-8?q?2024-09-24=20=E7=94=9F=E4=BA=A7=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/ruoyi/system/RuoYiSystemApplication.java | 13 +++++++++++++
.../ruoyi/system/controller/MerchantController.java | 4 ++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java
index 1755a8e6..1963f0cc 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java
@@ -1,9 +1,14 @@
package com.ruoyi.system;
+import org.apache.tomcat.util.http.LegacyCookieProcessor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.ruoyi.common.security.annotation.EnableCustomConfig;
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
+import org.springframework.boot.web.embedded.tomcat.TomcatContextCustomizer;
+import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
+import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.context.annotation.Bean;
/**
* 系统模块
@@ -20,4 +25,12 @@ public class RuoYiSystemApplication
SpringApplication.run(RuoYiSystemApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 系统模块启动成功 ლ(´ڡ`ლ)゙ \n");
}
+
+ @Bean
+ public WebServerFactoryCustomizer cookieProcessorCustomizer() {
+ return tomcatServletWebServerFactory -> tomcatServletWebServerFactory.addContextCustomizers((TomcatContextCustomizer) context -> {
+ context.setCookieProcessor(new LegacyCookieProcessor());
+ });
+ }
+
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java
index a94c8251..197b328c 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java
@@ -138,8 +138,8 @@ public class MerchantController extends BaseController
* H5申请商户
*/
@GetMapping("/h5applyMerchant")
- public AjaxResult H5applyMerchant(@RequestParam("merchantId") Long merchantId,HttpServletRequest request){
- return merchantService.H5applyMerchant(merchantId,request);
+ public AjaxResult H5applyMerchant(@RequestParam("merchantId") String merchantId,HttpServletRequest request){
+ return merchantService.H5applyMerchant(Long.valueOf(merchantId),request);
}
From 1eb07eb5a630f81911bac09a5db20981fe09fd16 Mon Sep 17 00:00:00 2001
From: zhp <746006956@qq.com>
Date: Wed, 25 Sep 2024 10:59:58 +0800
Subject: [PATCH 30/34] =?UTF-8?q?2024-09-24=20=E7=94=9F=E4=BA=A7=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-auth/src/main/resources/bootstrap.yml | 8 ++++----
ruoyi-gateway/src/main/resources/bootstrap.yml | 12 ++++++------
.../ruoyi-btc/src/main/resources/bootstrap.yml | 8 ++++----
.../ruoyi-file/src/main/resources/bootstrap.yml | 8 ++++----
.../ruoyi-gen/src/main/resources/bootstrap.yml | 8 ++++----
.../ruoyi-job/src/main/resources/bootstrap.yml | 8 ++++----
.../ruoyi-system/src/main/resources/bootstrap.yml | 8 ++++----
.../ruoyi-monitor/src/main/resources/bootstrap.yml | 4 ++--
8 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/ruoyi-auth/src/main/resources/bootstrap.yml b/ruoyi-auth/src/main/resources/bootstrap.yml
index b3d1cbda..c83ed94f 100644
--- a/ruoyi-auth/src/main/resources/bootstrap.yml
+++ b/ruoyi-auth/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-gateway/src/main/resources/bootstrap.yml b/ruoyi-gateway/src/main/resources/bootstrap.yml
index dd3075f9..d08317f9 100644
--- a/ruoyi-gateway/src/main/resources/bootstrap.yml
+++ b/ruoyi-gateway/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
# 共享配置
@@ -30,12 +30,12 @@ spring:
eager: true
transport:
# 控制台地址
- dashboard: 124.222.144.55:8718
+ dashboard: 47.109.135.151:8718
# nacos配置持久化
datasource:
ds1:
nacos:
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
dataId: sentinel-ruoyi-gateway
groupId: DEFAULT_GROUP
data-type: json
diff --git a/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml
index 93c2745e..ab6bb0f6 100644
--- a/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-btc/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml
index 15a8f393..fc025647 100644
--- a/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml
index e7776f1a..82f5eac8 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml
index 99a0a25b..955c5fe1 100644
--- a/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
index f9f159f2..17605768 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
@@ -14,12 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
- namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
+ server-addr: 47.109.135.151:8848
+ namespace: b8ad3fd2-18ea-4cdf-a82c-4ce483392b1a
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml b/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml
index 6f4f8acf..41be8c9c 100644
--- a/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml
+++ b/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml
@@ -14,10 +14,10 @@ spring:
nacos:
discovery:
# 服务注册地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
config:
# 配置中心地址
- server-addr: 124.222.144.55:8848
+ server-addr: 47.109.135.151:8848
# 配置文件格式
file-extension: yml
# 共享配置
From 69cb25f0522327c2def8737d815f23dbb6e492b3 Mon Sep 17 00:00:00 2001
From: zhp <746006956@qq.com>
Date: Wed, 25 Sep 2024 23:28:27 +0800
Subject: [PATCH 31/34] =?UTF-8?q?2024-09-24=20=E7=94=9F=E4=BA=A7=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../system/api/RemoteCustomerApplyLogService.java | 2 +-
.../ruoyi/common/core/constant/RedisConstant.java | 7 ++++++-
.../com/ruoyi/common/core/utils/SecureUtils.java | 2 +-
.../btc/controller/PublicHalfController.java | 2 +-
.../service/impl/SysPublicHalfServiceImpl.java | 15 ++++++++++++++-
.../controller/CustomerApplyLogController.java | 2 +-
.../system/service/impl/MerchantServiceImpl.java | 4 ++++
7 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerApplyLogService.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerApplyLogService.java
index 1ad4b31e..37392683 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerApplyLogService.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteCustomerApplyLogService.java
@@ -41,7 +41,7 @@ public interface RemoteCustomerApplyLogService
* @return 结果
*/
@GetMapping("/log/customerApply")
- public R customerApply(@PathVariable("customerID") Long customerID,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+ public R customerApply(@RequestParam("customerID") Long customerID,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 新增用户
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/RedisConstant.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/RedisConstant.java
index c659d279..4b6579ce 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/RedisConstant.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/RedisConstant.java
@@ -33,5 +33,10 @@ public class RedisConstant {
/**
* H5申请幂等校验
*/
- public final static String H5_APPLY_CHECK = CacheConstants.PROJET+"H5:apply:check";
+ public final static String H5_APPLY_CHECK = CacheConstants.PROJET+"H5:apply:check:";
+
+ /**
+ * 撞库幂等校验
+ */
+ public final static String HIT_CHECK_CACHE = CacheConstants.PROJET+"hit:check:cache:";
}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/SecureUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/SecureUtils.java
index b01e92ce..609f43e0 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/SecureUtils.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/SecureUtils.java
@@ -334,7 +334,7 @@ public class SecureUtils {
" \"orderStatus\":\"2\"\n" +
"}";
- System.out.println(AesEncode(s3,"LwLjtU1Bt8dcxxjY"));
+ System.out.println(AesEncode(s1,"g5N8XTYaOEwEmBgg"));
}
/**
* 解密
diff --git a/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/controller/PublicHalfController.java b/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/controller/PublicHalfController.java
index e53a726e..31edb903 100644
--- a/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/controller/PublicHalfController.java
+++ b/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/controller/PublicHalfController.java
@@ -42,7 +42,7 @@ public class PublicHalfController{
* 通用半流程撞库
*/
@GetMapping("/checkOrder")
- public AjaxResult checkOrder(@RequestParam("phoneMD5")String phoneMd5,@RequestParam("channelSign")String channelSign)
+ public AjaxResult checkOrder(String phoneMd5,String channelSign)
{
return sysPublicHalfService.checkOrder(phoneMd5,channelSign);
diff --git a/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java b/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java
index 6ec1bd7e..58d245e0 100644
--- a/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java
+++ b/ruoyi-modules/ruoyi-btc/src/main/java/com/ruoyi/btc/service/impl/SysPublicHalfServiceImpl.java
@@ -8,6 +8,7 @@ import com.ruoyi.btc.domain.ComPublicHalfDto;
import com.ruoyi.btc.domain.CustomerInfoDto;
import com.ruoyi.btc.service.ISysPublicHalfService;
import com.ruoyi.common.core.constant.CacheConstants;
+import com.ruoyi.common.core.constant.RedisConstant;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.domain.GetSumDto;
import com.ruoyi.common.core.domain.R;
@@ -24,9 +25,11 @@ import com.ruoyi.system.api.RemoteCustomerApplyLogService;
import com.ruoyi.system.api.RemoteCustomerService;
import com.ruoyi.system.api.RemoteMerchantService;
import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.*;
+import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
@@ -36,6 +39,7 @@ import java.util.stream.Collectors;
*/
@Service
@RequiredArgsConstructor
+@Slf4j
public class SysPublicHalfServiceImpl implements ISysPublicHalfService
{
private final RemoteCustomerService remoteCustomerService;
@@ -51,7 +55,6 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
@Override
public AjaxResult check(ComPublicHalfDto comPublicHalfDto) {
//校验 IP地址是否正常 渠道标识是否存在 数据是否为空
-
if (StringUtils.isEmpty(comPublicHalfDto.getChannelSignature())){
return AjaxResult.error("渠道标识不能未空");
}
@@ -62,12 +65,20 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
if (StringUtils.isEmpty(comPublicHalfDto.getData())){
return AjaxResult.error("加密数据不能为空");
}
+
//解密为customerInfoDto
String s = SecureUtils.AesUtil.AesDecode(comPublicHalfDto.getData(), comPublicHalfDto.getChannelSignature());
if (s==null){
return AjaxResult.error("解密异常");
}
CustomerInfoDto customerInfoDto = JSONObject.parseObject(s, CustomerInfoDto.class);
+ //撞库幂等性校验 暂时不加
+// Boolean aBoolean = redisService.hasKey(RedisConstant.HIT_CHECK_CACHE+customerInfoDto.getPhoneMd5()+":"+comPublicHalfDto.getChannelSignature());
+// if (aBoolean){
+// return AjaxResult.error("手机号:"+customerInfoDto.getPhoneMd5()+"请勿重复撞库");
+// }
+// redisService.setCacheObject(RedisConstant.HIT_CHECK_CACHE+customerInfoDto.getPhoneMd5(),1,60*3l, TimeUnit.SECONDS);
+ log.info("渠道:{},撞库手机号:{}",channel.getChannelName(),customerInfoDto.getPhoneMd5());
//校验数据必传参数是否未传
String checkData = checkData(customerInfoDto);
if (checkData!=null){
@@ -84,6 +95,7 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
customer.setStatus(2);
customer.setPhoneMd5(customerInfoDto.getPhoneMd5());
R customerInfoByPhoneMd5 = remoteCustomerService.getCustomerInfoByPhoneMd5(customerInfoDto.getPhoneMd5(), SecurityConstants.INNER);
+ log.info("渠道:{},是否查询到用户:{}",channel.getChannelName(),customerInfoByPhoneMd5.getCode());
if (customerInfoByPhoneMd5.getCode()==200){
remoteCustomerService.updateByPhoneMd5(customer,SecurityConstants.INNER);
}else {
@@ -211,6 +223,7 @@ public class SysPublicHalfServiceImpl implements ISysPublicHalfService
return AjaxResult.error("解密异常");
}
CustomerInfoDto customerInfoDto = JSONObject.parseObject(s, CustomerInfoDto.class);
+ log.info("渠道:{},进件手机号:{}",channel.getChannelName(),customerInfoDto.getPhone());
//校验数据必传参数是否未传
String checkData = checkData(customerInfoDto);
//转化字段未数据库中资质字段 更新 用户实名状态 一并保存用户申请记录 已申请
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java
index 4b152964..3b90ee9d 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerApplyLogController.java
@@ -66,7 +66,7 @@ public class CustomerApplyLogController extends BaseController
* @return 结果
*/
@GetMapping("/customerApply")
- public R customerApply(@PathVariable("customerID") Long customerID,@RequestHeader(SecurityConstants.FROM_SOURCE) String source){
+ public R customerApply(@RequestParam("customerID") Long customerID,@RequestHeader(SecurityConstants.FROM_SOURCE) String source){
return customerApplyLogService.getCustomerApply(customerID);
}
/**
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
index 5dafce35..b157fe82 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
@@ -25,6 +25,7 @@ import com.ruoyi.system.mapper.CustomerApplyLogMapper;
import com.ruoyi.system.mapper.CustomerMapper;
import com.ruoyi.system.service.ICustomerApplyLogService;
import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MerchantMapper;
@@ -41,6 +42,7 @@ import javax.servlet.http.HttpServletRequest;
*/
@Service
@RequiredArgsConstructor
+@Slf4j
public class MerchantServiceImpl extends ServiceImpl implements IService,IMerchantService
{
private final MerchantMapper merchantMapper;
@@ -147,6 +149,7 @@ public class MerchantServiceImpl extends ServiceImpl i
if (customerId==null){
return AjaxResult.error("用户不存在或未登录");
}
+ log.info("H5打开页面:{}",customerId);
Customer customer = customerMapper.selectById(customerId);
List merchants = matchMerchant(customer);
List merchantListDtos = new ArrayList<>();
@@ -170,6 +173,7 @@ public class MerchantServiceImpl extends ServiceImpl i
if (aBoolean){
return AjaxResult.error("请勿重复点击");
}
+ log.info("H5申请用户:{}",customerId);
Customer customer = customerMapper.selectById(customerId);
Merchant merchant = merchantMapper.selectById(merchantId);
redisService.setCacheObject(RedisConstant.H5_APPLY_CHECK+customerId,1,10l, TimeUnit.SECONDS);
From e10288e284a73e76c149bb6ee23c7f42b219e161 Mon Sep 17 00:00:00 2001
From: zhp <746006956@qq.com>
Date: Sun, 29 Sep 2024 09:45:09 +0800
Subject: [PATCH 32/34] =?UTF-8?q?2024-09-24=20=E7=94=9F=E4=BA=A7=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ruoyi/system/service/impl/CustomerApplyLogServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerApplyLogServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerApplyLogServiceImpl.java
index 58133de9..ebb6b15e 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerApplyLogServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerApplyLogServiceImpl.java
@@ -134,7 +134,7 @@ public class CustomerApplyLogServiceImpl extends ServiceImpl()
.isNotNull(CustomerApplyLog::getMerchantId)
- .eq(CustomerApplyLog::getOrderStatus, 0)
+ .eq(CustomerApplyLog::getOrderStatus, 20)
.ge(CustomerApplyLog::getCreateTime, LocalDateTimeUtils.getDateFromLocalDateTime(LocalDateTimeUtils.getTodayStartTime()))
.le(CustomerApplyLog::getCreateTime, LocalDateTimeUtils.getDateFromLocalDateTime(LocalDateTimeUtils.getTodayEndTime())));
return R.ok(aLong>0);
From c77ca554c0a24f079929b69e49d02b1c38df3f71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=B2=B8=E8=90=BD?= <15826189779@163.com>
Date: Wed, 9 Oct 2024 14:43:58 +0800
Subject: [PATCH 33/34] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=A1=B5=E6=89=93?=
=?UTF-8?q?=E5=BC=80=E7=9B=B4=E6=8E=A5=E6=8E=A8=E8=8D=90=E5=95=86=E6=88=B7?=
=?UTF-8?q?->=E7=94=A8=E6=88=B7=E7=82=B9=E5=87=BB=E7=94=B3=E8=AF=B7=20?=
=?UTF-8?q?=E4=B8=8D=E5=86=8D=E6=94=B6=E9=9B=86=E7=94=A8=E6=88=B7=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=20=E5=89=8D=E7=AD=9B=E5=AD=97=E6=AE=B5=E4=B9=9F?=
=?UTF-8?q?=E5=85=88=E4=B8=8D=E4=BD=BF=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../system/controller/MerchantController.java | 5 ++
.../system/service/IMerchantService.java | 2 +
.../service/impl/MerchantServiceImpl.java | 77 ++++++++++++++-----
3 files changed, 64 insertions(+), 20 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java
index 197b328c..64b2ba1a 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/MerchantController.java
@@ -142,5 +142,10 @@ public class MerchantController extends BaseController
return merchantService.H5applyMerchant(Long.valueOf(merchantId),request);
}
+ @GetMapping("/getMatchMerchantNew")
+ public AjaxResult getMatchMerchantNew(){
+ return merchantService.getMatchMerchantNew();
+ }
+
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMerchantService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMerchantService.java
index cf1b4ff7..b61f53e5 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMerchantService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMerchantService.java
@@ -91,4 +91,6 @@ public interface IMerchantService extends IService
* @return
*/
AjaxResult H5applyMerchant(Long merchantId, HttpServletRequest request);
+
+ AjaxResult getMatchMerchantNew();
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
index 5dafce35..49e7f8bd 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.java
@@ -1,41 +1,38 @@
package com.ruoyi.system.service.impl;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
-
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.constant.RedisConstant;
-import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.http.Customer;
import com.ruoyi.common.core.domain.http.CustomerApplyLog;
+import com.ruoyi.common.core.domain.http.Merchant;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.redis.service.CustomerTokenService;
import com.ruoyi.common.redis.service.RedisService;
import com.ruoyi.system.domain.dto.MerchantListDto;
-import com.ruoyi.system.mapper.CustomerApplyLogMapper;
import com.ruoyi.system.mapper.CustomerMapper;
+import com.ruoyi.system.mapper.MerchantMapper;
import com.ruoyi.system.service.ICustomerApplyLogService;
+import com.ruoyi.system.service.IMerchantService;
import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import com.ruoyi.system.mapper.MerchantMapper;
-import com.ruoyi.common.core.domain.http.Merchant;
-import com.ruoyi.system.service.IMerchantService;
+import org.springframework.util.CollectionUtils;
import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
/**
* 商户Service业务层处理
- *
+ *
* @author ruoyi
* @date 2024-09-15
*/
@@ -51,7 +48,7 @@ public class MerchantServiceImpl extends ServiceImpl i
/**
* 查询商户
- *
+ *
* @param id 商户主键
* @return 商户
*/
@@ -63,7 +60,7 @@ public class MerchantServiceImpl extends ServiceImpl i
/**
* 查询商户列表
- *
+ *
* @param merchant 商户
* @return 商户
*/
@@ -75,7 +72,7 @@ public class MerchantServiceImpl extends ServiceImpl i
/**
* 新增商户
- *
+ *
* @param merchant 商户
* @return 结果
*/
@@ -88,7 +85,7 @@ public class MerchantServiceImpl extends ServiceImpl i
/**
* 修改商户
- *
+ *
* @param merchant 商户
* @return 结果
*/
@@ -101,7 +98,7 @@ public class MerchantServiceImpl extends ServiceImpl i
/**
* 批量删除商户
- *
+ *
* @param ids 需要删除的商户主键
* @return 结果
*/
@@ -113,7 +110,7 @@ public class MerchantServiceImpl extends ServiceImpl i
/**
* 删除商户信息
- *
+ *
* @param id 商户主键
* @return 结果
*/
@@ -221,4 +218,44 @@ public class MerchantServiceImpl extends ServiceImpl i
}
return merchants;
}
+
+
+ @Override
+ public AjaxResult getMatchMerchantNew() {
+ List merchantLists = matchMerchantNew();
+ List results = new ArrayList<>();
+ for (Merchant merchant : merchantLists) {
+ MerchantListDto merchantListDto = new MerchantListDto();
+ merchantListDto.setMerchantName(merchant.getMerchantName());
+ merchantListDto.setMerchantDescribe(merchant.getMerchantDescribe());
+ merchantListDto.setMerchantUrl(merchant.getHitUrl());
+ merchantListDto.setMerchantId(merchant.getId());
+ results.add(merchantListDto);
+ }
+ return AjaxResult.success(results);
+ }
+
+
+ private List getMerchantLists() {
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper().eq(Merchant::getStatus, true);
+ List merchants = merchantMapper.selectList(queryWrapper);
+ return CollectionUtils.isEmpty(merchants) ? new ArrayList<>() : merchants;
+ }
+
+ private List matchMerchantNew() {
+ List merchantLists = getMerchantLists();
+ if (CollectionUtils.isEmpty(merchantLists)) {
+ return merchantLists;
+ }
+ List merchants = new ArrayList<>();
+ for (Merchant merchant : merchantLists) {
+ //限量判定
+ Integer sum = customerApplyLogService.getApplySum(merchant.getId());
+ if (merchant.getLimitType() != null && merchant.getLimitType() == 1 && merchant.getLimitNum() <= sum) {
+ continue;
+ }
+ merchants.add(merchant);
+ }
+ return merchants;
+ }
}
From 872977d4c27cba8fbf0b98b21cf8e53ac6695c7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=B2=B8=E8=90=BD?= <15826189779@163.com>
Date: Fri, 11 Oct 2024 14:11:18 +0800
Subject: [PATCH 34/34] =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E6=A8=A1=E5=9D=97?=
=?UTF-8?q?=E5=86=99=E6=88=90starter=20=E5=8F=91=E9=80=81=E7=9F=AD?=
=?UTF-8?q?=E4=BF=A1=E9=9C=80=E8=A6=81=E7=8E=AF=E5=A2=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-common/pom.xml | 1 +
ruoyi-common/ruoyi-common-sms/pom.xml | 59 +++++++
.../sms/XunDaYunXinAutoConfiguration.java | 24 +++
.../common/sms/component/SmsComponent.java | 145 ++++++++++++++++++
.../ruoyi/common/sms/entity/package-info.java | 1 +
.../sms/entity/request/package-info.java | 1 +
.../common/sms/entity/response/SmsEntity.java | 32 ++++
.../sms/entity/response/SmsResponse.java | 12 ++
.../sms/properties/XunDaYunXinProperties.java | 40 +++++
...ot.autoconfigure.AutoConfiguration.imports | 2 +
ruoyi-modules/ruoyi-system/pom.xml | 11 ++
.../system/controller/CommonController.java | 9 +-
.../system/controller/CustomerController.java | 6 +
.../system/controller/MerchantController.java | 6 +
.../ruoyi/system/process/ProcessHandler.java | 12 ++
.../process/enums/ProcessHandlerEnum.java | 36 +++++
.../system/process/handler/H5Handler.java | 14 ++
.../system/process/handler/HalfHandler.java | 13 ++
.../ruoyi/system/process/package-info.java | 1 +
.../ruoyi/system/service/ICommonService.java | 2 +-
.../system/service/ICustomerService.java | 2 +
.../system/service/IMerchantService.java | 2 +
.../service/impl/CommonServiceImpl.java | 83 ++++++++--
.../service/impl/CustomerServiceImpl.java | 24 +++
.../service/impl/MerchantServiceImpl.java | 22 +++
.../system/RuoYiSystemApplicationTest.java | 48 ++++++
26 files changed, 590 insertions(+), 18 deletions(-)
create mode 100644 ruoyi-common/ruoyi-common-sms/pom.xml
create mode 100644 ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/XunDaYunXinAutoConfiguration.java
create mode 100644 ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/component/SmsComponent.java
create mode 100644 ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/entity/package-info.java
create mode 100644 ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/entity/request/package-info.java
create mode 100644 ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/entity/response/SmsEntity.java
create mode 100644 ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/entity/response/SmsResponse.java
create mode 100644 ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/properties/XunDaYunXinProperties.java
create mode 100644 ruoyi-common/ruoyi-common-sms/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/process/ProcessHandler.java
create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/process/enums/ProcessHandlerEnum.java
create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/process/handler/H5Handler.java
create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/process/handler/HalfHandler.java
create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/process/package-info.java
create mode 100644 ruoyi-modules/ruoyi-system/src/test/java/com/ruoyi/system/RuoYiSystemApplicationTest.java
diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml
index 3129e2d6..513918dc 100644
--- a/ruoyi-common/pom.xml
+++ b/ruoyi-common/pom.xml
@@ -18,6 +18,7 @@
ruoyi-common-sensitive
ruoyi-common-datascope
ruoyi-common-datasource
+ ruoyi-common-sms
ruoyi-common
diff --git a/ruoyi-common/ruoyi-common-sms/pom.xml b/ruoyi-common/ruoyi-common-sms/pom.xml
new file mode 100644
index 00000000..eb3915b2
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-sms/pom.xml
@@ -0,0 +1,59 @@
+
+
+
+ com.ruoyi
+ ruoyi-common
+ 3.6.4
+
+ 4.0.0
+
+ ruoyi-common-sms
+
+
+ ruoyi-common-sms 短信模块
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.7.0
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.7.0
+ test
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/XunDaYunXinAutoConfiguration.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/XunDaYunXinAutoConfiguration.java
new file mode 100644
index 00000000..14ada60c
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/XunDaYunXinAutoConfiguration.java
@@ -0,0 +1,24 @@
+package com.ruoyi.common.sms;
+
+import com.ruoyi.common.sms.component.SmsComponent;
+import com.ruoyi.common.sms.properties.XunDaYunXinProperties;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.client.RestTemplate;
+
+@Configuration
+@EnableConfigurationProperties(XunDaYunXinProperties.class)
+public class XunDaYunXinAutoConfiguration {
+
+ @Bean
+ public SmsComponent smsComponent() {
+ return new SmsComponent();
+ }
+
+ @Bean
+ public RestTemplate restTemplate() {
+ return new RestTemplate();
+ }
+}
diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/component/SmsComponent.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/component/SmsComponent.java
new file mode 100644
index 00000000..43e83526
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/component/SmsComponent.java
@@ -0,0 +1,145 @@
+package com.ruoyi.common.sms.component;
+
+import com.ruoyi.common.sms.entity.response.SmsEntity;
+import com.ruoyi.common.sms.entity.response.SmsResponse;
+import com.ruoyi.common.sms.properties.XunDaYunXinProperties;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.*;
+
+@Slf4j
+public class SmsComponent {
+ @Autowired
+ private XunDaYunXinProperties properties;
+
+ @Autowired
+ private RestTemplate restTemplate;
+
+ /**
+ * 点对点
+ *
+ * @param mobileContentKvp 号码内容键值对 示例 {"15100000000":"【测试】test1","15100000001":"【测试】test2"}
+ * @return SmsResponse
+ */
+ public SmsResponse sendP2PMsg(Map mobileContentKvp) {
+ Map extraParams = new HashMap<>();
+
+ for (Map.Entry entry : mobileContentKvp.entrySet()) {
+ String oldValue = entry.getValue();
+ String newValue = replaceCode(properties.getTemplate(), oldValue);
+ entry.setValue(newValue);
+ }
+ extraParams.put("mobileContentKvp", mobileContentKvp);
+ return sendSmsRequest("p2p", extraParams, new ParameterizedTypeReference() {
+ });
+ }
+
+
+ /**
+ * 发送群发信息
+ *
+ * @param mobile 电话号码按照,分割 示例 "15100000000,15100000001"
+ * @param content 内容 一般为验证码
+ * @return SmsResponse
+ */
+ public SmsResponse sendGroupMsg(String mobile, String content) {
+ Map extraParams = new HashMap<>();
+ extraParams.put("mobile", removeDuplicates(mobile));
+ extraParams.put("content", replaceCode(properties.getTemplate(), content));
+ return sendSmsRequest("send", extraParams, new ParameterizedTypeReference>() {
+ });
+ }
+
+
+ public SmsResponse> checkBalance() {
+ String url = properties.getBaseUrl() + "/smsv2";
+ Map params = new HashMap<>();
+ params.put("action", "balance");
+ params.put("account", properties.getAccount());
+ params.put("password", properties.getPassword());
+ HttpEntity