Quellcode durchsuchen

微信移动端支付

guomengjiao vor 1 Jahr
Ursprung
Commit
4663b9a906

+ 74 - 77
.idea/workspace.xml

@@ -30,9 +30,10 @@
   <component name="ChangeListManager">
     <list default="true" id="fc9366aa-6566-4981-8149-d75e02f8e884" name="默认的" comment="微信移动端支付">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/modules/bjflapi/src/main/java/com/jeesite/modules/bjflapi/report/WebsiteUserOrderControllerApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bjflapi/src/main/java/com/jeesite/modules/bjflapi/report/WebsiteUserOrderControllerApi.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/modules/bjflapi/src/main/java/com/jeesite/modules/bjflapi/report/WebsiteUserControllerApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bjflapi/src/main/java/com/jeesite/modules/bjflapi/report/WebsiteUserControllerApi.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/dto/WebsiteUserDto.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/dto/WebsiteUserDto.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/service/WebsiteUserOrderService.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/service/WebsiteUserOrderService.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/util/WxPayUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/util/WxPayUtil.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/service/WebsiteUserService.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/service/WebsiteUserService.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/web/src/main/resources/config/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/web/src/main/resources/config/application.yml" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
@@ -95,8 +96,8 @@
     <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/../../maintenance-support/maintenance-support-java" />
-    <property name="project.structure.last.edited" value="Project" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/../../bogo/bogo-boot-server" />
+    <property name="project.structure.last.edited" value="SDKs" />
     <property name="project.structure.proportion" value="0.15" />
     <property name="project.structure.side.proportion" value="0.25287357" />
     <property name="settings.editor.selected.configurable" value="MavenSettings" />
@@ -136,7 +137,7 @@
       <visibility group="运行配置" flag="true" />
     </myKeys>
   </component>
-  <component name="RunManager" selected="Application.DateUtils">
+  <component name="RunManager" selected="Spring Boot.Application">
     <configuration name="DateUtils" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
       <option name="MAIN_CLASS_NAME" value="com.jeesite.common.lang.DateUtils" />
       <module name="jeesite-common" />
@@ -459,70 +460,7 @@
       <workItem from="1734579234738" duration="258000" />
       <workItem from="1734579502121" duration="1272000" />
       <workItem from="1734658594781" duration="126472000" />
-      <workItem from="1735184825354" duration="47732000" />
-    </task>
-    <task id="LOCAL-00008" summary="修复图片丢失">
-      <created>1681366727600</created>
-      <option name="number" value="00008" />
-      <option name="presentableId" value="LOCAL-00008" />
-      <option name="project" value="LOCAL" />
-      <updated>1681366727600</updated>
-    </task>
-    <task id="LOCAL-00009" summary="用户信息优化">
-      <created>1681371269847</created>
-      <option name="number" value="00009" />
-      <option name="presentableId" value="LOCAL-00009" />
-      <option name="project" value="LOCAL" />
-      <updated>1681371269847</updated>
-    </task>
-    <task id="LOCAL-00010" summary="添加销量单位,价格单位">
-      <created>1684465747870</created>
-      <option name="number" value="00010" />
-      <option name="presentableId" value="LOCAL-00010" />
-      <option name="project" value="LOCAL" />
-      <updated>1684465747870</updated>
-    </task>
-    <task id="LOCAL-00011" summary="更新">
-      <created>1685354940286</created>
-      <option name="number" value="00011" />
-      <option name="presentableId" value="LOCAL-00011" />
-      <option name="project" value="LOCAL" />
-      <updated>1685354940286</updated>
-    </task>
-    <task id="LOCAL-00012" summary="更新">
-      <created>1685354993492</created>
-      <option name="number" value="00012" />
-      <option name="presentableId" value="LOCAL-00012" />
-      <option name="project" value="LOCAL" />
-      <updated>1685354993492</updated>
-    </task>
-    <task id="LOCAL-00013" summary="更新">
-      <created>1687241530897</created>
-      <option name="number" value="00013" />
-      <option name="presentableId" value="LOCAL-00013" />
-      <option name="project" value="LOCAL" />
-      <updated>1687241530897</updated>
-    </task>
-    <task id="LOCAL-00014" summary="更新报告附件">
-      <created>1687241700652</created>
-      <option name="number" value="00014" />
-      <option name="presentableId" value="LOCAL-00014" />
-      <option name="project" value="LOCAL" />
-      <updated>1687241700652</updated>
-    </task>
-    <task id="LOCAL-00015" summary="更新模板配置">
-      <created>1687686800989</created>
-      <option name="number" value="00015" />
-      <option name="presentableId" value="LOCAL-00015" />
-      <option name="project" value="LOCAL" />
-      <updated>1687686800989</updated>
-    </task>
-    <task id="LOCAL-00016" summary="调查报告功能更新">
-      <created>1687773915626</created>
-      <option name="number" value="00016" />
-      <option name="presentableId" value="LOCAL-00016" />
-      <option name="project" value="LOCAL" />
-      <updated>1687773915626</updated>
+      <workItem from="1735184825354" duration="115077000" />
     </task>
     <task id="LOCAL-00017" summary="调查报告优化">
       <created>1687860575924</created>
@@ -804,7 +742,70 @@
       <option name="project" value="LOCAL" />
       <updated>1735525419724</updated>
     </task>
-    <option name="localTasksCounter" value="57" />
+    <task id="LOCAL-00057" summary="微信移动端支付">
+      <created>1735538092725</created>
+      <option name="number" value="00057" />
+      <option name="presentableId" value="LOCAL-00057" />
+      <option name="project" value="LOCAL" />
+      <updated>1735538092725</updated>
+    </task>
+    <task id="LOCAL-00058" summary="微信移动端支付">
+      <created>1735546636892</created>
+      <option name="number" value="00058" />
+      <option name="presentableId" value="LOCAL-00058" />
+      <option name="project" value="LOCAL" />
+      <updated>1735546636892</updated>
+    </task>
+    <task id="LOCAL-00059" summary="微信移动端支付">
+      <created>1735548916420</created>
+      <option name="number" value="00059" />
+      <option name="presentableId" value="LOCAL-00059" />
+      <option name="project" value="LOCAL" />
+      <updated>1735548916420</updated>
+    </task>
+    <task id="LOCAL-00060" summary="微信移动端支付">
+      <created>1735550803804</created>
+      <option name="number" value="00060" />
+      <option name="presentableId" value="LOCAL-00060" />
+      <option name="project" value="LOCAL" />
+      <updated>1735550803804</updated>
+    </task>
+    <task id="LOCAL-00061" summary="微信移动端支付">
+      <created>1735637411087</created>
+      <option name="number" value="00061" />
+      <option name="presentableId" value="LOCAL-00061" />
+      <option name="project" value="LOCAL" />
+      <updated>1735637411087</updated>
+    </task>
+    <task id="LOCAL-00062" summary="微信移动端支付">
+      <created>1735639019197</created>
+      <option name="number" value="00062" />
+      <option name="presentableId" value="LOCAL-00062" />
+      <option name="project" value="LOCAL" />
+      <updated>1735639019197</updated>
+    </task>
+    <task id="LOCAL-00063" summary="微信移动端支付">
+      <created>1735801608469</created>
+      <option name="number" value="00063" />
+      <option name="presentableId" value="LOCAL-00063" />
+      <option name="project" value="LOCAL" />
+      <updated>1735801608469</updated>
+    </task>
+    <task id="LOCAL-00064" summary="微信移动端支付">
+      <created>1735807416513</created>
+      <option name="number" value="00064" />
+      <option name="presentableId" value="LOCAL-00064" />
+      <option name="project" value="LOCAL" />
+      <updated>1735807416513</updated>
+    </task>
+    <task id="LOCAL-00065" summary="微信移动端支付">
+      <created>1735809757705</created>
+      <option name="number" value="00065" />
+      <option name="presentableId" value="LOCAL-00065" />
+      <option name="project" value="LOCAL" />
+      <updated>1735809757705</updated>
+    </task>
+    <option name="localTasksCounter" value="66" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -889,21 +890,17 @@
   <component name="XDebuggerManager">
     <breakpoint-manager>
       <breakpoints>
-        <line-breakpoint enabled="true" type="java-line">
-          <url>file://$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/service/ResearchBriefReportService.java</url>
-          <line>140</line>
-          <option name="timeStamp" value="47" />
-        </line-breakpoint>
         <line-breakpoint enabled="true" type="java-line">
           <url>file://$PROJECT_DIR$/modules/report/src/main/java/com/jeesite/modules/report/service/WebsiteUserOrderService.java</url>
-          <line>76</line>
-          <option name="timeStamp" value="50" />
+          <line>331</line>
+          <option name="timeStamp" value="69" />
         </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
     <watches-manager>
       <configuration name="SpringBootApplicationConfigurationType">
         <watch expression="query" />
+        <watch expression="order.getOrderNumber()" />
       </configuration>
     </watches-manager>
   </component>

+ 10 - 0
modules/bjflapi/src/main/java/com/jeesite/modules/bjflapi/report/WebsiteUserControllerApi.java

@@ -145,6 +145,16 @@ public class WebsiteUserControllerApi extends AbstractController {
         return login(websiteUser);
     }
 
+    /**
+     * 修改用户信息
+     */
+    @WebsiteAuth
+    @PostMapping(value = "updateUser")
+    public R<String> updateUser(WebsiteUser user) throws Exception {
+        String userId = getUserIdByRequest();
+        return websiteUserService.updateUser(userId, user);
+    }
+
     /**
      * 修改密码
      */

+ 1 - 1
modules/report/src/main/java/com/jeesite/modules/report/dto/WebsiteUserDto.java

@@ -9,5 +9,5 @@ public class WebsiteUserDto implements Serializable {
     private String newPassword;        // 新密码
     private String confirmNewPassword;        // 确认密码
     private String uuid;        // uuid
-    private String email;        // 目录
+    private String email;        // 邮箱
 }

+ 2 - 2
modules/report/src/main/java/com/jeesite/modules/report/service/WebsiteUserOrderService.java

@@ -221,7 +221,7 @@ public class WebsiteUserOrderService extends CrudService<WebsiteUserOrderDao, We
 	}
 
 	//定时任务会调用此方法
-//	@Scheduled(cron ="0 0/5 * * * ?")
+	@Scheduled(cron ="0 0/2 * * * ?")
 	public void zfbPayQuery() {
 		WebsiteUserOrder where = new WebsiteUserOrder();
 		where.setPayMethodList(Arrays.asList(Constants.orderPayMethod.ZFB, Constants.orderPayMethod.ZFB_H5));
@@ -259,7 +259,7 @@ public class WebsiteUserOrderService extends CrudService<WebsiteUserOrderDao, We
 	}
 
 	//定时任务会调用此方法
-//	@Scheduled(cron ="0 0/5 * * * ?")
+	@Scheduled(cron ="0 0/2 * * * ?")
 	public void wxPayQuery() {
 		WebsiteUserOrder where = new WebsiteUserOrder();
 		where.setPayMethodList(Arrays.asList(Constants.orderPayMethod.WX, Constants.orderPayMethod.WX_H5));

+ 26 - 0
modules/report/src/main/java/com/jeesite/modules/report/service/WebsiteUserService.java

@@ -1,9 +1,11 @@
 package com.jeesite.modules.report.service;
 
 import com.jeesite.common.entity.Page;
+import com.jeesite.common.lang.StringUtils;
 import com.jeesite.common.service.CrudService;
 import com.jeesite.modules.report.dao.WebsiteUserDao;
 import com.jeesite.modules.report.entity.WebsiteUser;
+import com.jeesite.modules.sys.utils.R;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -82,4 +84,28 @@ public class WebsiteUserService extends CrudService<WebsiteUserDao, WebsiteUser>
 		where.setEmail(email);
 		return dao.getByEntity(where);
 	}
+
+	public R<String> updateUser(String userId, WebsiteUser user) {
+		WebsiteUser websiteUser = get(userId);
+		if (websiteUser == null) {
+			return R.fail("用户不存在");
+		}
+		if (StringUtils.isNotEmpty(user.getContact())) {
+			websiteUser.setContact(user.getContact());
+		}
+		if (StringUtils.isNotEmpty(user.getCompanyName())) {
+			websiteUser.setCompanyName(user.getCompanyName());
+		}
+		if (StringUtils.isNotEmpty(user.getAddr())) {
+			websiteUser.setAddr(user.getAddr());
+		}
+		if (StringUtils.isNotEmpty(user.getEmail()) && !websiteUser.getEmail().equals(user.getEmail())) {
+			if (findEmail(user.getEmail()) != null) {
+				return R.fail("邮箱已存在");
+			}
+			websiteUser.setEmail(user.getEmail());
+		}
+		dao.update(websiteUser);
+		return R.ok();
+	}
 }

+ 1 - 1
web/src/main/resources/config/application.yml

@@ -953,7 +953,7 @@ wxpay:
   #商户id
   mchId: 1683231884
   #支付回调地址
-  notifyUrl: http://localhost:8090/js/a/api/report/websiteUserOrder/wxpay/asyncNotify
+  notifyUrl: http://frp.songlanyun.com:8801/js/a/api/report/websiteUserOrder/wxpay/asyncNotify
   # 商户API私钥路径
   privateKeyPath: web/src/main/resources/cert/apiclient_key.pem
   # 商户证书序列号