diff --git a/ghy-admin/pom.xml b/ghy-admin/pom.xml
index b98fc308..d36994c3 100644
--- a/ghy-admin/pom.xml
+++ b/ghy-admin/pom.xml
@@ -85,6 +85,12 @@
ghy-payment
+
+
+ com.ghy
+ ghy-custom
+
+
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
new file mode 100644
index 00000000..1d3ce36e
--- /dev/null
+++ b/ghy-admin/src/main/java/com/ghy/web/controller/customer/CustomerController.java
@@ -0,0 +1,47 @@
+package com.ghy.web.controller.customer;
+
+import com.ghy.common.core.controller.BaseController;
+import com.ghy.common.core.page.TableDataInfo;
+import com.ghy.customer.domain.Customer;
+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 java.util.List;
+
+/**
+ * @author clunt
+ * 消费者Controller
+ */
+@Controller
+@RequestMapping("/customer")
+public class CustomerController extends BaseController {
+
+ private String prefix = "customer";
+
+ @Autowired
+ private CustomerService customerService;
+
+ @RequiresPermissions("customer:customer:view")
+ @GetMapping()
+ public String customer()
+ {
+ return prefix + "/customer";
+ }
+
+ @RequiresPermissions("customer:customer:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(Customer customer)
+ {
+ startPage();
+ List list = customerService.getCustomerList(customer);
+ return getDataTable(list);
+ }
+
+}
diff --git a/ghy-admin/src/main/resources/templates/customer/customer.html b/ghy-admin/src/main/resources/templates/customer/customer.html
new file mode 100644
index 00000000..c8b33a40
--- /dev/null
+++ b/ghy-admin/src/main/resources/templates/customer/customer.html
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ghy-custom/src/main/java/com/ghy/customer/mapper/CustomerMapper.java b/ghy-custom/src/main/java/com/ghy/customer/mapper/CustomerMapper.java
index e72449ad..9482dada 100644
--- a/ghy-custom/src/main/java/com/ghy/customer/mapper/CustomerMapper.java
+++ b/ghy-custom/src/main/java/com/ghy/customer/mapper/CustomerMapper.java
@@ -2,12 +2,20 @@ package com.ghy.customer.mapper;
import com.ghy.customer.domain.Customer;
+import java.util.List;
+
/**
* @author clunt
* 消费者Mapper
*/
public interface CustomerMapper {
+ /**
+ * @param customer 消费者筛选条件
+ * @return 符合结果消费者
+ */
+ List getCustomerList(Customer customer);
+
/**
* @param customerId 消费者id
* @return 消费者信息
diff --git a/ghy-custom/src/main/java/com/ghy/customer/service/CustomerService.java b/ghy-custom/src/main/java/com/ghy/customer/service/CustomerService.java
index 062ad2e8..893791e7 100644
--- a/ghy-custom/src/main/java/com/ghy/customer/service/CustomerService.java
+++ b/ghy-custom/src/main/java/com/ghy/customer/service/CustomerService.java
@@ -2,12 +2,20 @@ package com.ghy.customer.service;
import com.ghy.customer.domain.Customer;
+import java.util.List;
+
/**
* @author clunt
* 消费者service层
*/
public interface CustomerService {
+ /**
+ * @param customer 消费者筛选条件
+ * @return 消费者列表
+ */
+ List getCustomerList(Customer customer);
+
/**
* @param customerId 消费者id
* @return 消费者信息
diff --git a/ghy-custom/src/main/java/com/ghy/customer/service/impl/CustomerServiceImpl.java b/ghy-custom/src/main/java/com/ghy/customer/service/impl/CustomerServiceImpl.java
index 39d0d3e7..ce69ee59 100644
--- a/ghy-custom/src/main/java/com/ghy/customer/service/impl/CustomerServiceImpl.java
+++ b/ghy-custom/src/main/java/com/ghy/customer/service/impl/CustomerServiceImpl.java
@@ -5,9 +5,11 @@ import com.ghy.common.exception.ServiceException;
import com.ghy.customer.domain.Customer;
import com.ghy.customer.mapper.CustomerMapper;
import com.ghy.customer.service.CustomerService;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
+import java.util.List;
/**
* @author clunt
@@ -16,7 +18,7 @@ import javax.annotation.Resource;
@Service
public class CustomerServiceImpl implements CustomerService {
- @Resource
+ @Autowired
private CustomerMapper customerMapper;
@Override
@@ -24,6 +26,11 @@ public class CustomerServiceImpl implements CustomerService {
return customerMapper.selectByCustomerId(customerId);
}
+ @Override
+ public List getCustomerList(Customer customer) {
+ return customerMapper.getCustomerList(customer);
+ }
+
@Override
public int deleteByIds(String ids) {
Long [] customerIds = Convert.toLongArray(ids);
diff --git a/ghy-custom/src/main/resources/mapper.customer/CustomerMapper.xml b/ghy-custom/src/main/resources/mapper/customer/CustomerMapper.xml
similarity index 95%
rename from ghy-custom/src/main/resources/mapper.customer/CustomerMapper.xml
rename to ghy-custom/src/main/resources/mapper/customer/CustomerMapper.xml
index 67faf487..02912a78 100644
--- a/ghy-custom/src/main/resources/mapper.customer/CustomerMapper.xml
+++ b/ghy-custom/src/main/resources/mapper/customer/CustomerMapper.xml
@@ -2,7 +2,7 @@
-
+
@@ -22,6 +22,10 @@
customer_logo_url, create_by, create_time, remark
FROM customer
+
+
DELETE FROM customer WHERE customer_id IN
diff --git a/ghy-custom/src/main/resources/mapper.customer/CustomerPlaceMapper.xml b/ghy-custom/src/main/resources/mapper/customer/CustomerPlaceMapper.xml
similarity index 100%
rename from ghy-custom/src/main/resources/mapper.customer/CustomerPlaceMapper.xml
rename to ghy-custom/src/main/resources/mapper/customer/CustomerPlaceMapper.xml