feat(shop): 新增客户跟进情况管理功能
- 新增 ShopDealerRecord 实体类及相关字段定义- 新增客户跟进情况控制器 ShopDealerRecordController - 实现客户跟进情况的增删改查及批量操作接口 - 新增 ShopDealerRecordMapper 及关联查询 SQL 配置- 新增 ShopDealerRecordService 及其实现类 - 新增 ShopDealerRecordParam 查询参数类 - 在 ShopDealerApply 更新时同步更新佣金比例到 ShopDealerUser- 修改 ShopDealerApplyMapper.xml 增加关联查询佣金比例字段
This commit is contained in:
@@ -109,6 +109,11 @@ public class ShopDealerApplyController extends BaseController {
|
|||||||
@PutMapping()
|
@PutMapping()
|
||||||
public ApiResult<?> update(@RequestBody ShopDealerApply shopDealerApply) {
|
public ApiResult<?> update(@RequestBody ShopDealerApply shopDealerApply) {
|
||||||
shopDealerApply.setAuditTime(null);
|
shopDealerApply.setAuditTime(null);
|
||||||
|
if(shopDealerApply.getRate() != null){
|
||||||
|
final ShopDealerUser dealerUser = new ShopDealerUser();
|
||||||
|
dealerUser.setRate(shopDealerApply.getRate());
|
||||||
|
shopDealerUserService.update(dealerUser, new LambdaQueryWrapper<ShopDealerUser>().eq(ShopDealerUser::getUserId, shopDealerApply.getUserId()));
|
||||||
|
}
|
||||||
if (shopDealerApplyService.updateById(shopDealerApply)) {
|
if (shopDealerApplyService.updateById(shopDealerApply)) {
|
||||||
if (shopDealerApply.getApplyStatus().equals(20)) {
|
if (shopDealerApply.getApplyStatus().equals(20)) {
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|||||||
@@ -0,0 +1,128 @@
|
|||||||
|
package com.gxwebsoft.shop.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.shop.entity.ShopDealerRecord;
|
||||||
|
import com.gxwebsoft.shop.param.ShopDealerRecordParam;
|
||||||
|
import com.gxwebsoft.shop.service.ShopDealerRecordService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户跟进情况控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2025-10-02 12:21:50
|
||||||
|
*/
|
||||||
|
@Api(tags = "客户跟进情况管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/shop/shop-dealer-record")
|
||||||
|
public class ShopDealerRecordController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private ShopDealerRecordService shopDealerRecordService;
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopDealerRecord:list')")
|
||||||
|
@ApiOperation("分页查询客户跟进情况")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<ShopDealerRecord>> page(ShopDealerRecordParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(shopDealerRecordService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopDealerRecord:list')")
|
||||||
|
@ApiOperation("查询全部客户跟进情况")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<ShopDealerRecord>> list(ShopDealerRecordParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(shopDealerRecordService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopDealerRecord:list')")
|
||||||
|
@ApiOperation("根据id查询客户跟进情况")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<ShopDealerRecord> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(shopDealerRecordService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopDealerRecord:save')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("添加客户跟进情况")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody ShopDealerRecord shopDealerRecord) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
shopDealerRecord.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (shopDealerRecordService.save(shopDealerRecord)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopDealerRecord:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("修改客户跟进情况")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody ShopDealerRecord shopDealerRecord) {
|
||||||
|
if (shopDealerRecordService.updateById(shopDealerRecord)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopDealerRecord:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("删除客户跟进情况")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (shopDealerRecordService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopDealerRecord:save')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量添加客户跟进情况")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<ShopDealerRecord> list) {
|
||||||
|
if (shopDealerRecordService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopDealerRecord:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改客户跟进情况")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<ShopDealerRecord> batchParam) {
|
||||||
|
if (batchParam.update(shopDealerRecordService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopDealerRecord:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量删除客户跟进情况")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (shopDealerRecordService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -60,6 +60,10 @@ public class ShopDealerApply implements Serializable {
|
|||||||
@Schema(description = "详细地址")
|
@Schema(description = "详细地址")
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
|
@Schema(description = "佣金比例")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal rate;
|
||||||
|
|
||||||
@Schema(description = "推荐人用户ID")
|
@Schema(description = "推荐人用户ID")
|
||||||
private Integer refereeId;
|
private Integer refereeId;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.gxwebsoft.shop.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户跟进情况
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2025-10-02 12:21:50
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "ShopDealerRecord对象", description = "客户跟进情况")
|
||||||
|
public class ShopDealerRecord implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "客户ID")
|
||||||
|
private Integer dealerId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0待处理, 1已完成")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@TableLogic
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.shop.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.shop.entity.ShopDealerRecord;
|
||||||
|
import com.gxwebsoft.shop.param.ShopDealerRecordParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户跟进情况Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2025-10-02 12:21:50
|
||||||
|
*/
|
||||||
|
public interface ShopDealerRecordMapper extends BaseMapper<ShopDealerRecord> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<ShopDealerRecord>
|
||||||
|
*/
|
||||||
|
List<ShopDealerRecord> selectPageRel(@Param("page") IPage<ShopDealerRecord> page,
|
||||||
|
@Param("param") ShopDealerRecordParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<ShopDealerRecord> selectListRel(@Param("param") ShopDealerRecordParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,10 +4,11 @@
|
|||||||
|
|
||||||
<!-- 关联查询sql -->
|
<!-- 关联查询sql -->
|
||||||
<sql id="selectSql">
|
<sql id="selectSql">
|
||||||
SELECT a.*, b.nickname as nickName, b.phone, c.nickname as refereeName
|
SELECT a.*, b.nickname as nickName, b.phone, c.nickname as refereeName, d.rate
|
||||||
FROM shop_dealer_apply a
|
FROM shop_dealer_apply a
|
||||||
LEFT JOIN gxwebsoft_core.sys_user b ON a.user_id = b.user_id
|
LEFT JOIN gxwebsoft_core.sys_user b ON a.user_id = b.user_id
|
||||||
LEFT JOIN gxwebsoft_core.sys_user c ON a.referee_id = c.user_id
|
LEFT JOIN gxwebsoft_core.sys_user c ON a.referee_id = c.user_id
|
||||||
|
LEFT JOIN shop_dealer_user d ON a.user_id = d.user_id
|
||||||
<where>
|
<where>
|
||||||
<if test="param.applyId != null">
|
<if test="param.applyId != null">
|
||||||
AND a.apply_id = #{param.applyId}
|
AND a.apply_id = #{param.applyId}
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?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.gxwebsoft.shop.mapper.ShopDealerRecordMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_dealer_record a
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.parentId != null">
|
||||||
|
AND a.parent_id = #{param.parentId}
|
||||||
|
</if>
|
||||||
|
<if test="param.dealerId != null">
|
||||||
|
AND a.dealer_id = #{param.dealerId}
|
||||||
|
</if>
|
||||||
|
<if test="param.content != null">
|
||||||
|
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.ShopDealerRecord">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.ShopDealerRecord">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.gxwebsoft.shop.param;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户跟进情况查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2025-10-02 12:21:50
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "ShopDealerRecordParam对象", description = "客户跟进情况查询参数")
|
||||||
|
public class ShopDealerRecordParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "客户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer dealerId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0待处理, 1已完成")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.shop.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.shop.entity.ShopDealerRecord;
|
||||||
|
import com.gxwebsoft.shop.param.ShopDealerRecordParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户跟进情况Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2025-10-02 12:21:50
|
||||||
|
*/
|
||||||
|
public interface ShopDealerRecordService extends IService<ShopDealerRecord> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<ShopDealerRecord>
|
||||||
|
*/
|
||||||
|
PageResult<ShopDealerRecord> pageRel(ShopDealerRecordParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<ShopDealerRecord>
|
||||||
|
*/
|
||||||
|
List<ShopDealerRecord> listRel(ShopDealerRecordParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @return ShopDealerRecord
|
||||||
|
*/
|
||||||
|
ShopDealerRecord getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.shop.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.shop.entity.ShopDealerRecord;
|
||||||
|
import com.gxwebsoft.shop.mapper.ShopDealerRecordMapper;
|
||||||
|
import com.gxwebsoft.shop.param.ShopDealerRecordParam;
|
||||||
|
import com.gxwebsoft.shop.service.ShopDealerRecordService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户跟进情况Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2025-10-02 12:21:50
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ShopDealerRecordServiceImpl extends ServiceImpl<ShopDealerRecordMapper, ShopDealerRecord> implements ShopDealerRecordService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<ShopDealerRecord> pageRel(ShopDealerRecordParam param) {
|
||||||
|
PageParam<ShopDealerRecord, ShopDealerRecordParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||||
|
List<ShopDealerRecord> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ShopDealerRecord> listRel(ShopDealerRecordParam param) {
|
||||||
|
List<ShopDealerRecord> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<ShopDealerRecord, ShopDealerRecordParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ShopDealerRecord getByIdRel(Integer id) {
|
||||||
|
ShopDealerRecordParam param = new ShopDealerRecordParam();
|
||||||
|
param.setId(id);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user