From 64d87f54bc52a5f6b7a1d84f8100b57d259a5a84 Mon Sep 17 00:00:00 2001 From: clunt Date: Mon, 2 May 2022 16:31:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E8=B4=B9=E8=80=85=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customer/CustomerController.java | 15 +++++-- .../templates/customer/customer.html | 27 +++-------- .../templates/customer/resetPwd.html | 45 +++++++++++++++++++ .../com/ghy/customer/domain/Customer.java | 3 ++ .../mapper/customer/CustomerMapper.xml | 5 ++- 5 files changed, 67 insertions(+), 28 deletions(-) create mode 100644 ghy-admin/src/main/resources/templates/customer/resetPwd.html diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/customer/CustomerController.java b/ghy-admin/src/main/java/com/ghy/web/controller/customer/CustomerController.java index 1d3ce36e..80970ced 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/customer/CustomerController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/customer/CustomerController.java @@ -7,10 +7,8 @@ import com.ghy.customer.service.CustomerService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -44,4 +42,13 @@ public class CustomerController extends BaseController { return getDataTable(list); } + @RequiresPermissions("customer:customer:resetPwd") + @GetMapping("/resetPwd/{customerId}") + public String resetPwd(@PathVariable("customerId") Long customerId, ModelMap mmap) + { + mmap.put("customer", customerService.selectByCustomerId(customerId)); + return prefix + "/resetPwd"; + } + + } diff --git a/ghy-admin/src/main/resources/templates/customer/customer.html b/ghy-admin/src/main/resources/templates/customer/customer.html index c8b33a40..e68a61bb 100644 --- a/ghy-admin/src/main/resources/templates/customer/customer.html +++ b/ghy-admin/src/main/resources/templates/customer/customer.html @@ -17,10 +17,10 @@
+ + + + + diff --git a/ghy-custom/src/main/java/com/ghy/customer/domain/Customer.java b/ghy-custom/src/main/java/com/ghy/customer/domain/Customer.java index b6d2b77b..54bf65e5 100644 --- a/ghy-custom/src/main/java/com/ghy/customer/domain/Customer.java +++ b/ghy-custom/src/main/java/com/ghy/customer/domain/Customer.java @@ -28,6 +28,9 @@ public class Customer extends BaseEntity { @Excel(name = "微信open_id", cellType = Excel.ColumnType.STRING) private String openId; + @Excel(name = "密码", cellType = Excel.ColumnType.STRING) + private String password; + @Excel(name = "用户状态 0生效 1冻结 2删除", readConverterExp = "0=生效,1=冻结,2=删除") private Integer status; diff --git a/ghy-custom/src/main/resources/mapper/customer/CustomerMapper.xml b/ghy-custom/src/main/resources/mapper/customer/CustomerMapper.xml index 02912a78..7dc098d5 100644 --- a/ghy-custom/src/main/resources/mapper/customer/CustomerMapper.xml +++ b/ghy-custom/src/main/resources/mapper/customer/CustomerMapper.xml @@ -8,6 +8,7 @@ + @@ -18,7 +19,7 @@ - SELECT customer_id, name, account, phone, open_id, status, + SELECT customer_id, name, account, phone, open_id, password, status, customer_logo_url, create_by, create_time, remark FROM customer @@ -42,7 +43,7 @@ - AND customer = #{customerId} + AND customer_id = #{customerId}