Commit 90be62ff by 林冲

优化一客一群的配置实现

1 parent 0099d596
...@@ -32,4 +32,14 @@ public class LiveCodeDTO extends VcpLiveCode implements Serializable { ...@@ -32,4 +32,14 @@ public class LiveCodeDTO extends VcpLiveCode implements Serializable {
* 群数量 * 群数量
*/ */
private Integer groupCount; private Integer groupCount;
/**
* 已接待客户群数量(已占用)
*/
private Integer occupiedGroupCount;
/**
* 可接待客户群数量(空闲)
*/
private Integer idleGroupCount;
} }
...@@ -7,7 +7,6 @@ import com.gsc4cloud.gsc.vpc.api.dto.entitydto.livecode.LiveCodeDTO; ...@@ -7,7 +7,6 @@ import com.gsc4cloud.gsc.vpc.api.dto.entitydto.livecode.LiveCodeDTO;
import com.gsc4cloud.gsc.vpc.api.req.PageRequest; import com.gsc4cloud.gsc.vpc.api.req.PageRequest;
import com.gsc4cloud.gsc.vpc.api.req.web.livecode.LiveCodePageRequest; import com.gsc4cloud.gsc.vpc.api.req.web.livecode.LiveCodePageRequest;
import com.gsc4cloud.gsc.vpc.api.req.web.livecode.LiveCodeRequest; import com.gsc4cloud.gsc.vpc.api.req.web.livecode.LiveCodeRequest;
import com.gsc4cloud.gsc.vpc.api.req.web.livecode.StoreConfigRequest;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -35,16 +34,10 @@ public interface LiveCodeRemote { ...@@ -35,16 +34,10 @@ public interface LiveCodeRemote {
R<LiveCodeDTO> details(@RequestBody LiveCodeRequest request); R<LiveCodeDTO> details(@RequestBody LiveCodeRequest request);
/** /**
* 新增活码 * 保存活码(新增或编辑)
*/ */
@PostMapping("/liveCode/create") @PostMapping("/liveCode/save")
R<Boolean> create(@RequestBody LiveCodeRequest request); R<Boolean> save(@RequestBody LiveCodeRequest request);
/**
* 编辑活码
*/
@PostMapping("/liveCode/edit")
R<Boolean> edit(@RequestBody LiveCodeRequest request);
/** /**
* 删除活码 * 删除活码
...@@ -56,11 +49,5 @@ public interface LiveCodeRemote { ...@@ -56,11 +49,5 @@ public interface LiveCodeRemote {
* 获取企微群列表(带绑定状态) * 获取企微群列表(带绑定状态)
*/ */
@PostMapping("/liveCode/group/list") @PostMapping("/liveCode/group/list")
R<Page<GroupPoolDTO>> groupList(@RequestBody PageRequest<LiveCodeRequest> request); R<List<GroupPoolDTO>> groupList(@RequestBody PageRequest<LiveCodeRequest> request);
/**
* 根据活码ID获取已绑定的群ID列表
*/
@PostMapping("/liveCode/group/ids")
R<List<String>> getGroupIdsByLiveCodeId(@RequestBody LiveCodeRequest request);
} }
...@@ -61,4 +61,10 @@ public class LiveCodePageRequest implements Serializable { ...@@ -61,4 +61,10 @@ public class LiveCodePageRequest implements Serializable {
@Schema(description = "创建时间结束时间") @Schema(description = "创建时间结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createdDateEnd; private Date createdDateEnd;
/**
* 统一搜索关键字(活码名称、备注、创建人模糊搜索)
*/
@Schema(description = "统一搜索关键字(活码名称、备注、创建人模糊搜索)")
private String keyword;
} }
...@@ -2,6 +2,7 @@ package com.gsc4cloud.gsc.vpc.api.req.web.livecode; ...@@ -2,6 +2,7 @@ package com.gsc4cloud.gsc.vpc.api.req.web.livecode;
import com.gsc4cloud.gsc.vpc.api.validation.AddGroup; import com.gsc4cloud.gsc.vpc.api.validation.AddGroup;
import com.gsc4cloud.gsc.vpc.api.validation.DeleteGroup; import com.gsc4cloud.gsc.vpc.api.validation.DeleteGroup;
import com.gsc4cloud.gsc.vpc.api.validation.SaveGroup;
import com.gsc4cloud.gsc.vpc.api.validation.UpdateGroup; import com.gsc4cloud.gsc.vpc.api.validation.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
...@@ -34,8 +35,8 @@ public class LiveCodeRequest implements Serializable { ...@@ -34,8 +35,8 @@ public class LiveCodeRequest implements Serializable {
/** /**
* 主键id * 主键id
*/ */
@Schema(description = "主键id") @Schema(description = "主键id(编辑时必填)")
@NotNull(message = "id不能为空", groups = {UpdateGroup.class, DeleteGroup.class}) @NotNull(message = "id不能为空", groups = {UpdateGroup.class, DeleteGroup.class, SaveGroup.class})
private Long id; private Long id;
/** /**
...@@ -48,7 +49,7 @@ public class LiveCodeRequest implements Serializable { ...@@ -48,7 +49,7 @@ public class LiveCodeRequest implements Serializable {
* 关联门店ID * 关联门店ID
*/ */
@Schema(description = "关联门店ID") @Schema(description = "关联门店ID")
@NotNull(message = "门店ID不能为空", groups = {AddGroup.class, UpdateGroup.class}) @NotNull(message = "门店ID不能为空", groups = {AddGroup.class, UpdateGroup.class, SaveGroup.class})
private Integer storeId; private Integer storeId;
/** /**
...@@ -85,7 +86,7 @@ public class LiveCodeRequest implements Serializable { ...@@ -85,7 +86,7 @@ public class LiveCodeRequest implements Serializable {
* 关联的企微群ID列表 * 关联的企微群ID列表
*/ */
@Schema(description = "关联的企微群ID列表") @Schema(description = "关联的企微群ID列表")
@NotEmpty(message = "请至少选择一个企微群", groups = {AddGroup.class, UpdateGroup.class}) @NotEmpty(message = "请至少选择一个企微群", groups = {AddGroup.class, UpdateGroup.class, SaveGroup.class})
private List<String> groupChatIds; private List<String> groupChatIds;
/** /**
...@@ -103,14 +104,21 @@ public class LiveCodeRequest implements Serializable { ...@@ -103,14 +104,21 @@ public class LiveCodeRequest implements Serializable {
private Date createdDateEnd; private Date createdDateEnd;
/** /**
* 新增操作人 * 操作人(新增和编辑共用)
*/ */
@NotBlank(message = "新增操作人不能为空", groups = {AddGroup.class}) @Schema(description = "操作人")
@NotBlank(message = "操作人不能为空", groups = {AddGroup.class, UpdateGroup.class, SaveGroup.class})
private String createdBy; private String createdBy;
/** /**
* 更新操作人 * 群名称(搜索用)
*/ */
@NotBlank(message = "更新操作人不能为空", groups = {UpdateGroup.class}) @Schema(description = "群名称(搜索用)")
private String updatedBy; private String groupChatName;
/**
* 仅展示空闲群
*/
@Schema(description = "仅展示空闲群")
private Boolean onlyShowIdle;
} }
package com.gsc4cloud.gsc.vpc.api.validation;
/**
* 保存验证组(新增和编辑共用)
*/
public interface SaveGroup {
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!