svn to git

0 parents
Showing 111 changed files with 4727 additions and 0 deletions
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.com.glsx.framework</groupId>
<artifactId>framework-rpc-api</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-business-school-api</artifactId>
<version>4.51.1-SNAPSHOT</version>
<name>rpc-dj-business-school-api</name>
<properties>
<deploy.scanPackage>cn.com.glsx.dj.remote</deploy.scanPackage>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>cn.com.glsx.framework</groupId>
<artifactId>rpc-api-deploy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-business-school-api</artifactId>
<version>4.51.1-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package cn.com.glsx.dj.businessschool.dto;
import java.io.Serializable;
/**
* @Title: DemoDTO.java
* @Description:
* @author ${userName}
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@SuppressWarnings("serial")
public class DemoDTO implements Serializable{
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package cn.com.glsx.dj.businessschool.dto;
import cn.com.glsx.dj.businessschool.model.MentorPerformanceConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceBonusConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceInfo;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceRelation;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import java.util.List;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
public class MentorPerformanceConfigDTO extends MentorPerformanceConfig {
private String staffName;
private String phoneNumber;
private Integer merchantId;
private String merchantName;
private List<StaffPerformanceInfoDTO> studentStaffs;
@ApiModelProperty(notes="徒弟员工uuid列表")
private List<String> studentStaffUuids;
@ApiModelProperty(notes="导师附加提成配置")
private List<StaffPerformanceBonusConfig> tutorBonusConfigs;
private List<StaffPerformanceRelation> staffPerformanceRelations;
private List<Integer> merchantIds;
private Integer oldId;
}
package cn.com.glsx.dj.businessschool.dto;
import cn.com.glsx.dj.businessschool.model.StaffOrderPerformanceDetail;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
/**
* @Author: chenx
* @Description: 员工订单绩效明细dto
* @Date: 2024/1/3 10:09
* @Version: 1.0
*/
@Data
@ToString(callSuper = true)
public class StaffOrderPerformanceDetailDTO extends StaffOrderPerformanceDetail{
/**
*
*/
private static final long serialVersionUID = 209401550499696317L;
private String startPaySuccessTime;
private String endPaySuccessTime;
private String mentorOrStudentStaffUuid;
@ApiModelProperty(notes = "导师姓名")
private String mentorStaffName;
@ApiModelProperty(notes = "分组类型 1 员工ID")
private Integer groupByType;
}
package cn.com.glsx.dj.businessschool.dto;
import java.io.Serializable;
import java.math.BigDecimal;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
@Data
@ToString
public class StaffOrderPerformanceTotalDTO implements Serializable{
/**
*
*/
private static final long serialVersionUID = 8134055194758907066L;
private String staffUuid;
@ApiModelProperty(notes = "订单产值")
private BigDecimal orderMoney;
@ApiModelProperty(notes = "提成奖励")
private BigDecimal orderBonus;
@ApiModelProperty(notes = "导师奖励")
private BigDecimal mentorBonus;
@ApiModelProperty(notes = "订单数")
private Integer orderCount;
}
package cn.com.glsx.dj.businessschool.dto;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceBonusConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceRelation;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import java.util.List;
/**
* @Author: chenx
* @Description: 员工绩效配置DTO
* @Date: 2024/1/3 13:50
* @Version: 1.0
*/
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
public class StaffPerformanceConfigDTO extends StaffPerformanceConfig {
@ApiModelProperty(notes = "员工绩效奖励配置值")
private List<StaffPerformanceBonusConfig> bonusConfigList;
@ApiModelProperty(notes = "员工信息")
private StaffPerformanceInfoDTO staffPerformanceInfo;
private List<MentorPerformanceConfigDTO> mentorPerformanceConfigList;
/**
* 员工作为导师身份关联的学员
*/
private List<StaffPerformanceRelation> staffPerformanceRelationList;
@ApiModelProperty(notes = "服务商商户号")
private Integer partnerMerchantId;
@ApiModelProperty(notes = "服务商商户名称")
private String partnerMerchantName;
/** ------------- 参数 ----------- **/
private List<String> staffUuidList;
}
package cn.com.glsx.dj.businessschool.dto;
import cn.com.glsx.dj.businessschool.model.MentorPerformanceConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceBonusConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceInfo;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceRelation;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import java.util.Date;
import java.util.List;
/**
* @Author: chenx
* @Description: 员工信息DTO
* @Date: 2024/1/3 17:25
* @Version: 1.0
*/
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
public class StaffPerformanceInfoDTO extends StaffPerformanceInfo{
private static final long serialVersionUID = -3462857060007496771L;
private List<StaffPerformanceConfig> staffPerformanceConfigList;
private List<MentorPerformanceConfig> mentorPerformanceConfigList;
private List<StaffPerformanceRelation> relationList;
private List<StaffPerformanceBonusConfig> staffPerformanceBonusConfigList;
private List<String> staffUuids;
/**
* 场景值
*/
private Byte sceneType;
/**
* 员工开通场景值
*/
private Integer staffSceneType;
@ApiModelProperty(notes = "学员导师关联时间")
private Date refTime;
/**
* 查询参数绩效配置4s店商户号
*/
private Integer shopMerchantId;
}
package cn.com.glsx.dj.businessschool.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @Author: chenx
* @Description:
* @Date: 2024/1/3 17:14
* @Version: 1.0
*/
public class StaffPerformancePageDTO implements Serializable {
private static final long serialVersionUID = -2296407500317912143L;
@ApiModelProperty(notes = "员工所在商户号")
private Integer merchantNo;
@ApiModelProperty(notes = "员工所在商户名")
private String merchantName;
@ApiModelProperty(notes = "员工名")
private String staffName;
@ApiModelProperty(notes = "员工手机号")
private String staffPhone;
@ApiModelProperty(notes = "员工uuid")
private String staffUuid;
@ApiModelProperty(example = "创建日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String createdDate;
}
package cn.com.glsx.dj.businessschool.dto;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceRelation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
public class StaffPerformanceRelationDTO extends StaffPerformanceRelation {
/**
*
*/
private static final long serialVersionUID = 8521318121441402030L;
private StaffPerformanceInfoDTO studentPerformanceInfo;
private StaffPerformanceInfoDTO mentorPerformanceInfo;
private Byte sceneType;
}
package cn.com.glsx.dj.businessschool.dto;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceResultSnapshot;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
public class StaffPerformanceResultSnapshotDTO extends StaffPerformanceResultSnapshot {
/**
*
*/
private static final long serialVersionUID = 3724887555025269414L;
@ApiModelProperty(notes = "绩效月份-开始月份(仅用于查询,含当前月份)")
private String performanceMonthStart;
@ApiModelProperty(notes = "绩效月份-结束月份(仅用于查询,含当前月份)")
private String performanceMonthEnd;
private MentorPerformanceConfigDTO mentorPerformanceConfig;
private StaffPerformanceConfigDTO staffPerformanceConfig;
@ApiModelProperty(notes="园区店商户号")
private List<Integer> yqMerchantIds;
private Boolean hasOrder;
@ApiModelProperty(notes = "升级订单数(含自身及学员)")
private Integer upgradeOrderCountAll;
@ApiModelProperty(notes = "订单产值(含自身及学员)")
private BigDecimal orderMoneyTotalAll;
/**
* 员工创建日期
*/
private Date accountCreatedDate;
}
package cn.com.glsx.dj.businessschool.dto;
import cn.com.glsx.dj.businessschool.model.TeachTaskAreaOperator;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import java.io.Serializable;
/**
* @ClassName TeachTaskAreaOperatorDTO
* @Description 带教任务区域运营人员
* @Author lqWang
* @Date 2025/3/31 15:29
*/
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
public class TeachTaskAreaOperatorDTO extends TeachTaskAreaOperator{
private static final long serialVersionUID = -1554297417940728062L;
}
package cn.com.glsx.dj.businessschool.dto;
import cn.com.glsx.dj.businessschool.model.TeachTaskRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @ClassName TeachTaskRecordDTO
* @Description 带教任务记录DTO
* @Author lqWang
* @Date 2025/3/31 15:35
*/
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
public class TeachTaskRecordDTO extends TeachTaskRecord implements Serializable {
private static final long serialVersionUID = 6677289825846340290L;
@ApiModelProperty(notes = "带教任务门店区域运营人员list")
private List<TeachTaskAreaOperatorDTO> teachTaskAreaOperatorList;
@ApiModelProperty(notes = "区域运营人员拼接")
private String areaOperators;
@ApiModelProperty(notes = "飞行督导(姓名+号码)")
private String flightSupervisor;
@ApiModelProperty(notes = "带教开始时间")
private String teachStartTimeStr;
@ApiModelProperty(notes = "带教结束时间")
private String teachEndTimeStr;
@ApiModelProperty(notes = "带教结束时间")
private String createdDateStr;
@ApiModelProperty(notes = "带教任务进行中数量")
private Integer underWayNum;
@ApiModelProperty(notes = "带教任务已结束数量")
private Integer finishedNum;
@ApiModelProperty(notes = "带教任务待接受数量")
private Integer toBeAcceptedNum;
@ApiModelProperty(notes = "带教任务数量")
private Integer taskNum;
@ApiModelProperty(notes = "任务状态(0:待接受,1:进行中,2:已结束)")
private Byte taskStatus;
@ApiModelProperty(notes = "销售类型拼接")
private String saleTypeStr;
/**
* 入参
*/
/*@ApiModelProperty(notes = "带教门店信息")
private TeachTaskAreaOperatorDTO teachTaskAreaOperator;*/
@ApiModelProperty(notes = "创建开始时间")
private Date createStartTime;
@ApiModelProperty(notes = "创建结束时间")
private Date createEndTime;
@ApiModelProperty(notes = "督导手机号码")
private String supervisorPhone;
@ApiModelProperty(notes = "飞行督导uuid")
private String flightSupervisorUuid;
@ApiModelProperty(notes = "带教任务id")
private Integer teachTaskRecordId;
@ApiModelProperty(notes = "任务创建人姓名")
private String createdName;
}
package cn.com.glsx.dj.businessschool.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @ClassName TeachTaskWechatMessageDTO
* @Description 带教任务企微推送
* @Author lqWang
* @Date 2025/4/5 9:54
*/
@Data
@Builder
public class TeachTaskWechatMessageDTO implements Serializable {
private static final long serialVersionUID = 10707286819104291L;
@ApiModelProperty(notes = "门店id")
private Integer merchantId;
@ApiModelProperty(notes = "门店名称")
private String merchantName;
@ApiModelProperty(notes = "支援类型(0:新店启动,1:老店业绩提升-渗透率过低,2:老店业绩提升-客单价过低)")
private String supportTypeStr;
@ApiModelProperty(notes = "提交人")
private String createdBy;
@ApiModelProperty(notes = "创建时间(年月日)")
private String createdDateStr;
}
package cn.com.glsx.dj.businessschool.enums;
import org.apache.commons.lang3.StringUtils;
import java.util.Objects;
/**
* @Author: chenx
* @Description: 通用枚举类
* @Date: 2024/1/5 11:42
* @Version: 1.0
*/
public class BusinessSchoolEnum {
public enum Flag {
Y("Y","是"),
N("N", "否");
private String value;
private String displayName;
Flag(String value, String displayName){
this.value = value;
this.displayName = displayName;
}
public static Flag getByDisplayName(String name){
for (Flag tmp:Flag.values()){
if (tmp.getDisplayName().equals(name)) {
return tmp;
}
}
return null;
}
public static Flag getByName(String name){
for (Flag tmp:Flag.values()){
if (tmp.name().equals(name)) {
return tmp;
}
}
return null;
}
public static Flag getByValue(String value){
if (StringUtils.isNotBlank(value)) {
for (Flag tmp:Flag.values()){
if (tmp.getValue().equals(value)) {
return tmp;
}
}
}
return null;
}
public String getValue() {
return value;
}
public String getDisplayName() {
return displayName;
}
}
public enum YesNo {
NO((byte)0,"否"),
YES((byte)1, "是");
private Byte value;
private String name;
YesNo(Byte value, String name){
this.value = value;
this.name = name;
}
public static YesNo getByName(String name){
for (YesNo tmp:YesNo.values()){
if (tmp.getName().equals(name)) {
return tmp;
}
}
return null;
}
public static YesNo getByValue(String value){
if (StringUtils.isNotBlank(value)) {
for (YesNo tmp:YesNo.values()){
if (tmp.getValue().equals(value)) {
return tmp;
}
}
}
return null;
}
public Byte getValue() {
return value;
}
public String getName() {
return name;
}
}
public enum UpgradeFlag {
NO( "N","战败"),
YES("Y", "升级");
private String value;
private String name;
UpgradeFlag(String value, String name){
this.value = value;
this.name = name;
}
public static UpgradeFlag getByName(String name){
for (UpgradeFlag tmp:UpgradeFlag.values()){
if (tmp.getName().equals(name)) {
return tmp;
}
}
return null;
}
public static UpgradeFlag getByValue(String value){
if (StringUtils.isNotBlank(value)) {
for (UpgradeFlag tmp:UpgradeFlag.values()){
if (tmp.getValue().equals(value)) {
return tmp;
}
}
}
return null;
}
public String getValue() {
return value;
}
public String getName() {
return name;
}
}
public enum EmployeePerformanceBonusTypeEnum {
/** 高产值奖励 **/
OUTPUT_BONUS((byte)0, "高产值奖励"),
/**成交率系数*/
UPGRADE_RATE_BONUS((byte)1, "成交率系数"),
/** 均客单系数**/
AVERAGE_PRICE_BONUS((byte)2, "均客单系数"),
/** 导师奖励 **/
MENTOR_BONUS((byte)3, "导师奖励");
private final byte value;
private final String name;
EmployeePerformanceBonusTypeEnum(byte value, String name){
this.value = value;
this.name = name;
}
public byte getValue(){
return value;
}
public String getName(){
return name;
}
public static EmployeePerformanceBonusTypeEnum getByValue(Byte value){
if(value == null){
return null;
}
for(EmployeePerformanceBonusTypeEnum s: EmployeePerformanceBonusTypeEnum.values()){
if(s.getValue() == value){
return s;
}
}
return null;
}
}
public enum StaffTitleEnum {
/** 初级驻店零售 **/
JUNIOR_STAFF((byte)0, "初级驻店零售"),
/** 中级导师 **/
JUNIOR_MENTOR((byte)1, "中级导师"),
/** 高级导师 **/
SENIOR_MENTOR((byte)2, "高级导师");
private final byte value;
private final String name;
StaffTitleEnum(byte value, String name){
this.value = value;
this.name = name;
}
public byte getValue(){
return value;
}
public String getName(){
return name;
}
public static StaffTitleEnum getByValue(Byte value){
if(value == null){
return null;
}
for(StaffTitleEnum s: StaffTitleEnum.values()){
if(s.getValue() == value){
return s;
}
}
return null;
}
public static StaffTitleEnum getByName(String name){
if(StringUtils.isBlank(name)){
return null;
}
for(StaffTitleEnum s: StaffTitleEnum.values()){
if(Objects.equals(name, s.getName())){
return s;
}
}
return null;
}
}
/**
* 员工类型枚举
*/
public enum StaffTypeEnum {
/** 驻店 **/
STAFF_TYPE((byte)0);
private final byte value;
StaffTypeEnum(byte value){
this.value = value;
}
public byte getValue(){
return value;
}
public static StaffTypeEnum getByValue(Byte value){
if(value == null){
return null;
}
for(StaffTypeEnum s: StaffTypeEnum.values()){
if(s.getValue() == value){
return s;
}
}
return null;
}
}
}
package cn.com.glsx.dj.businessschool.enums;
import cn.com.glsx.framework.core.enums.ErrorEnum;
import java.util.HashMap;
import java.util.Map;
public enum RpcErrorEnum implements ErrorEnum {
FLOW_DEAL_ERROR("30990501", "流程处理失败"),
DATA_INVALID_WITH_SPECIFIC_MSG("30990502", "数据无效");
private String value;
private String displayName;
static Map<String, RpcErrorEnum> enumMap = new HashMap();
private RpcErrorEnum(String value, String displayName) {
this.value = value;
this.displayName = displayName;
}
public String getValue() {
return this.value;
}
public String getDisplayName() {
return this.displayName;
}
public static RpcErrorEnum getEnum(String value) {
return (RpcErrorEnum)enumMap.get(value);
}
public String toString() {
return this.name().concat("[value:").concat(this.getValue()).concat(", displayName:").concat(this.getDisplayName()).concat("]");
}
static {
RpcErrorEnum[] var0 = values();
int var1 = var0.length;
for(int var2 = 0; var2 < var1; ++var2) {
RpcErrorEnum code = var0[var2];
enumMap.put(code.getValue(), code);
}
}
}
package cn.com.glsx.dj.businessschool.enums;
/**
* @description: 支援类型枚举
* @author: lqWang
* @date: 2025/4/5 10:14
*/
public enum SupportTypeEnum {
NEW_STORE_LAUNCH ((byte)0,"新店启动"),
OLD_STORE_RATE_LOW((byte)1,"老店业绩提升-渗透率过低"),
OLD_STORE_PRICE_LOW((byte)2,"老店业绩提升-客单价过低");
private final Byte value;
private final String name;
SupportTypeEnum(byte value, String name){
this.value = value;
this.name = name;
}
public byte getValue() {
return value;
}
public String getName() {
return name;
}
public static SupportTypeEnum getName(byte value) {
for (SupportTypeEnum type : SupportTypeEnum.values()) {
if (type.getValue() == value) {
return type;
}
}
return null;
}
}
package cn.com.glsx.dj.businessschool.enums;
/**
* @description: 带教任务状态枚举
* @author: lqWang
* @date: 2025/3/31 16:08
*/
public enum TaskStatusEnum {
TO_BE_ACCEPTED((byte)0,"待接受"),
UNDER_WAY((byte)1,"进行中"),
FINISHED((byte)2,"已结束");
private final Byte value;
private final String name;
TaskStatusEnum(byte value, String name){
this.value = value;
this.name = name;
}
public byte getValue() {
return value;
}
public String getName() {
return name;
}
}
package cn.com.glsx.dj.businessschool.enums;
\ No newline at end of file
package cn.com.glsx.dj.businessschool.model;
import java.io.Serializable;
/**
* @Title: DemoModel.java
* @Description:
* @author ${userName}
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@SuppressWarnings("serial")
public class DemoModel implements Serializable{
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package cn.com.glsx.dj.businessschool.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_mentor_performance_config")
public class MentorPerformanceConfig implements Serializable {
private static final long serialVersionUID = 4254806633001801515L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 员工uuid
*/
@Column(name = "staff_uuid")
private String staffUuid;
/**
* 场景类型 0-会员/权益升级 1-精品升级 2-次新车转化 3-售后众筹 4-积分商城
*/
@Column(name = "scene_type")
private Byte sceneType;
/**
* 员工职级 0-初级驻店 1-中级导师 2-高级导师
*/
@Column(name = "title")
private Byte title;
/**
* 4s店商户号
*/
@ApiModelProperty(notes = "4s店商户号")
@Column(name = "shop_merchant_id")
private Integer shopMerchantId;
/**
* 4s店名称
*/
@ApiModelProperty(notes = "4s店商户名")
@Column(name = "shop_merchant_name")
private String shopMerchantName;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_staff_order_performance_detail")
public class StaffOrderPerformanceDetail implements Serializable {
private static final long serialVersionUID = 5615584269658058399L;
/**
* 主键ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 订单编号
*/
@ApiModelProperty(notes = "订单编号")
@Column(name = "order_code")
private String orderCode;
/**
* 场景类型 0-会员/权益升级 1-精品升级 2-次新车转化 3-售后众筹 4-积分商城
*/
@Column(name = "scene_type")
private Byte sceneType;
/**
* 导师uuid
*/
@Column(name = "mentor_staff_uuid")
private String mentorStaffUuid;
/**
* 员工uuid
*/
@Column(name = "staff_uuid")
private String staffUuid;
/**
* 导师员工关联时间
*/
@Column(name = "mentor_staff_related_date")
private Date mentorStaffRelatedDate;
/**
* 员工姓名(转化员)
*/
@Column(name = "staff_name")
private String staffName;
/**
* 员工的导师的绩效配置id
*/
@Column(name = "mentor_performance_config_id")
private Integer mentorPerformanceConfigId;
/**
* 员工绩效配置id
*/
@Column(name = "student_staff_performance_config_id")
private Integer studentStaffPerformanceConfigId;
/**
* 下单时间
*/
@Column(name = "order_time")
private Date orderTime;
/**
* 支付时间
*/
@ApiModelProperty(notes = "支付时间")
@Column(name = "pay_success_time")
private Date paySuccessTime;
/**
* 订单所属门店商户号
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 订单所属门店
*/
@Column(name = "merchant_name")
private String merchantName;
/**
* 客户姓名
*/
@ApiModelProperty(notes = "客户姓名")
@Column(name = "customer_name")
private String customerName;
/**
* 客户手机号
*/
@ApiModelProperty(notes = "客户手机号")
@Column(name = "customer_phone")
private String customerPhone;
/**
* 商品分类
*/
@Column(name = "goods_type")
private Integer goodsType;
/**
* 订单商品名称,多个商品使用英文逗号分隔
*/
@Column(name = "order_goods_name")
private String orderGoodsName;
/**
* 订单产值
*/
@ApiModelProperty(notes = "订单产值")
@Column(name = "order_money")
private BigDecimal orderMoney;
/**
* 订单状态
*/
@Column(name = "order_status")
private Byte orderStatus;
/**
* 升级或战败 N-战败 Y-升级
*/
@Column(name = "upgrade_flag")
private String upgradeFlag;
/**
* 提成奖励
*/
@ApiModelProperty(notes = "提成奖励")
@Column(name = "order_bonus")
private BigDecimal orderBonus;
/**
* 导师奖励
*/
@ApiModelProperty(notes = "导师奖励")
@Column(name = "mentor_bonus")
private BigDecimal mentorBonus;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_staff_performance_bonus_config")
public class StaffPerformanceBonusConfig implements Serializable {
private static final long serialVersionUID = -3166892884887602710L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 员工绩效配置id
*/
@Column(name = "staff_performance_config_id")
private Integer staffPerformanceConfigId;
/**
* 导师绩效配置id
*/
@Column(name = "mentor_performance_config_id")
private Integer mentorPerformanceConfigId;
/**
* 奖励类型(0-高产值奖励 1-成交率系数 2-均客单系数、3-导师奖励)
*/
@ApiModelProperty(notes = "奖励类型(0-高产值奖励 1-成交率系数 2-均客单系数、3-导师奖励)")
@Column(name = "bonus_type")
private Byte bonusType;
/**
* 区间开始值
*/
@ApiModelProperty(notes = "奖励区间开始值")
@Column(name = "start_value")
private BigDecimal startValue;
/**
* 区间结束值
*/
@ApiModelProperty(notes = "奖励区间结束值")
@Column(name = "end_value")
private BigDecimal endValue;
/**
* 提成比例, 高产值奖励、成交率奖励提成按系数计算,数据值等于原始值 * 100
*/
@ApiModelProperty(notes = "提成比例, 高产值奖励、成交率奖励提成按系数计算,数据值等于原始值 * 100 ")
@Column(name = "calculate_value")
private BigDecimal calculateValue;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_staff_performance_config")
public class StaffPerformanceConfig implements Serializable {
private static final long serialVersionUID = 785024765287157455L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 员工uuid
*/
@ApiModelProperty(notes = "员工uuid")
@Column(name = "staff_uuid")
private String staffUuid;
/**
* 场景类型 0-会员/权益升级 1-精品升级 2-次新车转化 3-售后众筹 4-积分商城
*/
@ApiModelProperty(notes = "部署状态 0-会员/权益升级 1-精品升级 2-次新车转化 3-售后众筹 4-积分商城")
@Column(name = "scene_type")
private Byte sceneType;
/**
* 4s店商户号
*/
@ApiModelProperty(notes = "4s店商户号")
@Column(name = "shop_merchant_id")
private Integer shopMerchantId;
/**
* 4s店名称
*/
@ApiModelProperty(notes = "4s店名称")
@Column(name = "shop_merchant_name")
private String shopMerchantName;
/**
* 基本工资
*/
@ApiModelProperty(notes = "基本工资")
@Column(name = "basic_wage")
private BigDecimal basicWage;
/**
* 保底工资
*/
@ApiModelProperty(notes = "保底工资")
@Column(name = "minimum_wage")
private BigDecimal minimumWage;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.model;
import cn.com.glsx.dj.businessschool.remote.staff.StaffPerformanceInfoRemote;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_staff_performance_info")
public class StaffPerformanceInfo implements Serializable {
private static final long serialVersionUID = -8668583471442067293L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 员工uuid
*/
@NotNull(groups = {StaffPerformanceInfoRemote.ResetPerformancePassword.class, StaffPerformanceInfoRemote.UpdatePerformancePasswordMd5.class})
@ApiModelProperty(notes = "员工uuid")
@Column(name = "staff_uuid")
private String staffUuid;
/**
* 员工姓名
*/
@ApiModelProperty(notes = "员工姓名")
@Column(name = "staff_name")
private String staffName;
/**
* 1-驻店
*/
@ApiModelProperty(notes = "员工类型默认传 1-驻店")
@Column(name = "staff_type")
private Byte staffType;
/**
* 员工手机号
*/
@ApiModelProperty(notes = "员工手机号")
@Column(name = "phone_number")
private String phoneNumber;
/**
* 所属商户号
*/
@ApiModelProperty(notes = "园区店商户号")
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 所属商户名称
*/
@ApiModelProperty(notes = "园区店商户名称")
@Column(name = "merchant_name")
private String merchantName;
/**
* 账户中心员工创建时间
*/
@ApiModelProperty(notes = "账户中心员工创建时间")
@Column(name = "account_created_date")
private Date accountCreatedDate;
/**
* 是否启用工资绩效 Y开启 N关闭
*/
@ApiModelProperty(notes = "是否启用工资绩效 Y开启 N关闭")
@Column(name = "performance_flag")
private String performanceFlag;
/**
* 员工开通业务场景标签,0-会员权益/升级 1-精品升级 2-次新车转化 3-售后众筹 4-积分商城 多个用逗号分隔
*/
@Column(name = "staff_label")
private String staffLabel;
/**
* 查看绩效md5加密密码
*/
@NotEmpty(groups = {StaffPerformanceInfoRemote.UpdatePerformancePasswordMd5.class})
@Column(name = "view_performance_password_md5")
private String viewPerformancePasswordMd5;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@NotEmpty(groups = {StaffPerformanceInfoRemote.ResetPerformancePassword.class, StaffPerformanceInfoRemote.UpdatePerformancePasswordMd5.class})
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_staff_performance_relation")
public class StaffPerformanceRelation implements Serializable {
private static final long serialVersionUID = 3251752548766145281L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 导师绩效配置id
*/
@Column(name = "mentor_performance_config_id")
private Integer mentorPerformanceConfigId;
/**
* 导师员工uuid (冗余字段)
*/
@Column(name = "mentor_staff_uuid")
private String mentorStaffUuid;
/**
* 初级驻店员工uuid
*/
@Column(name = "student_staff_uuid")
private String studentStaffUuid;
/**
* 关联时间
*/
@Column(name = "ref_time")
private Date refTime;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_staff_performance_result_snapshot")
public class StaffPerformanceResultSnapshot implements Serializable {
private static final long serialVersionUID = 6860546018674973693L;
/**
* 主键ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 绩效月份
*/
@Column(name = "performance_month")
private String performanceMonth;
/**
* 场景类型 0-会员/权益升级 1-精品升级 2-次新车转化 3-售后众筹 4-积分商城
*/
@Column(name = "scene_type")
private Byte sceneType;
/**
* 员工uuid
*/
@Column(name = "staff_uuid")
private String staffUuid;
/**
* 员工绩效配置id
*/
@Column(name = "staff_performance_config_id")
private Integer staffPerformanceConfigId;
/**
* 员工作为导师的绩效配置id
*/
@Column(name = "mentor_performance_config_id")
private Integer mentorPerformanceConfigId;
/**
* 员工职级 0-初级驻店 1-中级导师 2-高级导师
*/
private Byte title;
/**
* 员工姓名
*/
@Column(name = "staff_name")
private String staffName;
/**
* 员工手机号
*/
@Column(name = "staff_phone")
private String staffPhone;
/**
* 所属园区店商户号
*/
@Column(name = "yq_merchant_id")
private Integer yqMerchantId;
/**
* 所属园区店
*/
@Column(name = "yq_merchant_name")
private String yqMerchantName;
/**
* 所属园区店商户号
*/
@Column(name = "shop_merchant_id")
private Integer shopMerchantId;
/**
* 所属园区店
*/
@Column(name = "shop_merchant_name")
private String shopMerchantName;
/**
* 当月平均客单价
*/
@Column(name = "customer_unit_price")
private BigDecimal customerUnitPrice;
/**
* 当月成交率
*/
@Column(name = "upgrade_rate")
private BigDecimal upgradeRate;
/**
* 当月订单数
*/
@Column(name = "upgrade_order_count")
private Integer upgradeOrderCount;
/**
* 当月订单产值
*/
@Column(name = "order_money_total")
private BigDecimal orderMoneyTotal;
/**
* 当月学员订单数
*/
@Column(name = "student_upgrade_order_count")
private Integer studentUpgradeOrderCount;
/**
* 当月学员订单产值
*/
@Column(name = "student_order_money_total")
private BigDecimal studentOrderMoneyTotal;
/**
* 基本工资
*/
@Column(name = "basic_wage")
private BigDecimal basicWage;
/**
* 保底工资
*/
@Column(name = "minimum_wage")
private BigDecimal minimumWage;
/**
* 提成奖励
*/
@Column(name = "order_bonus")
private BigDecimal orderBonus;
/**
* 导师奖励
*/
@Column(name = "mentor_bonus")
private BigDecimal mentorBonus;
/**
* 最终工资
*/
@Column(name = "final_wage")
private BigDecimal finalWage;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
@Table(name = "dj_car_life_teach_task_area_operator")
public class TeachTaskAreaOperator implements Serializable {
private static final long serialVersionUID = -6666610062571775467L;
/**
* 主键ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/**
* 带教任务记录表id
*/
@Column(name = "teach_task_record_id")
private Integer teachTaskRecordId;
/**
* 门店商户号
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 门店商户名称
*/
@Column(name = "merchant_name")
private String merchantName;
/**
* 区域运营手机号
*/
@Column(name = "area_operator_phone")
private String areaOperatorPhone;
/**
* 区域运营名称
*/
@Column(name = "area_operator_name")
private String areaOperatorName;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_teach_task_record")
public class TeachTaskRecord implements Serializable {
private static final long serialVersionUID = 1864922341858288791L;
/**
* 主键ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 门店商户号
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 门店商户名称
*/
@Column(name = "merchant_name")
private String merchantName;
/**
* 飞行督导手机号
*/
@Column(name = "flight_supervisor_phone")
private String flightSupervisorPhone;
/**
* 飞行督导id
*/
@Column(name = "flight_supervisor_uuid")
private String flightSupervisorUuid;
/**
* 飞行督导名称
*/
@Column(name = "flight_supervisor_name")
private String flightSupervisorName;
/**
* 支援类型(0:新店启动,1:老店业绩提升-渗透率过低,2:老店业绩提升-客单价过低)
*/
@Column(name = "support_type")
private Byte supportType;
/**
* 情况描述
*/
@Column(name = "situation_description")
private String situationDescription;
/**
* 支援方式(0:线上,1:线下)
*/
@Column(name = "support_way")
private Byte supportWay;
/**
* 门店类型(0:老店,1:新店)
*/
@Column(name = "store_type")
private Byte storeType;
/**
* 业务类型(0:权益升级,1:延保升级,2:精品升级)
*/
@Column(name = "business_type")
private Byte businessType;
/**
* 销售类型(0:售前,1:售后(多个用,拼接))
*/
@Column(name = "sale_type")
private String saleType;
/**
* 带教开始时间(yyyy-MM-dd)
*/
@Column(name = "teach_start_time")
private Date teachStartTime;
/**
* 带教结束时间(yyyy-MM-dd)
*/
@Column(name = "teach_end_time")
private Date teachEndTime;
/**
* 门店现存问题描述
*/
@Column(name = "problem_description")
private String problemDescription;
/**
* 预估解决方案描述
*/
@Column(name = "solution_description")
private String solutionDescription;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.remote;
import cn.com.glsx.dj.businessschool.dto.DemoDTO;
import cn.com.glsx.dj.businessschool.model.DemoModel;
/**
* @Title: DemoService.java
* @Description:
* @author ${userName}
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
public interface DemoRemote {
DemoModel get(String name);
DemoDTO convert(DemoModel model);
}
package cn.com.glsx.dj.businessschool.remote;
import cn.com.glsx.dj.businessschool.dto.TeachTaskAreaOperatorDTO;
import cn.com.glsx.dj.businessschool.dto.TeachTaskRecordDTO;
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 java.util.List;
@ApiService(value = "带教任务接口", owner = "cym", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface TeachTaskRecordRemote {
@ApiMethod("新增带教任务")
@ApiParam(name="condition",notes="任务基础信息",dataType= ApiParam.DataTypeEnum.OBJECT,required=true)
@ApiResponse("是否创建成功")
RpcResponse<Boolean> createTeachTask(TeachTaskRecordDTO condition);
@ApiMethod("带教任务分页查询")
@ApiParam(name="condition",notes="查询条件",dataType= ApiParam.DataTypeEnum.OBJECT,required=true)
@ApiResponse("带教任务list")
RpcResponse<RpcPagination<TeachTaskRecordDTO>> teachTaskPage(RpcPagination<TeachTaskRecordDTO> rpcPagination);
@ApiMethod("带教任务查询")
@ApiParam(name="condition",notes="查询条件",dataType= ApiParam.DataTypeEnum.OBJECT,required=true)
@ApiResponse("带教任务list")
RpcResponse<List<TeachTaskRecordDTO>> listTeachTask(TeachTaskRecordDTO condition);
@ApiMethod("查询当前飞行督导人员列表")
@ApiParam(name="condition",notes="查询条件",dataType= ApiParam.DataTypeEnum.OBJECT,required=true)
@ApiResponse("飞行督导人员列表")
RpcResponse<List<TeachTaskRecordDTO>> listTeachTaskFlightSupervisor(TeachTaskRecordDTO condition);
@ApiMethod("统计带教任务各状态数量")
@ApiParam(name="condition",notes="查询条件",dataType= ApiParam.DataTypeEnum.OBJECT)
@ApiResponse("带教任务各状态数量")
RpcResponse<TeachTaskRecordDTO> countTeachTask(TeachTaskRecordDTO condition);
@ApiMethod("带教任务指派")
@ApiParam(name="condition",notes="带教任务修改内容",dataType= ApiParam.DataTypeEnum.OBJECT)
@ApiResponse("是否修改成功")
RpcResponse<Boolean> updateTeachTask(TeachTaskRecordDTO condition);
}
package cn.com.glsx.dj.businessschool.remote.staff;
import cn.com.glsx.dj.businessschool.dto.MentorPerformanceConfigDTO;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO;
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;
import java.util.List;
@ApiService(value = "导师绩效配置接口", owner = "caiym", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface MentorPerformanceConfigRemote {
@ApiMethod("分页查询可关联的初级驻店列表")
@ApiParam(name = "", notes = "", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("可关联的初级驻店分页")
RpcResponse<RpcPagination<StaffPerformanceInfoDTO>> pageAvailableStudent(@NotNull RpcPagination<MentorPerformanceConfigDTO> pagination);
@interface GetMentorPerformanceConfig{}
@ApiMethod("获取职级信息详情")
@ApiParam(name = "mentorPerformanceConfigDTO", notes = "查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("职级信息详情")
RpcResponse<List<MentorPerformanceConfigDTO>> getMentorPerformanceConfig(@NotNull MentorPerformanceConfigDTO mentorPerformanceConfigDTO);
@interface SaveMentorPerformanceConfig{}
@ApiMethod("保存导师配置")
@ApiParam(name = "mentorPerformanceConfigDTO", notes = "导师配置", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<Boolean> saveMentorPerformanceConfig(List<MentorPerformanceConfigDTO> mentorPerformanceConfigList);
}
package cn.com.glsx.dj.businessschool.remote.staff;
import java.util.List;
import javax.validation.constraints.NotNull;
import cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceDetailDTO;
import cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceTotalDTO;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceResultSnapshot;
import cn.com.glsx.framework.core.annotation.ApiMethod;
import cn.com.glsx.framework.core.annotation.ApiParam;
import cn.com.glsx.framework.core.annotation.ApiParams;
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;
/**
* @Author: chenx
* @Description: 员工订单绩效明细remote
* @Date: 2024/1/3 9:48
* @Version: 1.0
*/
@ApiService(value = "员工订单绩效明细接口", protocol = ApiService.ProtocolEnum.dubbo, owner = "chenxi",version = "1.0.0")
public interface StaffOrderPerformanceDetailRemote {
@ApiMethod("同步1.1或者2.1场景订单到员工绩效")
@ApiParam(name = "staffOrderPerformanceDetail", notes = "订单信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("true")
RpcResponse<Boolean> syncStaffOrderInfo(StaffOrderPerformanceDetailDTO staffOrderPerformanceDetail);
@ApiMethod("查询订单绩效明细列表")
@ApiParam(name = "condition", notes = "查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("订单绩效明细列表")
RpcResponse<List<StaffOrderPerformanceDetailDTO>> list(StaffOrderPerformanceDetailDTO condition);
@ApiMethod("订单绩效明细统计")
@ApiParam(name = "condition", notes = "查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("订单绩效明细统计")
RpcResponse<List<StaffOrderPerformanceTotalDTO>> countTotal(StaffOrderPerformanceDetailDTO condition);
@ApiMethod("分页查询绩效订单明细")
@ApiParam(name = "pagination", notes = "分页参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("绩效订单明细分页")
RpcResponse<RpcPagination<StaffOrderPerformanceDetailDTO>> listWithPage(@NotNull RpcPagination<StaffOrderPerformanceDetailDTO> pagination);
@ApiMethod("获取员工某月某场景月份绩效快照")
@ApiParams({
@ApiParam(name = "staffUuid", notes = "员工uuid", dataType = ApiParam.DataTypeEnum.OBJECT, required = true),
@ApiParam(name = "sceneType", notes = "场景类型列表", dataType = ApiParam.DataTypeEnum.LIST, required = true),
@ApiParam(name = "performanceMonth", notes = "月份", dataType = ApiParam.DataTypeEnum.STRING, required = true)
})
@ApiResponse("订单绩效明细统计")
RpcResponse<List<StaffPerformanceResultSnapshot>> listSnapshot(String staffUuid, List<Integer> sceneType, String performanceMonth);
}
package cn.com.glsx.dj.businessschool.remote.staff;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceConfigDTO;
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.RpcResponse;
import java.util.List;
@ApiService(value = "员工绩效配置接口", owner = "caiym", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface StaffPerformanceConfigRemote {
@ApiMethod("查询员工绩效列表")
@ApiParam(name = "condition", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("员工列表含绩效信息")
RpcResponse<List<StaffPerformanceConfigDTO>> getPerformanceConfigListByStaffUuidAndScene(StaffPerformanceConfigDTO condition);
@ApiMethod("保存员工绩效列表")
@ApiParam(name = "condition", notes = "员工绩效参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("true")
RpcResponse<Boolean> saveStaffPerformanceConfig(List<StaffPerformanceConfigDTO> condition);
@ApiMethod("查询员工绩效详情")
@ApiParam(name = "condition", notes = "员工绩效参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("员工绩效详情")
RpcResponse<List<StaffPerformanceConfigDTO>> getStaffPerformanceConfig(String staffUuid, Byte sceneType);
}
package cn.com.glsx.dj.businessschool.remote.staff;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceInfo;
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;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiService(value = "员工基本信息表接口", owner = "caiym", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface StaffPerformanceInfoRemote {
@ApiMethod("根据staffUuid获取员工基本信息")
@ApiParam(name = "staffUuid", notes = "员工uuid", dataType = ApiParam.DataTypeEnum.STRING, required = true)
@ApiResponse("员工基本信息")
RpcResponse<StaffPerformanceInfo> getStaffPerformanceInfoByStaffUuid(@NotNull String staffUuid);
@ApiMethod("根据学员员工ID获取员工导师基本信息")
@ApiParams({
@ApiParam(name = "staffUuid", notes = "学员员工uuid", dataType = ApiParam.DataTypeEnum.STRING, required = true),
@ApiParam(name = "sceneType", notes = "场景类型", dataType = ApiParam.DataTypeEnum.BYTE, required = false)
})
@ApiResponse("员工导师基本信息")
RpcResponse<List<StaffPerformanceInfo>> getMentorStaffPerformanceInfoByStaffUuid(@NotBlank String staffUuid, Byte sceneType);
@ApiMethod("根据导师员工ID获取员工学员基本信息列表")
@ApiParams({
@ApiParam(name = "staffUuid", notes = "导师员工uuid", dataType = ApiParam.DataTypeEnum.STRING, required = true),
@ApiParam(name = "sceneType", notes = "场景类型", dataType = ApiParam.DataTypeEnum.BYTE, required = false)
})
@ApiResponse("导师学员基本信息列表")
RpcResponse<List<StaffPerformanceInfoDTO>> getStudentStaffPerformanceInfoByStaffUuid(@NotBlank String staffUuid, Byte sceneType);
@ApiMethod("查询共计多少员工启用商学院")
@ApiParam(name = "staffPerformanceInfoDTO", notes = "员工信息及操作人等", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("员工启用商学院数量")
RpcResponse<Long> getBusinessSchoolEnableNumber();
@ApiMethod("启用、禁用员工工资绩效")
@ApiParams({
@ApiParam(name = "staffUuid", notes = "员工uuid", dataType = ApiParam.DataTypeEnum.STRING, required = true),
@ApiParam(name = "performanceFlag", notes = "是否启用工资绩效", dataType = ApiParam.DataTypeEnum.INTEGER, required = true),
@ApiParam(name = "accountName", notes = "操作人", dataType = ApiParam.DataTypeEnum.INTEGER, required = true)
})
@ApiResponse("启用、禁用商学院信息结果")
RpcResponse<Boolean> updateStaffPerformanceFlag(String staffUuid, String performanceFlag, String accountName);
@interface ResetPerformancePassword {
}
@ApiMethod("重置绩效查看安全密码")
@ApiParam(name = "staffPerformanceInfoDTO", notes = "员工信息及操作人等", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否成功")
RpcResponse<Boolean> resetPerformancePassword(@NotNull StaffPerformanceInfoDTO staffPerformanceInfoDTO);
@ApiMethod("分页查询员工绩效信息")
@ApiParam(name = "pagination", notes = "分页及查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("员工绩效信息分页")
RpcResponse<RpcPagination<StaffPerformanceInfoDTO>> pageStaffPermanenceInfo(@NotNull RpcPagination<StaffPerformanceInfoDTO> pagination);
@ApiMethod("分页查询员工绩效信息详情")
@ApiParam(name = "pagination", notes = "分页及查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("员工绩效信息详情分页")
RpcResponse<RpcPagination<StaffPerformanceInfoDTO>> pageStaffPermanenceDetailInfo(@NotNull RpcPagination<StaffPerformanceInfoDTO> pagination);
@ApiMethod("获取员工基本信息列表")
@ApiParam(name = "condition", notes = "查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("员工基本信息列表")
RpcResponse<List<StaffPerformanceInfoDTO>> list(@NotNull StaffPerformanceInfoDTO condition);
@interface UpdatePerformancePasswordMd5{}
@ApiMethod("更新查看绩效密码")
@ApiParam(name = "staffPerformanceInfoDTO", notes = "更新信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("是否更新成功")
RpcResponse<Boolean> updatePerformancePasswordMd5(@NotNull StaffPerformanceInfoDTO staffPerformanceInfoDTO);
}
package cn.com.glsx.dj.businessschool.remote.staff;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceResultSnapshotDTO;
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;
import java.util.List;
@ApiService(value = "员工月份绩效快照接口", owner = "zhoulm", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface StaffPerformanceResultSnapshotRemote {
@ApiMethod("查询月份绩效列表")
@ApiParam(name = "condition", notes = "查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("月份绩效列表")
RpcResponse<List<StaffPerformanceResultSnapshotDTO>> list(@NotNull StaffPerformanceResultSnapshotDTO condition);
@ApiMethod("分页查询导出员工绩效所需数据")
@ApiParam(name = "pagination", notes = "查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("导出员工绩效所需数据")
RpcResponse<RpcPagination<StaffPerformanceResultSnapshotDTO>> pageForExport(@NotNull RpcPagination<StaffPerformanceResultSnapshotDTO> pagination);
@ApiMethod("统计月份绩效")
@ApiParam(name = "condition", notes = "查询条件", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("月份绩效统计")
RpcResponse<StaffPerformanceResultSnapshotDTO> countTotal(@NotNull StaffPerformanceResultSnapshotDTO condition);
}
# framework-archetype-rpc-api
RPC-API项目骨架
一、项目结构说明:
└─src
├─main
├─java
├─cn.com.glsx.dj.dto 数据传输模型层
├─cn.com.glsx.dj.enums 枚举定义
├─cn.com.glsx.dj.model 数据模型层
└─cn.com.glsx.dj.remote RPC暴露服务层
└─resources 资源文件目录
└─rpc
└─dubbo.xml dubbo接口配置
└─pom.xml pom文件
二、使用说明:
1、API改动后,请及时deploy到Maven仓库
三、注意事项:
1、rpc-api-deploy-maven-plugin api上报插件需配置当前api的jar包的引用。
\ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.com.glsx.framework</groupId>
<artifactId>framework-rpc</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-business-school</artifactId>
<version>1.0-SNAPSHOT</version>
<name>rpc-dj-business-school</name>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-business-school-api</artifactId>
<version>4.51.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-smartcarlife-api</artifactId>
<version>4.35.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.oreframework.boot</groupId>
<artifactId>ore-boot-starter-elasticjob</artifactId>
</dependency>
<dependency>
<groupId>cn.com.glsx</groupId>
<artifactId>rpc-dj-mindworkplate-api</artifactId>
<version>4.51.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cn.com.glsx</groupId>
<artifactId>rpc-scrm-wechat-api</artifactId>
<version>4.50.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.entmicro</groupId>
<artifactId>rpc-scrm-entmicro-api</artifactId>
<version>3.25.9-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package cn.com.glsx.dj.businessschool;
import org.oreframework.boot.main.AbsOreBootStarter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
/**
* @Title: Main.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2015
*/
@SpringBootApplication
@ServletComponentScan
public class Main extends AbsOreBootStarter {
@Override
public void run(String[] args)
{
SpringApplication.run(Main.class, args);
}
public static void main(String[] args)
{
Main main = new Main();
main.run(args);
}
}
package cn.com.glsx.dj.businessschool.config;
import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Title: DubboConfig.java
* @Description: Dubbo服务注册配置
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public class DubboConfig {
@Autowired
protected ReferenceBuilderFactory factory;
protected final boolean check = false;
protected final int timeout = 30000;
}
package cn.com.glsx.dj.businessschool.config;
import com.github.pagehelper.Page;
import com.github.pagehelper.dialect.helper.MySqlDialect;
import org.apache.ibatis.cache.CacheKey;
import java.util.regex.Pattern;
public class HelperDialectCustom extends MySqlDialect {
@Override
public String getPageSql(String sql, Page page, CacheKey pageKey) {
Pattern compileFixed = Pattern.compile("/\\*customLimitPlace\\*/");
String compileLimit = "/\\*limit\\*/";
if (compileFixed.matcher(sql).find()) {
if (page.getStartRow() == 0) {
sql = sql.replaceFirst(compileLimit, "\n LIMIT ? ");
} else {
sql = sql.replaceFirst(compileLimit, "\n LIMIT ?, ? ");
}
return sql;
}
return super.getPageSql(sql, page, pageKey);
}
}
package cn.com.glsx.dj.businessschool.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* @Title: SystemProperty.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Configuration
@ConfigurationProperties("system")
public class SystemProperty {
// 对应配置项:system.name
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package cn.com.glsx.dj.businessschool.config.dubbo;
import cn.com.glsx.dj.businessschool.config.DubboConfig;
import cn.com.glsx.dj.mindworkplate.remote.DigitalManagementRecordRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @ClassName MindworkplateDubboConfig
* @Description dubbo配置
* @Author lqWang
* @Date 2025/4/2 17:30
*/
@Configuration
public class MindworkplateDubboConfig extends DubboConfig {
@Bean
public DigitalManagementRecordRemote DigitalManagementRecordRemote(){
return factory.builder(DigitalManagementRecordRemote.class).check(check).timeout(timeout).build();
}
}
package cn.com.glsx.dj.businessschool.config.dubbo;
import cn.com.glsx.dj.businessschool.config.DubboConfig;
import cn.com.glsx.scrm.proxy.remote.CommonProxyRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ProxyDubboConfig extends DubboConfig {
@Bean
public CommonProxyRemote commonProxyRemote() {
return factory.builder(CommonProxyRemote.class).check(check).timeout(timeout).build();
}
}
package cn.com.glsx.dj.businessschool.config.dubbo;
import cn.com.glsx.dj.businessschool.config.DubboConfig;
import cn.com.glsx.entmicro.remote.EntmicroStaffRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ScrmEntmicroDubboConfig extends DubboConfig {
@Bean
public EntmicroStaffRemote getEntmicroStaffRemote() {
return factory.builder(EntmicroStaffRemote.class).check(false).timeout(30000).version("1.0.0").build();
}
}
package cn.com.glsx.dj.businessschool.config.dubbo;
import cn.com.glsx.dj.businessschool.config.DubboConfig;
import cn.com.glsx.scrm.wechat.remote.WorkWechatMessageRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ScrmWechatDubboConfig extends DubboConfig {
@Bean
public WorkWechatMessageRemote workWechatMessageRemote(){
return factory.builder(WorkWechatMessageRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
}
package cn.com.glsx.dj.businessschool.config.dubbo;
import cn.com.glsx.dj.businessschool.config.DubboConfig;
import cn.com.glsx.dj.smartcarlife.remote.SceneMerchantRefRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SmartCarLifeDubboConfig extends DubboConfig {
@Bean
public SceneMerchantRefRemote sceneMerchantRefRemote(){
return factory.builder(SceneMerchantRefRemote.class).check(check).timeout(timeout).build();
}
}
package cn.com.glsx.dj.businessschool.constant;
import java.math.BigDecimal;
/**
*
* @Title CommonConstants
* @Description:
* @author Suro
* @date 2021/8/4 15:41
* @version V1.0
* @Company:didihu.com.cn
**/
public class CommonConstants {
public static final String DEFAULT_UPDATE_BY = "system";
public static final String DEFAULT_SYSTEM_USER_NAME = "系统";
public static final String DEFAULT_EMPLOYEE_NAME = "管理员";
public static final String DEFAULT_FILM_GOOD_TYPES = "[1,4,6,12,14]";
public static final Integer DEFAULT_TEST_MERCHANT_ID = -1;
/**
* 日期正则表达式,格式如2022-04-03
*/
public static final String DATE_REGEX = "^\\d{4}(-)(1[0-2]|0\\d)\\1([0-2]\\d|\\d|30|31)$";
/**
* 月份正则表达式,格式如2022-04
*/
public static final String MONTH_REGEX = "^\\d{4}(-)(1[0-2]|0\\d)$";
/**
* 日期正则表达式,格式如2022-04-03 00:00:00
*/
public static final String DATE_TIME_REGEX = "^\\d{4}(-)(1[0-2]|0\\d)\\1([0-2]\\d|\\d|30|31)\\s\\d{2}(:)\\d{2}(:)\\d{2}$";
public static final BigDecimal ONEHUNDRED_BIGDECIMAL = BigDecimal.valueOf(100);
/**
* 车系是否选中标志位-选中
*/
public static final int SERIES_FLAG_SELECTED = 1;
/**
* 保留两位小数
*/
public static final int SCALE = 2;
public static final String DATE_START_TIME = " 00:00:00";
public static final String DATE_END_TIME = " 23:59:59";
public static final String FIRST_DATE = "-01";
public static final String LAST_DATE = "-31";
public static final String DATE_END_TIME_SECOND_EXCLUDED = " 23:59";
public static final BigDecimal DECIMAL_VALUE_MILLION = BigDecimal.valueOf(1000000);
public static final BigDecimal DECIMAL_VALUE_ALMOST_MILLION = new BigDecimal("999999.99");
public static final BigDecimal DECIMAL_VALUE_ALMOST_HUNDRED_THOUSAND = new BigDecimal("999999.99");
}
package cn.com.glsx.dj.businessschool.converter;
import cn.com.glsx.framework.core.beans.converter.RpcBaseConverter;
import org.mapstruct.Mapper;
import cn.com.glsx.dj.businessschool.model.DemoModel;
import cn.com.glsx.dj.businessschool.dto.DemoDTO;
/**
* @Title: DemoConverter.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Mapper(componentModel = "spring")
public abstract class DemoConverter extends RpcBaseConverter<DemoModel,DemoDTO>{
}
package cn.com.glsx.dj.businessschool.converter;
import cn.com.glsx.dj.businessschool.dto.MentorPerformanceConfigDTO;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO;
import cn.com.glsx.dj.businessschool.model.MentorPerformanceConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceBonusConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceInfo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import java.util.List;
@Mapper
public interface MentorPerformanceConfigDTOConvert {
MentorPerformanceConfigDTOConvert INSTANCE = Mappers.getMapper(MentorPerformanceConfigDTOConvert.class);
@Mappings({
@Mapping(target = "createdBy", ignore = true),
@Mapping(target = "createdDate", ignore = true),
@Mapping(target = "updatedBy", ignore = true),
@Mapping(target = "updatedDate", ignore = true),
@Mapping(target = "deletedFlag", ignore = true),
@Mapping(source = "staffPerformanceInfo.staffUuid",target = "staffUuid"),
@Mapping(source = "staffPerformanceInfo.staffName",target = "staffName"),
@Mapping(source = "staffPerformanceInfo.phoneNumber",target = "phoneNumber"),
@Mapping(source = "staffPerformanceInfo.merchantId",target = "merchantId"),
@Mapping(source = "staffPerformanceInfo.merchantName",target = "merchantName"),
@Mapping(source = "mentorPerformanceConfig.id",target = "id"),
@Mapping(source = "mentorPerformanceConfig.sceneType",target = "sceneType"),
@Mapping(source = "mentorPerformanceConfig.title",target = "title"),
@Mapping(source = "mentorBonusConfigs",target = "tutorBonusConfigs"),
@Mapping(source = "studentPerformanceInfos",target = "studentStaffs"),
})
MentorPerformanceConfigDTO build(StaffPerformanceInfo staffPerformanceInfo, MentorPerformanceConfig mentorPerformanceConfig,
List<StaffPerformanceBonusConfig> mentorBonusConfigs, List<StaffPerformanceInfoDTO> studentPerformanceInfos);
}
package cn.com.glsx.dj.businessschool.converter;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceInfo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
@Mapper
public interface MentorPerformanceInfoDTOConvert {
MentorPerformanceInfoDTOConvert INSTANCE = Mappers.getMapper(MentorPerformanceInfoDTOConvert.class);
StaffPerformanceInfoDTO convertToDTO(StaffPerformanceInfo source);
}
package cn.com.glsx.dj.businessschool.converter;
import cn.com.glsx.dj.businessschool.dto.TeachTaskAreaOperatorDTO;
import cn.com.glsx.dj.businessschool.model.TeachTaskAreaOperator;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.List;
@Mapper
public interface TeachTaskConvert {
TeachTaskConvert INSTANCE = Mappers.getMapper(TeachTaskConvert.class);
List<TeachTaskAreaOperatorDTO> toTeachTaskAreaOperatorDTOList(List<TeachTaskAreaOperator> teachTaskAreaOperatorList);
TeachTaskAreaOperatorDTO toTeachTaskAreaOperatorDTO(TeachTaskAreaOperator record);
}
package cn.com.glsx.dj.businessschool.job;
import cn.com.glsx.dj.businessschool.service.StaffOrderPerformanceDetailService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@ElasticJobConf(name = "CalculateStaffPerformanceDetailJob", cron = "0 30 2 1 * ?", description = "每月计算员工绩效详情", overwrite = false)
public class CalculateStaffPerformanceDetailJob implements SimpleJob {
private static final Logger logger = LoggerFactory.getLogger(CalculateStaffPerformanceDetailJob.class);
@Autowired
private StaffOrderPerformanceDetailService staffOrderPerformanceDetailService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("----------------每月计算员工绩效详情任务开始-----------------");
try {
staffOrderPerformanceDetailService.calculateStaffPerformanceOrderDetailJob(shardingContext.getJobParameter());
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("----------------每月计算员工绩效详情结束-----------------");
}
}
package cn.com.glsx.dj.businessschool.job;
import cn.com.glsx.dj.businessschool.service.StaffPerformanceInfoService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang3.StringUtils;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@ElasticJobConf(name = "SyncStaffInfoJob", cron = "0 0 0 * * ?", description = "同步账户中心员工数据", overwrite = false)
public class SyncStaffInfoJob implements SimpleJob {
private static final Logger logger = LoggerFactory.getLogger(SyncStaffInfoJob.class);
@Autowired
private StaffPerformanceInfoService staffPerformanceInfoService;
@Override
public void execute(ShardingContext shardingContext) {
logger.info("----------------同步账户中心员工数据任务开始-----------------");
try {
String param = shardingContext.getJobParameter();
List<Integer> merchantIdList = Arrays.stream(param.split(","))
.filter(StringUtils::isNumeric).map(Integer::valueOf).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(merchantIdList)) {
staffPerformanceInfoService.syncStaffInfo(merchantIdList);
} else {
staffPerformanceInfoService.syncStaffInfo(Lists.newArrayList());
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
logger.info("----------------同步账户中心员工数据任务结束-----------------");
}
}
package cn.com.glsx.dj.businessschool.manager;
import cn.com.glsx.dj.businessschool.model.DemoModel;
import org.springframework.stereotype.Service;
/**
* @Title: DemoManager.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Service
public class DemoManager{
public DemoModel load(){
return null;
}
}
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.model.DemoModel;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
/**
* @Title: DemoMapper.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Mapper
public interface DemoMapper extends OreMapper<DemoModel> {
DemoModel load();
}
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.dto.MentorPerformanceConfigDTO;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO;
import cn.com.glsx.dj.businessschool.model.MentorPerformanceConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface MentorPerformanceConfigMapper extends OreMapper<MentorPerformanceConfig> {
List<StaffPerformanceInfoDTO> listAvailableStudent(MentorPerformanceConfigDTO condition);
List<MentorPerformanceConfigDTO> list(MentorPerformanceConfigDTO mentorPerformanceConfigDTO);
/**
*
* @param staffUuid 员工uuid
* @param updatedBy 操作人
*/
void deleteByStaffUuid(@Param("staffUuid") String staffUuid, @Param("updatedBy")String updatedBy);
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.model.StaffOrderPerformanceDetail;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceDetailDTO;
import cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceTotalDTO;
import cn.com.glsx.dj.businessschool.model.StaffOrderPerformanceDetail;
import java.util.List;
@Mapper
public interface StaffOrderPerformanceDetailMapper extends OreMapper<StaffOrderPerformanceDetail> {
List<StaffOrderPerformanceDetailDTO> list(StaffOrderPerformanceDetailDTO condition);
List<StaffOrderPerformanceTotalDTO> countTotal(StaffOrderPerformanceDetailDTO condition);
/**
* 更新订单绩效中的绩效配置id和绩效奖励信息
* @param staffOrderPerformanceDetailDTO
*/
void updateBonusConfigIdAndBonus(StaffOrderPerformanceDetailDTO staffOrderPerformanceDetailDTO);
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceBonusConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface StaffPerformanceBonusConfigMapper extends OreMapper<StaffPerformanceBonusConfig> {
List<StaffPerformanceBonusConfig> getByStaffPerformanceConfigIdAndBonusType(@Param("staffPerformanceConfigId") Integer staffPerformanceConfigId, @Param("bonusType") Byte bonusType);
void deleteByStaffPerformanceConfigId(@Param("staffPerformanceConfigId") Integer staffPerformanceConfigId, @Param("updatedBy") String updatedBy);
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceConfigDTO;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface StaffPerformanceConfigMapper extends OreMapper<StaffPerformanceConfig> {
/**
* 根据场景值、员工uuid查询员工绩效信息
* @param condition
* @return
*/
List<StaffPerformanceConfigDTO> getPerformanceConfigByStaffUuidAndScene(StaffPerformanceConfigDTO condition);
/**
*
* @param staffUuid 员工uuid
* @param updatedBy 操作人
*/
void deleteByStaffUuid(@Param("staffUuid") String staffUuid, @Param("updatedBy")String updatedBy);
/**
* 查询员工绩效信息列表
*
* @param condition
* @return java.util.List<cn.com.glsx.dj.businessschool.dto.StaffPerformanceConfigDTO>
* @author caiym
* @date 2024年01月10日 17:31:28
*/
List<StaffPerformanceConfigDTO> list(StaffPerformanceConfigDTO condition);
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface StaffPerformanceInfoMapper extends OreMapper<StaffPerformanceInfo> {
List<StaffPerformanceInfoDTO> list(StaffPerformanceInfoDTO staffPerformanceInfoDTO);
/**
* 查询员工绩效详细信息
*/
List<StaffPerformanceInfoDTO> listDetail(StaffPerformanceInfoDTO staffPerformanceInfoDTO);
void updateStaffInfo(StaffPerformanceInfoDTO staffPerformanceInfoDTO);
Long getBusinessSchoolEnableNumber();
StaffPerformanceInfo selectByStaffUuid(@Param("staffUuid") String staffUuid);
int updateStaffPerformanceFlag(@Param("staffUuid")String staffUuid, @Param("performanceFlag")String performanceFlag, @Param("updatedBy")String updatedBy);
int resetPerformancePassword(StaffPerformanceInfoDTO staffPerformanceInfoDTO);
int updatePerformancePasswordMd5(StaffPerformanceInfoDTO staffPerformanceInfoDTO);
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceRelationDTO;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface StaffPerformanceRelationMapper extends OreMapper<StaffPerformanceRelation> {
List<StaffPerformanceRelation> listStaffRelation(StaffPerformanceRelationDTO condition);
void deleteByStaffUuid(@Param("staffUuid")String staffUuid, @Param("updatedBy") String updatedBy);
List<StaffPerformanceRelationDTO> listByMentorPerformanceConfigId(Integer mentorPerformanceConfigId);
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceResultSnapshotDTO;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceResultSnapshot;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface StaffPerformanceResultSnapshotMapper extends OreMapper<StaffPerformanceResultSnapshot> {
List<StaffPerformanceResultSnapshotDTO> list(StaffPerformanceResultSnapshotDTO condition);
void deleteByPerformanceMonth(@Param("performanceMonth") String performanceMonth, @Param("sceneType")Byte sceneType);
StaffPerformanceResultSnapshotDTO countTotal(StaffPerformanceResultSnapshotDTO condition);
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.dto.TeachTaskAreaOperatorDTO;
import cn.com.glsx.dj.businessschool.model.TeachTaskAreaOperator;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface TeachTaskAreaOperatorMapper extends OreMapper<TeachTaskAreaOperator> {
int insertTeachTaskAreaOperatorList(List<TeachTaskAreaOperatorDTO> teachTaskAreaOperatorList);
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.mapper;
import cn.com.glsx.dj.businessschool.dto.TeachTaskRecordDTO;
import cn.com.glsx.dj.businessschool.model.TeachTaskRecord;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface TeachTaskRecordMapper extends OreMapper<TeachTaskRecord> {
int insertTeachTaskRecord(TeachTaskRecordDTO teachTaskRecordDTO);
List<TeachTaskRecordDTO> teachTaskPage(TeachTaskRecordDTO condition);
List<TeachTaskRecordDTO> listTeachTaskFlightSupervisor(TeachTaskRecordDTO condition);
List<TeachTaskRecordDTO> countTeachTask(TeachTaskRecordDTO condition);
}
\ No newline at end of file
package cn.com.glsx.dj.businessschool.remote;
import cn.com.glsx.dj.businessschool.converter.DemoConverter;
import cn.com.glsx.dj.businessschool.dto.DemoDTO;
import cn.com.glsx.dj.businessschool.model.DemoModel;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.glsx.dj.businessschool.service.DemoService;
import org.apache.dubbo.config.annotation.DubboService;
/**
* @Title: DemoRemoteImpl.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@DubboService(retries = 0, timeout = 30000)
public class DemoRemoteImpl implements DemoRemote{
@Autowired
private DemoConverter demoConverter;
@Autowired
private DemoService demoService;
public DemoModel get(String name){
return demoService.load();
}
public DemoDTO convert(DemoModel model){
return demoConverter.convertToTarget(model);
}
}
package cn.com.glsx.dj.businessschool.remote;
import cn.com.glsx.dj.businessschool.dto.TeachTaskAreaOperatorDTO;
import cn.com.glsx.dj.businessschool.dto.TeachTaskRecordDTO;
import cn.com.glsx.dj.businessschool.service.TeachTaskRecordService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import com.github.pagehelper.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @ClassName TeachTaskRecordRemoteImpl
* @Description 带教任务
* @Author lqWang
* @Date 2025/3/28 21:20
*/
@Slf4j
@DubboService(validation = "true", version = "1.0.0")
public class TeachTaskRecordRemoteImpl implements TeachTaskRecordRemote{
@Autowired
private TeachTaskRecordService teachTaskRecordService;
@Override
public RpcResponse<Boolean> createTeachTask(TeachTaskRecordDTO condition) {
try{
Boolean res = teachTaskRecordService.createTeachTask(condition);
return RpcResponse.success(res);
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<RpcPagination<TeachTaskRecordDTO>> teachTaskPage(RpcPagination<TeachTaskRecordDTO> rpcPagination) {
try{
Page<TeachTaskRecordDTO> page = teachTaskRecordService.teachTaskPage(rpcPagination);
return RpcResponse.success(RpcPagination.copyPage(page));
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<TeachTaskRecordDTO>> listTeachTask(TeachTaskRecordDTO condition) {
try{
return RpcResponse.success(teachTaskRecordService.listTeachTask(condition));
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<TeachTaskRecordDTO>> listTeachTaskFlightSupervisor(TeachTaskRecordDTO condition) {
try{
return RpcResponse.success(teachTaskRecordService.listTeachTaskFlightSupervisor(condition));
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<TeachTaskRecordDTO> countTeachTask(TeachTaskRecordDTO condition) {
try{
return RpcResponse.success(teachTaskRecordService.countTeachTask(condition));
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> updateTeachTask(TeachTaskRecordDTO condition) {
try{
return RpcResponse.success(teachTaskRecordService.updateTeachTask(condition));
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.businessschool.remote.staff;
import cn.com.glsx.dj.businessschool.dto.MentorPerformanceConfigDTO;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO;
import cn.com.glsx.dj.businessschool.service.MentorPerformanceConfigService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
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 MentorPerformanceConfigRemoteImpl implements MentorPerformanceConfigRemote{
@Autowired
private MentorPerformanceConfigService mentorPerformanceConfigService;
@Override
public RpcResponse<RpcPagination<StaffPerformanceInfoDTO>> pageAvailableStudent(RpcPagination<MentorPerformanceConfigDTO> pagination) {
try{
RpcPagination<StaffPerformanceInfoDTO> pagination2 = RpcPagination.copyPage(mentorPerformanceConfigService.pageAvailableStudent(pagination));
return RpcResponse.success(pagination2);
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<MentorPerformanceConfigDTO>> getMentorPerformanceConfig(MentorPerformanceConfigDTO mentorPerformanceConfigDTO) {
try{
return RpcResponse.success(mentorPerformanceConfigService.getMentorPerformanceConfig(mentorPerformanceConfigDTO));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> saveMentorPerformanceConfig(List<MentorPerformanceConfigDTO> mentorPerformanceConfigList) {
try{
return RpcResponse.success(mentorPerformanceConfigService.saveMentorPerformanceConfig(mentorPerformanceConfigList));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.businessschool.remote.staff;
import cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceDetailDTO;
import cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceTotalDTO;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceResultSnapshot;
import cn.com.glsx.dj.businessschool.service.StaffOrderPerformanceDetailService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import java.util.List;
import javax.validation.constraints.NotNull;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Author: chenx
* @Description:
* @Date: 2024/1/3 9:54
* @Version: 1.0
*/
@DubboService(version = "1.0.0", validation = "true")
public class StaffOrderPerformanceDetailRemoteImpl implements StaffOrderPerformanceDetailRemote {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
StaffOrderPerformanceDetailService staffOrderPerformanceDetailService;
@Override
public RpcResponse<Boolean> syncStaffOrderInfo(StaffOrderPerformanceDetailDTO staffOrderPerformanceDetail) {
try{
return RpcResponse.success(staffOrderPerformanceDetailService.syncStaffOrderInfo(staffOrderPerformanceDetail));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<StaffOrderPerformanceDetailDTO>> list(StaffOrderPerformanceDetailDTO condition) {
try{
return RpcResponse.success(staffOrderPerformanceDetailService.list(condition));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<StaffOrderPerformanceTotalDTO>> countTotal(StaffOrderPerformanceDetailDTO condition) {
try{
return RpcResponse.success(staffOrderPerformanceDetailService.countTotal(condition));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<RpcPagination<StaffOrderPerformanceDetailDTO>> listWithPage(
@NotNull RpcPagination<StaffOrderPerformanceDetailDTO> pagination) {
try{
return RpcResponse.success(RpcPagination.copyPage(staffOrderPerformanceDetailService.listWithPage(pagination)));
}catch(Exception e){
logger.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<StaffPerformanceResultSnapshot>> listSnapshot(String staffUuid, List<Integer> sceneType, String performanceMonth) {
try{
return RpcResponse.success(staffOrderPerformanceDetailService.listSnapshot(staffUuid, sceneType, performanceMonth));
}catch(Exception e){
logger.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.businessschool.remote.staff;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceConfigDTO;
import cn.com.glsx.dj.businessschool.service.StaffPerformanceConfigService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
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 StaffPerformanceConfigRemoteImpl implements StaffPerformanceConfigRemote{
@Autowired
private StaffPerformanceConfigService staffPerformanceConfigService;
@Override
public RpcResponse<List<StaffPerformanceConfigDTO>> getPerformanceConfigListByStaffUuidAndScene(StaffPerformanceConfigDTO condition) {
try{
return RpcResponse.success(staffPerformanceConfigService.getPerformanceConfigListByStaffUuidAndScene(condition));
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> saveStaffPerformanceConfig(List<StaffPerformanceConfigDTO> condition) {
try{
return RpcResponse.success(staffPerformanceConfigService.saveStaffPerformanceConfig(condition));
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<StaffPerformanceConfigDTO>> getStaffPerformanceConfig(String staffUuid, Byte sceneType) {
try{
return RpcResponse.success(staffPerformanceConfigService.getStaffPerformanceConfigDetail(staffUuid, sceneType));
}catch(RpcServiceException e){
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.businessschool.remote.staff;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceInfo;
import cn.com.glsx.dj.businessschool.service.StaffPerformanceInfoService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class StaffPerformanceInfoRemoteImpl implements StaffPerformanceInfoRemote{
@Autowired
private StaffPerformanceInfoService staffPerformanceInfoService;
@Override
public RpcResponse<StaffPerformanceInfo> getStaffPerformanceInfoByStaffUuid(String staffUuid) {
try{
return RpcResponse.success(staffPerformanceInfoService.getStaffPerformanceInfoByStaffUuid(staffUuid));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Long> getBusinessSchoolEnableNumber() {
try{
return RpcResponse.success(staffPerformanceInfoService.getBusinessSchoolEnableNumber());
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> updateStaffPerformanceFlag(String staffUuid, String performanceFlag, String accountName) {
try{
return RpcResponse.success(staffPerformanceInfoService.updateStaffPerformanceFlag(staffUuid, performanceFlag, accountName));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> resetPerformancePassword(StaffPerformanceInfoDTO staffPerformanceInfoDTO) {
try{
return RpcResponse.success(staffPerformanceInfoService.resetPerformancePassword(staffPerformanceInfoDTO));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<RpcPagination<StaffPerformanceInfoDTO>> pageStaffPermanenceInfo(RpcPagination<StaffPerformanceInfoDTO> pagination) {
try{
pagination = RpcPagination.copyPage(staffPerformanceInfoService.pageStaffPermanenceInfo(pagination));
return RpcResponse.success(pagination);
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<RpcPagination<StaffPerformanceInfoDTO>> pageStaffPermanenceDetailInfo(RpcPagination<StaffPerformanceInfoDTO> pagination) {
try{
pagination = RpcPagination.copyPage(staffPerformanceInfoService.pageStaffPermanenceDetailInfo(pagination));
return RpcResponse.success(pagination);
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<StaffPerformanceInfo>> getMentorStaffPerformanceInfoByStaffUuid(@NotBlank String staffUuid, Byte sceneType) {
try {
return RpcResponse.success(staffPerformanceInfoService.getMentorStaffPerformanceInfoByStaffUuid(staffUuid,sceneType));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<StaffPerformanceInfoDTO>> getStudentStaffPerformanceInfoByStaffUuid(
@NotBlank String staffUuid, Byte sceneType) {
try {
return RpcResponse.success(staffPerformanceInfoService.getStudentStaffPerformanceInfoByStaffUuid(staffUuid,sceneType));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<StaffPerformanceInfoDTO>> list(@NotNull StaffPerformanceInfoDTO condition) {
try {
return RpcResponse.success(staffPerformanceInfoService.list(condition));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> updatePerformancePasswordMd5(StaffPerformanceInfoDTO staffPerformanceInfoDTO) {
try{
return RpcResponse.success(staffPerformanceInfoService.updatePerformancePasswordMd5(staffPerformanceInfoDTO));
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.businessschool.remote.staff;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceResultSnapshotDTO;
import cn.com.glsx.dj.businessschool.service.StaffPerformanceResultSnapshotService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import javax.validation.constraints.NotNull;
import java.util.List;
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class StaffPerformanceResultSnapshotRemoteImpl implements StaffPerformanceResultSnapshotRemote {
@Autowired
private StaffPerformanceResultSnapshotService staffPerformanceResultSnapshotService;
@Override
public RpcResponse<List<StaffPerformanceResultSnapshotDTO>> list(
@NotNull StaffPerformanceResultSnapshotDTO condition) {
try {
return RpcResponse.success(staffPerformanceResultSnapshotService.list(condition));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<RpcPagination<StaffPerformanceResultSnapshotDTO>> pageForExport(RpcPagination<StaffPerformanceResultSnapshotDTO> pagination) {
try{
pagination = RpcPagination.copyPage(staffPerformanceResultSnapshotService.pageForExport(pagination));
return RpcResponse.success(pagination);
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<StaffPerformanceResultSnapshotDTO> countTotal(
@NotNull StaffPerformanceResultSnapshotDTO condition) {
try {
return RpcResponse.success(staffPerformanceResultSnapshotService.countTotal(condition));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.businessschool.service;
import cn.com.glsx.dj.businessschool.mapper.DemoMapper;
import cn.com.glsx.dj.businessschool.model.DemoModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: DemoService.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Service
public class DemoService {
@Autowired
private DemoMapper demoMapper;
public DemoModel load(){
return demoMapper.load();
}
}
package cn.com.glsx.dj.businessschool.service;
import cn.com.glsx.dj.businessschool.dto.MentorPerformanceConfigDTO;
import cn.com.glsx.dj.businessschool.enums.BusinessSchoolEnum;
import cn.com.glsx.dj.businessschool.mapper.StaffPerformanceBonusConfigMapper;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceBonusConfig;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceConfig;
import cn.com.glsx.framework.core.beans.BaseModel;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.core.util.RpcAssert;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* @Author: chenx
* @Description: 员工绩效奖励值配置service
* @Date: 2024/1/2 16:43
* @Version: 1.0
*/
@Slf4j
@Service
@Transactional(propagation= Propagation.SUPPORTS,rollbackFor= RpcServiceException.class)
public class StaffPerformanceBonusConfigService {
@Autowired
private StaffPerformanceBonusConfigMapper staffPerformanceBonusConfigMapper;
@Lazy
@Autowired
private StaffPerformanceBonusConfigService thiz;
public List<StaffPerformanceBonusConfig> getByStaffPerformanceConfigIdAndBonusType(Integer staffPerformanceConfigId, Byte bonusType) {
return staffPerformanceBonusConfigMapper.getByStaffPerformanceConfigIdAndBonusType(staffPerformanceConfigId, bonusType);
}
public List<StaffPerformanceBonusConfig> getByMentorPerformanceConfigIdAndBonusType(Integer mentorPerformanceConfigId, Byte bonusType) {
try {
RpcAssert.assertNotNull(mentorPerformanceConfigId, DefaultErrorEnum.DATA_NULL, "mentorPerformanceConfigId not be null");
RpcAssert.assertNotNull(bonusType, DefaultErrorEnum.DATA_NULL, "bonusType not be null");
StaffPerformanceBonusConfig condition = StaffPerformanceBonusConfig.builder().mentorPerformanceConfigId(mentorPerformanceConfigId).bonusType(bonusType).deletedFlag(BaseModel.DeletedFlagEnum.N.name()).build();
return staffPerformanceBonusConfigMapper.select(condition);
}catch (RpcServiceException rpcServiceException){
throw rpcServiceException;
}catch (Exception e) {
log.error("异常:{}", e);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, e.getMessage());
}
}
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = RpcServiceException.class)
public void deleteByStaffPerformanceConfigId(Integer staffPerformanceConfigId, String updatedBy) {
RpcAssert.assertNotNull(staffPerformanceConfigId, DefaultErrorEnum.DATA_NULL, "staffPerformanceConfigId not be null");
RpcAssert.assertNotNull(updatedBy, DefaultErrorEnum.DATA_NULL, "updatedBy not be null");
staffPerformanceBonusConfigMapper.deleteByStaffPerformanceConfigId(staffPerformanceConfigId, updatedBy);
}
@Transactional(propagation= Propagation.REQUIRED,rollbackFor=RpcServiceException.class)
public void batchInsert(List<StaffPerformanceBonusConfig> list, StaffPerformanceConfig employeePerformanceConfig) {
for (StaffPerformanceBonusConfig staffPerformanceBonusConfig : list) {
staffPerformanceBonusConfig.setStaffPerformanceConfigId(employeePerformanceConfig.getId());
staffPerformanceBonusConfig.setUpdatedBy(employeePerformanceConfig.getUpdatedBy());
thiz.insert(staffPerformanceBonusConfig);
}
}
@Transactional(propagation= Propagation.REQUIRED,rollbackFor=RpcServiceException.class)
public void insert(StaffPerformanceBonusConfig config) {
RpcAssert.assertNotNull(config, DefaultErrorEnum.DATA_NULL, "EmployeePerformanceBonusConfig not be null");
RpcAssert.assertIsTrue(Objects.nonNull(config.getStaffPerformanceConfigId()) || Objects.nonNull(config.getMentorPerformanceConfigId()), DefaultErrorEnum.DATA_NULL, "performanceConfigId not be null");
RpcAssert.assertNotNull(config.getBonusType(), DefaultErrorEnum.DATA_NULL, "StaffPerformanceBonusConfig.bonusType not be null");
RpcAssert.assertNotNull(config.getStartValue(), DefaultErrorEnum.DATA_NULL, "StaffPerformanceBonusConfig.startValue not be null");
RpcAssert.assertNotNull(config.getEndValue(), DefaultErrorEnum.DATA_NULL, "StaffPerformanceBonusConfig.endValue not be null");
RpcAssert.assertNotNull(config.getCalculateValue(), DefaultErrorEnum.DATA_NULL, "StaffPerformanceBonusConfig.calculateValue not be null");
RpcAssert.assertNotNull(config.getUpdatedBy(), DefaultErrorEnum.DATA_NULL, "StaffPerformanceBonusConfig.updatedBy not be null");
Date now = new Date();
config.setCreatedBy(config.getUpdatedBy());
config.setCreatedDate(now);
config.setUpdatedDate(now);
config.setDeletedFlag(BaseModel.DeletedFlagEnum.N.name());
staffPerformanceBonusConfigMapper.insertUseGeneratedKeys(config);
}
/**
* 保存员工导师提成奖励配置
*
* @param mentorPerformanceConfigDTO
* @return void
* @author caiym
* @date 2024年01月09日 18:14:38
*/
@Transactional(propagation= Propagation.REQUIRED,rollbackFor=RpcServiceException.class)
public void saveStaffPerformanceBonusConfig(MentorPerformanceConfigDTO mentorPerformanceConfigDTO) {
try {
RpcAssert.assertNotNull(mentorPerformanceConfigDTO, DefaultErrorEnum.DATA_NULL,"mentorPerformanceConfigDTO not be null");
RpcAssert.assertNotNull(mentorPerformanceConfigDTO.getId(), DefaultErrorEnum.DATA_NULL,"mentorPerformanceConfigDTO.getId() not be null");
if (CollectionUtils.isNotEmpty(mentorPerformanceConfigDTO.getTutorBonusConfigs())) {
for (StaffPerformanceBonusConfig tutorBonusConfig : mentorPerformanceConfigDTO.getTutorBonusConfigs()) {
tutorBonusConfig.setMentorPerformanceConfigId(mentorPerformanceConfigDTO.getId());
tutorBonusConfig.setBonusType(BusinessSchoolEnum.EmployeePerformanceBonusTypeEnum.MENTOR_BONUS.getValue());
tutorBonusConfig.setUpdatedBy(mentorPerformanceConfigDTO.getUpdatedBy());
thiz.insert(tutorBonusConfig);
}
}
}catch (RpcServiceException rpcServiceException){
throw rpcServiceException;
}catch (Exception e) {
log.error("异常:{}", e);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, e.getMessage());
}
}
}
package cn.com.glsx.dj.businessschool.service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceInfo;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import cn.com.glsx.dj.businessschool.constant.CommonConstants;
import cn.com.glsx.dj.businessschool.dto.StaffPerformanceResultSnapshotDTO;
import cn.com.glsx.dj.businessschool.mapper.StaffPerformanceResultSnapshotMapper;
import cn.com.glsx.dj.businessschool.model.StaffPerformanceResultSnapshot;
import cn.com.glsx.framework.core.beans.BaseModel;
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 cn.com.glsx.framework.core.util.RpcAssert;
import lombok.extern.slf4j.Slf4j;
/**
* @Author: chenx
* @Description: 员工月份绩效快照service
* @Date: 2024/1/2 16:44
* @Version: 1.0
*/
@Slf4j
@Service
@Transactional(propagation= Propagation.SUPPORTS,rollbackFor= RpcServiceException.class)
public class StaffPerformanceResultSnapshotService {
@Autowired
private StaffPerformanceResultSnapshotMapper staffPerformanceResultSnapshotMapper;
@Autowired
private StaffPerformanceConfigService staffPerformanceConfigService;
@Autowired
private MentorPerformanceConfigService mentorPerformanceConfigService;
@Autowired
private StaffPerformanceInfoService staffPerformanceInfoService;
public List<StaffPerformanceResultSnapshotDTO> list(StaffPerformanceResultSnapshotDTO condition){
RpcAssert.assertNotNull(condition, DefaultErrorEnum.PARAMETER_NULL, "查询条件不能为空");
try {
return staffPerformanceResultSnapshotMapper.list(condition);
}catch(Exception e) {
log.error(e.getMessage(),e);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, e.getMessage());
}
}
/**
* 分页查询导出员工月份绩效所属数据
*
* @param pagination
* @return com.github.pagehelper.Page<cn.com.glsx.dj.businessschool.dto.StaffPerformanceResultSnapshotDTO>
* @author caiym
* @date 2024年01月10日 16:48:13
*/
public Page<StaffPerformanceResultSnapshotDTO> pageForExport(RpcPagination<StaffPerformanceResultSnapshotDTO> pagination) {
try {
Page<StaffPerformanceResultSnapshotDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(),pagination.isNeedCount());
staffPerformanceResultSnapshotMapper.list(pagination.getCondition());
if (CollectionUtils.isNotEmpty(page.getResult())) {
for (StaffPerformanceResultSnapshotDTO dto : page.getResult()) {
if (dto.getStaffPerformanceConfigId() != null) {
dto.setStaffPerformanceConfig(staffPerformanceConfigService.getById(dto.getStaffPerformanceConfigId()));
}
if (dto.getMentorPerformanceConfigId() != null) {
dto.setMentorPerformanceConfig(mentorPerformanceConfigService.getById(dto.getMentorPerformanceConfigId()));
}
StaffPerformanceInfo staffPerformanceInfo = staffPerformanceInfoService.getStaffPerformanceInfoByStaffUuid(dto.getStaffUuid());
if (Objects.nonNull(staffPerformanceInfo)) {
dto.setAccountCreatedDate(staffPerformanceInfo.getAccountCreatedDate());
}
}
}
return page;
}catch (RpcServiceException rpcServiceException){
throw rpcServiceException;
}catch (Exception e) {
log.error("异常:{}", e);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, e.getMessage());
}
}
@Transactional(propagation= Propagation.REQUIRED,rollbackFor=RpcServiceException.class)
public void deleteByPerformanceMonth(String performanceMonth, Byte sceneType) {
staffPerformanceResultSnapshotMapper.deleteByPerformanceMonth(performanceMonth, sceneType);
}
/**
* 批量插入
* @param resultSnapshotList
*/
public void batchInsert(List<StaffPerformanceResultSnapshot> resultSnapshotList) {
RpcAssert.assertNotEmpty(resultSnapshotList, DefaultErrorEnum.PARAMETER_NULL, "员工月份绩效快照记录不能为空");
for (StaffPerformanceResultSnapshot snapshot : resultSnapshotList) {
RpcAssert.assertNotNull(snapshot.getPerformanceMonth(), DefaultErrorEnum.PARAMETER_NULL, "绩效月份不能为空");
RpcAssert.assertNotNull(snapshot.getSceneType(), DefaultErrorEnum.PARAMETER_NULL, "场景类型不能为空");
RpcAssert.assertNotNull(snapshot.getStaffUuid(), DefaultErrorEnum.PARAMETER_NULL, "员工uuid不能为空");
RpcAssert.assertNotNull(snapshot.getYqMerchantId(), DefaultErrorEnum.PARAMETER_NULL, "所属园区店商户号不能为空");
RpcAssert.assertNotNull(snapshot.getYqMerchantName(), DefaultErrorEnum.PARAMETER_NULL, "所属园区店不能为空");
Integer upgradeOrderCount = snapshot.getUpgradeOrderCount();
if (Objects.isNull(upgradeOrderCount)) {
snapshot.setUpgradeOrderCount(0);
}
BigDecimal orderMoneyTotal = snapshot.getOrderMoneyTotal();
if (Objects.isNull(orderMoneyTotal)) {
snapshot.setOrderMoneyTotal(BigDecimal.ZERO);
}
Date date = new Date();
snapshot.setCreatedDate(date);
snapshot.setUpdatedDate(date);
snapshot.setUpdatedBy(CommonConstants.DEFAULT_UPDATE_BY);
snapshot.setCreatedBy(CommonConstants.DEFAULT_UPDATE_BY);
snapshot.setDeletedFlag(BaseModel.DeletedFlagEnum.N.name());
}
staffPerformanceResultSnapshotMapper.insertList(resultSnapshotList);
}
public StaffPerformanceResultSnapshotDTO countTotal(StaffPerformanceResultSnapshotDTO condition) {
RpcAssert.assertNotNull(condition, DefaultErrorEnum.PARAMETER_NULL, "查询条件不能为空");
try {
return staffPerformanceResultSnapshotMapper.countTotal(condition);
}catch(Exception e) {
log.error(e.getMessage(),e);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, e.getMessage());
}
}
}
package cn.com.glsx.dj.businessschool.service;
import cn.com.glsx.dj.businessschool.dto.TeachTaskAreaOperatorDTO;
import cn.com.glsx.dj.businessschool.mapper.TeachTaskAreaOperatorMapper;
import cn.com.glsx.dj.businessschool.model.TeachTaskAreaOperator;
import cn.com.glsx.framework.core.beans.BaseModel;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.core.util.RpcAssert;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @ClassName TeachTaskAreaOperatorService
* @Description 带教任务区域运营人员service
* @Author lqWang
* @Date 2025/3/31 16:29
*/
@Slf4j
@Service
@Transactional(propagation= Propagation.SUPPORTS,rollbackFor= RpcServiceException.class)
public class TeachTaskAreaOperatorService {
@Autowired
private TeachTaskAreaOperatorMapper teachTaskAreaOperatorMapper;
/**
* @description: 保存带教任务区域运营人员记录
* @param: [teachTaskAreaOperator]
* @return: void
* @author: lqWang
* @date: 2025/3/31 16:43
*/
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = RpcServiceException.class)
public void insertTeachTaskAreaOperatorList(List<TeachTaskAreaOperatorDTO> teachTaskAreaOperatorList) {
try {
teachTaskAreaOperatorMapper.insertTeachTaskAreaOperatorList(teachTaskAreaOperatorList);
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, e.getMessage());
}
}
/**
* @description: 获取
* @param: [id]
* @return: java.util.List<cn.com.glsx.dj.businessschool.dto.TeachTaskAreaOperatorDTO>
* @author: lqWang
* @date: 2025/4/8 17:18
*/
public List<TeachTaskAreaOperator> selectTeachTaskAreaOperatorListByRecordId(Integer id) {
try {
TeachTaskAreaOperator teachTaskAreaOperator = TeachTaskAreaOperator.builder().teachTaskRecordId(id).deletedFlag(BaseModel.DeletedFlagEnum.N.name()).build();
return teachTaskAreaOperatorMapper.select(teachTaskAreaOperator);
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, e.getMessage());
}
}
}
package cn.com.glsx.dj.businessschool.service.common;
import cn.com.glsx.dj.businessschool.dto.TeachTaskWechatMessageDTO;
import cn.com.glsx.dj.smartcarlife.dto.LifeCustomerCouponDTO;
import cn.com.glsx.entmicro.model.request.EntmicroStaffRequest;
import cn.com.glsx.entmicro.model.response.EntmicroStaffResponse;
import cn.com.glsx.entmicro.remote.EntmicroStaffRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.scrm.wechat.dto.workwechat.message.WorkWechatTextCardMessageDTO;
import cn.com.glsx.scrm.wechat.dto.workwechat.message.request.SendWorkWechatMessageRequestDTO;
import cn.com.glsx.scrm.wechat.dto.workwechat.message.response.SendWorkWechatMessageResponseDTO;
import cn.com.glsx.scrm.wechat.enums.WorkWechatAppMessageTypeEnum;
import cn.com.glsx.scrm.wechat.remote.WorkWechatMessageRemote;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @ClassName SendWorkWechatMessageService
* @Description 发送企微消息通用service
* @Author lqWang
* @Date 2025/4/4 16:20
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.SUPPORTS, rollbackFor = RpcServiceException.class)
public class SendWorkWechatMessageService {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private Environment env;
@Resource
WorkWechatMessageRemote workWechatMessageRemote;
@Autowired
private EntmicroStaffRemote entmicroStaffRemote;
/**
* 发送企微文本消息
*
*/
public boolean sendSingleWechatMessage(SendWorkWechatMessageRequestDTO sendWorkWechatMessageRequestDTO) {
log.info("sendMessage request:{}", JSON.toJSONString(sendWorkWechatMessageRequestDTO));
RpcResponse<SendWorkWechatMessageResponseDTO> sendWorkWechatMessageResponseDTORpcResponse = workWechatMessageRemote
.sendMessage(sendWorkWechatMessageRequestDTO);
log.info("sendMessage resp:{}", JSON.toJSONString(sendWorkWechatMessageResponseDTORpcResponse));
if (!sendWorkWechatMessageResponseDTORpcResponse.isSuccess()) {
logger.info("发送企微消息,参数为:{},异常:{}", sendWorkWechatMessageRequestDTO,
sendWorkWechatMessageResponseDTORpcResponse.getException().getMessage());
return false;
}
return true;
}
public boolean sendTeachTaskWorkWechatMessage(TeachTaskWechatMessageDTO teachTaskInfo, Integer sendWorkWechatMerchantId, String userIds) {
try {
if (StringUtils.isBlank(userIds)) {
return false;
}
SendWorkWechatMessageRequestDTO sendWorkWechatMessageRequestDTO = new SendWorkWechatMessageRequestDTO();
sendWorkWechatMessageRequestDTO.setToUser(userIds);
sendWorkWechatMessageRequestDTO.setMerchantId(sendWorkWechatMerchantId);
sendWorkWechatMessageRequestDTO.setMsgType(WorkWechatAppMessageTypeEnum.TEXTCARD.getValue());
WorkWechatTextCardMessageDTO textCard = new WorkWechatTextCardMessageDTO();
textCard.setBtnTxt(env.getProperty("teach.task.work.wechat.message.textcard.btntext", "立即完成"));
textCard.setDescription(
String.format(env.getProperty("teach.task.work.wechat.message.textcard.description"),
teachTaskInfo.getMerchantName(),teachTaskInfo.getCreatedBy(),teachTaskInfo.getSupportTypeStr(),teachTaskInfo.getCreatedDateStr()));
textCard.setTitle(env.getProperty("teach.task.work.wechat.message.textcard.title", "带教任务提醒"));
textCard.setUrl(String.format(env.getProperty("teach.task.work.wechat.message.textcard.url")));
sendWorkWechatMessageRequestDTO.setTextCard(textCard);
log.info("SendWorkWechatMessageRequestDTO:{}",JSON.toJSONString(sendWorkWechatMessageRequestDTO));
return sendSingleWechatMessage(sendWorkWechatMessageRequestDTO);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return false;
}
public Map<String,String> getSendUserIds(){
EntmicroStaffRequest entmicroStaffRequest = new EntmicroStaffRequest();
entmicroStaffRequest.setMerchantId(env.getProperty("dj.send.work.wechat.merchant.id", Integer.class, 44202977));
RpcResponse<List<EntmicroStaffResponse>> staffResponse = entmicroStaffRemote.findStaffByMerchantId(entmicroStaffRequest);
if (staffResponse.hasResult()) {
List<EntmicroStaffResponse> result = staffResponse.getResult();
return result.stream().filter(item ->{
return StringUtils.isNotBlank(item.getStaffPhone()) && StringUtils.isNotBlank(item.getUserId());
}).collect(Collectors.toMap(EntmicroStaffResponse::getStaffPhone, EntmicroStaffResponse::getUserId
,(a,b)->a));
}
if (staffResponse.isFailed()) {
log.warn("获取发送员工失败,失败原因{}", staffResponse.getException().getMessage());
}
return null;
}
}
package cn.com.glsx.dj.businessschool.util;
import cn.com.glsx.dj.businessschool.constant.CommonConstants;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class CommonUtil {
public static <T> T getFirst(List<T> list) {
if(CollectionUtils.isNotEmpty(list)) {
return list.get(0);
}
return null;
}
public static boolean contains(String ori,String content,String separator) {
if(StringUtils.isBlank(ori) || StringUtils.isBlank(content) || StringUtils.isBlank(separator)) {
return false;
}
return Arrays.asList(ori.split(separator)).contains(content);
}
public static List<Integer> convert2Integer(String[] strArr) {
if(strArr == null || strArr.length == 0) {
return null;
}
List<Integer> list = new ArrayList<>();
for(String s:strArr) {
try {
list.add(Integer.valueOf(s));
}catch(Exception e) {
}
}
return list.isEmpty() ? null:list;
}
public static List<Byte> convertByte(String[] strArr) {
if (strArr == null || strArr.length == 0) {
return null;
}
List<Byte> list = new ArrayList<>();
for (String s : strArr) {
try {
list.add(Byte.valueOf(s));
} catch (Exception e) {
}
}
return list.isEmpty() ? null : list;
}
/**
* 根据费用类目比例计算值, 默认保存两位小数,向上舍入
*
* @param baseValue 要计算的值
* @param ratio 比例
* @return
*/
public static BigDecimal calculateRatio(BigDecimal baseValue, BigDecimal ratio) {
return calculateRatio(baseValue, ratio, BigDecimal.ROUND_UP);
}
/**
* 根据费用类目比例计算值, 默认保存两位小数
*
* @param baseValue 要计算的值
* @param ratio 比例
* @param roundingMode 舍入方式
* @return
*/
public static BigDecimal calculateRatio(BigDecimal baseValue, BigDecimal ratio, int roundingMode) {
return calculateRatio(baseValue, ratio, CommonConstants.SCALE, roundingMode);
}
/**
*
* @param baseValue 要计算的值
* @param ratio 比例
* @param scale 保留的小数位
* @param roundingMode 舍入方式
* @return
*/
public static BigDecimal calculateRatio(BigDecimal baseValue, BigDecimal ratio, int scale, int roundingMode) {
return baseValue.multiply(ratio).divide(CommonConstants.ONEHUNDRED_BIGDECIMAL, scale, roundingMode);
}
/**
* 10进制转26进制
* @param serialNumber 26进制初始值 e.g. AAA
* @param serialNumber 10进制值 e.g. 100
* @return
*/
public static String generateSeqNumber(String seqNumberStr, Integer serialNumber) {
char[] chars = seqNumberStr.toCharArray();
while (serialNumber > 1) {
int lastIndex = seqNumberStr.length() - 1;
if (!(seqNumberStr.charAt(lastIndex) == 'Z' && seqNumberStr.charAt(0) == 'Z')) {
if (chars[lastIndex] == 'Z') {
int point = lastIndex - 1;
while (point >= 0) {
if (chars[point] == 'Z') {
point--;
} else {
chars[point] = (char) ((int) chars[point] + 1);
chars[lastIndex] = 'A';
break;
}
}
} else {
chars[lastIndex] = (char) (chars[lastIndex] + 1);
}
serialNumber--;
}
}
return new String(chars);
}
/**
* 校验BigDecimal值是否在区间范围内,闭区间
* @param value 校验值
* @param minValue 最小值
* @param maxValue 最大值
* @param errorMessage 异常信息
* @return
*/
public static BigDecimal checkDecimalValueValid(@NotNull BigDecimal value, @NotNull BigDecimal minValue, @NotNull BigDecimal maxValue, String errorMessage) {
if (value.compareTo(minValue) < 0 || value.compareTo(maxValue) > 0) {
throw new RpcServiceException(DefaultErrorEnum.VALIDATE_FAILED, errorMessage);
}
return value;
}
}
package cn.com.glsx.dj.businessschool.util;
import lombok.extern.slf4j.Slf4j;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @ClassName DateUtils
* @Description 日期工具类
* @Author lqWang
* @Date 2025/3/31 19:30
*/
@Slf4j
public class DateUtils {
/**
* @description: 获取年月日
* @return: java.lang.String
* @author: lqWang
* @date: 2025/3/31 19:32
*/
public static String getCurrentDate(Date Date) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
return dateFormat.format(Date);
}
/**
* @description: 获取传入时间年月日
* @return: java.lang.String
* @author: lqWang
* @date: 2025/3/31 19:32
*/
public static String getFormatDate(Date date) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return dateFormat.format(date);
}
}
package cn.com.glsx.dj.businessschool.util;
\ 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.businessschool.mapper.DemoMapper">
<select id="load" resultType="cn.com.glsx.dj.businessschool.model.DemoModel">
</select>
</mapper>
\ 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.businessschool.mapper.MentorPerformanceConfigMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.businessschool.model.MentorPerformanceConfig" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="staff_uuid" property="staffUuid" jdbcType="VARCHAR" />
<result column="scene_type" property="sceneType" jdbcType="TINYINT" />
<result column="title" property="title" jdbcType="TINYINT" />
<result column="shop_merchant_id" property="shopMerchantId" jdbcType="INTEGER" />
<result column="shop_merchant_name" property="shopMerchantName" 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="StaffPerformanceInfoDTOResultMap" type="cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO">
<result column="staff_uuid" property="staffUuid" jdbcType="VARCHAR" />
<result column="staff_name" property="staffName" jdbcType="VARCHAR" />
<result column="staff_type" property="staffType" jdbcType="TINYINT" />
<result column="phone_number" property="phoneNumber" jdbcType="VARCHAR" />
<result column="merchant_id" property="merchantId" jdbcType="INTEGER" />
<result column="merchant_name" property="merchantName" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.businessschool.dto.MentorPerformanceConfigDTO" extends="BaseResultMap">
<result column="staff_name" property="staffName" jdbcType="VARCHAR" />
<result column="phone_number" property="phoneNumber" jdbcType="VARCHAR" />
<result column="merchant_id" property="merchantId" jdbcType="INTEGER" />
<result column="merchant_name" property="merchantName" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, staff_uuid, scene_type, title, shop_merchant_id, shop_merchant_name, created_by, created_date, updated_by, updated_date,
deleted_flag
</sql>
<update id="deleteByStaffUuid">
update dj_car_life_mentor_performance_config
set deleted_flag = 'D',
updated_by = #{updatedBy},
updated_date = now()
where staff_uuid = #{staffUuid} and deleted_flag = 'N'
</update>
<select id="listAvailableStudent" parameterType="cn.com.glsx.dj.businessschool.dto.MentorPerformanceConfigDTO" resultMap="StaffPerformanceInfoDTOResultMap">
select dclspi.staff_uuid, dclspi.staff_name, dclspi.phone_number, dclspi.merchant_id, dclspi.merchant_name
from dj_car_life_staff_performance_info dclspi
<where>
dclspi.deleted_flag = 'N' and dclspi.performance_flag = 'Y'
and not exists(
select 1
from dj_car_life_staff_performance_relation dclspr
inner join dj_car_life_mentor_performance_config dclmpc
on dclmpc.id = dclspr.mentor_performance_config_id
and dclmpc.deleted_flag = 'N'
and dclmpc.scene_type = #{sceneType}
where dclspr.deleted_flag = 'N'
and (dclspi.staff_uuid = dclspr.student_staff_uuid
or dclspi.staff_uuid = dclspr.mentor_staff_uuid)
)
<if test="studentStaffUuids != null and studentStaffUuids.size()>0">
and dclspi.staff_uuid in
<foreach collection="studentStaffUuids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="merchantIds != null and merchantIds.size()>0">
and dclspi.merchant_id in
<foreach collection="merchantIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="merchantId != null">
and dclspi.merchant_id = #{merchantId}
</if>
</where>
</select>
<select id="list" parameterType="cn.com.glsx.dj.businessschool.dto.MentorPerformanceConfigDTO" resultMap="DTOResultMap">
select dclmpc.*, dclspi.staff_name, dclspi.phone_number, dclspi.merchant_id, dclspi.merchant_name
from dj_car_life_mentor_performance_config dclmpc
left join dj_car_life_staff_performance_info dclspi on dclmpc.staff_uuid = dclspi.staff_uuid and dclspi.deleted_flag = 'N'
<where>
dclmpc.deleted_flag = 'N'
<if test="staffUuid != null">
and dclmpc.staff_uuid = #{staffUuid}
</if>
<if test="sceneType != null">
and dclmpc.scene_type = #{sceneType}
</if>
</where>
</select>
</mapper>
\ 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.businessschool.mapper.StaffOrderPerformanceDetailMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.businessschool.model.StaffOrderPerformanceDetail">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
<result column="scene_type" jdbcType="TINYINT" property="sceneType" />
<result column="mentor_staff_uuid" jdbcType="VARCHAR" property="mentorStaffUuid" />
<result column="staff_uuid" jdbcType="VARCHAR" property="staffUuid" />
<result column="mentor_staff_related_date" jdbcType="TIMESTAMP" property="mentorStaffRelatedDate" />
<result column="staff_name" jdbcType="VARCHAR" property="staffName" />
<result column="mentor_performance_config_id" jdbcType="INTEGER" property="mentorPerformanceConfigId" />
<result column="student_staff_performance_config_id" jdbcType="INTEGER" property="studentStaffPerformanceConfigId" />
<result column="order_time" jdbcType="TIMESTAMP" property="orderTime" />
<result column="pay_success_time" jdbcType="TIMESTAMP" property="paySuccessTime" />
<result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="customer_name" jdbcType="VARCHAR" property="customerName" />
<result column="customer_phone" jdbcType="VARCHAR" property="customerPhone" />
<result column="goods_type" jdbcType="INTEGER" property="goodsType" />
<result column="order_goods_name" jdbcType="VARCHAR" property="orderGoodsName" />
<result column="order_money" jdbcType="DECIMAL" property="orderMoney" />
<result column="upgrade_flag" jdbcType="TINYINT" property="upgradeFlag" />
<result column="order_status" jdbcType="TINYINT" property="orderStatus" />
<result column="order_bonus" jdbcType="DECIMAL" property="orderBonus" />
<result column="mentor_bonus" jdbcType="DECIMAL" property="mentorBonus" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="deleted_flag" jdbcType="CHAR" property="deletedFlag" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, order_code, scene_type, mentor_staff_uuid, staff_uuid, mentor_staff_related_date,
staff_name, mentor_performance_config_id, student_staff_performance_config_id, order_time,
pay_success_time, merchant_id, merchant_name, customer_name, customer_phone, goods_type, order_goods_name,
order_money, upgrade_flag, order_status, order_bonus, mentor_bonus, created_by, created_date, updated_by,
updated_date, deleted_flag
</sql>
<resultMap extends="BaseResultMap" id="DTOResultMap" type="cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceDetailDTO">
<result column="mentor_staff_name" property="mentorStaffName" />
</resultMap>
<update id="updateBonusConfigIdAndBonus">
update dj_car_life_staff_order_performance_detail
set
mentor_performance_config_id = #{mentorPerformanceConfigId},
student_staff_performance_config_id = #{studentStaffPerformanceConfigId},
order_bonus = #{orderBonus},
mentor_bonus = #{mentorBonus},
updated_by = #{updatedBy},
updated_date = now()
where id = #{id}
</update>
<select id="list" parameterType="cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceDetailDTO" resultMap="DTOResultMap">
select
sopd.id, sopd.order_code, sopd.scene_type, sopd.mentor_staff_uuid, sopd.staff_uuid, sopd.mentor_staff_related_date,
sopd.staff_name, sopd.mentor_performance_config_id,
sopd.student_staff_performance_config_id, sopd.order_time, sopd.pay_success_time, sopd.merchant_id, sopd.merchant_name,
sopd.customer_name, sopd.customer_phone, sopd.goods_type, sopd.order_goods_name, sopd.order_money, sopd.upgrade_flag, sopd.order_bonus,
sopd.mentor_bonus, sopd.created_by, sopd.created_date,
sopd.updated_by, sopd.updated_date, sopd.deleted_flag,
msp.staff_name as mentor_staff_name
from dj_car_life_staff_order_performance_detail sopd
left join dj_car_life_staff_performance_info msp on msp.staff_uuid=sopd.mentor_staff_uuid and msp.deleted_flag='N'
<where>
sopd.deleted_flag ='N'
and order_status = 1
<if test="startPaySuccessTime != null and startPaySuccessTime !=''">
and sopd.pay_success_time <![CDATA[ >= ]]> #{startPaySuccessTime}
</if>
<if test="endPaySuccessTime != null and endPaySuccessTime !=''">
and sopd.pay_success_time <![CDATA[ <= ]]> #{endPaySuccessTime}
</if>
<if test="mentorOrStudentStaffUuid != null and mentorOrStudentStaffUuid !=''">
and (
sopd.staff_uuid = #{mentorOrStudentStaffUuid} or
sopd.mentor_staff_uuid = #{mentorOrStudentStaffUuid}
)
</if>
<if test="staffUuid != null and staffUuid !=''">
and sopd.staff_uuid = #{staffUuid}
</if>
<if test="mentorStaffUuid != null and mentorStaffUuid !=''">
and sopd.mentor_staff_uuid = #{mentorStaffUuid}
</if>
<if test="upgradeFlag != null">
and sopd.upgrade_flag = #{upgradeFlag}
</if>
<if test="orderCode != null and orderCode != ''">
and sopd.order_code = #{orderCode}
</if>
<if test="sceneType != null">
and sopd.scene_type = #{sceneType}
</if>
<if test="merchantId != null">
and sopd.merchant_id = #{merchantId}
</if>
order by sopd.pay_success_time desc
</where>
</select>
<select id="countTotal" parameterType="cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceDetailDTO" resultType="cn.com.glsx.dj.businessschool.dto.StaffOrderPerformanceTotalDTO">
SELECT
staff_uuid as staffUuid,
sum(ifnull(order_money,0)) as orderMoney ,
sum(ifnull(order_bonus,0)) as orderBonus,
sum(ifnull(mentor_bonus,0)) as mentorBonus,
count(id) as orderCount
FROM dj_car_life_staff_order_performance_detail
<where>
deleted_flag ='N'
and order_status = 1
<if test="startPaySuccessTime != null and startPaySuccessTime !=''">
and pay_success_time <![CDATA[ >= ]]> #{startPaySuccessTime}
</if>
<if test="endPaySuccessTime != null and endPaySuccessTime !=''">
and pay_success_time <![CDATA[ <= ]]> #{endPaySuccessTime}
</if>
<if test="mentorOrStudentStaffUuid != null and mentorOrStudentStaffUuid !=''">
and (
staff_uuid = #{mentorOrStudentStaffUuid} or
mentor_staff_uuid = #{mentorOrStudentStaffUuid}
)
</if>
<if test="sceneType != null">
and scene_type = #{sceneType}
</if>
<if test="upgradeFlag != null">
and upgrade_flag = #{upgradeFlag}
</if>
<if test="merchantId != null">
and merchant_id = #{merchantId}
</if>
</where>
<if test="groupByType != null and groupByType == 1">
group by staff_uuid
</if>
</select>
</mapper>
\ 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.businessschool.mapper.StaffPerformanceBonusConfigMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.businessschool.model.StaffPerformanceBonusConfig">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="staff_performance_config_id" jdbcType="INTEGER" property="staffPerformanceConfigId" />
<result column="mentor_performance_config_id" jdbcType="INTEGER" property="mentorPerformanceConfigId" />
<result column="bonus_type" jdbcType="TINYINT" property="bonusType" />
<result column="start_value" jdbcType="DECIMAL" property="startValue" />
<result column="end_value" jdbcType="DECIMAL" property="endValue" />
<result column="calculate_value" jdbcType="DECIMAL" property="calculateValue" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="deleted_flag" jdbcType="CHAR" property="deletedFlag" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, staff_performance_config_id, mentor_performance_config_id, bonus_type, start_value,
end_value, calculate_value, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<update id="deleteByStaffPerformanceConfigId">
update dj_car_life_staff_performance_bonus_config
set deleted_flag = 'D',
updated_by = #{updatedBy},
updated_date = now()
where staff_performance_config_id = #{staffPerformanceConfigId}
</update>
<select id="getByStaffPerformanceConfigIdAndBonusType" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from dj_car_life_staff_performance_bonus_config
where
staff_performance_config_id = #{staffPerformanceConfigId}
<if test="bonusType != null">
bonus_type = #{bonusType}
</if>
and deleted_flag = 'N'
</select>
</mapper>
\ 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.businessschool.mapper.StaffPerformanceConfigMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.businessschool.model.StaffPerformanceConfig">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="staff_uuid" jdbcType="VARCHAR" property="staffUuid" />
<result column="scene_type" jdbcType="TINYINT" property="sceneType" />
<result column="shop_merchant_id" jdbcType="INTEGER" property="shopMerchantId" />
<result column="shop_merchant_name" jdbcType="VARCHAR" property="shopMerchantName" />
<result column="basic_wage" jdbcType="DECIMAL" property="basicWage" />
<result column="minimum_wage" jdbcType="DECIMAL" property="minimumWage" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="deleted_flag" jdbcType="CHAR" property="deletedFlag" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, staff_uuid, scene_type, merchant_id, merchant_name, basic_wage, minimum_wage,
certificates_granted, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
<resultMap extends="BaseResultMap" id="DTOResultMap" type="cn.com.glsx.dj.businessschool.dto.StaffPerformanceConfigDTO">
<association javaType="cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO" property="staffPerformanceInfo">
<id column="spi_id" jdbcType="INTEGER" property="id" />
<result column="spi_staff_uuid" jdbcType="VARCHAR" property="staffUuid" />
<result column="spi_staff_name" jdbcType="VARCHAR" property="staffName" />
<result column="spi_staff_type" jdbcType="TINYINT" property="staffType" />
<result column="spi_phone_number" jdbcType="VARCHAR" property="phoneNumber" />
<result column="spi_merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="spi_merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="spi_performance_flag" jdbcType="TINYINT" property="performanceFlag" />
<result column="spi_account_created_date" jdbcType="TIMESTAMP" property="accountCreatedDate" />
<result column="view_performance_password_md5" jdbcType="VARCHAR" property="viewPerformancePasswordMd5" />
</association>
<collection javaType="java.util.List" ofType="cn.com.glsx.dj.businessschool.dto.MentorPerformanceConfigDTO" property="mentorPerformanceConfigList">
<id column="mpc_id" jdbcType="INTEGER" property="id" />
<result column="mpc_staff_uuid" jdbcType="VARCHAR" property="staffUuid" />
<result column="mpc_scene_type" jdbcType="TINYINT" property="sceneType" />
<result column="mpc_title" jdbcType="TINYINT" property="title" />
<result column="mpc_shop_merchant_id" jdbcType="TINYINT" property="shopMerchantId" />
<result column="mpc_shop_merchant_name" jdbcType="VARCHAR" property="shopMerchantName" />
</collection>
<collection javaType="java.util.List" ofType="cn.com.glsx.dj.businessschool.model.StaffPerformanceBonusConfig" property="bonusConfigList">
<id column="bc_id" jdbcType="INTEGER" property="id" />
<result column="staff_performance_config_id" jdbcType="INTEGER" property="staffPerformanceConfigId" />
<result column="mentor_performance_config_id" jdbcType="INTEGER" property="mentorPerformanceConfigId" />
<result column="bonus_type" jdbcType="TINYINT" property="bonusType" />
<result column="start_value" jdbcType="DECIMAL" property="startValue" />
<result column="end_value" jdbcType="DECIMAL" property="endValue" />
<result column="calculate_value" jdbcType="DECIMAL" property="calculateValue" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="deleted_flag" jdbcType="CHAR" property="deletedFlag" />
</collection>
<collection javaType="java.util.List" ofType="cn.com.glsx.dj.businessschool.model.StaffPerformanceRelation" property="staffPerformanceRelationList">
<id column="pr_id" jdbcType="INTEGER" property="id" />
<result column="pr_mentor_staff_uuid" jdbcType="VARCHAR" property="mentorStaffUuid" />
</collection>
</resultMap>
<update id="deleteByStaffUuid">
update dj_car_life_staff_performance_config
set deleted_flag = 'D',
updated_by = #{updatedBy},
updated_date = now()
where staff_uuid = #{staffUuid} and deleted_flag = 'N'
</update>
<select id="getPerformanceConfigByStaffUuidAndScene" resultMap="DTOResultMap">
select
pc.id, pc.staff_uuid, pc.scene_type,
pc.basic_wage, pc.minimum_wage, pc.shop_merchant_id, pc.shop_merchant_name,
bc.id as bc_id, bc.staff_performance_config_id, bc.bonus_type,
bc.start_value, bc.end_value, bc.calculate_value,
spi.id spi_id, spi.staff_uuid spi_staff_uuid, staff_name spi_staff_name, staff_type spi_staff_type,
spi.phone_number spi_phone_number, spi.merchant_id spi_merchant_id, spi.merchant_name spi_merchant_name,
spi.performance_flag spi_performance_flag, spi.account_created_date spi_account_created_date,
spi.view_performance_password_md5 spi_view_performance_password_md5,
mpc.id as mpc_id, mpc.staff_uuid as mpc_staff_uuid, mpc.scene_type as mpc_scene_type, mpc.title as mpc_title,
mpc.shop_merchant_id mpc_shop_merchant_id, mpc.shop_merchant_name mpc_shop_merchant_name,
pr.id pr_id, pr.mentor_staff_uuid pr_mentor_staff_uuid, pr.student_staff_uuid pr_student_staff_uuid
from dj_car_life_staff_performance_config pc
left join dj_car_life_staff_performance_bonus_config bc on pc.id = bc.staff_performance_config_id and
bc.deleted_flag = 'N'
left join dj_car_life_staff_performance_info spi on pc.staff_uuid = spi.staff_uuid and spi.deleted_flag = 'N'
left join dj_car_life_mentor_performance_config mpc on mpc.staff_uuid = pc.staff_uuid and mpc.deleted_flag = 'N' and pc.scene_type = mpc.scene_type
<if test="shopMerchantId != null ">
and mpc.shop_merchant_id = #{shopMerchantId}
</if>
left join dj_car_life_staff_performance_relation pr on pr.mentor_staff_uuid = pc.staff_uuid and pr.deleted_flag = 'N'
where pc.deleted_flag = 'N'
<if test="staffUuid != null and staffUuid !=''">
and pc.staff_uuid = #{staffUuid}
</if>
<if test="staffUuidList != null and staffUuidList.size()&gt;0">
and pc.staff_uuid in
<foreach close=")" collection="staffUuidList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
<if test="sceneType != null ">
and pc.scene_type = #{sceneType}
</if>
<if test="shopMerchantId != null ">
and pc.shop_merchant_id = #{shopMerchantId}
</if>
</select>
<select id="list" parameterType="cn.com.glsx.dj.businessschool.dto.StaffPerformanceConfigDTO" resultMap="DTOResultMap">
select dclspc.id, dclspc.staff_uuid, dclspc.scene_type, dclspc.shop_merchant_id, dclspc.shop_merchant_name, dclspc.basic_wage,
dclspc.minimum_wage, dclspc.created_by, dclspc.created_date, dclspc.updated_by,
dclspc.updated_date, dclspc.deleted_flag,
dclspbc.staff_performance_config_id, dclspbc.bonus_type, dclspbc.start_value, dclspbc.end_value, dclspbc.calculate_value
from dj_car_life_staff_performance_config dclspc
left join dj_car_life_staff_performance_bonus_config dclspbc on staff_performance_config_id = dclspc.id and dclspbc.deleted_flag = 'N'
<where>
dclspc.deleted_flag = 'N'
<if test="id != null">
and dclspc.id = #{id}
</if>
</where>
</select>
</mapper>
\ 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.businessschool.mapper.StaffPerformanceRelationMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.businessschool.model.StaffPerformanceRelation">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="mentor_performance_config_id" jdbcType="VARCHAR" property="mentorPerformanceConfigId" />
<result column="mentor_staff_uuid" jdbcType="VARCHAR" property="mentorStaffUuid" />
<result column="student_staff_uuid" jdbcType="VARCHAR" property="studentStaffUuid" />
<result column="ref_time" jdbcType="TIMESTAMP" property="refTime" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="deleted_flag" jdbcType="CHAR" property="deletedFlag" />
</resultMap>
<resultMap extends="BaseResultMap" id="DTOResultMap" type="cn.com.glsx.dj.businessschool.dto.StaffPerformanceRelationDTO">
<result column="scene_type" property="sceneType" />
<association javaType="cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO" property="mentorPerformanceInfo">
<result column="mentor_staff_name" property="staffName" />
<result column="performance_flag" property="performanceFlag" />
<result column="ref_time" jdbcType="TIMESTAMP" property="refTime" />
</association>
<association javaType="cn.com.glsx.dj.businessschool.dto.StaffPerformanceInfoDTO" property="studentPerformanceInfo">
<result column="student_staff_uuid" jdbcType="VARCHAR" property="staffUuid" />
<result column="student_staff_name" jdbcType="VARCHAR" property="staffName" />
<result column="student_staff_type" jdbcType="TINYINT" property="staffType" />
<result column="student_phone_number" jdbcType="VARCHAR" property="phoneNumber" />
<result column="student_merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="student_merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="ref_time" jdbcType="TIMESTAMP" property="refTime" />
</association>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, mentor_performance_config_id, mentor_staff_uuid, student_staff_uuid, ref_time, created_by, created_date, updated_by, updated_date,
deleted_flag
</sql>
<update id="deleteByStaffUuid">
update dj_car_life_staff_performance_relation
set deleted_flag = 'D',
updated_by = #{updatedBy}
where mentor_staff_uuid = #{staffUuid}
and deleted_flag = 'N'
</update>
<select id="listStaffRelation" parameterType="cn.com.glsx.dj.businessschool.dto.StaffPerformanceRelationDTO" resultMap="DTOResultMap">
select
spr.id, spr.mentor_performance_config_id, spr.mentor_staff_uuid, spr.student_staff_uuid, spr.ref_time, spr.created_date,
mpc.scene_type,
spi.staff_name as mentor_staff_name,
spi.performance_flag as performance_flag
from dj_car_life_staff_performance_relation spr
left join dj_car_life_mentor_performance_config mpc on spr.mentor_performance_config_id = mpc.id
left join dj_car_life_staff_performance_info spi on spi.staff_uuid = spr.mentor_staff_uuid and spi.deleted_flag = 'N'
where spr.deleted_flag = 'N' and mpc.deleted_flag = 'N'
<if test="mentorStaffUuid != null and mentorStaffUuid !=''">
and spr.mentor_staff_uuid = #{mentorStaffUuid}
</if>
<if test="studentStaffUuid != null and studentStaffUuid !=''">
and spr.student_staff_uuid = #{studentStaffUuid}
</if>
<if test="sceneType != null">
and mpc.scene_type = #{sceneType}
</if>
order by mpc.title desc
</select>
<select id="listByMentorPerformanceConfigId" resultMap="DTOResultMap">
select mentor_staff_uuid, dclspi.staff_uuid as student_staff_uuid, dclspi.staff_name as student_staff_name,
dclspi.phone_number as student_phone_number, dclspi.merchant_id as student_merchant_id,
dclspi.merchant_name as student_merchant_name, dclspr.ref_time
from dj_car_life_staff_performance_relation dclspr
left join dj_car_life_staff_performance_info dclspi on dclspr.student_staff_uuid = dclspi.staff_uuid and dclspi.deleted_flag = 'N'
where dclspr.deleted_flag = 'N' and mentor_performance_config_id = #{mentorPerformanceConfigId}
</select>
</mapper>
\ 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!