svn to git

0 parents
<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>rop-common</artifactId>
<version>5.3.0-SNAPSHOT</version>
<name>rop-common</name>
<properties>
<deploy.scanPackage>cn.com.glsx.dj.remote</deploy.scanPackage>
</properties>
<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>rop-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.carboutique.constant;
public interface RopConstants {
/** 登录信息session**/
final String LOGIN_SESSION = "ROP_CARBOUTIQUE_USER";
/** 登录授权手机号**/
final String LOGIN_PHONE_SESSION = "ROP_CARBOUTIQUE_USER_PHONE";
/** WEB SOCKET SESSION缓存前缀**/
final String LOGIN_WS_SESSION_PREFIX = "LOGIN_WS_SESSION_";
/** 登录的产品编号 **/
final String LOGIN_PRODUCT_CODE = "ROP_LOGIN_PRODUCT_CODE";
/** 登录账号密码**/
final String LOGIN_ACCOUNT_PWD_SESSION = "ROP_CARBOUTIQUE_USER_ACCOUNT_PWD";
}
package cn.com.glsx.dj.carboutique.enums;
public enum LoginRoleEnum {
SUPER(1,"超管"),
MERCHANT_MANAGER(2,"商户管理员"),
AREA_SUPERVISION(3,"区域运营"),
RESIDENT(4,"驻店人员"),
SALES(5, "广联销售"),
FLIGHT_SUPERVISION(6,"飞行督导"),
/** 技师**/
TECHNICIAN(7,"技师")
;
private final int value;
private final String name;
LoginRoleEnum(int value, String name){
this.value = value;
this.name = name;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
public static LoginRoleEnum getByValue(Integer value) {
if(value == null) {
return null;
}
for(LoginRoleEnum e:LoginRoleEnum.values()) {
if(e.getValue() == value) {
return e;
}
}
return null;
}
}
package cn.com.glsx.dj.carboutique.enums;
public interface RopConstants {
/** 登录信息session**/
final String LOGIN_SESSION = "ROP_CARBOUTIQUE_USER";
/** 登录授权手机号**/
final String LOGIN_PHONE_SESSION = "ROP_CARBOUTIQUE_USER_PHONE";
/** WEB SOCKET SESSION缓存前缀**/
final String LOGIN_WS_SESSION_PREFIX = "LOGIN_WS_SESSION_";
/** 登录的产品编号 **/
final String LOGIN_PRODUCT_CODE = "ROP_LOGIN_PRODUCT_CODE";
/** 登录账号密码**/
final String LOGIN_ACCOUNT_PWD_SESSION = "ROP_CARBOUTIQUE_USER_ACCOUNT_PWD";
}
package cn.com.glsx.dj.carboutique.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.springframework.beans.BeanUtils;
import java.io.Serializable;
import java.util.List;
/**
* 禁止改动(确实需要改动的与周海宝确认两边同步修改)
* @Title: LoginUserInfoResponse.java
* @Description:
* @author zhoulm
* @date 2024年8月2日 17:42:37
*/
@Data
@ToString
public class LoginUserInfoResponse implements Serializable{
/**
*
*/
private static final long serialVersionUID = -3576264570350286128L;
@ApiModelProperty(name = "accountName", notes = "登录账号", dataType = "string", required = true, example = "")
private String accountName;
@ApiModelProperty(name = "merchantId", notes = "商户号", dataType = "int", required = true, example = "")
private Integer merchantId;
@ApiModelProperty(notes = "账号类型(4门店,3片区(市级经销商),2大区(省级经销商),1总部(工厂))", dataType = "int", required = true, example = "")
private Integer accountLevel;
@ApiModelProperty(notes = "用户类型(1:商户,2员工)", dataType = "int", required = true, example = "")
private Integer userType;
@ApiModelProperty(name = "phone", notes = "手机号", dataType = "string", required = true, example = "")
private String phone;
/** 员工姓名**/
@ApiModelProperty(name = "name", notes = "员工姓名", dataType = "string", required = true, example = "")
private String name;
@ApiModelProperty(name = "duty", notes = "职务", dataType = "string", required = true, example = "")
private String duty;
/** 商户名称**/
@ApiModelProperty(name = "merchantName", notes = "商户名称", dataType = "string", required = true, example = "")
private String merchantName;
@ApiModelProperty(name="channelType", notes = "渠道类型", dataType = "int", example = "")
private Integer channelType;
/**是否超级管理员**/
private Boolean isSuper;
@ApiModelProperty(notes = "账号ID")
private String uuid;
@ApiModelProperty(name="createdDate", notes = "创建时间", dataType = "Date", example = "")
private String createdDate;
/**
* 用户数据权限商户ID
*/
private List<Integer> permissionMerchantIds;
/** 子登录信息**/
private LoginUserInfoResponse subLoginUser;
private List<String> merchantAccountList;
/** 登录角色**/
@ApiModelProperty(name="loginRole", notes = "登录角色 1-超管 2-商户管理员 3-区域督导 4-驻店人员", example = "")
private Integer loginRole;
@ApiModelProperty(notes = "选择的4S店商户号")
private Integer shopMerchantId;
@ApiModelProperty(notes = "选择的4S店商户名称")
private String shopMerchantName;
@ApiModelProperty(notes = "选择的业务场景")
private Byte sceneType;
@ApiModelProperty(notes = "在当前选择的4S下的登录角色 3-区域督导 4-驻店人员", example = "")
private Integer loginRoleOnSelectMerchant;
@ApiModelProperty(notes = "业务id(员工或者商户)")
private Integer bussinessId;
public LoginUserInfoResponse clone(){
LoginUserInfoResponse r = new LoginUserInfoResponse();
BeanUtils.copyProperties(this, r);
return r;
}
}
package cn.com.glsx.dj.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.enums;
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.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.smartcarlife.constant;
public interface RopConstants {
/** 登录信息session**/
final String LOGIN_SESSION = "ROP_USER";
/** 登录令牌存贮有效期(单位:秒)**/
final int LOGIN_TOKEN_EXPIRE_TIME = 5 * 60;
/** 登录跳转地址**/
final String LOGIN_REDIRECT_URL = "/loginByToken?token=";
/** WEB SOCKET SESSION缓存前缀**/
final String LOGIN_WS_SESSION_PREFIX = "SMARTCARLIFE_LOGIN_WS_SESSION_";
/**选择登录令牌 **/
public static final String LOGIN_SELECT_TOKEN = "SMARTCARLIFE_LOGIN_SELECT_";
}
package cn.com.glsx.dj.smartcarlife.dto;
import cn.com.glsx.dj.smartcarlife.enums.LoginSourceTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.List;
/**
* @Title: LoginUserDTO.java !!!!修改后rop-dj-business-school的pom需要同步且重新构建
* @Description: 嘀加智享车生活rop登录用户信息
* @author caiym
* @date 2020年12月08日 10:29
* @version V1.0.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@Data
@ToString
public class LoginUserDTO implements Serializable{
private static final long serialVersionUID = -3255611510352134004L;
/** 有效的账号状态 **/
public static final int ENABLED_STATUS = 2;
public static final int ADMIN = 1;
@ApiModelProperty(notes = "登录类型2.员工 1.商户")
private Integer userType;
@ApiModelProperty(notes = "用户名")
private String loginAccout;
@ApiModelProperty(notes = "姓名")
private String userName;
private String merchantName;
private Integer bussinessId;
private Integer accountLevel;
private Integer status;
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
private String phone;
private String openId;
@ApiModelProperty(notes = "渠道类型")
private String channelType;
@ApiModelProperty(notes = "商户模式 1.集团版 2.门店版")
private Integer merchantModel;
@ApiModelProperty(notes = "是否超管(1:是否,0:否)")
private Integer isAdmin;
@ApiModelProperty(notes = "sap编码")
private String sapCode;
@ApiModelProperty(notes = "企微id")
private String entmicroId;
@ApiModelProperty(notes = "账号唯一id")
private String uuid;
@ApiModelProperty(notes = "头像")
private String staffAvatar;
private Byte loginSource = LoginSourceTypeEnum.D_PLUS.getValue();
@ApiModelProperty(notes = "登录角色 3-区域督导 4-广联销售")
private Integer loginRole;
@ApiModelProperty(notes = "广联数科下角色名称")
private String roleName;
/**
* 用户数据权限商户ID
*/
private List<Integer> permissionMerchantIds;
private List<String> merchantAccountList;
@ApiModelProperty(notes = "登录角色在2.1业务角色权限导流方商户ID")
private List<Integer> scene0PermissionMerchantIds;
@ApiModelProperty(notes = "登录角色在1.1业务角色权限导流方商户ID")
private List<Integer> scene1PermissionMerchantIds;
public boolean isEnabled(){
if(this.status != null && this.status == ENABLED_STATUS){
return true;
}
return false;
}
public boolean curIsAdmin(){
if(this.isAdmin != null && this.isAdmin == ADMIN){
return true;
}
return false;
}
}
package cn.com.glsx.dj.smartcarlife.enums;
public enum LoginRoleEnum {
/** 区域督导 **/
AREA_SUPERVISION(3,"区域督导"),
/** 广联销售 **/
SELE(4,"广联销售");
private final int value;
private final String name;
LoginRoleEnum(int value, String name){
this.value = value;
this.name = name;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
public static LoginRoleEnum getByValue(Integer value) {
if(value == null) {
return null;
}
for(LoginRoleEnum e:LoginRoleEnum.values()) {
if(e.getValue() == value) {
return e;
}
}
return null;
}
}
package cn.com.glsx.dj.smartcarlife.enums;
public enum LoginSourceTypeEnum {
/**
* D+平台
*/
D_PLUS((byte)0,"D+平台"),
/**
* 服务商saas
*/
PARTNER_SAAS((byte)1,"服务商saas")
;
private byte value;
private String displayName;
LoginSourceTypeEnum(Byte value, String displayName) {
this.value = value;
this.displayName = displayName;
}
public byte getValue() {
return value;
}
public String getDisplayName() {
return displayName;
}
public static LoginSourceTypeEnum getByValue(Byte value){
if (value != null) {
for (LoginSourceTypeEnum temp: LoginSourceTypeEnum.values()) {
if (temp.getValue() == value.byteValue()) {
return temp;
}
}
}
return null;
}
}
# 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 \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<dubbo:reference interface="cn.com.glsx.dj.remote.DemoRemote" id="demoRemote" version="1.0.1" timeout="30000" retries="1" />
</beans>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!