Commit 361fdac8 by 章家宝

提成方案:代码提交一版,接口相关

1 parent db728b32
Showing 46 changed files with 1042 additions and 89 deletions
...@@ -2,8 +2,8 @@ package cn.com.glsx.dj.staff.dto; ...@@ -2,8 +2,8 @@ package cn.com.glsx.dj.staff.dto;
import cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MerchantPerformanceProductDefineDTO; import cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MerchantPerformanceProductDefineDTO;
import cn.com.glsx.dj.staff.model.PerformanceParamConfigCondition; import cn.com.glsx.dj.staff.model.PerformanceParamConfigCondition;
import lombok.Data; import io.swagger.annotations.ApiModelProperty;
import lombok.ToString; import lombok.*;
import lombok.experimental.SuperBuilder; import lombok.experimental.SuperBuilder;
@SuperBuilder @SuperBuilder
...@@ -11,4 +11,6 @@ import lombok.experimental.SuperBuilder; ...@@ -11,4 +11,6 @@ import lombok.experimental.SuperBuilder;
@Data @Data
public class PerformanceParamConfigConditionDTO extends PerformanceParamConfigCondition { public class PerformanceParamConfigConditionDTO extends PerformanceParamConfigCondition {
private MerchantPerformanceProductDefineDTO productDefine; private MerchantPerformanceProductDefineDTO productDefine;
@ApiModelProperty(notes = "提成方案置ID")
private Integer performanceConfigId;
} }
package cn.com.glsx.dj.staff.dto.performance; package cn.com.glsx.dj.staff.dto.performance;
import cn.com.glsx.dj.staff.model.PerformanceConfigApprove;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.*;
import lombok.Data; import lombok.experimental.SuperBuilder;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@ToString @ToString
public class PerformanceConfigApproveDTO implements Serializable { @SuperBuilder
public class PerformanceConfigApproveDTO extends PerformanceConfigApprove {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "主键ID") @ApiModelProperty(notes = "手机号码")
private Integer id; private String mobile;
@ApiModelProperty(notes = "提成方案配置ID(dj_car_life_performance_config.id)")
private Integer performanceConfigId;
@ApiModelProperty(notes = "审批说明")
private String approveRemark;
@ApiModelProperty(notes = "审批附件urls,多个用英文逗号分隔")
private String approveAttachments;
@ApiModelProperty(notes = "附图urls,多个用英文逗号分隔")
private String attachmentImgs;
@ApiModelProperty(notes = "提交人用户名")
private String submitUsername;
@ApiModelProperty(notes = "审批状态(1:审批中;2:已通过;3:已驳回)")
private Integer approveStatus;
@ApiModelProperty(notes = "门店名称, 多个用英文逗号分隔")
private String merchantNames;
@ApiModelProperty(notes = "名称, 多个用英文逗号分隔")
private String brandsNames;
} }
\ No newline at end of file \ No newline at end of file
...@@ -15,6 +15,9 @@ public class PerformanceConfigApproveDetailDTO { ...@@ -15,6 +15,9 @@ public class PerformanceConfigApproveDetailDTO {
@ApiModelProperty(notes = "主键ID") @ApiModelProperty(notes = "主键ID")
private Integer id; private Integer id;
@ApiModelProperty(notes = "方案id")
private Integer performanceConfigId;
@ApiModelProperty(notes = "方案名称") @ApiModelProperty(notes = "方案名称")
private String schemeName; private String schemeName;
......
...@@ -6,6 +6,33 @@ import lombok.Data; ...@@ -6,6 +6,33 @@ import lombok.Data;
@Data @Data
public class PerformanceConfigApprovePermissionDTO { public class PerformanceConfigApprovePermissionDTO {
@ApiModelProperty(notes = "状态(1:查阅人;2:审批人)") @ApiModelProperty(notes = "主键ID")
private Integer id; private Integer id;
@ApiModelProperty(notes = "提成方案配置ID(dj_car_life_performance_config.id)")
private Integer performanceConfigId;
@ApiModelProperty(notes = "审批说明")
private String approveRemark;
@ApiModelProperty(notes = "审批附件urls,多个用英文逗号分隔")
private String approveAttachments;
@ApiModelProperty(notes = "附图urls,多个用英文逗号分隔")
private String attachmentImgs;
@ApiModelProperty(notes = "提交人用户名")
private String submitUsername;
@ApiModelProperty(notes = "审批状态(1:审批中;2:已通过;3:已驳回)")
private Integer approveStatus;
@ApiModelProperty(notes = "门店名称, 多个用英文逗号分隔")
private String merchantNames;
@ApiModelProperty(notes = "名称, 多个用英文逗号分隔")
private String brandsNames;
@ApiModelProperty(notes = "0:无权限 1:查阅人;2:审批人")
private String approvePermission;
} }
package cn.com.glsx.dj.staff.dto.performance; package cn.com.glsx.dj.staff.dto.performance;
import com.fasterxml.jackson.annotation.JsonFormat; import cn.com.glsx.dj.staff.model.PerformanceTimeCycle;
import io.swagger.annotations.ApiModelProperty; import lombok.*;
import lombok.AllArgsConstructor; import lombok.experimental.SuperBuilder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
@Data @Data
@AllArgsConstructor
@NoArgsConstructor
@ToString @ToString
public class PerformanceTimeCycleDTO implements Serializable { @SuperBuilder
private static final long serialVersionUID = 1L; public class PerformanceTimeCycleDTO extends PerformanceTimeCycle {
@ApiModelProperty(notes = "主键ID")
private Long id;
@ApiModelProperty(notes = "周期名称")
private String cycleName;
@ApiModelProperty(notes = "周期基本事项")
private String cycleItem;
@ApiModelProperty(notes = "周期开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startDate;
@ApiModelProperty(notes = "周期结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endDate;
@ApiModelProperty(notes = "是否启用(N:否,Y:是)")
private String enableFlag;
@ApiModelProperty(notes = "创建人")
private String createdBy;
@ApiModelProperty(notes = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdDate;
@ApiModelProperty(notes = "修改人")
private String updatedBy;
@ApiModelProperty(notes = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedDate;
@ApiModelProperty(notes = "删除标识(D:已删除;N:未删除)")
private String deletedFlag;
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.dto.performance;
import cn.com.glsx.dj.staff.dto.StaffPerformanceDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class StaffPerformanceGetDTO {
@ApiModelProperty(name = "staffPerformanceList", notes = "工资提成列表获取")
private List<StaffPerformanceDTO> staffPerformanceList;
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import java.util.List;
@ApiService(value = "提成方案审批人配置", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceApproveConfigRemote {
List<PerformanceApproveConfigDTO> selectAll();
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.framework.core.annotation.ApiService;
@ApiService(value = "提成方案审批操作记录", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigApproveOperationRecordRemote {
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
@ApiService(value = "提成方案审批主表", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigApproveRemote {
@ApiMethod("提成方案审批列表")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("提成方案审批分页")
RpcResponse<RpcPagination<PerformanceConfigApprovePageDTO>> performanceConfigApprovePage(RpcPagination<PerformanceConfigApprovePageDTO> pagination);
@ApiMethod("提成方案审批详情")
@ApiParam(name = "dto", notes = "查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("提成方案审批详情")
RpcResponse<PerformanceConfigApproveDetailDTO> performanceConfigApproveDetail(PerformanceConfigApproveDTO dto);
@ApiMethod("提成方案审批详情")
@ApiParam(name = "dto", notes = "查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("提成方案审批详情")
RpcResponse<PerformanceConfigApprovePermissionDTO> performanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto);
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import java.util.List;
@ApiService(value = "提成方案商户品牌关联", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigMerchantBrandRefRemote {
RpcResponse<Boolean> performanceConfigMerchantBrandRefAdd(List<PerformanceConfigMerchantBrandRefDTO> merchantBrandRefList);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import java.util.List;
@ApiService(value = "提成方案参数配置", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigParamConfigRemote {
RpcResponse<Boolean> performanceConfigParamConfigAdd(List<PerformanceParamConfigDTO> performanceParamConfigList);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.framework.core.annotation.ApiMethod;
import cn.com.glsx.framework.core.annotation.ApiParam;
import cn.com.glsx.framework.core.annotation.ApiResponse;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import javax.validation.constraints.NotNull;
@ApiService(value = "提成方案", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigRemote {
@ApiMethod("提成方案新增")
@ApiParam(name = "dto", notes = "提成方案信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<Boolean> performanceConfigAdd(@NotNull PerformanceConfigDTO dto);
@ApiMethod("提成方案修改")
@ApiParam(name = "dto", notes = "提成方案信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<Boolean> performanceConfigUpdate(@NotNull PerformanceConfigDTO dto);
@ApiMethod("分页查询提成方案")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("招聘需求分页")
RpcResponse<RpcPagination<PerformanceConfigPageDTO>> performanceConfigPage(RpcPagination<PerformanceConfigPageDTO> pagination);
@ApiMethod("门店提成方案列表(以门店为维度)")
@ApiParam(name = "pagination", notes = "分页查询信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("招聘需求分页")
RpcResponse<RpcPagination<PerformanceConfigPageByMerchantDTO>> performanceConfigPageByMerchant(RpcPagination<PerformanceConfigPageByMerchantDTO> pagination);
@ApiMethod("通过名称查询提成方案")
@ApiParam(name = "dto", notes = "提成方案信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<PerformanceConfigDTO> selectByName(@NotNull PerformanceConfigDTO dto);
@ApiMethod("查询提成方案详情")
@ApiParam(name = "dto", notes = "提成方案信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<PerformanceConfigDetailDTO> performanceConfigDetail(PerformanceConfigDTO dto);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
@ApiService(value = "提成方案规则", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceConfigRuleRemote {
RpcResponse<Boolean> performanceConfigRuleAdd(PerformanceConfigRuleDTO performanceConfigRule);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO;
import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import java.util.List;
@ApiService(value = "提成方案参数条件配置", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceParamConfigConditionRemote {
@ApiMethod("添加提成参数条件")
@ApiParam(name = "dto", notes = "dto", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("添加提成参数条件")
RpcResponse<Boolean> performanceParamConfigConditionAdd(List<PerformanceParamConfigConditionDTO> performanceParamConfigConditionDTOList);
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO;
import cn.com.glsx.framework.core.annotation.*;
@ApiService(value = "提成系统周期", owner = "zhangjb", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface PerformanceTimeCycleRemote {
@ApiMethod("当前工资提成系统周期管理")
@ApiParam(name = "dto", notes = "dto", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("当前工资提成系统周期")
PerformanceTimeCycleDTO getCurrPerformanceTimeCycle(PerformanceTimeCycleDTO dto);
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.model.PerformanceApproveConfig;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface PerformanceApproveConfigMapper extends OreMapper<PerformanceApproveConfig> {
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.dj.staff.model.PerformanceConfigApprove;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface PerformanceConfigApproveMapper extends OreMapper<PerformanceConfigApprove> {
List<PerformanceConfigApprovePageDTO> listPerformanceConfig(PerformanceConfigApprovePageDTO condition);
PerformanceConfigApproveDetailDTO getPerformanceConfigApproveDetail(PerformanceConfigApproveDTO dto);
PerformanceConfigApprovePermissionDTO getPerformanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto);
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.model.PerformanceConfigApproveOperationRecord;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface PerformanceConfigApproveOperationRecordMapper extends OreMapper<PerformanceConfigApproveOperationRecord> {
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.mapper; package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO;
import cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO;
import cn.com.glsx.dj.staff.model.PerformanceConfig; import cn.com.glsx.dj.staff.model.PerformanceConfig;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO; import java.util.List;
@Mapper @Mapper
public interface PerformanceConfigMapper extends OreMapper<PerformanceConfig> { public interface PerformanceConfigMapper extends OreMapper<PerformanceConfig> {
PerformanceConfigDTO selectEffectiveConfig(PerformanceConfigDTO dto); PerformanceConfigDTO selectEffectiveConfig(PerformanceConfigDTO dto);
PerformanceConfigDTO selectByName(PerformanceConfigDTO dto);
List<PerformanceConfigPageDTO> listPerformanceConfig(PerformanceConfigPageDTO dto);
PerformanceConfigDTO selectById(@Param("id") Integer id);
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.mapper; package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.model.PerformanceConfigMerchantBrandRef; import cn.com.glsx.dj.staff.model.PerformanceConfigMerchantBrandRef;
import org.mapstruct.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface PerformanceConfigMerchantBrandRefMapper extends OreMapper<PerformanceConfigMerchantBrandRef> { public interface PerformanceConfigMerchantBrandRefMapper extends OreMapper<PerformanceConfigMerchantBrandRef> {
} }
\ No newline at end of file \ No newline at end of file
...@@ -2,11 +2,15 @@ package cn.com.glsx.dj.staff.mapper; ...@@ -2,11 +2,15 @@ package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO; import cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO;
import cn.com.glsx.dj.staff.model.PerformanceParamConfigCondition; import cn.com.glsx.dj.staff.model.PerformanceParamConfigCondition;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List; import java.util.List;
@Mapper
public interface PerformanceParamConfigConditionMapper extends OreMapper<PerformanceParamConfigCondition> { public interface PerformanceParamConfigConditionMapper extends OreMapper<PerformanceParamConfigCondition> {
List<PerformanceParamConfigConditionDTO> listByParamConfigId( List<PerformanceParamConfigConditionDTO> listByParamConfigId(
PerformanceParamConfigConditionDTO dto); PerformanceParamConfigConditionDTO dto);
void deleteByPerformanceConfigId(@Param("performanceConfigId") Integer performanceConfigId);
} }
\ No newline at end of file \ No newline at end of file
...@@ -10,4 +10,6 @@ import java.util.List; ...@@ -10,4 +10,6 @@ import java.util.List;
@Mapper @Mapper
public interface PerformanceParamConfigMapper extends OreMapper<PerformanceParamConfig> { public interface PerformanceParamConfigMapper extends OreMapper<PerformanceParamConfig> {
List<PerformanceParamConfigDTO> listByConfigId(PerformanceParamConfigDTO dto); List<PerformanceParamConfigDTO> listByConfigId(PerformanceParamConfigDTO dto);
void deleteByPerformanceParamConfigId(Integer id);
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO;
import cn.com.glsx.dj.staff.model.PerformanceTimeCycle;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface PerformanceTimeCycleMapper extends OreMapper<PerformanceTimeCycle> {
PerformanceTimeCycleDTO selectCurrCycle();
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import java.util.Collections;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceApproveConfigRemoteImpl implements PerformanceApproveConfigRemote {
@Override
public List<PerformanceApproveConfigDTO> selectAll() {
return Collections.emptyList();
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigApproveOperationRecordRemoteImpl implements PerformanceConfigApproveOperationRecordRemote {
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceConfigApproveService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigApproveRemoteImpl implements PerformanceConfigApproveRemote {
@Autowired
private PerformanceConfigApproveService performanceConfigApproveService;
@Override
public RpcResponse<RpcPagination<PerformanceConfigApprovePageDTO>> performanceConfigApprovePage(RpcPagination<PerformanceConfigApprovePageDTO> pagination) {
pagination = RpcPagination.copyPage(performanceConfigApproveService.pagePerformanceConfigApprove(pagination));
return RpcResponse.success(pagination);
}
@Override
public RpcResponse<PerformanceConfigApproveDetailDTO> performanceConfigApproveDetail(PerformanceConfigApproveDTO dto) {
return RpcResponse.success(performanceConfigApproveService.getPerformanceConfigApproveDetail(dto));
}
@Override
public RpcResponse<PerformanceConfigApprovePermissionDTO> performanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto) {
return RpcResponse.success(performanceConfigApproveService.getPerformanceConfigApproveDetailAndPermission(dto));
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigMerchantBrandRefRemoteImpl implements PerformanceConfigMerchantBrandRefRemote {
@Override
public RpcResponse<Boolean> performanceConfigMerchantBrandRefAdd(List<PerformanceConfigMerchantBrandRefDTO> merchantBrandRefList) {
return null;
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceConfigParamConfigService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigParamConfigRemoteImpl implements PerformanceConfigParamConfigRemote {
@Autowired
private PerformanceConfigParamConfigService performanceConfigParamConfigService;
@Override
public RpcResponse<Boolean> performanceConfigParamConfigAdd(List<PerformanceParamConfigDTO> performanceParamConfigList) {
performanceConfigParamConfigService.insertList(performanceParamConfigList);
return RpcResponse.success(true);
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceConfigService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
@Autowired
private PerformanceConfigService performanceConfigService;
@Override
public RpcResponse<Boolean> performanceConfigAdd(PerformanceConfigDTO dto) {
return null;
}
@Override
public RpcResponse<Boolean> performanceConfigUpdate(PerformanceConfigDTO dto) {
return null;
}
@Override
public RpcResponse<RpcPagination<PerformanceConfigPageDTO>> performanceConfigPage(RpcPagination<PerformanceConfigPageDTO> pagination) {
pagination = RpcPagination.copyPage(performanceConfigService.pagePerformanceConfig(pagination));
return RpcResponse.success(pagination);
}
@Override
public RpcResponse<RpcPagination<PerformanceConfigPageByMerchantDTO>> performanceConfigPageByMerchant(RpcPagination<PerformanceConfigPageByMerchantDTO> pagination) {
return null;
}
@Override
public RpcResponse<PerformanceConfigDTO> selectByName(PerformanceConfigDTO dto) {
return RpcResponse.success(performanceConfigService.selectByName(dto));
}
@Override
public RpcResponse<PerformanceConfigDetailDTO> performanceConfigDetail(PerformanceConfigDTO dto) {
return RpcResponse.success(performanceConfigService.selectPerformanceConfigDetail(dto));
}
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceConfigRuleRemoteImpl implements PerformanceConfigRuleRemote {
@Override
public RpcResponse<Boolean> performanceConfigRuleAdd(PerformanceConfigRuleDTO performanceConfigRule) {
return null;
}
}
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceParamConfigConditionService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceParamConfigConditionRemoteImpl implements PerformanceParamConfigConditionRemote {
@Autowired
private PerformanceParamConfigConditionService performanceParamConfigConditionService;
@Override
public RpcResponse<Boolean> performanceParamConfigConditionAdd(List<PerformanceParamConfigConditionDTO> performanceParamConfigConditionDTOList) {
performanceParamConfigConditionService.insertList(performanceParamConfigConditionDTOList);
return RpcResponse.success(true);
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.remote.performance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO;
import cn.com.glsx.dj.staff.service.staffPerformance.PerformanceTimeCycleService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class PerformanceTimeCycleRemoteImpl implements PerformanceTimeCycleRemote {
@Autowired
private PerformanceTimeCycleService performanceTimeCycleService;
@Override
public PerformanceTimeCycleDTO getCurrPerformanceTimeCycle(PerformanceTimeCycleDTO dto) {
return performanceTimeCycleService.selectCurrCycle();
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import cn.com.glsx.dj.staff.dto.performance.*;
import cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveMapper;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
public class PerformanceConfigApproveService {
@Autowired
private PerformanceConfigApproveMapper performanceConfigApproveMapper;
@Autowired
private PerformanceConfigMerchantBrandRefService performanceConfigMerchantBrandRefService;
public Page<PerformanceConfigApprovePageDTO> pagePerformanceConfigApprove(RpcPagination<PerformanceConfigApprovePageDTO> pagination) {
try{
Page<PerformanceConfigApprovePageDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(),pagination.isNeedCount());
performanceConfigApproveMapper.listPerformanceConfig(pagination.getCondition());
return page;
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR);
}
}
public PerformanceConfigApproveDetailDTO getPerformanceConfigApproveDetail(PerformanceConfigApproveDTO dto) {
PerformanceConfigApproveDetailDTO performanceConfigApproveDetail = performanceConfigApproveMapper.getPerformanceConfigApproveDetail(dto);
if (performanceConfigApproveDetail == null) {
return null;
}
List<PerformanceConfigMerchantBrandRefDTO> performanceConfigMerchantBrandRefDTOS = performanceConfigMerchantBrandRefService.listByConfigId(performanceConfigApproveDetail.getPerformanceConfigId());
performanceConfigApproveDetail.setMerchantBrandRefList(performanceConfigMerchantBrandRefDTOS);
return performanceConfigApproveDetail;
}
public PerformanceConfigApprovePermissionDTO getPerformanceConfigApproveDetailAndPermission(PerformanceConfigApproveDTO dto) {
return performanceConfigApproveMapper.getPerformanceConfigApproveDetailAndPermission(dto);
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceConfigMerchantBrandRefMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*
*
* @time 2026-01-15 20:28
*/
@Slf4j
@Service
public class PerformanceConfigMerchantBrandRefService {
@Autowired
private PerformanceConfigMerchantBrandRefMapper performanceConfigMerchantBrandRefMapper;
public List<PerformanceConfigMerchantBrandRefDTO> listByConfigId(Integer id) {
return null;
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceParamConfigMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
public class PerformanceConfigParamConfigService {
@Autowired
private PerformanceParamConfigMapper performanceParamConfigMapper;
public void insertList(List<PerformanceParamConfigDTO> performanceParamConfigList) {
// 1 先删掉逻辑删除久的配置
performanceParamConfigMapper.deleteByPerformanceParamConfigId(performanceParamConfigList.get(0).getId());
// 2 插入新的配置
performanceParamConfigMapper.insertList(performanceParamConfigList);
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceConfigRuleMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
*
*
* @time 2026-01-15 20:27
*/
@Slf4j
@Service
public class PerformanceConfigRuleService {
@Autowired
private PerformanceConfigRuleMapper performanceConfigRuleMapper;
public PerformanceConfigRuleDTO listByConfigId(Integer id) {
return null;
}
}
package cn.com.glsx.dj.staff.service.staffPerformance; package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceConfigDTO; import cn.com.glsx.dj.staff.dto.*;
import cn.com.glsx.dj.staff.dto.performance.PerformanceConfigDetailDTO;
import cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceConfigMapper; import cn.com.glsx.dj.staff.mapper.PerformanceConfigMapper;
import cn.com.glsx.dj.staff.model.PerformanceConfig;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO;
import java.util.List; import java.util.List;
/** /**
...@@ -22,6 +29,14 @@ public class PerformanceConfigService { ...@@ -22,6 +29,14 @@ public class PerformanceConfigService {
@Autowired @Autowired
private PerformanceParamConfigService performanceParamConfigService; private PerformanceParamConfigService performanceParamConfigService;
@Autowired
private PerformanceConfigRuleService performanceConfigRuleService;
@Autowired
private PerformanceConfigMerchantBrandRefService performanceConfigMerchantBrandRefService;
/** /**
* 查找门店 业务场景 品牌生效的提成配置 * 查找门店 业务场景 品牌生效的提成配置
* *
...@@ -50,4 +65,49 @@ public class PerformanceConfigService { ...@@ -50,4 +65,49 @@ public class PerformanceConfigService {
// 3. 返回PerformanceConfigDTO // 3. 返回PerformanceConfigDTO
return result; return result;
} }
public PerformanceConfigDTO selectByName(PerformanceConfigDTO dto) {
return performanceConfigMapper.selectByName(dto);
}
public Page<PerformanceConfigPageDTO> pagePerformanceConfig(RpcPagination<PerformanceConfigPageDTO> pagination) {
try{
Page<PerformanceConfigPageDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(),pagination.isNeedCount());
performanceConfigMapper.listPerformanceConfig(pagination.getCondition());
return page;
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR);
}
}
/**
* 查询提成方案详情
*/
public PerformanceConfigDetailDTO selectPerformanceConfigDetail(PerformanceConfigDTO dto) {
PerformanceConfig config = performanceConfigMapper.selectById(dto.getId());
if (config == null) {
return null;
}
PerformanceConfigDetailDTO result = PerformanceConfigDetailDTO.builder()
.id(config.getId())
.schemeName(config.getSchemeName())
.schemeType(config.getSchemeType())
.businessType(config.getBusinessType())
.effectiveMonth(config.getEffectiveMonth())
.build();
// 查询rule
PerformanceConfigRuleDTO ruleDTO = performanceConfigRuleService
.listByConfigId(dto.getId());
result.setPerformanceConfigRule(ruleDTO);
// 查询参数配置
List<PerformanceParamConfigDTO> performanceParamConfigs = performanceParamConfigService
.listByConfigId(result.getId());
result.setParamConfigList(performanceParamConfigs);
// 查询商户品牌
List<PerformanceConfigMerchantBrandRefDTO> merchantBrandRefs = performanceConfigMerchantBrandRefService
.listByConfigId(result.getId());
result.setMerchantBrandRefList(merchantBrandRefs);
return result;
}
} }
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceParamConfigConditionMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
public class PerformanceParamConfigConditionService {
@Autowired
private PerformanceParamConfigConditionMapper performanceParamConfigConditionMapper;
public void insertList(List<PerformanceParamConfigConditionDTO> performanceParamConfigConditionDTOList) {
// 1 把物理删除久的condition
performanceParamConfigConditionMapper.deleteByPerformanceConfigId(performanceParamConfigConditionDTOList.get(0).getPerformanceConfigId());
// 2 插入新的condition
performanceParamConfigConditionMapper.insertList(performanceParamConfigConditionDTOList);
}
}
package cn.com.glsx.dj.staff.service.staffPerformance;
import cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO;
import cn.com.glsx.dj.staff.mapper.PerformanceTimeCycleMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class PerformanceTimeCycleService {
@Autowired
private PerformanceTimeCycleMapper performanceTimeCycleMapper;
/**
* 获取当前提成周期
*
* @return PerformanceTimeCycleDTO
*/
public PerformanceTimeCycleDTO selectCurrCycle() {
return performanceTimeCycleMapper.selectCurrCycle();
}
}
<?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="cn.com.glsx.dj.staff.mapper.PerformanceApproveConfigMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.PerformanceApproveConfig" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="approver_name" property="approverName" jdbcType="VARCHAR" />
<result column="approver_mobile" property="approverMobile" jdbcType="VARCHAR" />
<result column="approver_type" property="approverType" jdbcType="TINYINT" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
id, approver_name, approver_mobile, approver_type,
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</mapper>
\ No newline at end of file \ No newline at end of file
<?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="cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.PerformanceConfigApprove" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="performance_config_id" property="performanceConfigId" jdbcType="INTEGER" />
<result column="approve_remark" property="approveRemark" jdbcType="VARCHAR" />
<result column="approve_attachments" property="approveAttachments" jdbcType="VARCHAR" />
<result column="attachment_imgs" property="attachmentImgs" jdbcType="VARCHAR" />
<result column="submit_username" property="submitUsername" jdbcType="VARCHAR" />
<result column="approve_status" property="approveStatus" jdbcType="TINYINT" />
<result column="merchant_names" property="merchantNames" jdbcType="VARCHAR" />
<result column="brands_names" property="brandsNames" jdbcType="VARCHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO" extends="BaseResultMap">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="performance_config_id" property="performanceConfigId" jdbcType="INTEGER" />
<result column="approve_remark" property="approveRemark" jdbcType="VARCHAR" />
<result column="approve_attachments" property="approveAttachments" jdbcType="VARCHAR" />
<result column="attachment_imgs" property="attachmentImgs" jdbcType="VARCHAR" />
<result column="submit_username" property="submitUsername" jdbcType="VARCHAR" />
<result column="approve_status" property="approveStatus" jdbcType="TINYINT" />
<result column="merchant_names" property="merchantNames" jdbcType="VARCHAR" />
<result column="brands_names" property="brandsNames" jdbcType="VARCHAR" />
</resultMap>
<!-- 分页DTO结果映射:联表后完整匹配所有字段 -->
<resultMap id="PageDTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO">
<id column="a_id" property="id" jdbcType="INTEGER" />
<result column="c_scheme_name" property="schemeName" jdbcType="VARCHAR" />
<result column="c_business_type" property="businessType" jdbcType="TINYINT" />
<result column="c_effective_month" property="effectiveMonth" jdbcType="VARCHAR" />
<result column="c_status" property="status" jdbcType="TINYINT" />
<result column="a_merchant_names" property="merchantNames" jdbcType="VARCHAR" />
<result column="a_brands_names" property="brandsNames" jdbcType="VARCHAR" />
<result column="a_created_date" property="submitDate" jdbcType="TIMESTAMP" />
<result column="a_updated_date" property="approveDate" jdbcType="TIMESTAMP" />
</resultMap>
<resultMap id="ApproveDetailResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDetailDTO">
<id column="a_id" property="id" jdbcType="INTEGER" />
<result column="a_performance_config_id" property="performanceConfigId" jdbcType="INTEGER" /> <!-- 新增的方案ID -->
<result column="c_scheme_name" property="schemeName" jdbcType="VARCHAR" />
<result column="c_scheme_type" property="schemeType" jdbcType="TINYINT" />
<result column="c_effective_month" property="effectiveMonth" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="ApprovePermissionResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePermissionDTO">
<id column="a_id" property="id" jdbcType="INTEGER" />
<result column="a_performance_config_id" property="performanceConfigId" jdbcType="INTEGER" />
<result column="a_approve_remark" property="approveRemark" jdbcType="VARCHAR" />
<result column="a_approve_attachments" property="approveAttachments" jdbcType="VARCHAR" />
<result column="a_attachment_imgs" property="attachmentImgs" jdbcType="VARCHAR" />
<result column="a_submit_username" property="submitUsername" jdbcType="VARCHAR" />
<result column="a_approve_status" property="approveStatus" jdbcType="TINYINT" />
<result column="a_merchant_names" property="merchantNames" jdbcType="VARCHAR" />
<result column="a_brands_names" property="brandsNames" jdbcType="VARCHAR" />
<!-- 权限字段:1=查阅人/2=审批人/0=无权限 -->
<result column="approve_permission" property="approvePermission" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, performance_config_id, approve_remark, approve_attachments, attachment_imgs, submit_username,
approve_status, merchant_names, brands_names, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<!-- 联表查询:审批主表 + 提成方案配置表 -->
<select id="listPerformanceConfig" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO" resultMap="PageDTOResultMap">
SELECT
a.id AS a_id,
c.scheme_name AS c_scheme_name,
c.business_typeG AS c_business_type,
c.effective_month AS c_effective_month,
c.status AS c_status,
a.merchant_names AS a_merchant_names,
a.brands_names AS a_brands_names,
a.created_date AS a_created_date,
a.updated_date AS a_updated_date
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c
ON a.performance_config_id = c.id
AND c.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
ORDER BY
a.created_date DESC
</select>
<select id="getPerformanceConfigApproveDetail" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO" resultMap="ApproveDetailResultMap">
SELECT
a.id AS a_id,
a.performance_config_id AS a_performance_config_id,
c.scheme_name AS c_scheme_name,
c.scheme_type AS c_scheme_type,
c.effective_month AS c_effective_month
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c
ON a.performance_config_id = c.id
AND c.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
<if test="id != null">
AND a.id = #{id}
</if>
LIMIT 1
</select>
<select id="getPerformanceConfigApproveDetailAndPermission"
parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
resultMap="ApprovePermissionResultMap">
SELECT
a.id AS a_id,
a.performance_config_id AS a_performance_config_id,
a.approve_remark AS a_approve_remark,
a.approve_attachments AS a_approve_attachments,
a.attachment_imgs AS a_attachment_imgs,
a.submit_username AS a_submit_username,
a.approve_status AS a_approve_status,
a.merchant_names AS a_merchant_names,
a.brands_names AS a_brands_names,
CASE
WHEN ac.approver_type IS NOT NULL THEN CAST(ac.approver_type AS CHAR)
ELSE '0'
END AS approve_permission
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_approve_config ac
ON a.performance_config_id = ac.performance_config_id
AND ac.approver_mobile = #{mobile}
AND ac.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
AND a.id = #{id}
LIMIT 1
</select>
</mapper>
\ No newline at end of file \ No newline at end of file
<?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="cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveOperationRecordMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.PerformanceConfigApproveOperationRecord" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="performance_config_approve_id" property="performanceConfigApproveId" jdbcType="INTEGER" />
<result column="approve_status" property="approveStatus" jdbcType="TINYINT" />
<result column="approve_time" property="approveTime" jdbcType="TIMESTAMP" />
<result column="approve_opinion" property="approveOpinion" jdbcType="VARCHAR" />
<result column="approver_name" property="approverName" jdbcType="VARCHAR" />
<result column="approver_mobile" property="approverMobile" jdbcType="VARCHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveOperationRecordDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
id, performance_config_approve_id, approve_status, approve_time, approve_opinion, approver_name,
approver_mobile, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</mapper>
\ No newline at end of file \ No newline at end of file
...@@ -47,4 +47,58 @@ ...@@ -47,4 +47,58 @@
AND r.child_id = #{childBrandId} AND r.child_id = #{childBrandId}
LIMIT 1 LIMIT 1
</select> </select>
<select id="selectByName" parameterType="cn.com.glsx.dj.staff.dto.PerformanceConfigDTO" resultMap="DTOResultMap">
SELECT
c.*
FROM
dj_car_life_performance_config c
WHERE
c.deleted_flag = 'N'
AND c.status = 2
AND r.scheme_name = #{schemeName}
LIMIT 1
</select>
<select id="listPerformanceConfig" parameterType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO" resultType="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO">
SELECT
c.id,
c.scheme_name as schemeName,
c.business_type as businessType,
c.status,
c.effective_month as effectiveMonth,
c.updated_date as updatedDate,
IFNULL(COUNT(DISTINCT r.merchant_id), 0) as applicationQuantity
FROM
dj_car_life_performance_config c
LEFT JOIN dj_car_life_performance_config_merchant_brand_ref r
ON c.id = r.performance_config_id
AND r.deleted_flag = 'N'
WHERE
c.deleted_flag = 'N'
GROUP BY
c.id,
c.scheme_name,
c.business_type,
c.status,
c.effective_month,
c.updated_date
ORDER BY
c.updated_date DESC
</select>
<!-- 根据ID查询提成方案配置(未删除) -->
<select id="selectById"
parameterType="java.lang.Integer"
resultMap="DTOResultMap">
SELECT
c.*
FROM
dj_car_life_performance_config c
WHERE
c.deleted_flag = 'N'
AND c.id = #{id}
LIMIT 1
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -52,6 +52,18 @@ ...@@ -52,6 +52,18 @@
condition_end_value, condition_commission_base, condition_commission_type, condition_commission_type_value, condition_end_value, condition_commission_base, condition_commission_type, condition_commission_type_value,
created_by, created_date, updated_by, updated_date, deleted_flag created_by, created_date, updated_by, updated_date, deleted_flag
</sql> </sql>
<update id="deleteByPerformanceConfigId" parameterType="java.lang.Integer">
UPDATE dj_car_life_performance_param_config_condition cond
INNER JOIN dj_car_life_performance_param_config param
ON cond.performance_param_config_id = param.id
AND param.deleted_flag = 'N'
SET
cond.deleted_flag = 'D',
cond.updated_date = NOW()
WHERE
param.performance_config_id = #{performanceConfigId}
AND cond.deleted_flag = 'N'
</update>
<select id="listByParamConfigId" resultMap="DTOResultMap"> <select id="listByParamConfigId" resultMap="DTOResultMap">
SELECT SELECT
......
...@@ -93,4 +93,13 @@ ...@@ -93,4 +93,13 @@
c.deleted_flag = 'N' c.deleted_flag = 'N'
AND c.performance_config_id = #{performanceConfigId} AND c.performance_config_id = #{performanceConfigId}
</select> </select>
<update id="deleteByPerformanceParamConfigId" parameterType="java.lang.Integer">
UPDATE dj_car_life_performance_param_config
SET
deleted_flag = 'D',
updated_date = NOW()
WHERE
deleted_flag = 'N'
AND performance_config_id = #{id}
</update>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
<?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="cn.com.glsx.dj.staff.mapper.PerformanceTimeCycleMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.PerformanceTimeCycle" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="BIGINT" />
<result column="cycle_name" property="cycleName" jdbcType="VARCHAR" />
<result column="cycle_item" property="cycleItem" jdbcType="VARCHAR" />
<result column="start_date" property="startDate" jdbcType="TIMESTAMP" />
<result column="end_date" property="endDate" jdbcType="TIMESTAMP" />
<result column="enable_flag" property="enableFlag" jdbcType="CHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, cycle_name, cycle_item, start_date, end_date, enable_flag,
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<select id="selectCurrCycle" resultMap="DTOResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
dj_car_life_performance_time_cycle
WHERE
deleted_flag = 'N'
AND enable_flag = 'Y'
AND NOW() BETWEEN start_date AND end_date
LIMIT 1
</select>
</mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!