Skip to content

Commit

Permalink
add process define
Browse files Browse the repository at this point in the history
  • Loading branch information
leelance committed Jan 3, 2017
1 parent d385e54 commit b0c2418
Show file tree
Hide file tree
Showing 9 changed files with 359 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.lance.activiti.common;

public interface SystemConstants {
/**后台图形验证码key*/
String ADMIN_VALID_KEY = "admin_valid_code";

/**APP注册验证码*/
String APP_REGISTER_VALID_KEY = "app_register_valid_code";

/**后台登录用户key*/
String ADMIN_LOGIN_KEY = "admin_login_key";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.lance.activiti.mapper.process;

import java.util.List;

import com.lance.activiti.model.process.ProcessDefineInfo;

public interface ProcessDefineMapper {
/**
* 查询所有流程
* @return
*/
List<ProcessDefineInfo> findAll();

/**
* 保存对象
* @author Lance
* @since 2016-08-26 16:31:12
*/
int save(ProcessDefineInfo info);

/**
* 修改对象
* @author Lance
* @since 2016-08-26 16:31:12
*/
int update(ProcessDefineInfo info);

/**
* 删除对象
* @author Lance
* @since 2016-08-26 16:31:12
*/
int delete(int id);

/**
* 根据ID查询对象
* @author Lance
* @since 2016-08-26 16:31:12
*/
ProcessDefineInfo findOne(int id);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.lance.activiti.mapper.system;

import java.util.List;

import com.lance.activiti.model.system.RoleInfo;

public interface RoleMapper {
/**
* 查询所有角色
* @return
*/
List<RoleInfo> findAll();

/**
* 根据ID查询角色
* @param id
* @return
*/
RoleInfo findOne(int id);

/**
* 保存角色
* @param user
*/
void save(RoleInfo user);

/**
* 更新角色
* @param user
*/
int update(RoleInfo user);

/**
* 删除角色
* @param id
*/
int delete(int id);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.lance.activiti.mapper.system;

import java.util.List;

import com.lance.activiti.model.system.UserInfo;

public interface UserMapper {

/**
* 查询所有用户信息
* @return
*/
List<UserInfo> findAll();

/**
* 根据登录账号查询用户信息
* @param account
* @return
*/
UserInfo findByAccount(String account);

/**
* 根据ID查询用户信息
* @param id
* @return
*/
UserInfo findOne(int id);

/**
* 保存用户信息
* @param user
*/
void save(UserInfo user);

/**
* 更新用户对象
* @param user
*/
int update(UserInfo user);

/**
* 删除对象
* @param id
*/
int delete(int id);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package com.lance.activiti.model.process;

import java.io.Serializable;
import java.util.Date;

/**
* 定义流程
* @author Administrator
*/
public class ProcessDefineInfo implements Serializable{
private static final long serialVersionUID = -6159834621213504983L;

/**ID*/
private int id;

/**流程名称*/
private String processName;

/**流程Key*/
private String processKey;

/**流程File, leave.bpmn20.xml*/
private String processFile;

/**创建时间*/
private Date createTime;

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public String getProcessName() {
return processName;
}

public void setProcessName(String processName) {
this.processName = processName;
}

public String getProcessKey() {
return processKey;
}

public void setProcessKey(String processKey) {
this.processKey = processKey;
}

public String getProcessFile() {
return processFile;
}

public void setProcessFile(String processFile) {
this.processFile = processFile;
}

public Date getCreateTime() {
return createTime;
}

public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.lance.activiti.model.system;

import java.io.Serializable;
import java.util.Date;

public class RoleInfo implements Serializable{
private static final long serialVersionUID = -7980149051661283417L;

/**ID*/
private int id;

/**角色名称*/
private String roleName;

/**描述*/
private String description;

/*创建时间*/
private Date createTime;

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public String getRoleName() {
return roleName;
}

public void setRoleName(String roleName) {
this.roleName = roleName;
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public Date getCreateTime() {
return createTime;
}

public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package com.lance.activiti.model.system;

import java.io.Serializable;
import java.util.Date;

public class UserInfo implements Serializable{
private static final long serialVersionUID = 3218476189702605388L;
/**主键ID*/
private int id;
/**登录账号*/
private String account;
/**密码*/
private String password;
/**姓名*/
private String name;
/**手机号码*/
private String phone;
/**Email*/
private String email;
/**创建时间*/
private Date createTime;

public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.lance.activiti.service.process;

import java.util.List;

import com.lance.activiti.model.process.ProcessDefineInfo;

public interface ProcessDefineService {

/**
* 查询所有定义的流程
* @return
*/
List<ProcessDefineInfo>findAll();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.lance.activiti.service.process;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lance.activiti.mapper.process.ProcessDefineMapper;
import com.lance.activiti.model.process.ProcessDefineInfo;

@Service
public class ProcessDefineServiceImpl implements ProcessDefineService{
@Autowired
private ProcessDefineMapper processDefineMapper;

/**
* 查询所有定义的流程
* @return
*/
@Override
public List<ProcessDefineInfo> findAll() {
return processDefineMapper.findAll();
}
}

0 comments on commit b0c2418

Please sign in to comment.