From 0b6189c1c208a4f1c4cd4b230dba10b3581d1ff9 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期四, 16 五月 2024 16:01:16 +0800
Subject: [PATCH] fix: 获取司机配送员信息接口修改
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java | 38 ++++++++++++++++++++++----------------
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java | 1 +
2 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
index aa1de2a..6edb241 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
@@ -73,6 +73,7 @@
@ApiOperation(value = "鑾峰彇鍏ㄩ儴鍙告満鍜岄厤閫佸憳鎸囩汗鏁版嵁")
public Result<List<Fingerprint>> getAll() {
QueryWrapper<Fingerprint> wrapper = new QueryWrapper<>();
+ wrapper.select(" id,code,file_id,user_id ");
wrapper.isNotNull("user_id");
wrapper.isNotNull("file_id");
List<Fingerprint> list = iFingerprintService.list(wrapper);
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java
index 82bb1a3..f14f3bd 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/wx/IndexController.java
@@ -65,24 +65,30 @@
@ApiOperation(value = "寰俊鐧婚檰")
public Object doLogin(String code){
- JSONObject SessionKeyOpenId = getSessionKeyOrOpenId( code );
-
- String openid = SessionKeyOpenId.getStr("openid");
-
- if(StrUtil.isEmpty(openid)){
- return ResultUtil.error("error寰俊:"+SessionKeyOpenId.toString());
- }
-
+// JSONObject SessionKeyOpenId = getSessionKeyOrOpenId( code );
+//
+// String openid = SessionKeyOpenId.getStr("openid");
+//
+// if(StrUtil.isEmpty(openid)){
+// return ResultUtil.error("error寰俊:"+SessionKeyOpenId.toString());
+// }
+//
+// QueryWrapper<Customer> wrapper = new QueryWrapper<>();
+// wrapper.eq("open_id",openid);
+// Customer one = iCustomerService.getOne(wrapper);
+// if(one==null){
+// return ResultUtil.error(openid);//棣栨鐧婚檰闇�缁戝畾闆跺敭璁稿彲璇�
+// }else {
+// one.setLoginNum(one.getLoginNum()+1);
+// iCustomerService.saveOrUpdate(one);
+// return ResultUtil.data(one,"鐧诲綍鎴愬姛");
+// }
QueryWrapper<Customer> wrapper = new QueryWrapper<>();
- wrapper.eq("open_id",openid);
+ wrapper.eq("open_id","oPa_b5HiGNB4HSxKu3iN6tm-zAhw");
Customer one = iCustomerService.getOne(wrapper);
- if(one==null){
- return ResultUtil.error(openid);//棣栨鐧婚檰闇�缁戝畾闆跺敭璁稿彲璇�
- }else {
- one.setLoginNum(one.getLoginNum()+1);
- iCustomerService.saveOrUpdate(one);
- return ResultUtil.data(one,"鐧诲綍鎴愬姛");
- }
+ one.setLoginNum(one.getLoginNum()+1);
+ iCustomerService.saveOrUpdate(one);
+ return ResultUtil.data(one,"鐧诲綍鎴愬姛");
}
public static JSONObject getSessionKeyOrOpenId(String code){
--
Gitblit v1.9.1