合同:新增合同转移接口
parent
81b6aebf47
commit
d9f6fb241a
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contract.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 合同转移 Request VO")
|
||||
@Data
|
||||
public class CrmContractTransferReqVO {
|
||||
|
||||
@Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430")
|
||||
@NotNull(message = "合同编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "新负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430")
|
||||
@NotNull(message = "新负责人的用户编号不能为空")
|
||||
private Long ownerUserId; // 新的负责人
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.crm.framework.utils;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 数据读写权限校验工具类
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
public class AuthUtil {
|
||||
|
||||
/**
|
||||
* 判断当前数据对用户来说是否是只读的
|
||||
*
|
||||
* @param roUserIds 当前操作数据的只读权限的用户编号数组
|
||||
* @param userId 当前操作数据的用户编号
|
||||
* @return boolean 是/否
|
||||
*/
|
||||
public static boolean isReadOnly(Collection<Long> roUserIds, Long userId) {
|
||||
return roUserIds.contains(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前数据对用户来说是否是可读写的
|
||||
*
|
||||
* @param rwUserIds 当前操作数据的读写权限的用户编号数组
|
||||
* @param userId 当前操作数据的用户编号
|
||||
* @return boolean 是/否
|
||||
*/
|
||||
public static boolean isReadAndWrite(Collection<Long> rwUserIds, Long userId) {
|
||||
return rwUserIds.contains(userId);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue