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 @@
-
- 新增
-
-
- 修改
-
删除
@@ -97,8 +91,6 @@
function queryUserList() {
var options = {
url: prefix + "/list",
- createUrl: prefix + "/add",
- updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
@@ -154,12 +146,8 @@
formatter: function(value, row, index) {
if (row.customerId != 1) {
var actions = [];
- actions.push('
编辑 ');
+ actions.push("
重置密码 ");
actions.push('
删除 ');
- var more = [];
- more.push("
重置密码 ");
- more.push("
分配角色");
- actions.push('
更多操作');
return actions.join('');
} else {
return "";
@@ -172,16 +160,11 @@
/* 用户管理-重置密码 */
- function resetPwd(userId) {
- var url = prefix + '/resetPwd/' + userId;
+ function resetPwd(customerId) {
+ var url = prefix + '/resetPwd/' + customerId;
$.modal.open("重置密码", url, '800', '300');
}
- /* 用户管理-分配角色 */
- function authRole(userId) {
- var url = prefix + '/authRole/' + userId;
- $.modal.openTab("用户分配角色", url);
- }
/* 用户状态显示 */
function statusTools(row) {
diff --git a/ghy-admin/src/main/resources/templates/customer/resetPwd.html b/ghy-admin/src/main/resources/templates/customer/resetPwd.html
new file mode 100644
index 00000000..64b5342a
--- /dev/null
+++ b/ghy-admin/src/main/resources/templates/customer/resetPwd.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
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}