Browse Source

售后管理功能增加选择商品关联

yzc 2 years ago
parent
commit
ab554b7b0a
24 changed files with 771 additions and 0 deletions
  1. 49 0
      hx-service-api/victoriatourist-api/src/main/java/com/fjhx/entity/after/AfterSalesDetails.java
  2. 49 0
      hx-service-api/victoriatourist-api/src/main/java/com/fjhx/entity/after/AfterSalesFollow.java
  3. 74 0
      hx-service-api/victoriatourist-api/src/main/java/com/fjhx/entity/after/AfterSalesInfo.java
  4. 17 0
      hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesDetailsEx.java
  5. 17 0
      hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesDetailsVo.java
  6. 22 0
      hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesFollowEx.java
  7. 17 0
      hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesFollowVo.java
  8. 20 0
      hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesInfoEx.java
  9. 24 0
      hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesInfoVo.java
  10. 56 0
      hx-service/victoriatourist/src/main/java/com/fjhx/controller/after/AfterSalesDetailsController.java
  11. 53 0
      hx-service/victoriatourist/src/main/java/com/fjhx/controller/after/AfterSalesFollowController.java
  12. 47 0
      hx-service/victoriatourist/src/main/java/com/fjhx/controller/after/AfterSalesInfoController.java
  13. 16 0
      hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesDetailsMapper.java
  14. 5 0
      hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesDetailsMapper.xml
  15. 16 0
      hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesFollowMapper.java
  16. 5 0
      hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesFollowMapper.xml
  17. 22 0
      hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesInfoMapper.java
  18. 17 0
      hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesInfoMapper.xml
  19. 28 0
      hx-service/victoriatourist/src/main/java/com/fjhx/service/after/AfterSalesDetailsService.java
  20. 31 0
      hx-service/victoriatourist/src/main/java/com/fjhx/service/after/AfterSalesFollowService.java
  21. 24 0
      hx-service/victoriatourist/src/main/java/com/fjhx/service/after/AfterSalesInfoService.java
  22. 48 0
      hx-service/victoriatourist/src/main/java/com/fjhx/service/after/impl/AfterSalesDetailsServiceImpl.java
  23. 58 0
      hx-service/victoriatourist/src/main/java/com/fjhx/service/after/impl/AfterSalesFollowServiceImpl.java
  24. 56 0
      hx-service/victoriatourist/src/main/java/com/fjhx/service/after/impl/AfterSalesInfoServiceImpl.java

+ 49 - 0
hx-service-api/victoriatourist-api/src/main/java/com/fjhx/entity/after/AfterSalesDetails.java

@@ -0,0 +1,49 @@
+package com.fjhx.entity.after;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.Version;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.fjhx.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 售后信息明细
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AfterSalesDetails extends BaseEntity {
+
+
+    /**
+     * 售后信息id
+     */
+    private Long afterSalesInfoId;
+
+    /**
+     * 产品id
+     */
+    private Long productId;
+
+    /**
+     * 数量
+     */
+    private String quantity;
+
+    /**
+     * 逻辑删除 0未删除 1已删除
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer delFlag;
+
+
+}

+ 49 - 0
hx-service-api/victoriatourist-api/src/main/java/com/fjhx/entity/after/AfterSalesFollow.java

@@ -0,0 +1,49 @@
+package com.fjhx.entity.after;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.Version;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.fjhx.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 售后跟进-新
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AfterSalesFollow extends BaseEntity {
+
+
+    /**
+     * 售后信息id
+     */
+    private Long afterSalesInfoId;
+
+    /**
+     * 售后状态 1跟进中(补发中、未补发未收到退货) 2已补发 3未补发收到退货 4已补发收到退货 5已补发未收到退货 6结束
+     */
+    private Integer afterSalesStatus;
+
+    /**
+     * 跟进说明
+     */
+    private String remark;
+
+    /**
+     * 逻辑删除 0未删除 1已删除
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer delFlag;
+
+
+}

+ 74 - 0
hx-service-api/victoriatourist-api/src/main/java/com/fjhx/entity/after/AfterSalesInfo.java

@@ -0,0 +1,74 @@
+package com.fjhx.entity.after;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.Version;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.fjhx.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 售后信息
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AfterSalesInfo extends BaseEntity {
+
+
+    /**
+     * 售后类型 1补发 2线下退换货
+     */
+    private Integer type;
+
+    /**
+     * 客户id
+     */
+    private Long customerId;
+
+    /**
+     * 售后原因
+     */
+    private String cause;
+
+    /**
+     * 售后状态
+     */
+    private Integer status;
+
+    /**
+     * 国家
+     */
+    private String countryId;
+
+    /**
+     * 省
+     */
+    private String provinceId;
+
+    /**
+     * 市
+     */
+    private String cityId;
+
+    /**
+     * 详细地址
+     */
+    private String detailedAddress;
+
+    /**
+     * 逻辑删除 0未删除 1已删除
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer delFlag;
+
+
+}

+ 17 - 0
hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesDetailsEx.java

@@ -0,0 +1,17 @@
+package com.fjhx.params.after;
+
+import com.fjhx.entity.after.AfterSalesDetails;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 售后信息明细
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AfterSalesDetailsEx extends AfterSalesDetails {
+
+}

+ 17 - 0
hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesDetailsVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.params.after;
+
+import com.fjhx.entity.after.AfterSalesDetails;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 售后信息明细
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AfterSalesDetailsVo extends AfterSalesDetails {
+
+}

+ 22 - 0
hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesFollowEx.java

@@ -0,0 +1,22 @@
+package com.fjhx.params.after;
+
+import com.fjhx.entity.after.AfterSalesFollow;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 售后跟进-新
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AfterSalesFollowEx extends AfterSalesFollow {
+
+    /**
+     * 跟进用户名
+     */
+    private String purchaseName;
+
+}

+ 17 - 0
hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesFollowVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.params.after;
+
+import com.fjhx.entity.after.AfterSalesFollow;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 售后跟进-新
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AfterSalesFollowVo extends AfterSalesFollow {
+
+}

+ 20 - 0
hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesInfoEx.java

@@ -0,0 +1,20 @@
+package com.fjhx.params.after;
+
+import com.fjhx.entity.after.AfterSalesInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 售后信息
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AfterSalesInfoEx extends AfterSalesInfo {
+
+    /**客户名称*/
+    private String customerName;
+
+}

+ 24 - 0
hx-service-api/victoriatourist-api/src/main/java/com/fjhx/params/after/AfterSalesInfoVo.java

@@ -0,0 +1,24 @@
+package com.fjhx.params.after;
+
+import com.fjhx.entity.abnormal.AbnormalDetails;
+import com.fjhx.entity.after.AfterSalesDetails;
+import com.fjhx.entity.after.AfterSalesInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * 售后信息
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AfterSalesInfoVo extends AfterSalesInfo {
+
+    /**售后明细列表*/
+    private List<AfterSalesDetails> afterSalesDetailsList;
+
+}

+ 56 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/controller/after/AfterSalesDetailsController.java

@@ -0,0 +1,56 @@
+package com.fjhx.controller.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springblade.core.tool.api.R;
+import com.fjhx.entity.after.AfterSalesDetails;
+import com.fjhx.params.after.AfterSalesDetailsVo;
+import com.fjhx.service.after.AfterSalesDetailsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * 售后信息明细 前端控制器
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@RestController
+@RequestMapping("/afterSalesDetails")
+public class AfterSalesDetailsController {
+
+    @Autowired
+    private AfterSalesDetailsService afterSalesDetailsService;
+
+    @PostMapping("/page")
+    public R page(@RequestBody Map<String, Object> condition){
+        Page<AfterSalesDetails> result = afterSalesDetailsService.getPage(condition);
+        return R.success(result);
+    }
+
+    @PostMapping("/add")
+    public R add(@RequestBody AfterSalesDetailsVo afterSalesDetailsVo){
+        afterSalesDetailsService.add(afterSalesDetailsVo);
+        return R.success();
+    }
+
+    @PostMapping("/edit")
+    public R edit(@RequestBody AfterSalesDetailsVo afterSalesDetailsVo){
+        afterSalesDetailsService.edit(afterSalesDetailsVo);
+        return R.success();
+    }
+
+    @PostMapping("/delete")
+    public R delete(@RequestBody AfterSalesDetailsVo afterSalesDetailsVo){
+        afterSalesDetailsService.delete(afterSalesDetailsVo);
+        return R.success();
+    }
+
+}
+

+ 53 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/controller/after/AfterSalesFollowController.java

@@ -0,0 +1,53 @@
+package com.fjhx.controller.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.entity.after.AfterSalesInfo;
+import com.fjhx.params.after.AfterSalesFollowEx;
+import org.springblade.core.tool.api.R;
+import com.fjhx.entity.after.AfterSalesFollow;
+import com.fjhx.params.after.AfterSalesFollowVo;
+import com.fjhx.service.after.AfterSalesFollowService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 售后跟进-新 前端控制器
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@RestController
+@RequestMapping("/afterSalesFollow")
+public class AfterSalesFollowController {
+
+    @Autowired
+    private AfterSalesFollowService afterSalesFollowService;
+
+    /**
+     * 添加跟进记录
+     */
+    @PostMapping("/add")
+    public R add(@RequestBody AfterSalesFollowVo afterSalesFollowVo) {
+        afterSalesFollowService.add(afterSalesFollowVo);
+        return R.success();
+    }
+
+    /**
+     * 获取跟进记录
+     */
+    @PostMapping("/lists")
+    public R lists(@RequestBody AfterSalesInfo afterSalesInfo) {
+        List<AfterSalesFollowEx> lists = afterSalesFollowService.lists(afterSalesInfo);
+        return R.success(lists);
+    }
+
+}
+

+ 47 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/controller/after/AfterSalesInfoController.java

@@ -0,0 +1,47 @@
+package com.fjhx.controller.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.base.Condition;
+import com.fjhx.params.after.AfterSalesInfoEx;
+import org.springblade.core.tool.api.R;
+import com.fjhx.entity.after.AfterSalesInfo;
+import com.fjhx.params.after.AfterSalesInfoVo;
+import com.fjhx.service.after.AfterSalesInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * 售后信息 前端控制器
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@RestController
+@RequestMapping("/afterSalesInfo")
+public class AfterSalesInfoController {
+
+    @Autowired
+    private AfterSalesInfoService afterSalesInfoService;
+
+    @PostMapping("/page")
+    public R page(@RequestBody Condition condition){
+        Page<AfterSalesInfoEx> result = afterSalesInfoService.getPage(condition);
+        return R.success(result);
+    }
+
+    @PostMapping("/add")
+    public R add(@RequestBody AfterSalesInfoVo afterSalesInfoVo){
+        afterSalesInfoVo.setStatus(1);
+        afterSalesInfoService.add(afterSalesInfoVo);
+        return R.success();
+    }
+
+}
+

+ 16 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesDetailsMapper.java

@@ -0,0 +1,16 @@
+package com.fjhx.mapper.after;
+
+import com.fjhx.entity.after.AfterSalesDetails;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 售后信息明细 Mapper 接口
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+public interface AfterSalesDetailsMapper extends BaseMapper<AfterSalesDetails> {
+
+}

+ 5 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesDetailsMapper.xml

@@ -0,0 +1,5 @@
+<?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="com.fjhx.mapper.after.AfterSalesDetailsMapper">
+
+</mapper>

+ 16 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesFollowMapper.java

@@ -0,0 +1,16 @@
+package com.fjhx.mapper.after;
+
+import com.fjhx.entity.after.AfterSalesFollow;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 售后跟进-新 Mapper 接口
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+public interface AfterSalesFollowMapper extends BaseMapper<AfterSalesFollow> {
+
+}

+ 5 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesFollowMapper.xml

@@ -0,0 +1,5 @@
+<?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="com.fjhx.mapper.after.AfterSalesFollowMapper">
+
+</mapper>

+ 22 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesInfoMapper.java

@@ -0,0 +1,22 @@
+package com.fjhx.mapper.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.base.Condition;
+import com.fjhx.entity.after.AfterSalesInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fjhx.params.after.AfterSalesInfoEx;
+import com.fjhx.utils.wrapperUtil.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 售后信息 Mapper 接口
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+public interface AfterSalesInfoMapper extends BaseMapper<AfterSalesInfo> {
+
+    Page<AfterSalesInfoEx> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<AfterSalesInfo> wrapper);
+}

+ 17 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/mapper/after/AfterSalesInfoMapper.xml

@@ -0,0 +1,17 @@
+<?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="com.fjhx.mapper.after.AfterSalesInfoMapper">
+
+    <select id="getPage" resultType="com.fjhx.params.after.AfterSalesInfoEx">
+        SELECT
+            after_sales_info.id,
+            after_sales_info.type,
+            customer_info.`name` customerName,
+            after_sales_info.cause,
+            after_sales_info.`status`
+        FROM
+            after_sales_info
+                JOIN customer_info ON after_sales_info.customer_id = customer_info.id
+            ${ew.customSqlSegment}
+    </select>
+</mapper>

+ 28 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/service/after/AfterSalesDetailsService.java

@@ -0,0 +1,28 @@
+package com.fjhx.service.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.entity.after.AfterSalesDetails;
+import com.fjhx.params.after.AfterSalesDetailsVo;
+import com.fjhx.base.BaseService;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * 售后信息明细 服务类
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+public interface AfterSalesDetailsService extends BaseService<AfterSalesDetails> {
+
+    Page<AfterSalesDetails> getPage(Map<String, Object> condition);
+
+    void add(AfterSalesDetailsVo afterSalesDetailsVo);
+
+    void edit(AfterSalesDetailsVo afterSalesDetailsVo);
+
+    void delete(AfterSalesDetailsVo afterSalesDetailsVo);
+
+}

+ 31 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/service/after/AfterSalesFollowService.java

@@ -0,0 +1,31 @@
+package com.fjhx.service.after;
+
+import com.fjhx.entity.after.AfterSalesFollow;
+import com.fjhx.entity.after.AfterSalesInfo;
+import com.fjhx.params.after.AfterSalesFollowEx;
+import com.fjhx.params.after.AfterSalesFollowVo;
+import com.fjhx.base.BaseService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 售后跟进-新 服务类
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+public interface AfterSalesFollowService extends BaseService<AfterSalesFollow> {
+
+    /**
+     * 添加跟进记录
+     */
+    void add(AfterSalesFollowVo afterSalesFollowVo);
+
+    /**
+     * 获取跟进记录
+     */
+    List<AfterSalesFollowEx> lists(AfterSalesInfo afterSalesInfo);
+
+}

+ 24 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/service/after/AfterSalesInfoService.java

@@ -0,0 +1,24 @@
+package com.fjhx.service.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.base.Condition;
+import com.fjhx.entity.after.AfterSalesInfo;
+import com.fjhx.params.after.AfterSalesInfoEx;
+import com.fjhx.params.after.AfterSalesInfoVo;
+import com.fjhx.base.BaseService;
+
+/**
+ * <p>
+ * 售后信息 服务类
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+public interface AfterSalesInfoService extends BaseService<AfterSalesInfo> {
+
+    Page<AfterSalesInfoEx> getPage(Condition condition);
+
+    void add(AfterSalesInfoVo afterSalesInfoVo);
+
+}

+ 48 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/service/after/impl/AfterSalesDetailsServiceImpl.java

@@ -0,0 +1,48 @@
+package com.fjhx.service.after.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.entity.after.AfterSalesDetails;
+import com.fjhx.params.after.AfterSalesDetailsVo;
+import com.fjhx.mapper.after.AfterSalesDetailsMapper;
+import com.fjhx.service.after.AfterSalesDetailsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.utils.wrapperUtil.IWrapper;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * 售后信息明细 服务实现类
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Service
+public class AfterSalesDetailsServiceImpl extends ServiceImpl<AfterSalesDetailsMapper, AfterSalesDetails> implements AfterSalesDetailsService {
+
+    @Override
+    public Page<AfterSalesDetails> getPage(Map<String, Object> condition) {
+
+        IWrapper<AfterSalesDetails> wrapper = IWrapper.getWrapper(condition);
+
+        return page(condition, wrapper);
+    }
+
+    @Override
+    public void add(AfterSalesDetailsVo afterSalesDetailsVo) {
+        save(afterSalesDetailsVo);
+    }
+
+    @Override
+    public void edit(AfterSalesDetailsVo afterSalesDetailsVo) {
+        updateById(afterSalesDetailsVo);
+    }
+
+    @Override
+    public void delete(AfterSalesDetailsVo afterSalesDetailsVo) {
+        removeById(afterSalesDetailsVo.getId());
+    }
+
+}

+ 58 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/service/after/impl/AfterSalesFollowServiceImpl.java

@@ -0,0 +1,58 @@
+package com.fjhx.service.after.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.fjhx.entity.after.AfterSalesFollow;
+import com.fjhx.entity.after.AfterSalesInfo;
+import com.fjhx.params.after.AfterSalesFollowEx;
+import com.fjhx.params.after.AfterSalesFollowVo;
+import com.fjhx.mapper.after.AfterSalesFollowMapper;
+import com.fjhx.service.after.AfterSalesFollowService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.service.after.AfterSalesInfoService;
+import com.fjhx.utils.UserClientUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 售后跟进-新 服务实现类
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Service
+public class AfterSalesFollowServiceImpl extends ServiceImpl<AfterSalesFollowMapper, AfterSalesFollow> implements AfterSalesFollowService {
+
+    @Autowired
+    AfterSalesInfoService afterSalesInfoService;
+
+    @Override
+    @Transactional
+    public void add(AfterSalesFollowVo afterSalesFollowVo) {
+        save(afterSalesFollowVo);
+        //更新售后信息表的状态
+        AfterSalesInfo afterSalesInfo = afterSalesInfoService.getById(afterSalesFollowVo.getAfterSalesInfoId());
+        afterSalesInfo.setStatus(afterSalesFollowVo.getAfterSalesStatus());
+        afterSalesInfoService.updateById(afterSalesInfo);
+    }
+
+    @Override
+    public List<AfterSalesFollowEx> lists(AfterSalesInfo afterSalesInfo){
+        List<AfterSalesFollow> list = list(q->q.eq(AfterSalesFollow::getAfterSalesInfoId,afterSalesInfo.getId()));
+
+        List<AfterSalesFollowEx> afterSalesFollowExList = BeanUtil.copyToList(list, AfterSalesFollowEx.class);
+
+        Map<Long, String> userNameMap = UserClientUtil.getUserNameMap(afterSalesFollowExList, AfterSalesFollowEx::getCreateUser);
+        for (AfterSalesFollowEx afterSalesFollowEx : afterSalesFollowExList) {
+            afterSalesFollowEx.setPurchaseName(userNameMap.get(afterSalesFollowEx.getCreateUser()));
+        }
+
+        return afterSalesFollowExList;
+    }
+
+}

+ 56 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/service/after/impl/AfterSalesInfoServiceImpl.java

@@ -0,0 +1,56 @@
+package com.fjhx.service.after.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.base.Condition;
+import com.fjhx.entity.after.AfterSalesDetails;
+import com.fjhx.entity.after.AfterSalesInfo;
+import com.fjhx.params.after.AfterSalesInfoEx;
+import com.fjhx.params.after.AfterSalesInfoVo;
+import com.fjhx.mapper.after.AfterSalesInfoMapper;
+import com.fjhx.service.after.AfterSalesDetailsService;
+import com.fjhx.service.after.AfterSalesInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.utils.wrapperUtil.IWrapper;
+import org.springblade.core.tool.utils.ObjectUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 售后信息 服务实现类
+ * </p>
+ *
+ * @author ${author}
+ * @since 2023-03-15
+ */
+@Service
+public class AfterSalesInfoServiceImpl extends ServiceImpl<AfterSalesInfoMapper, AfterSalesInfo> implements AfterSalesInfoService {
+
+    @Autowired
+    AfterSalesDetailsService afterSalesDetailsService;
+
+    @Override
+    public Page<AfterSalesInfoEx> getPage(Condition condition) {
+        IWrapper<AfterSalesInfo> wrapper = IWrapper.getWrapper(condition);
+        wrapper.eq(ObjectUtil.isNotEmpty(condition.getType()),"type",condition.getType());
+        wrapper.eq(ObjectUtil.isNotEmpty(condition.getStatus()),"status",condition.getStatus());
+        wrapper.like(ObjectUtil.isNotEmpty(condition.getKeyword()),"cause",condition.getStatus());
+        return baseMapper.getPage(condition.getPage(), wrapper);
+    }
+
+    @Override
+    @Transactional
+    public void add(AfterSalesInfoVo afterSalesInfoVo) {
+        save(afterSalesInfoVo);
+        //保存售后明细
+        List<AfterSalesDetails> afterSalesDetailsList = afterSalesInfoVo.getAfterSalesDetailsList();
+        for (AfterSalesDetails afterSalesDetails: afterSalesDetailsList) {
+            afterSalesDetails.setAfterSalesInfoId(afterSalesInfoVo.getId());
+        }
+        afterSalesDetailsService.saveBatch(afterSalesDetailsList);
+    }
+
+}