forked from leelance/spring-boot-all
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
359 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
spring-boot-activiti/src/main/java/com/lance/activiti/common/SystemConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
} |
41 changes: 41 additions & 0 deletions
41
...ng-boot-activiti/src/main/java/com/lance/activiti/mapper/process/ProcessDefineMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
38 changes: 38 additions & 0 deletions
38
spring-boot-activiti/src/main/java/com/lance/activiti/mapper/system/RoleMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
46 changes: 46 additions & 0 deletions
46
spring-boot-activiti/src/main/java/com/lance/activiti/mapper/system/UserMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
67 changes: 67 additions & 0 deletions
67
spring-boot-activiti/src/main/java/com/lance/activiti/model/process/ProcessDefineInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
spring-boot-activiti/src/main/java/com/lance/activiti/model/system/RoleInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
spring-boot-activiti/src/main/java/com/lance/activiti/model/system/UserInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...-boot-activiti/src/main/java/com/lance/activiti/service/process/ProcessDefineService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
24 changes: 24 additions & 0 deletions
24
...t-activiti/src/main/java/com/lance/activiti/service/process/ProcessDefineServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |