From 7aad41284d522002584383aaa9e34caa14a2b2aa Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期一, 19 五月 2025 15:32:20 +0800 Subject: [PATCH] fix: 修复md5加密规则 增加介绍人字段 --- ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 15 ++++++- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java | 5 +- ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderSign.java | 4 +- ruoyi-admin/src/main/resources/application-prod.yml | 4 +- ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java | 13 ++++++ ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java | 32 ++++++++++++++- ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml | 6 ++ ruoyi-ui/src/views/system/clientApp/index.vue | 4 ++ ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java | 2 + ruoyi-admin/src/main/resources/application-dev.yml | 2 10 files changed, 73 insertions(+), 14 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java index 35d6238..c4f3ca2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java @@ -133,7 +133,6 @@ model.setMethod("ServiceOrder_APP"); // 璁剧疆鎺ュ彛鍚嶇О model.setAppId(scApp.getMinAppId()); // 璁剧疆鍟嗘埛 APPID - model.setOrdType(tbOrders.getTypeCode().intValue()); model.setCoPhone(tbOrders.getLinkTel()); // 瀹㈡埛鑱旂郴鐢佃瘽 model.setCoName(tbOrders.getLinkPerson()); // 瀹㈡埛濮撳悕 @@ -166,8 +165,8 @@ // model.setDoctor("鍖荤敓" + (int) (Math.random() * 10)); // 闅忔満璁剧疆鎮h�呭尰鐢� // model.setDoctorPhone("13" + (int) (Math.random() * 900000000 + 100000000)); // 闅忔満鐢熸垚鎮h�呭尰鐢熺數璇� - model.setOfferPrice(tbOrders.getBookingPrice().doubleValue()); // 鐢熸垚鎶ヤ环 -// model.setReferrals("鎺ㄤ粙浜�" + (int) (Math.random() * 10)); // 闅忔満璁剧疆鎺ㄤ粙浜轰俊鎭� + model.setOfferPrice(tbOrders.getBookingPrice().doubleValue()); // 鐢熸垚鎶ヤ环 + model.setReferrals(scApp.getReferrals()); // 璁剧疆鎺ㄤ粙浜哄悕绉颁负鏈烘瀯鍚嶇О // model.setUnitRemarks("鍟嗘埛闅忔満澶囨敞淇℃伅"); // 闅忔満璁剧疆鍟嗘埛澶囨敞 model.setPayQRcodeURL(scApp.getPayUrl()); diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index 5659fd8..5975026 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -86,4 +86,4 @@ instanceId: AUTO # 姘戣埅鎺ュ彛鍦板潃 min: - apiUrl: http://120.25.98.119:8084/v1/ #娴嬭瘯鐜锛歭ocalhost:8011 \ No newline at end of file + apiUrl: http://120.25.98.119:8084/v1/ #娴嬭瘯鐜锛歭ocalhost:8011 #http://120.25.98.119:8084/v1/ \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml index 12a4ebc..46247b2 100644 --- a/ruoyi-admin/src/main/resources/application-prod.yml +++ b/ruoyi-admin/src/main/resources/application-prod.yml @@ -6,9 +6,9 @@ druid: # 涓诲簱鏁版嵁婧� master: - url: jdbc:mysql://127.0.0.1:3307/mhyl?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://127.0.0.1:3306/mhyl?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: abcd1234 + password: 2025@@gdmh$$ # 浠庡簱鏁版嵁婧� # SQL Server鏁版嵁婧� sqlserver: diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java index 6840946..58943af 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java @@ -132,6 +132,8 @@ * 姘戣埅瀛楀吀orderClass */ private String ordClass; + + /** * 姘戣埅鍒嗗叕鍙窱d */ diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderSign.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderSign.java index 9dc2790..1d02ba7 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderSign.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderSign.java @@ -294,8 +294,8 @@ String value = params.get(key); if (value != null && !value.isEmpty()) { // 灏嗗弬鏁板悕棣栧瓧姣嶅ぇ鍐� - String capitalizedKey = StringUtils.capitalize(key); - stringA.append(capitalizedKey).append(value); +// String capitalizedKey = StringUtils.capitalize(key); + stringA.append(key).append(value); } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java index a41b868..da4efa0 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/civilAviation/ServiceOrderUtil.java @@ -63,7 +63,17 @@ try { Object value = field.get(model); if (value != null) { - params.put(field.getName(),URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); + + // 灏嗗瓧娈靛悕棣栧瓧姣嶅ぇ鍐� + String fieldName = field.getName(); + + String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); + if(fieldName.contains("method")) + { + capitalizedFieldName = fieldName; + } + + params.put(capitalizedFieldName,URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); } } catch (IllegalAccessException e) { // log.error("鑾峰彇瀵硅薄灞炴�у�兼椂鍑洪敊", e); @@ -89,7 +99,13 @@ } // 灏嗗瓧娈靛悕棣栧瓧姣嶅ぇ鍐� String fieldName = field.getName(); + String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); + + if(fieldName.contains("method")) + { + capitalizedFieldName = fieldName; + } formData.append(capitalizedFieldName) .append("=") @@ -145,7 +161,14 @@ try { Object value = field.get(model); if (value != null) { - params.put(field.getName(),URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); + // 灏嗗瓧娈靛悕棣栧瓧姣嶅ぇ鍐� + String fieldName = field.getName(); + String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); + if(fieldName.contains("method")) + { + capitalizedFieldName = fieldName; + } + params.put(capitalizedFieldName,URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); } } catch (IllegalAccessException e) { // log.error("鑾峰彇瀵硅薄灞炴�у�兼椂鍑洪敊", e); @@ -170,7 +193,10 @@ // 灏嗗瓧娈靛悕棣栧瓧姣嶅ぇ鍐� String fieldName = field.getName(); String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); - + if(fieldName.contains("method")) + { + capitalizedFieldName = fieldName; + } formData.append(capitalizedFieldName) .append("=") .append(URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java index 6deaa72..5f9c32e 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java @@ -106,7 +106,7 @@ //鑾峰彇杞︾墝鍙� - String carLicense = ""; + String carLicense = "-"; StringBuilder driverNames = new StringBuilder(); StringBuilder driverMobiles = new StringBuilder(); try{ @@ -185,6 +185,13 @@ String callbackUrl = clientApp.getCallbackUrl(); try { + + String carLicenseStr = "-"; + if(carLicense!=null && carLicense.length()>0){ + carLicenseStr = carLicense; + } + + // 鏋勫缓璇锋眰鍙傛暟 Map<String, String> map = new HashMap<>(); map.put("orderID", tbOrders.getOrderID().toString()); @@ -196,10 +203,14 @@ .findFirst() .orElse("0")); map.put("orderRemark", orderStatus.getMsg()); - map.put("plateNo",carLicense); + map.put("plateNo",carLicenseStr); map.put("driverMobile",driverMobiles.toString()); map.put("driverName", driverNames.toString()); + log.info("銆愮洃娴嬨�慬" + tbOrders.getOrderID() + "]杞︾墝鍙凤細" + carLicenseStr); + //鎵撳嵃map + log.info("銆愮洃娴嬨�慬" + tbOrders.getOrderID() + "]鍥炶皟璇锋眰鍙傛暟锛�" + map); + // 绗竴娆″皾璇� String response = sendCallback(callbackUrl, map); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java index 53c8a5c..14a1a6f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java @@ -75,6 +75,11 @@ @Excel(name = "鐢ㄦ埛ID") private Long userId; + + /** 鎺ㄤ粙浜轰俊鎭� */ + @Excel(name = "鎺ㄤ粙浜轰俊鎭�") + private String referrals; + public Long getAppId() { return appId; } @@ -187,6 +192,14 @@ this.userId = userId; } + public String getReferrals() { + return referrals; + } + + public void setReferrals(String referrals) { + this.referrals = referrals; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml index 5837c9d..b60da7f 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml @@ -24,10 +24,11 @@ <result property="payUrl" column="pay_url" /> <result property="orderClass" column="order_class" /> <result property="userId" column="user_id" /> + <result property="referrals" column="referrals" /> </resultMap> <sql id="selectSysClientAppVo"> - select app_id, client_name, app_key, security_key, valid_start_time, valid_end_time, status, del_flag, create_by, create_time, update_by, update_time, remark, min_app_id, min_app_secret, callback_url, pay_url, order_class, user_id from sys_client_app + select app_id, client_name, app_key, security_key, valid_start_time, valid_end_time, status, del_flag, create_by, create_time, update_by, update_time, remark, min_app_id, min_app_secret, callback_url, pay_url, order_class, user_id, referrals from sys_client_app </sql> <select id="selectSysClientAppList" parameterType="SysClientApp" resultMap="SysClientAppResult"> @@ -72,6 +73,7 @@ <if test="payUrl != null">pay_url,</if> <if test="orderClass != null">order_class,</if> <if test="userId != null">user_id,</if> + <if test="referrals != null">referrals,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="clientName != null">#{clientName},</if> @@ -92,6 +94,7 @@ <if test="payUrl != null">#{payUrl},</if> <if test="orderClass != null">#{orderClass},</if> <if test="userId != null">#{userId},</if> + <if test="referrals != null">#{referrals},</if> </trim> </insert> @@ -111,6 +114,7 @@ <if test="payUrl != null">pay_url = #{payUrl},</if> <if test="orderClass != null">order_class = #{orderClass},</if> <if test="userId != null">user_id = #{userId},</if> + <if test="referrals != null">referrals = #{referrals},</if> <if test="updateBy != null">update_by = #{updateBy},</if> update_time = sysdate() </set> diff --git a/ruoyi-ui/src/views/system/clientApp/index.vue b/ruoyi-ui/src/views/system/clientApp/index.vue index 5f19022..923f283 100644 --- a/ruoyi-ui/src/views/system/clientApp/index.vue +++ b/ruoyi-ui/src/views/system/clientApp/index.vue @@ -108,6 +108,7 @@ <el-table-column label="鏀粯鍦板潃" align="center" prop="payUrl" /> <el-table-column label="姘戣埅瀛楀吀orderClass" align="center" prop="orderClass" /> <el-table-column label="姘戣埅鍒嗗叕鍙窱d" align="center" prop="userId" /> + <el-table-column label="鎺ㄤ粙浜轰俊鎭�" align="center" prop="referrals" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -186,6 +187,9 @@ <el-form-item label="姘戣埅鍒嗗叕鍙窱d" prop="userId"> <el-input v-model="form.userId" placeholder="璇疯緭鍏ユ皯鑸垎鍏徃Id" /> </el-form-item> + <el-form-item label="鎺ㄤ粙浜轰俊鎭�" prop="referrals"> + <el-input v-model="form.referrals" placeholder="璇疯緭鍏ユ帹浠嬩汉淇℃伅" /> + </el-form-item> <el-form-item label="澶囨敞" prop="remark"> <el-input v-model="form.remark" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" /> </el-form-item> -- Gitblit v1.9.1