Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/article/AppArticleController.javaplp
commit
9203f485e9
|
@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.framework.operatelog.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.service.ILogRecordServiceImpl;
|
||||
import com.mzt.logapi.service.ILogRecordService;
|
||||
import com.mzt.logapi.starter.annotation.EnableLogRecord;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
|
||||
/**
|
||||
* 操作日志配置类
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@EnableLogRecord(tenant = "") // 貌似用不上 tenant 这玩意给个空好啦
|
||||
@AutoConfiguration
|
||||
@Slf4j
|
||||
public class YudaoOperateLogV2Configuration {
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public ILogRecordService iLogRecordServiceImpl() {
|
||||
return new ILogRecordServiceImpl();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* 基于 mzt-log 框架
|
||||
* 实现操作日志功能
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
package cn.iocoder.yudao.framework.operatelog;
|
||||
@ -1,2 +1,3 @@
|
||||
cn.iocoder.yudao.framework.security.config.YudaoSecurityAutoConfiguration
|
||||
cn.iocoder.yudao.framework.security.config.YudaoWebSecurityConfigurerAdapter
|
||||
cn.iocoder.yudao.framework.security.config.YudaoWebSecurityConfigurerAdapter
|
||||
cn.iocoder.yudao.framework.operatelog.config.YudaoOperateLogV2Configuration
|
||||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.task;
|
||||
@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.crm.enums.permission;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Crm 数据权限角色枚举
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum CrmPermissionRoleCodeEnum {
|
||||
|
||||
CRM_ADMIN("crm_admin", "CRM 管理员");
|
||||
|
||||
/**
|
||||
* 角色标识
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contact.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人商机 Request VO") // 用于关联,取消关联的操作
|
||||
@Data
|
||||
public class CrmContactBusinessReqVO {
|
||||
|
||||
@Schema(description = "联系人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20878")
|
||||
@NotNull(message="联系人不能为空")
|
||||
private Long contactId;
|
||||
|
||||
@Schema(description = "商机编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "7638")
|
||||
@NotEmpty(message="商机不能为空")
|
||||
private List<Long> businessIds;
|
||||
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contactbusinesslink.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人商机关联分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CrmContactBusinessLinkPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "联系人编号", example = "20878")
|
||||
private Long contactId;
|
||||
|
||||
@Schema(description = "商机编号", example = "7638")
|
||||
private Long businessId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contactbusinesslink.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人商机关联 Response VO")
|
||||
@Data
|
||||
public class CrmContactBusinessLinkRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17220")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "联系人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20878")
|
||||
private Long contactId;
|
||||
|
||||
@Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7638")
|
||||
private Long businessId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contactbusinesslink.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人商机关联新增/修改 Request VO")
|
||||
@Data
|
||||
public class CrmContactBusinessLinkSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17220")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "联系人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20878")
|
||||
@NotNull(message="联系人不能为空")
|
||||
private Long contactId;
|
||||
|
||||
@Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7638")
|
||||
@NotNull(message="商机不能为空")
|
||||
private Long businessId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.customer.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 客户锁定/解锁 Request VO")
|
||||
@Data
|
||||
public class CrmCustomerLockReqVO {
|
||||
|
||||
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13563")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "客户锁定状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
private Boolean lockStatus;
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.customer.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - crm 客户操作日志分页 Request VO")
|
||||
@Data
|
||||
public class CrmCustomerOperateLogPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模块数据编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long bizId;
|
||||
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "模块类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private String bizType;
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.crm.dal.mysql.contactbusinesslink;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactBusinessDO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CRM 联系人与商机的关联 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface CrmContactBusinessMapper extends BaseMapperX<CrmContactBusinessDO> {
|
||||
|
||||
default CrmContactBusinessDO selectByContactIdAndBusinessId(Long contactId, Long businessId) {
|
||||
return selectOne(CrmContactBusinessDO::getContactId, contactId,
|
||||
CrmContactBusinessDO::getBusinessId, businessId);
|
||||
}
|
||||
|
||||
default void deleteByContactIdAndBusinessId(Long contactId, Collection<Long> businessIds) {
|
||||
delete(new LambdaQueryWrapper<CrmContactBusinessDO>()
|
||||
.eq(CrmContactBusinessDO::getContactId, contactId)
|
||||
.in(CrmContactBusinessDO::getBusinessId, businessIds));
|
||||
}
|
||||
|
||||
default List<CrmContactBusinessDO> selectListByContactId(Long contactId) {
|
||||
return selectList(CrmContactBusinessDO::getContactId, contactId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.framework.bizlog;
|
||||
@ -1 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.framework.core;
|
||||
@ -0,0 +1 @@
|
||||
package cn.iocoder.yudao.module.crm.framework.operatelog;
|
||||
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.crm.framework.core.annotations;
|
||||
package cn.iocoder.yudao.module.crm.framework.permission.core.annotations;
|
||||
|
||||
import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum;
|
||||
import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum;
|
||||
@ -0,0 +1 @@
|
||||
package cn.iocoder.yudao.module.crm.framework.permission.core;
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.crm.framework.permission.core.util;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionRoleCodeEnum;
|
||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
/**
|
||||
* 数据权限工具类
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
public class CrmPermissionUtils {
|
||||
|
||||
/**
|
||||
* 校验用户是否是 CRM 管理员
|
||||
*
|
||||
* @return 是/否
|
||||
*/
|
||||
public static boolean isCrmAdmin() {
|
||||
return SingletonManager.getPermissionApi().hasAnyRoles(getLoginUserId(), CrmPermissionRoleCodeEnum.CRM_ADMIN.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 静态内部类实现单例获取
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
private static class SingletonManager {
|
||||
|
||||
private static final PermissionApi PERMISSION_API = SpringUtil.getBean(PermissionApi.class);
|
||||
|
||||
public static PermissionApi getPermissionApi() {
|
||||
return PERMISSION_API;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
package cn.iocoder.yudao.module.crm.framework.permission;
|
||||
@ -1,4 +0,0 @@
|
||||
/**
|
||||
* 线索
|
||||
*/
|
||||
package cn.iocoder.yudao.module.crm.service.clue;
|
||||
@ -1,72 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.service.contactbusinesslink;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.business.vo.business.CrmBusinessRespVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.contactbusinesslink.vo.CrmContactBusinessLinkPageReqVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.contactbusinesslink.vo.CrmContactBusinessLinkSaveReqVO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.contactbusinesslink.CrmContactBusinessLinkDO;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CRM 联系人商机关联 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface CrmContactBusinessLinkService {
|
||||
|
||||
/**
|
||||
* 创建联系人商机关联
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createContactBusinessLink(@Valid CrmContactBusinessLinkSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 创建联系人商机关联
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
*/
|
||||
void createContactBusinessLinkBatch(@Valid List<CrmContactBusinessLinkSaveReqVO> createReqVO);
|
||||
|
||||
/**
|
||||
* 更新联系人商机关联
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateContactBusinessLink(@Valid CrmContactBusinessLinkSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除联系人商机关联
|
||||
*
|
||||
* @param createReqVO 删除列表
|
||||
*/
|
||||
void deleteContactBusinessLink(@Valid List<CrmContactBusinessLinkSaveReqVO> createReqVO);
|
||||
|
||||
/**
|
||||
* 获得联系人商机关联
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 联系人商机关联
|
||||
*/
|
||||
CrmContactBusinessLinkDO getContactBusinessLink(Long id);
|
||||
|
||||
/**
|
||||
* 获得联系人商机关联分页
|
||||
*
|
||||
* @param pageReqVO 编号
|
||||
* @return 联系人商机关联
|
||||
*/
|
||||
PageResult<CrmBusinessRespVO> getContactBusinessLinkPageByContact(CrmContactBusinessLinkPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得联系人商机关联分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 联系人商机关联分页
|
||||
*/
|
||||
PageResult<CrmContactBusinessLinkDO> getContactBusinessLinkPage(CrmContactBusinessLinkPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue