mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-29 18:51:53 +08:00
code review:CRM 商机的逻辑
This commit is contained in:
parent
24e6deb82b
commit
6f8fd383f7
@ -19,7 +19,6 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
@ -67,15 +66,6 @@ public class CrmBusinessController {
|
||||
return success(CrmBusinessConvert.INSTANCE.convert(business));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得商机列表")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
||||
@PreAuthorize("@ss.hasPermission('crm:business:query')")
|
||||
public CommonResult<List<CrmBusinessRespVO>> getBusinessList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<CrmBusinessDO> list = businessService.getBusinessList(ids);
|
||||
return success(CrmBusinessConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得商机分页")
|
||||
@PreAuthorize("@ss.hasPermission('crm:business:query')")
|
||||
|
@ -21,10 +21,12 @@ public class CrmBusinessBaseVO {
|
||||
@NotNull(message = "商机名称不能为空")
|
||||
private String name;
|
||||
|
||||
// TODO @ljileo:要写 requiredMode = Schema.RequiredMode.REQUIRED
|
||||
@Schema(description = "商机状态类型编号", example = "25714")
|
||||
@NotNull(message = "商机状态类型不能为空")
|
||||
private Long statusTypeId;
|
||||
|
||||
// TODO @ljileo:要写 requiredMode = Schema.RequiredMode.REQUIRED
|
||||
@Schema(description = "商机状态编号", example = "30320")
|
||||
@NotNull(message = "商机状态不能为空")
|
||||
private Long statusId;
|
||||
@ -41,9 +43,11 @@ public class CrmBusinessBaseVO {
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime dealTime;
|
||||
|
||||
// TODO @ljileo:金额使用 Integer 类型,转换成分
|
||||
@Schema(description = "商机金额", example = "12371")
|
||||
private BigDecimal price;
|
||||
|
||||
// TODO @ljileo:折扣使用 Integer 类型,存储时,默认 * 100;展示的时候,前端需要 / 100;避免精度丢失问题
|
||||
@Schema(description = "整单折扣")
|
||||
private BigDecimal discountPercent;
|
||||
|
||||
@ -53,25 +57,32 @@ public class CrmBusinessBaseVO {
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
// TODO @ljileo:这个新建和修改的时候,应该不传递哈;应该新建的人,就是它的负责人
|
||||
@Schema(description = "负责人的用户编号", example = "25562")
|
||||
private Long ownerUserId;
|
||||
|
||||
// TODO @ljileo:这个新建和修改的时候,应该不传递哈
|
||||
@Schema(description = "只读权限的用户编号数组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String roUserIds;
|
||||
|
||||
// TODO @ljileo:这个新建和修改的时候,应该不传递哈
|
||||
@Schema(description = "读写权限的用户编号数组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String rwUserIds;
|
||||
|
||||
// TODO @lijieo:新建的时候,不传递这个字段哈;
|
||||
@Schema(description = "1赢单2输单3无效", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer endStatus;
|
||||
|
||||
// TODO @lijieo:新建的时候,不传递这个字段哈;
|
||||
@Schema(description = "结束时的备注", example = "你说的对")
|
||||
private String endRemark;
|
||||
|
||||
// TODO @lijieo:新建的时候,不传递这个字段哈;
|
||||
@Schema(description = "最后跟进时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime contactLastTime;
|
||||
|
||||
// TODO @lijieo:新建的时候,不传递这个字段哈;
|
||||
@Schema(description = "跟进状态", example = "1")
|
||||
private Integer followUpStatus;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.business.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import javax.validation.constraints.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 商机创建 Request VO")
|
||||
@Data
|
||||
@ -11,4 +11,6 @@ import javax.validation.constraints.*;
|
||||
@ToString(callSuper = true)
|
||||
public class CrmBusinessCreateReqVO extends CrmBusinessBaseVO {
|
||||
|
||||
// TODO @ljileo:新建的时候,应该可以传递添加的产品;
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@ToString(callSuper = true)
|
||||
public class CrmBusinessPageReqVO extends PageParam {
|
||||
|
||||
// TODO @ljileo:目前就使用 name 检索即可;
|
||||
|
||||
@Schema(description = "商机名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.business.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 商机更新 Request VO")
|
||||
@Data
|
||||
@ -15,4 +17,6 @@ public class CrmBusinessUpdateReqVO extends CrmBusinessBaseVO {
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
|
||||
// TODO @ljileo:修改的时候,应该可以传递添加的产品;
|
||||
|
||||
}
|
||||
|
@ -25,8 +25,6 @@ public interface CrmBusinessConvert {
|
||||
|
||||
CrmBusinessRespVO convert(CrmBusinessDO bean);
|
||||
|
||||
List<CrmBusinessRespVO> convertList(List<CrmBusinessDO> list);
|
||||
|
||||
PageResult<CrmBusinessRespVO> convertPage(PageResult<CrmBusinessDO> page);
|
||||
|
||||
List<CrmBusinessExcelVO> convertList02(List<CrmBusinessDO> list);
|
||||
|
@ -35,10 +35,14 @@ public class CrmBusinessDO extends BaseDO {
|
||||
private String name;
|
||||
/**
|
||||
* 商机状态类型编号
|
||||
*
|
||||
* TODO @ljileo:这个字段,后续要写下关联的实体哈
|
||||
*/
|
||||
private Long statusTypeId;
|
||||
/**
|
||||
* 商机状态编号
|
||||
*
|
||||
* TODO @ljileo:这个字段,后续要写下关联的实体哈
|
||||
*/
|
||||
private Long statusId;
|
||||
/**
|
||||
@ -47,6 +51,8 @@ public class CrmBusinessDO extends BaseDO {
|
||||
private LocalDateTime contactNextTime;
|
||||
/**
|
||||
* 客户编号
|
||||
*
|
||||
* TODO @ljileo:这个字段,后续要写下关联的实体哈
|
||||
*/
|
||||
private Long customerId;
|
||||
/**
|
||||
@ -55,14 +61,20 @@ public class CrmBusinessDO extends BaseDO {
|
||||
private LocalDateTime dealTime;
|
||||
/**
|
||||
* 商机金额
|
||||
*
|
||||
* TODO @lijie:Integer
|
||||
*/
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 整单折扣
|
||||
*
|
||||
* TODO @lijie:Integer
|
||||
*/
|
||||
private BigDecimal discountPercent;
|
||||
/**
|
||||
* 产品总金额
|
||||
*
|
||||
* TODO @lijie:Integer
|
||||
*/
|
||||
private BigDecimal productPrice;
|
||||
/**
|
||||
@ -75,14 +87,20 @@ public class CrmBusinessDO extends BaseDO {
|
||||
private Long ownerUserId;
|
||||
/**
|
||||
* 只读权限的用户编号数组
|
||||
*
|
||||
* TODO @lijie:应该是 List<Long>,然后使用下对应的 typehandler
|
||||
*/
|
||||
private String roUserIds;
|
||||
/**
|
||||
* 读写权限的用户编号数组
|
||||
*
|
||||
* TODO @lijie:应该是 List<Long>,然后使用下对应的 typehandler
|
||||
*/
|
||||
private String rwUserIds;
|
||||
/**
|
||||
* 1赢单2输单3无效
|
||||
*
|
||||
* TODO @lijie:搞个枚举;
|
||||
*/
|
||||
private Integer endStatus;
|
||||
/**
|
||||
@ -95,6 +113,8 @@ public class CrmBusinessDO extends BaseDO {
|
||||
private LocalDateTime contactLastTime;
|
||||
/**
|
||||
* 跟进状态
|
||||
*
|
||||
* TODO @lijie:目前就是 Boolean;是否跟进
|
||||
*/
|
||||
private Integer followUpStatus;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user