From 1e4fce87e08f4a00c76cac14286d8c2c99e3cba0 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 16 五月 2025 16:13:35 +0800
Subject: [PATCH] 黑名单列表(添加移出),

---
 framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerBlackForm.java         |   41 ++++
 framework/src/main/resources/mapper/lmk/CustomerTagRefMapper.xml                       |    1 
 framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerQuery.java            |    2 
 manager-api/src/main/java/cn/lili/controller/lmk/CustomerBlackController.java          |   76 +++++++
 framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerBlackVO.java             |   52 +++++
 framework/src/main/resources/mapper/lmk/CustomerMapper.xml                             |   21 --
 framework/src/main/resources/mapper/lmk/CustomerTagMapper.xml                          |    1 
 framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTag.java             |    3 
 framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerBlackServiceImpl.java |  136 +++++++++++++
 framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerBlackQuery.java       |   29 ++
 framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerBlackMapper.java            |   33 +++
 framework/src/main/java/cn/lili/modules/lmk/service/CustomerBlackService.java          |   67 ++++++
 framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerBlack.java           |   29 ++
 manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java               |    2 
 framework/src/main/resources/mapper/lmk/CustomerBlackMapper.xml                        |   70 +++++++
 15 files changed, 538 insertions(+), 25 deletions(-)

diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerBlack.java b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerBlack.java
new file mode 100644
index 0000000..436d6f2
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerBlack.java
@@ -0,0 +1,29 @@
+package cn.lili.modules.lmk.domain.entity;
+
+import cn.lili.mybatis.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import lombok.Data;
+
+/**
+ * 瀹㈡埛榛戝悕鍗�
+ *
+ * @author zxl
+ * @since 2025-05-15
+ */
+@Data
+@TableName("lmk_customer_black")
+public class CustomerBlack extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("store_id")
+    /** 搴楅摵id */
+    private String storeId;
+
+    @TableField("user_id")
+    /** 鐢ㄦ埛id */
+    private String userId;
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTag.java b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTag.java
index f31ddbc..3a5ae77 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTag.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTag.java
@@ -22,5 +22,8 @@
     /**  鏍囩鍚嶇О*/
     private String tagName;
 
+    @TableField("create_type")
+    /** 鍒涘缓鏂瑰紡 */
+    private String createType;
 
 }
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerBlackForm.java b/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerBlackForm.java
new file mode 100644
index 0000000..188d3fe
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerBlackForm.java
@@ -0,0 +1,41 @@
+package cn.lili.modules.lmk.domain.form;
+
+import cn.lili.base.AbsForm;
+import cn.lili.group.Add;
+import cn.lili.group.Update;
+import cn.lili.modules.lmk.domain.entity.CustomerBlack;
+import org.springframework.beans.BeanUtils;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import org.springframework.lang.NonNull;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+/**
+ * 瀹㈡埛榛戝悕鍗曡〃鍗�
+ *
+ * @author zxl
+ * @since 2025-05-15
+ */
+@Data
+@ApiModel(value = "CustomerBlack琛ㄥ崟", description = "瀹㈡埛榛戝悕鍗曡〃鍗�")
+public class CustomerBlackForm extends AbsForm {
+
+    @ApiModelProperty("搴楅摵id")
+    private String storeId;
+
+    @NotBlank(message = "鐢ㄦ埛id涓嶈兘涓虹┖", groups = {Add.class, Update.class})
+    @ApiModelProperty("鐢ㄦ埛id")
+    private String userId;
+
+    public static CustomerBlack getEntityByForm(@NonNull CustomerBlackForm form, CustomerBlack entity) {
+        if(entity == null) {
+          entity = new CustomerBlack();
+        }
+        BeanUtils.copyProperties(form, entity);
+        return entity;
+    }
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerBlackQuery.java b/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerBlackQuery.java
new file mode 100644
index 0000000..dbd111a
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerBlackQuery.java
@@ -0,0 +1,29 @@
+package cn.lili.modules.lmk.domain.query;
+
+
+import cn.lili.base.AbsQuery;
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 瀹㈡埛榛戝悕鍗曟煡璇�
+ *
+ * @author zxl
+ * @since 2025-05-15
+ */
+@Data
+@ApiModel(value = "CustomerBlack鏌ヨ鍙傛暟", description = "瀹㈡埛榛戝悕鍗曟煡璇㈠弬鏁�")
+public class CustomerBlackQuery extends AbsQuery {
+    @ApiModelProperty(value = "鐢ㄦ埛鍚�")
+    private String username;
+
+    @ApiModelProperty(value = "鏄电О")
+    private String nickName;
+
+    @ApiModelProperty(value = "鍟嗘埛id")
+    private String storeId;
+
+}
+
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerQuery.java b/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerQuery.java
index 40911b4..be37454 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerQuery.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerQuery.java
@@ -19,7 +19,7 @@
     @ApiModelProperty(value = "鐢ㄦ埛鎵嬫満鍙风爜")
     private String mobile;
 
-    @ApiModelProperty(value = "鍟嗘埛鍚�")
+    @ApiModelProperty(value = "鍟嗘埛id")
     private String storeId;
 
     /**
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerBlackVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerBlackVO.java
new file mode 100644
index 0000000..cc4b35b
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerBlackVO.java
@@ -0,0 +1,52 @@
+package cn.lili.modules.lmk.domain.vo;
+
+
+import cn.lili.base.AbsVo;
+import cn.lili.modules.lmk.domain.entity.CustomerBlack;
+import org.springframework.lang.NonNull;
+import org.springframework.beans.BeanUtils;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+/**
+ * 瀹㈡埛榛戝悕鍗曞睍绀�
+ *
+ * @author zxl
+ * @since 2025-05-15
+ */
+@Data
+@ApiModel(value = "瀹㈡埛榛戝悕鍗曞搷搴旀暟鎹�", description = "瀹㈡埛榛戝悕鍗曞搷搴旀暟鎹�")
+public class CustomerBlackVO extends AbsVo {
+
+    /** 搴楅摵id */
+    @ApiModelProperty("搴楅摵id")
+    private String storeId;
+
+    /** 鐢ㄦ埛id */
+    @ApiModelProperty("鐢ㄦ埛id")
+    private String userId;
+    /** 鍒涘缓鏂瑰紡 */
+    @ApiModelProperty("鍒涘缓鏂瑰紡")
+    private String createType;
+
+    @ApiModelProperty("鐢ㄦ埛鍚�")
+    private String username;
+
+    @ApiModelProperty("鏄电О")
+    private String nickName;
+
+    @ApiModelProperty(value = "浼氬憳鍦板潃")
+    private String region;
+
+
+    public static CustomerBlackVO getVoByEntity(@NonNull CustomerBlack entity, CustomerBlackVO vo) {
+        if(vo == null) {
+            vo = new CustomerBlackVO();
+        }
+        BeanUtils.copyProperties(entity, vo);
+        return vo;
+    }
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerBlackMapper.java b/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerBlackMapper.java
new file mode 100644
index 0000000..11eeb94
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerBlackMapper.java
@@ -0,0 +1,33 @@
+package cn.lili.modules.lmk.mapper;
+
+import cn.lili.modules.lmk.domain.entity.CustomerBlack;
+
+import cn.lili.modules.lmk.domain.query.CustomerBlackQuery;
+import cn.lili.modules.lmk.domain.vo.CustomerBlackVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 瀹㈡埛榛戝悕鍗� Mapper 鎺ュ彛
+ *
+ * @author zxl
+ * @since 2025-05-15
+ */
+@Mapper
+public interface CustomerBlackMapper extends BaseMapper<CustomerBlack> {
+
+    /**
+     * id鏌ユ壘瀹㈡埛榛戝悕鍗�
+     * @param id
+     * @return
+     */
+    CustomerBlackVO getById(Integer id);
+
+    /**
+    *  鍒嗛〉
+    */
+    IPage getPage(IPage page, @Param("query") CustomerBlackQuery query);
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/CustomerBlackService.java b/framework/src/main/java/cn/lili/modules/lmk/service/CustomerBlackService.java
new file mode 100644
index 0000000..d729ea4
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/CustomerBlackService.java
@@ -0,0 +1,67 @@
+package cn.lili.modules.lmk.service;
+
+import cn.lili.base.Result;
+import cn.lili.modules.lmk.domain.entity.CustomerBlack;
+
+import cn.lili.modules.lmk.domain.form.CustomerBlackForm;
+import cn.lili.modules.lmk.domain.query.CustomerBlackQuery;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 瀹㈡埛榛戝悕鍗� 鏈嶅姟绫�
+ *
+ * @author zxl
+ * @since 2025-05-15
+ */
+public interface CustomerBlackService extends IService<CustomerBlack> {
+
+    /**
+     * 娣诲姞
+     * @param form
+     * @return
+     */
+    Result add(CustomerBlackForm form);
+
+    /**
+     * 淇敼
+     * @param form
+     * @return
+     */
+    Result update(CustomerBlackForm form);
+
+    /**
+     * 鎵归噺鍒犻櫎
+     * @param ids
+     * @return
+     */
+    Result remove(List<String> ids);
+
+    /**
+     * id鍒犻櫎
+     * @param id
+     * @return
+     */
+    Result removeById(String id);
+
+    /**
+     * 鍒嗛〉鏌ヨ
+     * @param query
+     * @return
+     */
+    Result page(CustomerBlackQuery query);
+
+    /**
+     * 鏍规嵁id鏌ユ壘
+     * @param id
+     * @return
+     */
+    Result detail(Integer id);
+
+    /**
+     * 鍒楄〃
+     * @return
+     */
+    Result all();
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerBlackServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerBlackServiceImpl.java
new file mode 100644
index 0000000..b42d0a6
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerBlackServiceImpl.java
@@ -0,0 +1,136 @@
+package cn.lili.modules.lmk.service.impl;
+
+import cn.lili.base.Result;
+import cn.lili.modules.lmk.domain.entity.CustomerBlack;
+import cn.lili.modules.lmk.domain.form.CustomerBlackForm;
+import cn.lili.modules.lmk.domain.query.CustomerBlackQuery;
+import cn.lili.modules.lmk.domain.vo.CustomerBlackVO;
+import cn.lili.modules.lmk.mapper.CustomerBlackMapper;
+import cn.lili.modules.lmk.service.CustomerBlackService;
+import cn.lili.utils.PageUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import org.springframework.stereotype.Service;
+import lombok.RequiredArgsConstructor;
+
+import org.springframework.beans.BeanUtils;
+import org.springframework.util.Assert;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 瀹㈡埛榛戝悕鍗� 鏈嶅姟瀹炵幇绫�
+ *
+ * @author zxl
+ * @since 2025-05-15
+ */
+@Service
+@RequiredArgsConstructor
+public class CustomerBlackServiceImpl extends ServiceImpl<CustomerBlackMapper, CustomerBlack> implements CustomerBlackService {
+
+    private final CustomerBlackMapper customerBlackMapper;
+
+    /**
+     * 娣诲姞
+     * @param form
+     * @return
+     */
+    @Override
+    public Result add(CustomerBlackForm form) {
+        CustomerBlack entity = CustomerBlackForm.getEntityByForm(form, null);
+        //鍒ゆ柇鏄惁宸插瓨鍦ㄩ粦鍚嶅崟涓�
+        CustomerBlack customerBlack = new LambdaQueryChainWrapper<CustomerBlack>(customerBlackMapper)
+                .eq(CustomerBlack::getUserId,entity.getUserId())
+                        .and(customer -> {
+                            if (form.getStoreId() == null) {
+                                customer.isNull(CustomerBlack::getStoreId);
+                            } else {
+                                customer.isNotNull(CustomerBlack::getStoreId);
+                            }
+                        }            ).one();
+        if (customerBlack != null) {
+            return Result.ok("璇ュ鎴峰凡琚坊鍔犲埌榛戝悕鍗曚腑锛�");
+        }
+        baseMapper.insert(entity);
+        return Result.ok("娣诲姞鎴愬姛");
+    }
+
+    /**
+     * 淇敼
+     * @param form
+     * @return
+     */
+    @Override
+    public Result update(CustomerBlackForm form) {
+        CustomerBlack entity = baseMapper.selectById(form.getId());
+
+        // 涓虹┖鎶汭llegalArgumentException锛屽仛鍏ㄥ眬寮傚父澶勭悊
+        Assert.notNull(entity, "璁板綍涓嶅瓨鍦�");
+        BeanUtils.copyProperties(form, entity);
+        baseMapper.updateById(entity);
+        return Result.ok("淇敼鎴愬姛");
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎
+     * @param ids
+     * @return
+     */
+    @Override
+    public Result remove(List<String> ids) {
+        baseMapper.deleteBatchIds(ids);
+        return Result.ok("鍒犻櫎鎴愬姛");
+    }
+
+    /**
+     * id鍒犻櫎
+     * @param id
+     * @return
+     */
+    @Override
+    public Result removeById(String id) {
+        baseMapper.deleteById(id);
+        return Result.ok("鍒犻櫎鎴愬姛");
+    }
+
+    /**
+     * 鍒嗛〉鏌ヨ
+     * @param query
+     * @return
+     */
+    @Override
+    public Result page(CustomerBlackQuery query) {
+        IPage<CustomerBlackVO> page = PageUtil.getPage(query, CustomerBlackVO.class);
+        baseMapper.getPage(page, query);
+        return Result.ok().data(page.getRecords()).total(page.getTotal());
+    }
+
+    /**
+     * 鏍规嵁id鏌ユ壘
+     * @param id
+     * @return
+     */
+    @Override
+    public Result detail(Integer id) {
+        CustomerBlackVO vo = baseMapper.getById(id);
+        Assert.notNull(vo, "璁板綍涓嶅瓨鍦�");
+        return Result.ok().data(vo);
+    }
+
+    /**
+     * 鍒楄〃
+     * @return
+     */
+    @Override
+    public Result all() {
+        List<CustomerBlack> entities = baseMapper.selectList(null);
+        List<CustomerBlackVO> vos = entities.stream()
+                .map(entity -> CustomerBlackVO.getVoByEntity(entity, null))
+                .collect(Collectors.toList());
+        return Result.ok().data(vos);
+    }
+}
diff --git a/framework/src/main/resources/mapper/lmk/CustomerBlackMapper.xml b/framework/src/main/resources/mapper/lmk/CustomerBlackMapper.xml
new file mode 100644
index 0000000..9a3bc56
--- /dev/null
+++ b/framework/src/main/resources/mapper/lmk/CustomerBlackMapper.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.lili.modules.lmk.mapper.CustomerBlackMapper">
+
+    <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+    <resultMap id="BaseResultMap" type="cn.lili.modules.lmk.domain.vo.CustomerBlackVO">
+        <result column="store_id" property="storeId" />
+        <result column="user_id" property="userId" />
+        <result column="create_time" property="createTime" />
+        <result column="create_by" property="createBy" />
+        <result column="update_by" property="updateBy" />
+        <result column="update_time" property="updateTime" />
+        <result column="username" property="username" />
+        <result column="nickName" property="nick_name" />
+        <result property="region" column="region"/>
+        <result property="storeId" column="store_id"/>
+    </resultMap>
+
+    <select id="getById" resultMap="BaseResultMap">
+        SELECT
+            LCB.store_id,
+            LCB.user_id,
+            LCB.create_time,
+            LCB.create_by,
+            LCB.update_by,
+            LCB.update_time,
+            LCB.id
+        FROM
+            lmk_customer_black LCB
+        WHERE
+            LCB.id = #{id} AND LCB.delete_flag = 0
+    </select>
+
+
+    <select id="getPage" resultMap="BaseResultMap">
+        SELECT
+            LCB.store_id,
+            LCB.user_id,
+            LCB.create_time,
+            LCB.create_by,
+            LCB.update_by,
+            LCB.update_time,
+            LCB.id,
+            lm.username,
+            lm.nick_name,
+            lm.region
+        FROM
+            lmk_customer_black LCB
+        LEFT JOIN
+            li_member lm ON LCB.user_id = lm.id
+        <where>
+            LCB.delete_flag = 0
+            <!-- 鐢ㄦ埛鍚嶆ā绯婃煡璇� -->
+            <if test="query.username != null and query.username != ''">
+                AND lm.username LIKE CONCAT('%', #{query.username}, '%')
+            </if>
+
+            <!-- 鏄电О妯$硦鏌ヨ -->
+            <if test="query.nickName != null and query.nickName != ''">
+                AND lm.nick_name LIKE CONCAT('%', #{query.nickName}, '%')
+            </if>
+            <!-- 鍟嗛摵id -->
+            <if test="query.storeId != null and query.storeId != ''">
+                AND lm.store_id = #{query.storeId}
+            </if>
+        </where>
+
+    </select>
+
+</mapper>
diff --git a/framework/src/main/resources/mapper/lmk/CustomerMapper.xml b/framework/src/main/resources/mapper/lmk/CustomerMapper.xml
index 0a38e6b..1c484e7 100644
--- a/framework/src/main/resources/mapper/lmk/CustomerMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/CustomerMapper.xml
@@ -83,25 +83,4 @@
     </select>
 
 
-
-
-    <select id="getById" resultMap="BaseResultMap">
-        SELECT
-            LCT.tag_name,
-            LCT.create_type,
-            LCT.create_by,
-            LCT.create_time,
-            LCT.update_by,
-            LCT.update_time,
-            LCT.delete_flag,
-            LCT.id
-        FROM
-            lmk_customer_tag LCT
-        WHERE
-            LCT.id = #{id} AND LCT.delete_flag = 0
-    </select>
-
-
-
-
 </mapper>
diff --git a/framework/src/main/resources/mapper/lmk/CustomerTagMapper.xml b/framework/src/main/resources/mapper/lmk/CustomerTagMapper.xml
index 747aa47..fe509b3 100644
--- a/framework/src/main/resources/mapper/lmk/CustomerTagMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/CustomerTagMapper.xml
@@ -41,7 +41,6 @@
             LCT.create_time,
             LCT.update_by,
             LCT.update_time,
-            LCT.delete_flag,
             LCT.id
         FROM
             lmk_customer_tag LCT
diff --git a/framework/src/main/resources/mapper/lmk/CustomerTagRefMapper.xml b/framework/src/main/resources/mapper/lmk/CustomerTagRefMapper.xml
index 0c00489..b6dbbef 100644
--- a/framework/src/main/resources/mapper/lmk/CustomerTagRefMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/CustomerTagRefMapper.xml
@@ -8,7 +8,6 @@
         <result column="customer_tag_id" property="customerTagId" />
         <result column="create_time" property="createTime" />
         <result column="update_time" property="updateTime" />
-        <result column="delete_flag" property="deleteFlag" />
     </resultMap>
 
     <select id="getById" resultMap="BaseResultMap">
diff --git a/manager-api/src/main/java/cn/lili/controller/lmk/CustomerBlackController.java b/manager-api/src/main/java/cn/lili/controller/lmk/CustomerBlackController.java
new file mode 100644
index 0000000..166bb37
--- /dev/null
+++ b/manager-api/src/main/java/cn/lili/controller/lmk/CustomerBlackController.java
@@ -0,0 +1,76 @@
+package cn.lili.controller.lmk;
+
+import cn.lili.base.Result;
+import cn.lili.group.Add;
+import cn.lili.group.Update;
+import cn.lili.modules.lmk.domain.form.CustomerBlackForm;
+import cn.lili.modules.lmk.domain.query.CustomerBlackQuery;
+import cn.lili.modules.lmk.service.CustomerBlackService;
+
+import io.swagger.annotations.ApiOperation;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import java.util.List;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.constraints.NotEmpty;
+import io.swagger.annotations.Api;;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 瀹㈡埛榛戝悕鍗� 鍓嶇鎺у埗鍣�
+ *
+ * @author zxl
+ * @since 2025-05-15
+ */
+@Validated
+@RequiredArgsConstructor
+@Api(value = "瀹㈡埛榛戝悕鍗�", tags = "瀹㈡埛榛戝悕鍗曠鐞�")
+@RestController
+@RequestMapping("/manager/customer-black")
+public class CustomerBlackController {
+
+    private final CustomerBlackService customerBlackService;
+
+    @PostMapping
+    @ApiOperation(value = "娣诲姞", notes = "娣诲姞")
+    public Result add(@RequestBody @Validated(Add.class) CustomerBlackForm form) {
+        return customerBlackService.add(form);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "淇敼", notes = "淇敼")
+    public Result update(@RequestBody @Validated(Update.class) CustomerBlackForm form) {
+        return customerBlackService.update(form);
+    }
+
+    @DeleteMapping("/{id}")
+    @ApiOperation(value = "ID鍒犻櫎", notes = "ID鍒犻櫎")
+    public Result removeById(@PathVariable("id") String id) {
+        return customerBlackService.removeById(id);
+    }
+
+    @DeleteMapping("/batch")
+    @ApiOperation(value = "鎵归噺鍒犻櫎", notes = "鎵归噺鍒犻櫎")
+    public Result remove(@RequestBody @NotEmpty(message = "璇烽�夋嫨鏁版嵁") List<String> ids) {
+        return customerBlackService.remove(ids);
+    }
+
+    @GetMapping("/page")
+    @ApiOperation(value = "鍒嗛〉", notes = "鍒嗛〉")
+    public Result page(CustomerBlackQuery query) {
+        return customerBlackService.page(query);
+    }
+
+    @GetMapping("/{id}")
+    @ApiOperation(value = "璇︽儏", notes = "璇︽儏")
+    public Result detail(@PathVariable("id") Integer id) {
+        return customerBlackService.detail(id);
+    }
+
+    @GetMapping("/list")
+    @ApiOperation(value = "鍒楄〃", notes = "鍒楄〃")
+    public Result list() {
+        return customerBlackService.all();
+    }
+}
diff --git a/manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java b/manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java
index f3938a7..98ee0b1 100644
--- a/manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java
+++ b/manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java
@@ -39,7 +39,7 @@
     }
 
 
-    @ApiOperation(value = "浼氬憳鍒嗛〉鍒楄〃")
+    @ApiOperation(value = "瀹㈡埛鍒嗛〉鍒楄〃")
     @GetMapping
     public Result getByPage(CustomerQuery customerQuery) {
         return customerService.getMemberPage(customerQuery);

--
Gitblit v1.8.0