Commit 7fa8137a authored by HuangBingGui's avatar HuangBingGui
Browse files

no commit message

parent 6c859da2
...@@ -24,8 +24,10 @@ public class JsonpCallbackFilter implements Filter ...@@ -24,8 +24,10 @@ public class JsonpCallbackFilter implements Filter
private static Logger log = LoggerFactory.getLogger(JsonpCallbackFilter.class); private static Logger log = LoggerFactory.getLogger(JsonpCallbackFilter.class);
@Override
public void init(FilterConfig fConfig) throws ServletException {} public void init(FilterConfig fConfig) throws ServletException {}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request; HttpServletRequest httpRequest = (HttpServletRequest) request;
...@@ -35,8 +37,9 @@ public class JsonpCallbackFilter implements Filter ...@@ -35,8 +37,9 @@ public class JsonpCallbackFilter implements Filter
Map<String, String[]> parms = httpRequest.getParameterMap(); Map<String, String[]> parms = httpRequest.getParameterMap();
if (parms.containsKey("callback")) { if (parms.containsKey("callback")) {
if (log.isDebugEnabled()) if (log.isDebugEnabled()) {
log.debug("Wrapping response with JSONP callback '" + parms.get("callback")[0] + "'"); log.debug("Wrapping response with JSONP callback '" + parms.get("callback")[0] + "'");
}
OutputStream out = httpResponse.getOutputStream(); OutputStream out = httpResponse.getOutputStream();
...@@ -49,7 +52,7 @@ public class JsonpCallbackFilter implements Filter ...@@ -49,7 +52,7 @@ public class JsonpCallbackFilter implements Filter
outputStream.write(new String(parms.get("callback")[0] + "(").getBytes()); outputStream.write(new String(parms.get("callback")[0] + "(").getBytes());
outputStream.write(wrapper.getData()); outputStream.write(wrapper.getData());
outputStream.write(new String(");").getBytes()); outputStream.write(new String(");").getBytes());
byte jsonpResponse[] = outputStream.toByteArray(); byte[] jsonpResponse = outputStream.toByteArray();
wrapper.setContentType("text/javascript;charset=UTF-8"); wrapper.setContentType("text/javascript;charset=UTF-8");
wrapper.setContentLength(jsonpResponse.length); wrapper.setContentLength(jsonpResponse.length);
...@@ -63,5 +66,6 @@ public class JsonpCallbackFilter implements Filter ...@@ -63,5 +66,6 @@ public class JsonpCallbackFilter implements Filter
} }
} }
@Override
public void destroy() {} public void destroy() {}
} }
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.service; package com.jeespring.modules.act.service;
...@@ -35,7 +35,7 @@ import com.jeespring.common.service.AbstractService; ...@@ -35,7 +35,7 @@ import com.jeespring.common.service.AbstractService;
/** /**
* 流程模型相关Controller * 流程模型相关Controller
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
@Service @Service
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.service; package com.jeespring.modules.act.service;
...@@ -43,7 +43,7 @@ import com.jeespring.common.utils.StringUtils; ...@@ -43,7 +43,7 @@ import com.jeespring.common.utils.StringUtils;
/** /**
* 流程定义相关Controller * 流程定义相关Controller
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
@Service @Service
...@@ -114,9 +114,9 @@ public class ActProcessService extends AbstractService { ...@@ -114,9 +114,9 @@ public class ActProcessService extends AbstractService {
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(procDefId).singleResult(); ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(procDefId).singleResult();
String resourceName = ""; String resourceName = "";
if (resType.equals("image")) { if ("image".equals(resType)) {
resourceName = processDefinition.getDiagramResourceName(); resourceName = processDefinition.getDiagramResourceName();
} else if (resType.equals("xml")) { } else if ("xml".equals(resType)) {
resourceName = processDefinition.getResourceName(); resourceName = processDefinition.getResourceName();
} }
...@@ -140,14 +140,14 @@ public class ActProcessService extends AbstractService { ...@@ -140,14 +140,14 @@ public class ActProcessService extends AbstractService {
InputStream fileInputStream = file.getInputStream(); InputStream fileInputStream = file.getInputStream();
Deployment deployment; Deployment deployment;
String extension = FilenameUtils.getExtension(fileName); String extension = FilenameUtils.getExtension(fileName);
if (extension.equals("zip") || extension.equals("bar")) { if ("zip".equals(extension) || "bar".equals(extension)) {
ZipInputStream zip = new ZipInputStream(fileInputStream); ZipInputStream zip = new ZipInputStream(fileInputStream);
deployment = repositoryService.createDeployment().addZipInputStream(zip).deploy(); deployment = repositoryService.createDeployment().addZipInputStream(zip).deploy();
} else if (extension.equals("png")) { } else if ("png".equals(extension)) {
deployment = repositoryService.createDeployment().addInputStream(fileName, fileInputStream).deploy(); deployment = repositoryService.createDeployment().addInputStream(fileName, fileInputStream).deploy();
} else if (fileName.indexOf("bpmn20.xml") != -1) { } else if (fileName.indexOf("bpmn20.xml") != -1) {
deployment = repositoryService.createDeployment().addInputStream(fileName, fileInputStream).deploy(); deployment = repositoryService.createDeployment().addInputStream(fileName, fileInputStream).deploy();
} else if (extension.equals("bpmn")) { // bpmn扩展名特殊处理,转换为bpmn20.xml } else if ("bpmn".equals(extension)) { // bpmn扩展名特殊处理,转换为bpmn20.xml
String baseName = FilenameUtils.getBaseName(fileName); String baseName = FilenameUtils.getBaseName(fileName);
deployment = repositoryService.createDeployment().addInputStream(baseName + ".bpmn20.xml", fileInputStream).deploy(); deployment = repositoryService.createDeployment().addInputStream(baseName + ".bpmn20.xml", fileInputStream).deploy();
} else { } else {
...@@ -187,10 +187,10 @@ public class ActProcessService extends AbstractService { ...@@ -187,10 +187,10 @@ public class ActProcessService extends AbstractService {
*/ */
@Transactional(readOnly = false) @Transactional(readOnly = false)
public String updateState(String state, String procDefId) { public String updateState(String state, String procDefId) {
if (state.equals("active")) { if ("active".equals(state)) {
repositoryService.activateProcessDefinitionById(procDefId, true, null); repositoryService.activateProcessDefinitionById(procDefId, true, null);
return "已激活ID为[" + procDefId + "]的流程定义。"; return "已激活ID为[" + procDefId + "]的流程定义。";
} else if (state.equals("suspend")) { } else if ("suspend".equals(state)) {
repositoryService.suspendProcessDefinitionById(procDefId, true, null); repositoryService.suspendProcessDefinitionById(procDefId, true, null);
return "已挂起ID为[" + procDefId + "]的流程定义。"; return "已挂起ID为[" + procDefId + "]的流程定义。";
} }
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.service; package com.jeespring.modules.act.service;
...@@ -71,7 +71,7 @@ import com.jeespring.modules.sys.utils.UserUtils; ...@@ -71,7 +71,7 @@ import com.jeespring.modules.sys.utils.UserUtils;
/** /**
* 流程定义相关Service * 流程定义相关Service
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
@Service @Service
......
...@@ -23,7 +23,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; ...@@ -23,7 +23,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
/** /**
* 模型部署或更新到流程定义 * 模型部署或更新到流程定义
* @author ThinkGem * @author JeeSpring
* @version 2016年8月2日 * @version 2016年8月2日
*/ */
public class ModelDeployProcessDefinitionCmd implements Command<Void> { public class ModelDeployProcessDefinitionCmd implements Command<Void> {
...@@ -43,13 +43,13 @@ public class ModelDeployProcessDefinitionCmd implements Command<Void> { ...@@ -43,13 +43,13 @@ public class ModelDeployProcessDefinitionCmd implements Command<Void> {
RepositoryService repositoryService = Context.getProcessEngineConfiguration() RepositoryService repositoryService = Context.getProcessEngineConfiguration()
.getRepositoryService(); .getRepositoryService();
try{ try{
// 生成部署名称和数据 ThinkGem // 生成部署名称和数据 JeeSpring
JsonNode editorNode = new ObjectMapper().readTree(repositoryService JsonNode editorNode = new ObjectMapper().readTree(repositoryService
.getModelEditorSource(modelId)); .getModelEditorSource(modelId));
BpmnModel bpmnModel = new BpmnJsonConverter().convertToBpmnModel(editorNode); BpmnModel bpmnModel = new BpmnJsonConverter().convertToBpmnModel(editorNode);
byte[] bpmnBytes = new BpmnXMLConverter().convertToXML(bpmnModel); byte[] bpmnBytes = new BpmnXMLConverter().convertToXML(bpmnModel);
// 查询流程定义是否已经存在了 ThinkGem // 查询流程定义是否已经存在了 JeeSpring
ProcessDefinition processDefinition = Context.getProcessEngineConfiguration() ProcessDefinition processDefinition = Context.getProcessEngineConfiguration()
.getRepositoryService().createProcessDefinitionQuery() .getRepositoryService().createProcessDefinitionQuery()
.processDefinitionKey(procDefKey).latestVersion().singleResult(); .processDefinitionKey(procDefKey).latestVersion().singleResult();
...@@ -82,7 +82,7 @@ public class ModelDeployProcessDefinitionCmd implements Command<Void> { ...@@ -82,7 +82,7 @@ public class ModelDeployProcessDefinitionCmd implements Command<Void> {
deployment.addResource(diagramResource); deployment.addResource(diagramResource);
resourceEntityManager.insertResource(diagramResource); resourceEntityManager.insertResource(diagramResource);
} }
// 不存在部署一个新的流程 ThinkGem // 不存在部署一个新的流程 JeeSpring
else{ else{
repositoryService.createDeployment().name(procDefName).addInputStream( repositoryService.createDeployment().name(procDefName).addInputStream(
procDefName + ".bpmn20.xml", new ByteArrayInputStream(bpmnBytes)).deploy(); procDefName + ".bpmn20.xml", new ByteArrayInputStream(bpmnBytes)).deploy();
......
...@@ -12,7 +12,8 @@ import com.jeespring.modules.act.utils.ProcessDefUtils; ...@@ -12,7 +12,8 @@ import com.jeespring.modules.act.utils.ProcessDefUtils;
public class ChainedActivitiesCreator extends RuntimeActivityCreatorSupport implements RuntimeActivityCreator { public class ChainedActivitiesCreator extends RuntimeActivityCreatorSupport implements RuntimeActivityCreator {
@SuppressWarnings("unchecked") @Override
@SuppressWarnings("unchecked")
public ActivityImpl[] createActivities(ProcessEngine processEngine, ProcessDefinitionEntity processDefinition, public ActivityImpl[] createActivities(ProcessEngine processEngine, ProcessDefinitionEntity processDefinition,
RuntimeActivityDefinitionEntity info) { RuntimeActivityDefinitionEntity info) {
info.setFactoryName(ChainedActivitiesCreator.class.getName()); info.setFactoryName(ChainedActivitiesCreator.class.getName());
......
...@@ -16,8 +16,9 @@ import com.jeespring.modules.act.utils.ProcessDefUtils; ...@@ -16,8 +16,9 @@ import com.jeespring.modules.act.utils.ProcessDefUtils;
public class MultiInstanceActivityCreator extends RuntimeActivityCreatorSupport implements RuntimeActivityCreator { public class MultiInstanceActivityCreator extends RuntimeActivityCreatorSupport implements RuntimeActivityCreator {
public ActivityImpl[] createActivities(ProcessEngine processEngine, ProcessDefinitionEntity processDefinition, @Override
RuntimeActivityDefinitionEntity info) { public ActivityImpl[] createActivities(ProcessEngine processEngine, ProcessDefinitionEntity processDefinition,
RuntimeActivityDefinitionEntity info) {
info.setFactoryName(MultiInstanceActivityCreator.class.getName()); info.setFactoryName(MultiInstanceActivityCreator.class.getName());
RuntimeActivityDefinitionEntityIntepreter radei = new RuntimeActivityDefinitionEntityIntepreter(info); RuntimeActivityDefinitionEntityIntepreter radei = new RuntimeActivityDefinitionEntityIntepreter(info);
......
...@@ -20,19 +20,23 @@ public class SimpleRuntimeActivityDefinitionEntity implements RuntimeActivityDef ...@@ -20,19 +20,23 @@ public class SimpleRuntimeActivityDefinitionEntity implements RuntimeActivityDef
_properties = properties; _properties = properties;
} }
public void setFactoryName(String factoryName) { @Override
public void setFactoryName(String factoryName) {
_factoryName = factoryName; _factoryName = factoryName;
} }
public void setProcessDefinitionId(String processDefinitionId) { @Override
public void setProcessDefinitionId(String processDefinitionId) {
_processDefinitionId = processDefinitionId; _processDefinitionId = processDefinitionId;
} }
public void setProcessInstanceId(String processInstanceId) { @Override
public void setProcessInstanceId(String processInstanceId) {
_processInstanceId = processInstanceId; _processInstanceId = processInstanceId;
} }
public void setPropertiesText(String propertiesText) { @Override
public void setPropertiesText(String propertiesText) {
_propertiesText = propertiesText; _propertiesText = propertiesText;
} }
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.service.ext; package com.jeespring.modules.act.service.ext;
...@@ -23,7 +23,7 @@ import com.jeespring.modules.sys.service.SystemService; ...@@ -23,7 +23,7 @@ import com.jeespring.modules.sys.service.SystemService;
/** /**
* Activiti Group Entity Service * Activiti Group Entity Service
* @author ThinkGem * @author JeeSpring
* @version 2013-12-05 * @version 2013-12-05
*/ */
@Service @Service
...@@ -38,11 +38,13 @@ public class ActGroupEntityService extends GroupEntityManager { ...@@ -38,11 +38,13 @@ public class ActGroupEntityService extends GroupEntityManager {
return systemService; return systemService;
} }
public Group createNewGroup(String groupId) { @Override
public Group createNewGroup(String groupId) {
return new GroupEntity(groupId); return new GroupEntity(groupId);
} }
public void insertGroup(Group group) { @Override
public void insertGroup(Group group) {
// getDbSqlSession().insert((PersistentObject) group); // getDbSqlSession().insert((PersistentObject) group);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
...@@ -54,30 +56,35 @@ public class ActGroupEntityService extends GroupEntityManager { ...@@ -54,30 +56,35 @@ public class ActGroupEntityService extends GroupEntityManager {
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public void deleteGroup(String groupId) { @Override
public void deleteGroup(String groupId) {
// GroupEntity group = getDbSqlSession().selectById(GroupEntity.class, groupId); // GroupEntity group = getDbSqlSession().selectById(GroupEntity.class, groupId);
// getDbSqlSession().delete("deleteMembershipsByGroupId", groupId); // getDbSqlSession().delete("deleteMembershipsByGroupId", groupId);
// getDbSqlSession().delete(group); // getDbSqlSession().delete(group);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public GroupQuery createNewGroupQuery() { @Override
public GroupQuery createNewGroupQuery() {
// return new GroupQueryImpl(Context.getProcessEngineConfiguration().getCommandExecutorTxRequired()); // return new GroupQueryImpl(Context.getProcessEngineConfiguration().getCommandExecutorTxRequired());
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
// @SuppressWarnings("unchecked") // @SuppressWarnings("unchecked")
public List<Group> findGroupByQueryCriteria(GroupQueryImpl query, Page page) { @Override
public List<Group> findGroupByQueryCriteria(GroupQueryImpl query, Page page) {
// return getDbSqlSession().selectList("selectGroupByQueryCriteria", query, page); // return getDbSqlSession().selectList("selectGroupByQueryCriteria", query, page);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public long findGroupCountByQueryCriteria(GroupQueryImpl query) { @Override
public long findGroupCountByQueryCriteria(GroupQueryImpl query) {
// return (Long) getDbSqlSession().selectOne("selectGroupCountByQueryCriteria", query); // return (Long) getDbSqlSession().selectOne("selectGroupCountByQueryCriteria", query);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public List<Group> findGroupsByUser(String userId) { @Override
public List<Group> findGroupsByUser(String userId) {
// return getDbSqlSession().selectList("selectGroupsByUserId", userId); // return getDbSqlSession().selectList("selectGroupsByUserId", userId);
List<Group> list = Lists.newArrayList(); List<Group> list = Lists.newArrayList();
User user = getSystemService().getUserByLoginName(userId); User user = getSystemService().getUserByLoginName(userId);
...@@ -89,12 +96,14 @@ public class ActGroupEntityService extends GroupEntityManager { ...@@ -89,12 +96,14 @@ public class ActGroupEntityService extends GroupEntityManager {
return list; return list;
} }
public List<Group> findGroupsByNativeQuery(Map<String, Object> parameterMap, int firstResult, int maxResults) { @Override
public List<Group> findGroupsByNativeQuery(Map<String, Object> parameterMap, int firstResult, int maxResults) {
// return getDbSqlSession().selectListWithRawParameter("selectGroupByNativeQuery", parameterMap, firstResult, maxResults); // return getDbSqlSession().selectListWithRawParameter("selectGroupByNativeQuery", parameterMap, firstResult, maxResults);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public long findGroupCountByNativeQuery(Map<String, Object> parameterMap) { @Override
public long findGroupCountByNativeQuery(Map<String, Object> parameterMap) {
// return (Long) getDbSqlSession().selectOne("selectGroupCountByNativeQuery", parameterMap); // return (Long) getDbSqlSession().selectOne("selectGroupCountByNativeQuery", parameterMap);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.service.ext; package com.jeespring.modules.act.service.ext;
...@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
/** /**
* Activiti Group Entity Factory * Activiti Group Entity Factory
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
public class ActGroupEntityServiceFactory implements SessionFactory { public class ActGroupEntityServiceFactory implements SessionFactory {
...@@ -18,12 +18,14 @@ public class ActGroupEntityServiceFactory implements SessionFactory { ...@@ -18,12 +18,14 @@ public class ActGroupEntityServiceFactory implements SessionFactory {
@Autowired @Autowired
private ActGroupEntityService actGroupEntityService; private ActGroupEntityService actGroupEntityService;
public Class<?> getSessionType() { @Override
public Class<?> getSessionType() {
// 返回原始的GroupIdentityManager类型 // 返回原始的GroupIdentityManager类型
return GroupIdentityManager.class; return GroupIdentityManager.class;
} }
public Session openSession() { @Override
public Session openSession() {
// 返回自定义的GroupEntityManager实例 // 返回自定义的GroupEntityManager实例
return actGroupEntityService; return actGroupEntityService;
} }
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.service.ext; package com.jeespring.modules.act.service.ext;
...@@ -24,7 +24,7 @@ import com.jeespring.modules.sys.service.SystemService; ...@@ -24,7 +24,7 @@ import com.jeespring.modules.sys.service.SystemService;
/** /**
* Activiti User Entity Service * Activiti User Entity Service
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
@Service @Service
...@@ -39,11 +39,13 @@ public class ActUserEntityService extends UserEntityManager { ...@@ -39,11 +39,13 @@ public class ActUserEntityService extends UserEntityManager {
return systemService; return systemService;
} }
public User createNewUser(String userId) { @Override
public User createNewUser(String userId) {
return new UserEntity(userId); return new UserEntity(userId);
} }
public void insertUser(User user) { @Override
public void insertUser(User user) {
// getDbSqlSession().insert((PersistentObject) user); // getDbSqlSession().insert((PersistentObject) user);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
...@@ -55,12 +57,14 @@ public class ActUserEntityService extends UserEntityManager { ...@@ -55,12 +57,14 @@ public class ActUserEntityService extends UserEntityManager {
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public UserEntity findUserById(String userId) { @Override
public UserEntity findUserById(String userId) {
// return (UserEntity) getDbSqlSession().selectOne("selectUserById", userId); // return (UserEntity) getDbSqlSession().selectOne("selectUserById", userId);
return ActUtils.toActivitiUser(getSystemService().getUserByLoginName(userId)); return ActUtils.toActivitiUser(getSystemService().getUserByLoginName(userId));
} }
public void deleteUser(String userId) { @Override
public void deleteUser(String userId) {
// UserEntity user = findUserById(userId); // UserEntity user = findUserById(userId);
// if (user != null) { // if (user != null) {
// List<IdentityInfoEntity> identityInfos = getDbSqlSession().selectList("selectIdentityInfoByUserId", userId); // List<IdentityInfoEntity> identityInfos = getDbSqlSession().selectList("selectIdentityInfoByUserId", userId);
...@@ -76,17 +80,20 @@ public class ActUserEntityService extends UserEntityManager { ...@@ -76,17 +80,20 @@ public class ActUserEntityService extends UserEntityManager {
} }
} }
public List<User> findUserByQueryCriteria(UserQueryImpl query, Page page) { @Override
public List<User> findUserByQueryCriteria(UserQueryImpl query, Page page) {
// return getDbSqlSession().selectList("selectUserByQueryCriteria", query, page); // return getDbSqlSession().selectList("selectUserByQueryCriteria", query, page);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public long findUserCountByQueryCriteria(UserQueryImpl query) { @Override
public long findUserCountByQueryCriteria(UserQueryImpl query) {
// return (Long) getDbSqlSession().selectOne("selectUserCountByQueryCriteria", query); // return (Long) getDbSqlSession().selectOne("selectUserCountByQueryCriteria", query);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public List<Group> findGroupsByUser(String userId) { @Override
public List<Group> findGroupsByUser(String userId) {
// return getDbSqlSession().selectList("selectGroupsByUserId", userId); // return getDbSqlSession().selectList("selectGroupsByUserId", userId);
List<Group> list = Lists.newArrayList(); List<Group> list = Lists.newArrayList();
for (Role role : getSystemService().findRole(new Role(new com.jeespring.modules.sys.entity.User(null, userId)))){ for (Role role : getSystemService().findRole(new Role(new com.jeespring.modules.sys.entity.User(null, userId)))){
...@@ -95,12 +102,14 @@ public class ActUserEntityService extends UserEntityManager { ...@@ -95,12 +102,14 @@ public class ActUserEntityService extends UserEntityManager {
return list; return list;
} }
public UserQuery createNewUserQuery() { @Override
public UserQuery createNewUserQuery() {
// return new UserQueryImpl(Context.getProcessEngineConfiguration().getCommandExecutorTxRequired()); // return new UserQueryImpl(Context.getProcessEngineConfiguration().getCommandExecutorTxRequired());
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public IdentityInfoEntity findUserInfoByUserIdAndKey(String userId, String key) { @Override
public IdentityInfoEntity findUserInfoByUserIdAndKey(String userId, String key) {
// Map<String, String> parameters = new HashMap<String, String>(); // Map<String, String> parameters = new HashMap<String, String>();
// parameters.put("userId", userId); // parameters.put("userId", userId);
// parameters.put("key", key); // parameters.put("key", key);
...@@ -108,7 +117,8 @@ public class ActUserEntityService extends UserEntityManager { ...@@ -108,7 +117,8 @@ public class ActUserEntityService extends UserEntityManager {
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public List<String> findUserInfoKeysByUserIdAndType(String userId, String type) { @Override
public List<String> findUserInfoKeysByUserIdAndType(String userId, String type) {
// Map<String, String> parameters = new HashMap<String, String>(); // Map<String, String> parameters = new HashMap<String, String>();
// parameters.put("userId", userId); // parameters.put("userId", userId);
// parameters.put("type", type); // parameters.put("type", type);
...@@ -116,7 +126,8 @@ public class ActUserEntityService extends UserEntityManager { ...@@ -116,7 +126,8 @@ public class ActUserEntityService extends UserEntityManager {
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public Boolean checkPassword(String userId, String password) { @Override
public Boolean checkPassword(String userId, String password) {
// User user = findUserById(userId); // User user = findUserById(userId);
// if ((user != null) && (password != null) && (password.equals(user.getPassword()))) { // if ((user != null) && (password != null) && (password.equals(user.getPassword()))) {
// return true; // return true;
...@@ -125,7 +136,8 @@ public class ActUserEntityService extends UserEntityManager { ...@@ -125,7 +136,8 @@ public class ActUserEntityService extends UserEntityManager {
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public List<User> findPotentialStarterUsers(String proceDefId) { @Override
public List<User> findPotentialStarterUsers(String proceDefId) {
// Map<String, String> parameters = new HashMap<String, String>(); // Map<String, String> parameters = new HashMap<String, String>();
// parameters.put("procDefId", proceDefId); // parameters.put("procDefId", proceDefId);
// return (List<User>) getDbSqlSession().selectOne("selectUserByQueryCriteria", parameters); // return (List<User>) getDbSqlSession().selectOne("selectUserByQueryCriteria", parameters);
...@@ -133,12 +145,14 @@ public class ActUserEntityService extends UserEntityManager { ...@@ -133,12 +145,14 @@ public class ActUserEntityService extends UserEntityManager {
} }
public List<User> findUsersByNativeQuery(Map<String, Object> parameterMap, int firstResult, int maxResults) { @Override
public List<User> findUsersByNativeQuery(Map<String, Object> parameterMap, int firstResult, int maxResults) {
// return getDbSqlSession().selectListWithRawParameter("selectUserByNativeQuery", parameterMap, firstResult, maxResults); // return getDbSqlSession().selectListWithRawParameter("selectUserByNativeQuery", parameterMap, firstResult, maxResults);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
public long findUserCountByNativeQuery(Map<String, Object> parameterMap) { @Override
public long findUserCountByNativeQuery(Map<String, Object> parameterMap) {
// return (Long) getDbSqlSession().selectOne("selectUserCountByNativeQuery", parameterMap); // return (Long) getDbSqlSession().selectOne("selectUserCountByNativeQuery", parameterMap);
throw new RuntimeException("not implement method."); throw new RuntimeException("not implement method.");
} }
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.service.ext; package com.jeespring.modules.act.service.ext;
...@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
/** /**
* Activiti User Entity Service Factory * Activiti User Entity Service Factory
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
public class ActUserEntityServiceFactory implements SessionFactory { public class ActUserEntityServiceFactory implements SessionFactory {
...@@ -18,12 +18,14 @@ public class ActUserEntityServiceFactory implements SessionFactory { ...@@ -18,12 +18,14 @@ public class ActUserEntityServiceFactory implements SessionFactory {
@Autowired @Autowired
private ActUserEntityService actUserEntityService; private ActUserEntityService actUserEntityService;
public Class<?> getSessionType() { @Override
public Class<?> getSessionType() {
// 返回原始的UserIdentityManager类型 // 返回原始的UserIdentityManager类型
return UserIdentityManager.class; return UserIdentityManager.class;
} }
public Session openSession() { @Override
public Session openSession() {
// 返回自定义的UserEntityManager实例 // 返回自定义的UserEntityManager实例
return actUserEntityService; return actUserEntityService;
} }
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.utils; package com.jeespring.modules.act.utils;
...@@ -27,7 +27,7 @@ import com.jeespring.modules.sys.entity.User; ...@@ -27,7 +27,7 @@ import com.jeespring.modules.sys.entity.User;
/** /**
* 流程工具 * 流程工具
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
public class ActUtils { public class ActUtils {
...@@ -94,7 +94,7 @@ public class ActUtils { ...@@ -94,7 +94,7 @@ public class ActUtils {
}else{ }else{
chinesName.add(""); chinesName.add("");
} }
if (m.getName().equals("getAct")){ if ("getAct".equals(m.getName())){
Object act = m.invoke(entity, new Object[]{}); Object act = m.invoke(entity, new Object[]{});
Method actMet = act.getClass().getMethod("getTaskId"); Method actMet = act.getClass().getMethod("getTaskId");
map.put("taskId", ObjectUtils.toString(m.invoke(act, new Object[]{}), "")); map.put("taskId", ObjectUtils.toString(m.invoke(act, new Object[]{}), ""));
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.utils; package com.jeespring.modules.act.utils;
...@@ -15,7 +15,7 @@ import org.slf4j.LoggerFactory; ...@@ -15,7 +15,7 @@ import org.slf4j.LoggerFactory;
/** /**
* 日期转换类 * 日期转换类
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
public class DateConverter implements Converter { public class DateConverter implements Converter {
...@@ -30,7 +30,8 @@ public class DateConverter implements Converter { ...@@ -30,7 +30,8 @@ public class DateConverter implements Converter {
private static final String MONTH_PATTERN = "yyyy-MM"; private static final String MONTH_PATTERN = "yyyy-MM";
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public Object convert(Class type, Object value) { public Object convert(Class type, Object value) {
Object result = null; Object result = null;
if (type == Date.class) { if (type == Date.class) {
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.utils; package com.jeespring.modules.act.utils;
...@@ -16,7 +16,7 @@ import com.jeespring.common.utils.SpringContextHolder; ...@@ -16,7 +16,7 @@ import com.jeespring.common.utils.SpringContextHolder;
/** /**
* 流程定义缓存 * 流程定义缓存
* @author ThinkGem * @author JeeSpring
* @version 2013-12-05 * @version 2013-12-05
*/ */
public class ProcessDefCache { public class ProcessDefCache {
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.utils; package com.jeespring.modules.act.utils;
...@@ -7,7 +7,7 @@ import java.util.Date; ...@@ -7,7 +7,7 @@ import java.util.Date;
/** /**
* 属性数据类型 * 属性数据类型
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
public enum PropertyType { public enum PropertyType {
......
/** /**
* Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * Copyright &copy; 2012-2016 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpring</a> All rights reserved.
*/ */
package com.jeespring.modules.act.utils; package com.jeespring.modules.act.utils;
...@@ -13,7 +13,7 @@ import com.jeespring.common.utils.StringUtils; ...@@ -13,7 +13,7 @@ import com.jeespring.common.utils.StringUtils;
/** /**
* 流程变量对象 * 流程变量对象
* @author ThinkGem * @author JeeSpring
* @version 2013-11-03 * @version 2013-11-03
*/ */
public class Variable { public class Variable {
......
...@@ -110,7 +110,9 @@ public class FaceRecognitionRestController extends AbstractBaseController { ...@@ -110,7 +110,9 @@ public class FaceRecognitionRestController extends AbstractBaseController {
//判断分数值 //判断分数值
if(score >= 80){ if(score >= 80){
result = ResultFactory.getSuccessResult("检测成功!"); result = ResultFactory.getSuccessResult("检测成功!");
}else result = ResultFactory.getErrorResult("检测失败,请重新扫描!!"); }else {
result = ResultFactory.getErrorResult("检测失败,请重新扫描!!");
}
return result; return result;
} catch (Exception e) { } catch (Exception e) {
...@@ -141,7 +143,9 @@ public class FaceRecognitionRestController extends AbstractBaseController { ...@@ -141,7 +143,9 @@ public class FaceRecognitionRestController extends AbstractBaseController {
String baiDuResult = HttpUtil.post(url, token, "application/json", param); String baiDuResult = HttpUtil.post(url, token, "application/json", param);
if (baiDuResult.contains("SUCCESS")) { if (baiDuResult.contains("SUCCESS")) {
result = ResultFactory.getSuccessResult("注册成功!"); result = ResultFactory.getSuccessResult("注册成功!");
} else result = ResultFactory.getErrorResult("注册失败!"); } else {
result = ResultFactory.getErrorResult("注册失败!");
}
return result; return result;
} catch (Exception e) { } catch (Exception e) {
logger.info(e.toString()); logger.info(e.toString());
......
...@@ -22,24 +22,29 @@ import com.jeespring.modules.echarts.dao.ChinaWeatherDataBeanDao; ...@@ -22,24 +22,29 @@ import com.jeespring.modules.echarts.dao.ChinaWeatherDataBeanDao;
@Transactional(readOnly = true) @Transactional(readOnly = true)
public class ChinaWeatherDataBeanService extends AbstractBaseService<ChinaWeatherDataBeanDao, ChinaWeatherDataBean> { public class ChinaWeatherDataBeanService extends AbstractBaseService<ChinaWeatherDataBeanDao, ChinaWeatherDataBean> {
public ChinaWeatherDataBean get(String id) { @Override
public ChinaWeatherDataBean get(String id) {
return super.get(id); return super.get(id);
} }
public List<ChinaWeatherDataBean> findList(ChinaWeatherDataBean chinaWeatherDataBean) { @Override
public List<ChinaWeatherDataBean> findList(ChinaWeatherDataBean chinaWeatherDataBean) {
return super.findList(chinaWeatherDataBean); return super.findList(chinaWeatherDataBean);
} }
public Page<ChinaWeatherDataBean> findPage(Page<ChinaWeatherDataBean> page, ChinaWeatherDataBean chinaWeatherDataBean) { @Override
public Page<ChinaWeatherDataBean> findPage(Page<ChinaWeatherDataBean> page, ChinaWeatherDataBean chinaWeatherDataBean) {
return super.findPage(page, chinaWeatherDataBean); return super.findPage(page, chinaWeatherDataBean);
} }
@Transactional(readOnly = false) @Override
@Transactional(readOnly = false)
public void save(ChinaWeatherDataBean chinaWeatherDataBean) { public void save(ChinaWeatherDataBean chinaWeatherDataBean) {
super.save(chinaWeatherDataBean); super.save(chinaWeatherDataBean);
} }
@Transactional(readOnly = false) @Override
@Transactional(readOnly = false)
public void delete(ChinaWeatherDataBean chinaWeatherDataBean) { public void delete(ChinaWeatherDataBean chinaWeatherDataBean) {
super.delete(chinaWeatherDataBean); super.delete(chinaWeatherDataBean);
} }
......
...@@ -22,24 +22,29 @@ import com.jeespring.modules.echarts.dao.PieClassDao; ...@@ -22,24 +22,29 @@ import com.jeespring.modules.echarts.dao.PieClassDao;
@Transactional(readOnly = true) @Transactional(readOnly = true)
public class PieClassService extends AbstractBaseService<PieClassDao, PieClass> { public class PieClassService extends AbstractBaseService<PieClassDao, PieClass> {
public PieClass get(String id) { @Override
public PieClass get(String id) {
return super.get(id); return super.get(id);
} }
public List<PieClass> findList(PieClass pieClass) { @Override
public List<PieClass> findList(PieClass pieClass) {
return super.findList(pieClass); return super.findList(pieClass);
} }
public Page<PieClass> findPage(Page<PieClass> page, PieClass pieClass) { @Override
public Page<PieClass> findPage(Page<PieClass> page, PieClass pieClass) {
return super.findPage(page, pieClass); return super.findPage(page, pieClass);
} }
@Transactional(readOnly = false) @Override
@Transactional(readOnly = false)
public void save(PieClass pieClass) { public void save(PieClass pieClass) {
super.save(pieClass); super.save(pieClass);
} }
@Transactional(readOnly = false) @Override
@Transactional(readOnly = false)
public void delete(PieClass pieClass) { public void delete(PieClass pieClass) {
super.delete(pieClass); super.delete(pieClass);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment