From 05d286d33b25ea7e317eae2861bb765ac11a927d Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 15 五月 2025 17:44:34 +0800
Subject: [PATCH] 新增客户管理,客户标签(暂留)功能
---
framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerServiceImpl.java | 60 +++
framework/src/main/resources/mapper/lmk/CustomerTagRefMapper.xml | 39 +
framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerMapper.java | 35 +
framework/src/main/java/cn/lili/modules/lmk/service/CustomerTagService.java | 68 +++
framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerTagQuery.java | 17
framework/src/main/resources/mapper/lmk/CustomerMapper.xml | 107 +++++
framework/src/main/resources/mapper/lmk/CustomerTagMapper.xml | 52 ++
framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTag.java | 26 +
framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerTagRefVO.java | 29 +
framework/src/main/java/cn/lili/modules/lmk/mapper/LmkStoreMapper.java | 15
framework/src/main/java/cn/lili/modules/member/entity/vo/MemberVO.java | 5
framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerTagServiceImpl.java | 144 +++++++
framework/src/main/java/cn/lili/modules/lmk/domain/vo/StoreVO.java | 14
framework/src/main/java/cn/lili/modules/lmk/service/CustomerService.java | 50 ++
framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerQuery.java | 31 +
framework/src/main/resources/mapper/lmk/LmkStoreMapper.xml | 20 +
framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTagRef.java | 27 +
framework/src/main/java/cn/lili/modules/lmk/service/CustomerTagRefService.java | 61 +++
framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerTagVO.java | 43 ++
framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerTagRefServiceImpl.java | 118 +++++
framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerTagMapper.java | 34 +
framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerTagRefForm.java | 2
framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerTagForm.java | 50 ++
framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerTagRefMapper.java | 32 +
manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java | 103 +++++
25 files changed, 1,181 insertions(+), 1 deletions(-)
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
new file mode 100644
index 0000000..f31ddbc
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTag.java
@@ -0,0 +1,26 @@
+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 java.time.LocalDateTime;
+import lombok.Data;
+
+/**
+ *
+ *
+ * @author zxl
+ * @since 2025-05-14
+ */
+@Data
+@TableName("lmk_customer_tag")
+public class CustomerTag extends BaseEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableField("tag_name")
+ /** 鏍囩鍚嶇О*/
+ private String tagName;
+
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTagRef.java b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTagRef.java
new file mode 100644
index 0000000..5d0dc4e
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/CustomerTagRef.java
@@ -0,0 +1,27 @@
+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;
+
+@Data
+@TableName("lmk_customer_tag_ref")
+public class CustomerTagRef extends BaseEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableField("customerId")
+ /**
+ * 瀹㈡埛id
+ */
+ private String customerId;
+
+ @TableField("customer_tag_id")
+ /**
+ * 瀹㈡埛瀵瑰簲鏍囩id
+ */
+ private String customerTagId;
+
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerTagForm.java b/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerTagForm.java
new file mode 100644
index 0000000..9117724
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerTagForm.java
@@ -0,0 +1,50 @@
+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.CustomerTag;
+import cn.lili.mybatis.BaseEntity;
+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-14
+ */
+@Data
+@ApiModel(value = "CustomerTag琛ㄥ崟", description = "琛ㄥ崟")
+public class CustomerTagForm extends AbsForm {
+
+ @NotBlank(message = "涓嶈兘涓虹┖", groups = {Add.class, Update.class})
+ @ApiModelProperty("鏍囩鍚�")
+ private String tagName;
+
+ @NotBlank(message = "涓嶈兘涓虹┖", groups = {Add.class, Update.class})
+ @ApiModelProperty("")
+ private String createType;
+
+
+ /**
+ * 瀹㈡埛id
+ * */
+ @ApiModelProperty("瀹㈡埛id")
+ private String customerId;
+
+ public static CustomerTag getEntityByForm(@NonNull CustomerTagForm form, CustomerTag entity) {
+ if(entity == null) {
+ entity = new CustomerTag();
+ }
+ BeanUtils.copyProperties(form, entity);
+ return entity;
+ }
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerTagRefForm.java b/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerTagRefForm.java
index 6047b7c..e3571ca 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerTagRefForm.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/form/CustomerTagRefForm.java
@@ -25,7 +25,7 @@
@NotNull(message = "涓嶈兘涓虹┖", groups = {Add.class, Update.class})
@ApiModelProperty("瀹㈡埛id")
- private Long customerId;
+ private String customerId;
@NotBlank(message = "涓嶈兘涓虹┖", groups = {Add.class, Update.class})
@ApiModelProperty("鏍囩id")
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
new file mode 100644
index 0000000..40911b4
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerQuery.java
@@ -0,0 +1,31 @@
+package cn.lili.modules.lmk.domain.query;
+
+import cn.lili.base.AbsQuery;
+import cn.lili.common.enums.SwitchEnum;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "瀹㈡埛鏌ヨ鍙傛暟", description = "鏌ヨ鍙傛暟")
+public class CustomerQuery extends AbsQuery {
+
+ @ApiModelProperty(value = "鐢ㄦ埛鍚�")
+ private String username;
+
+ @ApiModelProperty(value = "鏄电О")
+ private String nickName;
+
+ @ApiModelProperty(value = "鐢ㄦ埛鎵嬫満鍙风爜")
+ private String mobile;
+
+ @ApiModelProperty(value = "鍟嗘埛鍚�")
+ private String storeId;
+
+ /**
+ * @see SwitchEnum
+ */
+ @ApiModelProperty(value = "浼氬憳鐘舵��")
+ private String disabled;
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerTagQuery.java b/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerTagQuery.java
new file mode 100644
index 0000000..653cdf1
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/query/CustomerTagQuery.java
@@ -0,0 +1,17 @@
+package cn.lili.modules.lmk.domain.query;
+
+import cn.lili.base.AbsQuery;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * 鏌ヨ
+ *
+ * @author zxl
+ * @since 2025-05-14
+ */
+@Data
+@ApiModel(value = "CustomerTag鏌ヨ鍙傛暟", description = "鏌ヨ鍙傛暟")
+public class CustomerTagQuery extends AbsQuery {
+}
+
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerTagRefVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerTagRefVO.java
new file mode 100644
index 0000000..83a1ba7
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerTagRefVO.java
@@ -0,0 +1,29 @@
+package cn.lili.modules.lmk.domain.vo;
+
+import cn.lili.base.AbsVo;
+import cn.lili.modules.lmk.domain.entity.CustomerTagRef;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.beans.BeanUtils;
+import org.springframework.lang.NonNull;
+
+@Data
+@ApiModel(value = "瀹㈡埛鏍囩涓棿琛ㄥ搷搴旀暟鎹�", description = "瀹㈡埛鏍囩涓棿琛ㄥ搷搴旀暟鎹�")
+public class CustomerTagRefVO extends AbsVo {
+ /** */
+ @ApiModelProperty("")
+ private String customerId;
+
+ /** */
+ @ApiModelProperty("")
+ private String customerTagId;
+
+ public static CustomerTagRefVO getVoByEntity(@NonNull CustomerTagRef entity, CustomerTagRefVO vo) {
+ if(vo == null) {
+ vo = new CustomerTagRefVO();
+ }
+ BeanUtils.copyProperties(entity, vo);
+ return vo;
+ }
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerTagVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerTagVO.java
new file mode 100644
index 0000000..e0a9236
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/CustomerTagVO.java
@@ -0,0 +1,43 @@
+package cn.lili.modules.lmk.domain.vo;
+
+import cn.lili.base.AbsVo;
+
+import java.util.List;
+
+import cn.lili.modules.lmk.domain.entity.CustomerTag;
+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-14
+ */
+@Data
+@ApiModel(value = "鍝嶅簲鏁版嵁", description = "鍝嶅簲鏁版嵁")
+public class CustomerTagVO extends AbsVo {
+
+ /** */
+ @ApiModelProperty("鏍囩鍚嶇О")
+ private String tagName;
+
+ /** */
+ @ApiModelProperty("鍒涘缓鏂瑰紡")
+ private String createType;
+
+
+
+ public static CustomerTagVO getVoByEntity(@NonNull CustomerTag entity, CustomerTagVO vo) {
+ if(vo == null) {
+ vo = new CustomerTagVO();
+ }
+ BeanUtils.copyProperties(entity, vo);
+ return vo;
+ }
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/StoreVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/StoreVO.java
new file mode 100644
index 0000000..2f01eef
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/StoreVO.java
@@ -0,0 +1,14 @@
+package cn.lili.modules.lmk.domain.vo;
+
+import cn.lili.base.AbsVo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "鍟嗘埛涓嬫媺鍝嶅簲鏁版嵁", description = "鍝嶅簲鏁版嵁")
+public class StoreVO extends AbsVo{
+
+ @ApiModelProperty(value = "鍟嗘埛鍚嶇О")
+ private String storeName;
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerMapper.java b/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerMapper.java
new file mode 100644
index 0000000..738590c
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerMapper.java
@@ -0,0 +1,35 @@
+package cn.lili.modules.lmk.mapper;
+
+
+import cn.lili.modules.lmk.domain.query.CustomerQuery;
+import cn.lili.modules.member.entity.dos.Member;
+import cn.lili.modules.member.entity.vo.MemberVO;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * 瀹㈡埛鏁版嵁澶勭悊灞�
+ *
+ * @author
+ * @since
+ */
+@Mapper
+public interface CustomerMapper extends BaseMapper<Member> {
+
+ /**
+ * 鑾峰彇鎵�鏈夌殑浼氬憳鎵嬫満鍙�
+ * @return 浼氬憳鎵嬫満鍙�
+ */
+ @Select("select m.mobile from li_member m")
+ List<String> getAllMemberMobile();
+
+
+ IPage<MemberVO> getPage(IPage page, @Param("query") CustomerQuery query);
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerTagMapper.java b/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerTagMapper.java
new file mode 100644
index 0000000..908b2f6
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerTagMapper.java
@@ -0,0 +1,34 @@
+package cn.lili.modules.lmk.mapper;
+
+import java.util.List;
+
+import cn.lili.modules.lmk.domain.entity.CustomerTag;
+import cn.lili.modules.lmk.domain.query.CustomerTagQuery;
+import cn.lili.modules.lmk.domain.vo.CustomerTagVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * Mapper 鎺ュ彛
+ *
+ * @author zxl
+ * @since 2025-05-14
+ */
+@Mapper
+public interface CustomerTagMapper extends BaseMapper<CustomerTag> {
+
+ /**
+ * id鏌ユ壘
+ * @param id
+ * @return
+ */
+ CustomerTagVO getById(Integer id);
+
+ /**
+ * 鍒嗛〉
+ */
+ IPage getPage(IPage page, @Param("query") CustomerTagQuery query);
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerTagRefMapper.java b/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerTagRefMapper.java
new file mode 100644
index 0000000..9440e89
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/mapper/CustomerTagRefMapper.java
@@ -0,0 +1,32 @@
+package cn.lili.modules.lmk.mapper;
+
+import cn.lili.modules.lmk.domain.entity.CustomerTagRef;
+import cn.lili.modules.lmk.domain.query.CustomerTagRefQuery;
+import cn.lili.modules.lmk.domain.vo.CustomerTagRefVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * Mapper 鎺ュ彛
+ *
+ * @author zxl
+ * @since 2025-05-14
+ */
+@Mapper
+public interface CustomerTagRefMapper extends BaseMapper<CustomerTagRef> {
+
+ /**
+ * id鏌ユ壘
+ * @param id
+ * @return
+ */
+ CustomerTagRefVO getById(Integer id);
+
+ /**
+ * 鍒嗛〉
+ */
+ IPage getPage(IPage page, @Param("query") CustomerTagRefQuery query);
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/mapper/LmkStoreMapper.java b/framework/src/main/java/cn/lili/modules/lmk/mapper/LmkStoreMapper.java
new file mode 100644
index 0000000..d9e94f4
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/mapper/LmkStoreMapper.java
@@ -0,0 +1,15 @@
+package cn.lili.modules.lmk.mapper;
+
+import cn.lili.modules.lmk.domain.vo.StoreVO;
+import cn.lili.modules.store.entity.dos.Store;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface LmkStoreMapper extends BaseMapper<Store> {
+
+ List<StoreVO> getStoreSelectOptions();
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/CustomerService.java b/framework/src/main/java/cn/lili/modules/lmk/service/CustomerService.java
new file mode 100644
index 0000000..b648e66
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/CustomerService.java
@@ -0,0 +1,50 @@
+package cn.lili.modules.lmk.service;
+
+
+import cn.lili.base.Result;
+import cn.lili.common.vo.PageVO;
+import cn.lili.modules.lmk.domain.query.CustomerQuery;
+import cn.lili.modules.member.entity.dos.Member;
+import cn.lili.modules.member.entity.vo.MemberSearchVO;
+import cn.lili.modules.member.entity.vo.MemberVO;
+import cn.lili.modules.order.order.entity.dto.OrderSearchParams;
+import cn.lili.modules.order.order.entity.vo.OrderSimpleVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+public interface CustomerService extends IService<Member> {
+
+ /**
+ * 鑾峰彇浼氬憳鍒嗛〉 澶嶇敤浜庤妗嗘灦寮�婧恆pi
+ *
+ * @param customerQuery 浼氬憳鎼滅储
+ * @return 浼氬憳鍒嗛〉
+ */
+ Result getMemberPage(CustomerQuery customerQuery);
+
+
+ /**
+ * 鑾峰彇鐢ㄦ埛VO鍩烘湰淇℃伅 澶嶇敤浜庤妗嗘灦寮�婧恆pi
+ * @param id 浼氬憳id
+ * @return 鐢ㄦ埛VO
+ */
+ MemberVO getMember(String id);
+
+
+ /**
+ * 璁㈠崟鏌ヨ
+ *
+ * @param orderSearchParams 鏌ヨ鍙傛暟
+ * @return 绠�鐭鍗曞垎椤�
+ */
+ IPage<OrderSimpleVO> queryByParams(OrderSearchParams orderSearchParams);
+
+
+ /**
+ * TODO 鑾峰緱浼氬憳瑙嗛鐨勬祻瑙堣褰�
+ */
+ Object getMemberVideoViewHistory();
+
+
+ Result getStoreSelectOptions();
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/CustomerTagRefService.java b/framework/src/main/java/cn/lili/modules/lmk/service/CustomerTagRefService.java
new file mode 100644
index 0000000..74cad33
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/CustomerTagRefService.java
@@ -0,0 +1,61 @@
+package cn.lili.modules.lmk.service;
+
+
+import cn.lili.base.Result;
+import cn.lili.modules.lmk.domain.entity.CustomerTagRef;
+import cn.lili.modules.lmk.domain.form.CustomerTagRefForm;
+import cn.lili.modules.lmk.domain.query.CustomerTagRefQuery;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+public interface CustomerTagRefService extends IService<CustomerTagRef> {
+
+ /**
+ * 娣诲姞
+ * @param form
+ * @return
+ */
+ Result add(CustomerTagRefForm form);
+
+ /**
+ * 淇敼
+ * @param form
+ * @return
+ */
+ Result update(CustomerTagRefForm form);
+
+ /**
+ * 鎵归噺鍒犻櫎
+ * @param ids
+ * @return
+ */
+ Result remove(List<String> ids);
+
+ /**
+ * id鍒犻櫎
+ * @param id
+ * @return
+ */
+ Result removeById(String id);
+
+ /**
+ * 鍒嗛〉鏌ヨ
+ * @param query
+ * @return
+ */
+ Result page(CustomerTagRefQuery query);
+
+ /**
+ * 鏍规嵁id鏌ユ壘
+ * @param id
+ * @return
+ */
+ Result detail(Integer id);
+
+ /**
+ * 鍒楄〃
+ * @return
+ */
+ Result all();
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/CustomerTagService.java b/framework/src/main/java/cn/lili/modules/lmk/service/CustomerTagService.java
new file mode 100644
index 0000000..e17f760
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/CustomerTagService.java
@@ -0,0 +1,68 @@
+package cn.lili.modules.lmk.service;
+
+import cn.lili.base.Result;
+import cn.lili.modules.lmk.domain.entity.CustomerTag;
+import cn.lili.modules.lmk.domain.form.CustomerTagForm;
+import cn.lili.modules.lmk.domain.query.CustomerTagQuery;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 鏈嶅姟绫�
+ *
+ * @author zxl
+ * @since 2025-05-14
+ */
+public interface CustomerTagService extends IService<CustomerTag> {
+
+ /**
+ * 娣诲姞
+ * @param form
+ * @return
+ */
+ Result add(CustomerTagForm form);
+
+ /**
+ * 淇敼
+ * @param form
+ * @return
+ */
+ Result update(CustomerTagForm form);
+
+ /**
+ * 鎵归噺鍒犻櫎
+ * @param ids
+ * @return
+ */
+ Result remove(List<String> ids);
+
+ /**
+ * id鍒犻櫎
+ * @param id
+ * @return
+ */
+ Result removeById(String id);
+
+ /**
+ * 鍒嗛〉鏌ヨ
+ * @param query
+ * @return
+ */
+ Result page(CustomerTagQuery query);
+
+ /**
+ * 鏍规嵁id鏌ユ壘
+ * @param id
+ * @return
+ */
+ Result detail(Integer id);
+
+ /**
+ * 鍒楄〃
+ * @return
+ */
+ Result all();
+
+ Result addCustomerTag(CustomerTagForm form);
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerServiceImpl.java
new file mode 100644
index 0000000..a52ce67
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerServiceImpl.java
@@ -0,0 +1,60 @@
+package cn.lili.modules.lmk.service.impl;
+
+
+import cn.lili.base.Result;
+import cn.lili.modules.lmk.domain.query.CustomerQuery;
+import cn.lili.modules.lmk.mapper.CustomerMapper;
+import cn.lili.modules.lmk.mapper.LmkStoreMapper;
+import cn.lili.modules.lmk.service.CustomerService;
+import cn.lili.modules.member.entity.dos.Member;
+
+import cn.lili.modules.member.entity.vo.MemberVO;
+import cn.lili.modules.member.mapper.MemberMapper;
+import cn.lili.modules.order.order.entity.dto.OrderSearchParams;
+import cn.lili.modules.order.order.entity.vo.OrderSimpleVO;
+import cn.lili.utils.PageUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+@Service
+@RequiredArgsConstructor
+public class CustomerServiceImpl extends ServiceImpl<MemberMapper, Member> implements CustomerService {
+
+ private final CustomerMapper customerMapper;
+
+ private final LmkStoreMapper storeMapper;
+
+ @Override
+ public Result getMemberPage(CustomerQuery customerQuery) {
+ IPage<MemberVO> page = PageUtil.getPage(customerQuery,MemberVO.class);
+ customerMapper.getPage(page, customerQuery);
+ //骞惰幏寰椾細鍛樺搴旂殑鏍囩
+ return Result.ok().data(page.getRecords()).total(page.getTotal());
+ }
+
+ @Override
+ public MemberVO getMember(String id) {
+ return null;
+ }
+
+ @Override
+ public IPage<OrderSimpleVO> queryByParams(OrderSearchParams orderSearchParams) {
+ return null;
+ }
+
+ @Override
+ public Object getMemberVideoViewHistory() {
+ return null;
+ }
+
+ @Override
+ public Result getStoreSelectOptions() {
+ return Result.ok().data(storeMapper.getStoreSelectOptions());
+ }
+
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerTagRefServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerTagRefServiceImpl.java
new file mode 100644
index 0000000..24a2f6a
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerTagRefServiceImpl.java
@@ -0,0 +1,118 @@
+package cn.lili.modules.lmk.service.impl;
+
+
+import cn.lili.base.Result;
+import cn.lili.modules.lmk.domain.entity.CustomerTagRef;
+import cn.lili.modules.lmk.domain.form.CustomerTagRefForm;
+import cn.lili.modules.lmk.domain.query.CustomerTagRefQuery;
+import cn.lili.modules.lmk.domain.vo.CustomerTagRefVO;
+import cn.lili.modules.lmk.mapper.CustomerTagRefMapper;
+import cn.lili.modules.lmk.service.CustomerTagRefService;
+import cn.lili.utils.PageUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.util.Assert;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+@Service
+@RequiredArgsConstructor
+public class CustomerTagRefServiceImpl extends ServiceImpl<CustomerTagRefMapper, CustomerTagRef> implements CustomerTagRefService {
+
+ private final CustomerTagRefMapper CustomerTagRefMapper;
+
+ /**
+ * 娣诲姞
+ * @param form
+ * @return
+ */
+ @Override
+ public Result add(CustomerTagRefForm form) {
+ CustomerTagRef entity = CustomerTagRefForm.getEntityByForm(form, null);
+ baseMapper.insert(entity);
+ return Result.ok("娣诲姞鎴愬姛");
+ }
+
+ /**
+ * 淇敼
+ * @param form
+ * @return
+ */
+ @Override
+ public Result update(CustomerTagRefForm form) {
+ CustomerTagRef 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(CustomerTagRefQuery query) {
+ IPage<CustomerTagRefVO> page = PageUtil.getPage(query, CustomerTagRefVO.class);
+ baseMapper.getPage(page, query);
+ return Result.ok().data(page.getRecords()).total(page.getTotal());
+ }
+
+ /**
+ * 鏍规嵁id鏌ユ壘
+ * @param id
+ * @return
+ */
+ @Override
+ public Result detail(Integer id) {
+ CustomerTagRefVO vo = baseMapper.getById(id);
+ Assert.notNull(vo, "璁板綍涓嶅瓨鍦�");
+ return Result.ok().data(vo);
+ }
+
+ /**
+ * 鍒楄〃
+ * @return
+ */
+ @Override
+ public Result all() {
+ List<CustomerTagRef> entities = baseMapper.selectList(null);
+ List<CustomerTagRefVO> vos = entities.stream()
+ .map(entity -> CustomerTagRefVO.getVoByEntity(entity, null))
+ .collect(Collectors.toList());
+ return Result.ok().data(vos);
+ }
+
+
+
+}
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerTagServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerTagServiceImpl.java
new file mode 100644
index 0000000..59d7a94
--- /dev/null
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/CustomerTagServiceImpl.java
@@ -0,0 +1,144 @@
+package cn.lili.modules.lmk.service.impl;
+
+import cn.lili.base.Result;
+import cn.lili.modules.lmk.domain.entity.CustomerTag;
+import cn.lili.modules.lmk.domain.entity.CustomerTagRef;
+import cn.lili.modules.lmk.domain.form.CustomerTagForm;
+import cn.lili.modules.lmk.domain.query.CustomerTagQuery;
+import cn.lili.modules.lmk.domain.vo.CustomerTagVO;
+import cn.lili.modules.lmk.mapper.CustomerTagMapper;
+import cn.lili.modules.lmk.mapper.CustomerTagRefMapper;
+import cn.lili.modules.lmk.service.CustomerTagService;
+import cn.lili.utils.PageUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+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-14
+ */
+@Service
+@RequiredArgsConstructor
+public class CustomerTagServiceImpl extends ServiceImpl<CustomerTagMapper, CustomerTag> implements CustomerTagService {
+
+ private final CustomerTagMapper customerTagMapper;
+
+ private final CustomerTagRefMapper customerTagRefMapper;
+ /**
+ * 娣诲姞
+ * @param form
+ * @return
+ */
+ @Override
+ public Result add(CustomerTagForm form) {
+ CustomerTag entity = CustomerTagForm.getEntityByForm(form, null);
+ baseMapper.insert(entity);
+ return Result.ok("娣诲姞鎴愬姛");
+ }
+
+ /**
+ * 淇敼
+ * @param form
+ * @return
+ */
+ @Override
+ public Result update(CustomerTagForm form) {
+ CustomerTag 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(CustomerTagQuery query) {
+ IPage<CustomerTagVO> page = PageUtil.getPage(query, CustomerTagVO.class);
+ baseMapper.getPage(page, query);
+ return Result.ok().data(page.getRecords()).total(page.getTotal());
+ }
+
+ /**
+ * 鏍规嵁id鏌ユ壘
+ * @param id
+ * @return
+ */
+ @Override
+ public Result detail(Integer id) {
+ CustomerTagVO vo = baseMapper.getById(id);
+ Assert.notNull(vo, "璁板綍涓嶅瓨鍦�");
+ return Result.ok().data(vo);
+ }
+
+ /**
+ * 鍒楄〃
+ * @return
+ */
+ @Override
+ public Result all() {
+ List<CustomerTag> entities = baseMapper.selectList(null);
+ List<CustomerTagVO> vos = entities.stream()
+ .map(entity -> CustomerTagVO.getVoByEntity(entity, null))
+ .collect(Collectors.toList());
+ return Result.ok().data(vos);
+ }
+
+ @Override
+ public Result addCustomerTag(CustomerTagForm form) {
+ //鎻掑叆瀹㈡埛鏍囩
+ CustomerTag entity = CustomerTagForm.getEntityByForm(form, null);
+ baseMapper.insert(entity);
+
+ //鎻掑叆瀹㈡埛鏍囩涓棿琛�
+ CustomerTagRef ref = new CustomerTagRef();
+ ref.setCustomerTagId(entity.getId());
+ ref.setCustomerId(form.getCustomerId());
+ customerTagRefMapper.insert(ref);
+ return Result.ok("娣诲姞鎴愬姛");
+ }
+
+
+
+ public Result delCustomerTag(String id) {
+
+ return null;
+ }
+}
diff --git a/framework/src/main/java/cn/lili/modules/member/entity/vo/MemberVO.java b/framework/src/main/java/cn/lili/modules/member/entity/vo/MemberVO.java
index 3404797..8aafe40 100644
--- a/framework/src/main/java/cn/lili/modules/member/entity/vo/MemberVO.java
+++ b/framework/src/main/java/cn/lili/modules/member/entity/vo/MemberVO.java
@@ -4,6 +4,7 @@
import cn.lili.common.security.sensitive.Sensitive;
import cn.lili.common.security.sensitive.enums.SensitiveStrategy;
import cn.lili.common.utils.BeanUtil;
+import cn.lili.modules.lmk.domain.vo.CustomerTagVO;
import cn.lili.modules.member.entity.dos.Member;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
@@ -13,6 +14,7 @@
import java.io.Serializable;
import java.util.Date;
+import java.util.List;
/**
* @author paulG
@@ -95,6 +97,9 @@
@ApiModelProperty(value = "鍒涘缓鏃堕棿", hidden = true)
private Date createTime;
+ @ApiModelProperty(value = "瀹㈡埛鏍囩鍒楄〃")
+ private List<CustomerTagVO> customerTagList;
+
public MemberVO(Member member) {
BeanUtil.copyProperties(member, this);
}
diff --git a/framework/src/main/resources/mapper/lmk/CustomerMapper.xml b/framework/src/main/resources/mapper/lmk/CustomerMapper.xml
new file mode 100644
index 0000000..0a38e6b
--- /dev/null
+++ b/framework/src/main/resources/mapper/lmk/CustomerMapper.xml
@@ -0,0 +1,107 @@
+<?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.CustomerMapper">
+
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMap" type="cn.lili.modules.member.entity.vo.MemberVO">
+ <id property="id" column="id"/>
+
+ <!-- 鍩虹瀛楁鏄犲皠 -->
+ <result property="username" column="username"/>
+ <result property="nickName" column="nick_name"/>
+ <result property="sex" column="sex"/>
+ <result property="birthday" column="birthday"/>
+ <result property="regionId" column="region_id"/>
+ <result property="region" column="region"/>
+ <result property="mobile" column="mobile"/>
+ <result property="point" column="point"/>
+ <result property="totalPoint" column="total_point"/>
+ <result property="face" column="face"/>
+ <result property="disabled" column="disabled"/>
+ <result property="haveStore" column="have_store"/>
+ <result property="storeId" column="store_id"/>
+ <result property="openId" column="open_id"/>
+ <result property="clientEnum" column="client_enum"/>
+ <result property="lastLoginDate" column="last_login_date"/>
+ <result property="gradeId" column="grade_id"/>
+ <result property="experience" column="experience"/>
+ <result property="createTime" column="create_time"/>
+ <collection property="customerTagList" ofType="cn.lili.modules.lmk.domain.vo.CustomerTagVO"
+ select="selectTagByMemberId"
+ column="id"
+ />
+ </resultMap>
+
+ <select id="getPage" resultMap="BaseResultMap">
+ SELECT
+ *
+ FROM
+ li_member lm
+ <where>
+ <!-- 鐢ㄦ埛鍚嶆ā绯婃煡璇� -->
+ <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>
+
+ <!-- 鎵嬫満鍙风爜绮剧‘鏌ヨ -->
+ <if test="query.mobile != null and query.mobile != ''">
+ AND lm.mobile = #{query.mobile}
+ </if>
+
+ <!-- 浼氬憳鐘舵�佽浆 -->
+ <if test="query.disabled != null and query.disabled != ''">
+ AND lm.disabled = #{query.disabled}
+ </if>
+
+ <!-- 鍟嗛摵id -->
+ <if test="query.storeId != null and query.storeId != ''">
+ AND lm.store_id = #{query.storeId}
+ </if>
+ AND EXISTS (
+ SELECT 1
+ FROM li_order lo
+ WHERE lo.member_id = lm.id
+ )
+ </where>
+ ORDER BY lm.create_time DESC
+ </select>
+
+ <select id="selectTagByMemberId" resultType="cn.lili.modules.lmk.domain.vo.CustomerTagVO">
+ SELECT
+ LCT.id,
+ LCT.tag_name,
+ LCT.create_type
+ FROM lmk_customer_tag_ref LCTR
+ LEFT JOIN lmk_customer_tag LCT
+ ON LCTR.customer_tag_id = LCT.id
+ WHERE LCTR.customer_id =#{id}
+ </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
new file mode 100644
index 0000000..747aa47
--- /dev/null
+++ b/framework/src/main/resources/mapper/lmk/CustomerTagMapper.xml
@@ -0,0 +1,52 @@
+<?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.CustomerTagMapper">
+
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMap" type="cn.lili.modules.lmk.domain.vo.CustomerTagVO">
+ <result column="tag_name" property="tagName" />
+ <result column="create_type" property="createType" />
+ <result column="create_by" property="createBy" />
+ <result column="create_time" property="createTime" />
+ <result column="update_by" property="updateBy" />
+ <result column="update_time" property="updateTime" />
+ </resultMap>
+
+
+
+
+
+
+ <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.id
+ FROM
+ lmk_customer_tag LCT
+ WHERE
+ LCT.id = #{id} AND LCT.delete_flag = 0
+ </select>
+
+
+ <select id="getPage" 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.delete_flag = 0
+ </select>
+
+</mapper>
diff --git a/framework/src/main/resources/mapper/lmk/CustomerTagRefMapper.xml b/framework/src/main/resources/mapper/lmk/CustomerTagRefMapper.xml
new file mode 100644
index 0000000..0c00489
--- /dev/null
+++ b/framework/src/main/resources/mapper/lmk/CustomerTagRefMapper.xml
@@ -0,0 +1,39 @@
+<?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.CustomerTagRefMapper">
+
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMap" type="cn.lili.modules.lmk.domain.vo.CustomerTagRefVO">
+ <result column="customer_id" property="customerId" />
+ <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">
+ SELECT
+ LCTR.varchar,
+ LCTR.customer_id,
+ LCTR.customer_tag_id,
+ LCTR.id
+ FROM
+ lmk_customer_tag_ref LCTR
+ WHERE
+ LCTR.id = #{id} AND LCTR.delete_flag = 0
+ </select>
+
+
+ <select id="getPage" resultMap="BaseResultMap">
+ SELECT
+ LCTR.varchar,
+ LCTR.customer_id,
+ LCTR.customer_tag_id,
+ LCTR.id
+ FROM
+ lmk_customer_tag_ref LCTR
+ WHERE
+ LCTR.delete_flag = 0
+ </select>
+
+</mapper>
diff --git a/framework/src/main/resources/mapper/lmk/LmkStoreMapper.xml b/framework/src/main/resources/mapper/lmk/LmkStoreMapper.xml
new file mode 100644
index 0000000..16ffc36
--- /dev/null
+++ b/framework/src/main/resources/mapper/lmk/LmkStoreMapper.xml
@@ -0,0 +1,20 @@
+<?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.LmkStoreMapper">
+
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMap" type="cn.lili.modules.lmk.domain.vo.StoreVO">
+ <id column="id" property="id"/>
+ <result column="store_name" property="storeName"/>
+
+ </resultMap>
+
+
+ <select id="getStoreSelectOptions" resultMap="BaseResultMap">
+ SELECT
+ LS.id,
+ LS.store_name
+ FROM li_store LS
+ </select>
+
+</mapper>
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
new file mode 100644
index 0000000..f3938a7
--- /dev/null
+++ b/manager-api/src/main/java/cn/lili/controller/lmk/CustomerController.java
@@ -0,0 +1,103 @@
+package cn.lili.controller.lmk;
+
+import cn.lili.base.Result;
+import cn.lili.common.enums.ResultUtil;
+import cn.lili.common.vo.PageVO;
+import cn.lili.common.vo.ResultMessage;
+import cn.lili.group.Add;
+import cn.lili.group.Update;
+import cn.lili.modules.lmk.domain.form.CustomerTagForm;
+import cn.lili.modules.lmk.domain.form.CustomerTagRefForm;
+import cn.lili.modules.lmk.domain.query.CustomerQuery;
+import cn.lili.modules.lmk.domain.query.CustomerTagQuery;
+import cn.lili.modules.lmk.service.CustomerService;
+import cn.lili.modules.lmk.service.CustomerTagRefService;
+import cn.lili.modules.lmk.service.CustomerTagService;
+import cn.lili.modules.member.entity.vo.MemberSearchVO;
+import cn.lili.modules.member.entity.vo.MemberVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+@Validated
+@RequiredArgsConstructor
+@Api(value = "瀹㈡埛绠$悊", tags = "绠$悊")
+@RestController
+@RequestMapping("/manager/customerManager")
+public class CustomerController {
+ private final CustomerService customerService;
+ private final CustomerTagService customerTagService;
+ private final CustomerTagRefService customerTagRefService;
+
+ @ApiOperation(value = "鍟嗛摵涓嬫媺鍒楄〃")
+ @GetMapping("/store/selectOption")
+ public Result getStoreSelectOptions(){
+ return customerService.getStoreSelectOptions();
+ }
+
+
+ @ApiOperation(value = "浼氬憳鍒嗛〉鍒楄〃")
+ @GetMapping
+ public Result getByPage(CustomerQuery customerQuery) {
+ return customerService.getMemberPage(customerQuery);
+ }
+
+ @PostMapping("/addTag")
+ @ApiOperation(value = "娣诲姞鏍囩", notes = "娣诲姞鏍囩")
+ public Result add(@RequestBody @Validated(Add.class) CustomerTagForm form) {
+ return customerTagService.add(form);
+ }
+
+ @PutMapping("/editTag")
+ @ApiOperation(value = "淇敼鏍囩", notes = "淇敼鏍囩")
+ public Result update(@RequestBody @Validated(Update.class) CustomerTagForm form) {
+ return customerTagService.update(form);
+ }
+
+ @DeleteMapping("/tag/{id}")
+ @ApiOperation(value = "ID鍒犻櫎鏍囩", notes = "ID鍒犻櫎")
+ public Result removeById(@PathVariable("id") String id) {
+ return customerTagService.removeById(id);
+ }
+
+
+ @GetMapping("/tagList")
+ @ApiOperation(value = "鏍囩鍒楄〃", notes = "鏍囩鍒楄〃")
+ public Result list() {
+ return customerTagService.all();
+ }
+ @GetMapping("/pageTagList")
+ @ApiOperation(value = "鍒嗛〉鏍囩鍒楄〃", notes = "鏍囩鍒楄〃")
+ public Result pageList(CustomerTagQuery query) {
+ return customerTagService.page(query);
+ }
+
+
+ @PostMapping("/customerAddTag")
+ @ApiOperation(value = "娣诲姞瀹㈡埛鏍囩鏍囪瘑", notes = "娣诲姞瀹㈡埛鏍囩鏍囪瘑")
+ public Result addCustomerTag(@RequestBody @Validated(Add.class) CustomerTagForm form) {
+ return customerTagService.addCustomerTag(form);
+ }
+
+// @PostMapping("/customerAddTag")
+// @ApiOperation(value = "娣诲姞瀹㈡埛鏍囩鏍囪瘑", notes = "娣诲姞瀹㈡埛鏍囩鏍囪瘑")
+// public Result add(@RequestBody @Validated(Add.class) CustomerTagRefForm form) {
+// return customerTagRefService.add(form);
+// }
+
+ @PutMapping("/customerEditTag")
+ @ApiOperation(value = "淇敼瀹㈡埛鏍囩鏍囪瘑", notes = "淇敼瀹㈡埛鏍囩鏍囪瘑")
+ public Result update(@RequestBody @Validated(Update.class) CustomerTagRefForm form) {
+ return customerTagRefService.update(form);
+ }
+
+ @DeleteMapping("/customerDelTag/{id}")
+ @ApiOperation(value = "鍒犻櫎瀹㈡埛鏍囩鏍囪瘑ID鍒犻櫎", notes = "鍒犻櫎瀹㈡埛鏍囩鏍囪瘑ID鍒犻櫎")
+ public Result removeCustomerTagById(@PathVariable("id") String id) {
+ return customerTagRefService.removeById(id);
+ }
+
+}
--
Gitblit v1.8.0