Переглянути джерело

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

周箭河 5 роки тому
батько
коміт
0273585ff4
37 змінених файлів з 424 додано та 241 видалено
  1. 14 14
      mec-auth/mec-auth-server/pom.xml
  2. 1 1
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/WebSecurityConfig.java
  3. 2 2
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java
  4. 2 2
      mec-auth/mec-auth-server/src/main/resources/application.yml
  5. 13 1
      mec-common/common-core/pom.xml
  6. 54 0
      mec-common/common-core/src/main/java/com/ym/mec/common/redis/config/RedisConfig.java
  7. 0 68
      mec-common/common-core/src/main/java/com/ym/mec/common/redis/config/RedisTemplateConfig.java
  8. 4 0
      mec-common/common-core/src/main/java/com/ym/mec/common/redis/service/RedisCache.java
  9. 8 12
      mec-common/common-core/src/main/java/com/ym/mec/common/validcode/impl/SmsCodeServiceImpl.java
  10. 2 12
      mec-education/src/main/java/com/ym/mec/education/EducationApplication.java
  11. 30 1
      mec-education/src/main/java/com/ym/mec/education/controller/AttendClassController.java
  12. 1 1
      mec-education/src/main/java/com/ym/mec/education/controller/HomeWorkController.java
  13. 17 8
      mec-education/src/main/java/com/ym/mec/education/entity/TeacherAttendance.java
  14. 4 1
      mec-education/src/main/java/com/ym/mec/education/req/StudentReq.java
  15. 24 0
      mec-education/src/main/java/com/ym/mec/education/resp/CallStudentResp.java
  16. 6 0
      mec-education/src/main/java/com/ym/mec/education/resp/CourseInfoResp.java
  17. 25 0
      mec-education/src/main/java/com/ym/mec/education/resp/SignInfoResp.java
  18. 16 0
      mec-education/src/main/java/com/ym/mec/education/service/IStudentAttendanceService.java
  19. 8 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java
  20. 11 0
      mec-education/src/main/java/com/ym/mec/education/service/impl/CourseScheduleServiceImpl.java
  21. 79 3
      mec-education/src/main/java/com/ym/mec/education/service/impl/StudentAttendanceServiceImpl.java
  22. 6 6
      mec-education/src/main/java/com/ym/mec/education/service/impl/StudentCourseHomeworkServiceImpl.java
  23. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherAttendanceServiceImpl.java
  24. 1 0
      mec-education/src/main/java/com/ym/mec/education/utils/DateUtil.java
  25. 4 3
      mec-education/src/main/resources/mapper/TeacherAttendanceMapper.xml
  26. 0 12
      mec-student/src/main/java/com/ym/mec/student/StudentApplication.java
  27. 3 13
      mec-teacher/src/main/java/com/ym/mec/teacher/TeacherApplication.java
  28. 0 13
      mec-web/src/main/java/com/ym/mec/web/WebApplication.java
  29. 16 0
      mec-workflow/src/main/java/com/ym/mec/workfow/WorkflowApplication.java
  30. 18 0
      mec-workflow/src/main/resources/application.yml
  31. 0 6
      pom.xml
  32. 0 6
      workflowy/src/main/java/org/snaker/SnakerFlowyApplication.java
  33. 1 1
      workflowy/src/main/java/org/snaker/engine/core/ManagerService.java
  34. 13 13
      workflowy/src/main/java/org/snaker/engine/core/OrderService.java
  35. 7 7
      workflowy/src/main/java/org/snaker/engine/core/ProcessService.java
  36. 16 16
      workflowy/src/main/java/org/snaker/engine/core/SnakerEngineImpl.java
  37. 17 17
      workflowy/src/main/java/org/snaker/engine/core/TaskService.java

+ 14 - 14
mec-auth/mec-auth-server/pom.xml

@@ -33,7 +33,7 @@
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-starter-security</artifactId>
 		</dependency>
-		
+
 		<dependency>
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-sleuth-zipkin</artifactId>
@@ -70,19 +70,19 @@
 			<artifactId>kaptcha</artifactId>
 			<version>2.3.2</version>
 		</dependency>
-		
-        <dependency>
-            <groupId>com.ym</groupId>
-            <artifactId>mec-client-api</artifactId>
-        </dependency>
-
-			<dependency>
-				<groupId>org.apache.commons</groupId>
-				<artifactId>commons-pool2</artifactId>
-			</dependency>
-
-    </dependencies>
-	
+
+		<dependency>
+			<groupId>com.ym</groupId>
+			<artifactId>mec-client-api</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-pool2</artifactId>
+		</dependency>
+
+	</dependencies>
+
 	<build>
 		<plugins>
 			<plugin>

+ 1 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/WebSecurityConfig.java

@@ -70,7 +70,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
 
 	@Override
 	public void configure(WebSecurity web) throws Exception {
-		web.ignoring().antMatchers("/usernameLogin", "/smsLogin", "/refreshToken", "/v2/api-docs","/loginIn","/code/*","/user/setPassword","/user/updatePassword");
+		web.ignoring().antMatchers("/usernameLogin", "/smsLogin", "/refreshToken", "/v2/api-docs","/loginIn","/code/*");
 	}
 
 	@Bean

+ 2 - 2
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java

@@ -78,7 +78,7 @@ public class UserController extends BaseController {
 	}
 
 	@ApiOperation(value = "设置密码")
-	@PostMapping(value = "/setPassword", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
+	@PostMapping(value = "/setPassword", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
 	@ApiImplicitParams({ @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String"),
 			@ApiImplicitParam(name = "password", value = "密码", required = true, dataType = "String") })
 	public Object setPassword(String mobile, String password) {
@@ -95,7 +95,7 @@ public class UserController extends BaseController {
 	}
 
 	@ApiOperation(value = "修改密码")
-	@PostMapping(value = "/updatePassword", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
+	@PostMapping(value = "/updatePassword", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
 	@ApiImplicitParams({ @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String"),
 			@ApiImplicitParam(name = "authCode", value = "验证码", required = true, dataType = "String"),
 			@ApiImplicitParam(name = "newPassword", value = "新密码", required = true, dataType = "String") })

+ 2 - 2
mec-auth/mec-auth-server/src/main/resources/application.yml

@@ -41,7 +41,7 @@ spring:
     database: 0
     #连接超时时间(毫秒)
     timeout: 10000
-    lettuce:
+    jedis:
       pool:
         #连接池最大连接数(使用负值表示没有限制)
         max-active: 10
@@ -50,7 +50,7 @@ spring:
         #连接池中的最大空闲连接
         max-idle: 10
         #连接池中的最小空闲连接
-        min-idle: 0
+        min-idle: 1
 
 mybatis:
     mapperLocations: classpath:config/mybatis/*.xml

+ 13 - 1
mec-common/common-core/pom.xml

@@ -26,6 +26,12 @@
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-data-redis</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>io.lettuce</groupId>
+					<artifactId>lettuce-core</artifactId>
+				</exclusion>
+			</exclusions>
 		</dependency>
 		<!-- Redis缓存整合结束 -->
 
@@ -38,16 +44,22 @@
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-starter-openfeign</artifactId>
 		</dependency>
+		
 		<dependency>
 			<groupId>com.ym</groupId>
 			<artifactId>mec-thirdparty</artifactId>
 		</dependency>
+		
+		<dependency>
+			<groupId>redis.clients</groupId>
+			<artifactId>jedis</artifactId>
+		</dependency>
+		
 		<dependency>
 			<groupId>org.springframework.security.oauth</groupId>
 			<artifactId>spring-security-oauth2</artifactId>
 			<version>2.2.1.RELEASE</version>
 		</dependency>
 
-
 	</dependencies>
 </project>

+ 54 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/redis/config/RedisConfig.java

@@ -0,0 +1,54 @@
+package com.ym.mec.common.redis.config;
+
+import java.io.Serializable;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.connection.RedisPassword;
+import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
+import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+@Configuration
+public class RedisConfig {
+
+	@Value("${spring.redis.host}")
+	private String host;
+	
+	@Value("${spring.redis.port}")
+	private int port;
+	
+	@Value("${spring.redis.password}")
+	private String password;
+	
+	@Value("${spring.redis.database}")
+	private int database;
+
+	@Bean
+	public RedisConnectionFactory jedisConnectionFactory() {
+		RedisStandaloneConfiguration config = new RedisStandaloneConfiguration();
+		config.setHostName(host);
+		config.setPort(port);
+		config.setPassword(RedisPassword.of(password));
+		config.setDatabase(database);
+
+		JedisConnectionFactory factory = new JedisConnectionFactory(config);
+		return factory;
+	}
+
+	@Bean
+	public RedisTemplate<String, Serializable> redisTemplate(JedisConnectionFactory connectionFactory) {
+		RedisTemplate<String, Serializable> redisTemplate = new RedisTemplate<>();
+		redisTemplate.setKeySerializer(new StringRedisSerializer());
+		redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+		redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer());
+		redisTemplate.setHashValueSerializer(new JdkSerializationRedisSerializer());
+		redisTemplate.setConnectionFactory(jedisConnectionFactory());
+		return redisTemplate;
+	}
+
+}

+ 0 - 68
mec-common/common-core/src/main/java/com/ym/mec/common/redis/config/RedisTemplateConfig.java

@@ -1,68 +0,0 @@
-package com.ym.mec.common.redis.config;
-
-import org.springframework.boot.autoconfigure.AutoConfigureBefore;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
-import org.springframework.cache.annotation.EnableCaching;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.RedisConnectionFactory;
-import org.springframework.data.redis.core.HashOperations;
-import org.springframework.data.redis.core.ListOperations;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.core.SetOperations;
-import org.springframework.data.redis.core.ValueOperations;
-import org.springframework.data.redis.core.ZSetOperations;
-import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
-import org.springframework.data.redis.serializer.StringRedisSerializer;
-
-/**
- * Redis 配置类
- */
-@EnableCaching
-@Configuration
-@AutoConfigureBefore(RedisAutoConfiguration.class)
-public class RedisTemplateConfig {
-
-	@Bean
-	@ConditionalOnMissingBean(name="redisTemplate")
-	public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
-		RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
-		redisTemplate.setKeySerializer(new StringRedisSerializer());
-		redisTemplate.setHashKeySerializer(new StringRedisSerializer());
-		redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer());
-		redisTemplate.setHashValueSerializer(new JdkSerializationRedisSerializer());
-		redisTemplate.setConnectionFactory(redisConnectionFactory);
-		return redisTemplate;
-	}
-
-	@Bean
-	@ConditionalOnMissingBean(name="hashOperations")
-	public HashOperations<String, String, Object> hashOperations(RedisTemplate<String, Object> redisTemplate) {
-		return redisTemplate.opsForHash();
-	}
-
-	@Bean
-	@ConditionalOnMissingBean(name="valueOperations")
-	public ValueOperations<String, String> valueOperations(RedisTemplate<String, String> redisTemplate) {
-		return redisTemplate.opsForValue();
-	}
-
-	@Bean
-	@ConditionalOnMissingBean(name="listOperations")
-	public ListOperations<String, Object> listOperations(RedisTemplate<String, Object> redisTemplate) {
-		return redisTemplate.opsForList();
-	}
-
-	@Bean
-	@ConditionalOnMissingBean(name="setOperations")
-	public SetOperations<String, Object> setOperations(RedisTemplate<String, Object> redisTemplate) {
-		return redisTemplate.opsForSet();
-	}
-
-	@Bean
-	@ConditionalOnMissingBean(name="zSetOperations")
-	public ZSetOperations<String, Object> zSetOperations(RedisTemplate<String, Object> redisTemplate) {
-		return redisTemplate.opsForZSet();
-	}
-}

+ 4 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/redis/service/RedisCache.java

@@ -3,14 +3,18 @@ package com.ym.mec.common.redis.service;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.stereotype.Service;
 
 import com.ym.mec.common.cache.Cache;
 import com.ym.mec.common.cache.CacheException;
 
+@Service
 public class RedisCache<K, V> implements Cache<K, V> {
 
+	@Autowired
 	private RedisTemplate<K, V> redisTemplate;
 
 	public RedisCache(RedisTemplate<K, V> redisTemplate) {

+ 8 - 12
mec-common/common-core/src/main/java/com/ym/mec/common/validcode/impl/SmsCodeServiceImpl.java

@@ -1,23 +1,19 @@
 package com.ym.mec.common.validcode.impl;
 
-import com.ym.mec.thirdparty.message.MessageSenderPlugin;
-import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import org.apache.commons.lang3.RandomStringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 
 import com.ym.mec.common.redis.service.RedisCache;
 import com.ym.mec.common.validcode.SmsCodeService;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 
 @Service
 public class SmsCodeServiceImpl implements SmsCodeService {
-
-	@Autowired
-	private RedisTemplate<String,String> redisTemplate;
 	
-	private RedisCache<String,String> redisCache = new RedisCache<String, String>(redisTemplate);
+	@Autowired
+	private RedisCache<String,Object> redisCache;
 	
 	private final String loginVerifyCodeKey = "loginVerifyCode:";
 	
@@ -28,7 +24,7 @@ public class SmsCodeServiceImpl implements SmsCodeService {
 
 	@Override
 	public boolean verifyValidCode(String mobile, String authCode) {
-		String verifyCode = redisTemplate.opsForValue().get(loginVerifyCodeKey + mobile);
+		String verifyCode = (String) redisCache.get(loginVerifyCodeKey + mobile);
 		if(StringUtils.isNoneEmpty(verifyCode) && StringUtils.equalsIgnoreCase(verifyCode,authCode)){
 			return true;
 		}
@@ -40,19 +36,19 @@ public class SmsCodeServiceImpl implements SmsCodeService {
 		String code = RandomStringUtils.randomNumeric(6);
 		// 发送验证码
 //		messageSenderPluginContext.send(MessageSenderPluginContext.MessageSender.YIMEI,"","",mobile,"");
-		redisTemplate.opsForValue().set(loginVerifyCodeKey + mobile, code, expireTime);
+		redisCache.put(loginVerifyCodeKey + mobile, code, expireTime);
 		return true;
 	}
 
 	@Override
 	public String getValidCode(String mobile) {
-		return redisTemplate.opsForValue().get(loginVerifyCodeKey + mobile);
+		return (String) redisCache.get(loginVerifyCodeKey + mobile);
 	}
 
 	@Override
 	public void removeValidCode(String mobile) {
-		if (redisTemplate.hasKey(loginVerifyCodeKey + mobile)) {
-			redisTemplate.delete(loginVerifyCodeKey + mobile);
+		if (redisCache.exists(loginVerifyCodeKey + mobile)) {
+			redisCache.delete(loginVerifyCodeKey + mobile);
 		}
 	}
 

+ 2 - 12
mec-education/src/main/java/com/ym/mec/education/EducationApplication.java

@@ -1,20 +1,17 @@
 package com.ym.mec.education;
 
-import com.spring4all.swagger.EnableSwagger2Doc;
-import com.ym.mec.common.redis.service.RedisCache;
 import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.client.loadbalancer.LoadBalanced;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.client.RestTemplate;
 
+import com.spring4all.swagger.EnableSwagger2Doc;
+
 @MapperScan({"com.ym.mec.education.mapper", "com.ym.mec.biz.dal.dao"})
 @SpringBootApplication
 @EnableDiscoveryClient
@@ -22,8 +19,6 @@ import org.springframework.web.client.RestTemplate;
 @Configuration
 @EnableSwagger2Doc
 public class EducationApplication {
-    @Autowired
-    private RedisTemplate<String, Object> redisTemplate;
 
     public static void main(String[] args) {
         SpringApplication.run(EducationApplication.class, args);
@@ -35,9 +30,4 @@ public class EducationApplication {
         return new RestTemplate();
     }
 
-    @Bean
-    @ConditionalOnBean(RedisTemplate.class)
-    public RedisCache<String, Object> redisCache() {
-        return new RedisCache<String, Object>(redisTemplate);
-    }
 }

+ 30 - 1
mec-education/src/main/java/com/ym/mec/education/controller/AttendClassController.java

@@ -3,6 +3,7 @@ package com.ym.mec.education.controller;
 import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.req.AttendClassReq;
+import com.ym.mec.education.req.HomeWorkReq;
 import com.ym.mec.education.service.IStudentAttendanceService;
 import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
@@ -40,7 +41,7 @@ public class AttendClassController {
 
 
     /**
-     *
+     * 上课记录
      * @param req
      * @return
      */
@@ -49,4 +50,32 @@ public class AttendClassController {
 
         return  studentAttendanceService.attendRecordList(req);
     }
+
+
+    /**
+     * 点名记录
+     * @param req
+     * @return
+     */
+    @PostMapping(value = "/callStudent")
+    public PageResponse callStudent(@RequestBody HomeWorkReq req) {
+
+        return  studentAttendanceService.callStudent(req);
+    }
+
+
+    /**
+     * 签到
+     * @param req
+     * @return
+     */
+    @PostMapping(value = "/signInfo")
+    public BaseResponse signInfo(@RequestBody HomeWorkReq req) {
+
+
+        return studentAttendanceService.signInfo(req);
+    }
+
+
+
 }

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/controller/HomeWorkController.java

@@ -79,7 +79,7 @@ public class HomeWorkController {
     @PostMapping(value = "/workDetail")
     public BaseResponse workDetail(@RequestBody HomeWorkDetailReq req) {
         BaseResponse baseResponse = new BaseResponse();
-        if(req == null || req.getMusicGroupId() == null || req.getClassGroupId() == null || req.getWorkId() == null){
+        if(req == null || req.getWorkId() == null){
             baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
             baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
             return baseResponse;

+ 17 - 8
mec-education/src/main/java/com/ym/mec/education/entity/TeacherAttendance.java

@@ -37,11 +37,13 @@ public class TeacherAttendance extends Model<TeacherAttendance> {
      */
     @TableField("sign_in_time_")
     private Date signInTime;
+    @TableField("sign_out_time_")
+    private Date signOutTime;
     /**
      * 状态(正常签到,异常签到)
      */
-    @TableField("status_")
-    private Integer status;
+    @TableField("sign_in_status_" )
+    private Integer signInStatus;
     /**
      * 备注
      */
@@ -69,6 +71,14 @@ public class TeacherAttendance extends Model<TeacherAttendance> {
         return this;
     }
 
+    public Date getSignOutTime() {
+        return signOutTime;
+    }
+
+    public void setSignOutTime(Date signOutTime) {
+        this.signOutTime = signOutTime;
+    }
+
     public Integer getMusicGroupId() {
         return musicGroupId;
     }
@@ -105,13 +115,13 @@ public class TeacherAttendance extends Model<TeacherAttendance> {
         return this;
     }
 
-    public Integer getStatus() {
-        return status;
+
+    public Integer getSignInStatus() {
+        return signInStatus;
     }
 
-    public TeacherAttendance setStatus(Integer status) {
-        this.status = status;
-        return this;
+    public void setSignInStatus(Integer signInStatus) {
+        this.signInStatus = signInStatus;
     }
 
     public String getRemark() {
@@ -146,7 +156,6 @@ public class TeacherAttendance extends Model<TeacherAttendance> {
         ", classGroupId=" + classGroupId +
         ", courseScheduleId=" + courseScheduleId +
         ", signInTime=" + signInTime +
-        ", status=" + status +
         ", remark=" + remark +
         ", createTime=" + createTime +
         "}";

+ 4 - 1
mec-education/src/main/java/com/ym/mec/education/req/StudentReq.java

@@ -19,5 +19,8 @@ public class StudentReq extends BaseQuery {
     private String studentName;
 
     @ApiModelProperty(value = "学员编号")
-    private String studentId;
+    private Integer studentId;
+
+    @ApiModelProperty(value = "老师编号")
+    private Integer teacherId;
 }

+ 24 - 0
mec-education/src/main/java/com/ym/mec/education/resp/CallStudentResp.java

@@ -0,0 +1,24 @@
+package com.ym.mec.education.resp;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+
+/**
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年09月29日 13:45
+ */
+@Data
+@ToString
+public class CallStudentResp implements Serializable {
+
+    private Integer userId;
+
+    private String name;
+
+    private String avatar;
+
+    private String status;
+}

+ 6 - 0
mec-education/src/main/java/com/ym/mec/education/resp/CourseInfoResp.java

@@ -42,4 +42,10 @@ public class CourseInfoResp implements Serializable {
     private String week;
 
     private String schoolName;
+
+    private Integer totalNum;
+
+    private Integer actualNum;
+
+    private Integer leaveNum;
 }

+ 25 - 0
mec-education/src/main/java/com/ym/mec/education/resp/SignInfoResp.java

@@ -0,0 +1,25 @@
+package com.ym.mec.education.resp;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年09月29日 13:45
+ */
+@Data
+@ToString
+public class SignInfoResp implements Serializable {
+
+    private String signInTime;
+
+    private String signOutTime;
+
+    private List<String> attachments;
+
+    private String content;
+}

+ 16 - 0
mec-education/src/main/java/com/ym/mec/education/service/IStudentAttendanceService.java

@@ -1,11 +1,13 @@
 package com.ym.mec.education.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.StudentAttendance;
 import com.ym.mec.education.req.AttendClassReq;
 import com.ym.mec.education.req.ClassGroupReq;
 import com.ym.mec.education.req.CourseScheduleReq;
+import com.ym.mec.education.req.HomeWorkReq;
 
 /**
  * <p>
@@ -40,4 +42,18 @@ public interface IStudentAttendanceService extends IService<StudentAttendance> {
      * @return
      */
     PageResponse attendRecordList(AttendClassReq req);
+
+    /**
+     * 点名记录
+     * @param req
+     * @return
+     */
+    PageResponse callStudent(HomeWorkReq req);
+
+    /**
+     * 签退签到
+     * @param req
+     * @return
+     */
+    BaseResponse signInfo(HomeWorkReq req);
 }

+ 8 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
 import com.ym.mec.biz.dal.enums.JobTypeEnum;
 import com.ym.mec.common.enums.UserGenderEnum;
+import com.ym.mec.common.security.AuthUser;
 import com.ym.mec.common.security.SecurityUtils;
 import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
@@ -112,8 +113,14 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
 
     @Override
     public PageResponse getPageByTeacher(StudentReq studentReq) {
+        Teacher teacher;
         //判断当前登录人角色
-        Teacher teacher = teacherService.getById(SecurityUtils.getUser().getUserId());
+        AuthUser user = SecurityUtils.getUser();
+        if(Objects.nonNull(user)) {
+            teacher = teacherService.getById(user.getUserId());
+        }else {
+            teacher = teacherService.getById(studentReq.getTeacherId());
+        }
         if (Objects.nonNull(teacher)) {
             //教学主管
             QueryWrapper<MusicGroup> musicGroupQueryWrapper = new QueryWrapper<>();

+ 11 - 0
mec-education/src/main/java/com/ym/mec/education/service/impl/CourseScheduleServiceImpl.java

@@ -349,7 +349,18 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
                     }
                 }
             }
+            QueryWrapper<StudentAttendance> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("course_schedule_id_",courseSchedule.getId());
+            List<StudentAttendance> attendanceList =  studentAttendanceService.list(queryWrapper);
+            if(!CollectionUtils.isEmpty(attendanceList)){
+                resp.setTotalNum(attendanceList.size());
 
+               List<StudentAttendance>  leaveList = attendanceList.stream().filter(e->StudentAttendanceStatusEnum.LEAVE.getCode().equals(e.getStatus())).collect(Collectors.toList());
+               if(!CollectionUtils.isEmpty(leaveList)){
+                   resp.setLeaveNum(leaveList.size());
+                   resp.setActualNum(attendanceList.size() - leaveList.size());
+               }
+            }
 
         }
         return BaseResponse.success(resp);

+ 79 - 3
mec-education/src/main/java/com/ym/mec/education/service/impl/StudentAttendanceServiceImpl.java

@@ -5,16 +5,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
+import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.*;
+import com.ym.mec.education.enums.ReturnCodeEnum;
 import com.ym.mec.education.enums.StudentAttendanceStatusEnum;
 import com.ym.mec.education.mapper.StudentAttendanceMapper;
 import com.ym.mec.education.req.AttendClassReq;
 import com.ym.mec.education.req.ClassGroupReq;
 import com.ym.mec.education.req.CourseScheduleReq;
-import com.ym.mec.education.resp.AttendClassResp;
-import com.ym.mec.education.resp.StudentAttendanceResp;
-import com.ym.mec.education.resp.StudentAttendanceStatisticsResp;
+import com.ym.mec.education.req.HomeWorkReq;
+import com.ym.mec.education.resp.*;
 import com.ym.mec.education.service.*;
 import com.ym.mec.education.utils.DateUtil;
 import org.apache.commons.lang3.StringUtils;
@@ -23,6 +24,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Objects;
 import java.util.stream.Collectors;
@@ -51,6 +54,12 @@ public class StudentAttendanceServiceImpl extends ServiceImpl<StudentAttendanceM
     @Autowired
     private IMusicGroupStudentFeeService musicGroupStudentFeeService;
 
+    @Autowired
+    private ITeacherAttendanceService teacherAttendanceService;
+
+    @Autowired
+    private ICourseHomeworkService courseHomeworkService;
+
     @Override
     public PageResponse getPage(ClassGroupReq classGroupReq) {
         if (Objects.isNull(classGroupReq.getGroupId())) {
@@ -243,4 +252,71 @@ public class StudentAttendanceServiceImpl extends ServiceImpl<StudentAttendanceM
         return PageResponse.success(pageParam);
     }
 
+    @Override
+    public PageResponse callStudent(HomeWorkReq req) {
+        if(req == null || req.getCourseScheduleId() == null){
+            return  PageResponse.errorParam();
+        }
+        PageResponse response = new PageResponse();
+
+        IPage<StudentAttendance> page = new Page<>(req.getPageNo(),req.getPageSize());
+        IPage<StudentAttendance> studentAttendanceIPage = this.page(page,new QueryWrapper<StudentAttendance>().eq("course_schedule_id_",req.getCourseScheduleId()));
+
+        List<CallStudentResp> callStudentResps = new ArrayList<>();
+        List<StudentAttendance> studentAttendanceList = studentAttendanceIPage.getRecords();
+        if(!CollectionUtils.isEmpty(studentAttendanceList)){
+
+            studentAttendanceList.forEach(e->{
+                CallStudentResp callStudentResp = new CallStudentResp();
+                callStudentResp.setUserId(e.getUserId());
+                SysUser sysUser = userService.getById(e.getUserId());
+                if(sysUser != null ){
+                    callStudentResp.setName(sysUser.getRealName());
+                    callStudentResp.setAvatar(sysUser.getAvatar());
+                }
+                callStudentResp.setStatus(e.getStatus());
+                callStudentResps.add(callStudentResp);
+            });
+
+
+        }
+
+        response.setTotal(Math.toIntExact(page.getTotal()));
+        response.setSize(Math.toIntExact(page.getSize()));
+        response.setCurrent(Math.toIntExact(page.getCurrent()));
+        response.setRecords(callStudentResps);
+        response.setReturnCode(ReturnCodeEnum.CODE_200.getCode());
+        return response;
+    }
+
+    @Override
+    public BaseResponse signInfo(HomeWorkReq req) {
+
+        if(req == null || req.getCourseScheduleId() == null){
+            return  BaseResponse.errorParam();
+        }
+
+        SignInfoResp signInfoResp = new SignInfoResp();
+        QueryWrapper<TeacherAttendance> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("course_schedule_id_",req.getCourseScheduleId());
+        TeacherAttendance teacherAttendance = teacherAttendanceService.getOne(queryWrapper);
+        if(teacherAttendance != null){
+            signInfoResp.setSignInTime(DateUtil.date2String(teacherAttendance.getSignInTime(),DateUtil.DATE_FORMAT_DATE));
+            signInfoResp.setSignOutTime(DateUtil.date2String(teacherAttendance.getSignOutTime(),DateUtil.DATE_FORMAT_DATE));
+        }
+        QueryWrapper<CourseHomework> queryWrapper1 = new QueryWrapper<>();
+        queryWrapper1.eq("course_schedule_id_",req.getCourseScheduleId());
+        CourseHomework courseHomework = courseHomeworkService.getOne(queryWrapper1);
+        if(courseHomework != null){
+            signInfoResp.setContent(courseHomework.getContent());
+            if(courseHomework.getAttachments()!= null){
+                String[] str = courseHomework.getAttachments().split(",");
+                signInfoResp.setAttachments(Arrays.asList(str));
+            }
+
+        }
+
+        return BaseResponse.success(signInfoResp);
+    }
+
 }

+ 6 - 6
mec-education/src/main/java/com/ym/mec/education/service/impl/StudentCourseHomeworkServiceImpl.java

@@ -74,9 +74,9 @@ public class StudentCourseHomeworkServiceImpl extends ServiceImpl<StudentCourseH
         }
         IPage ipage = new Page(req.getPageNo() == null ? 1: req.getPageNo(),req.getPageSize() == null ? 10:req.getPageSize());
         QueryWrapper<StudentCourseHomework> queryWrapper = new QueryWrapper<>();
-      /*  if(userIds != null && !userIds.isEmpty()){
+      if(userIds != null && !userIds.isEmpty()){
             queryWrapper.in("user_id_",userIds);
-        }*/
+        }
         queryWrapper.eq("course_schedule_id_",req.getCourseScheduleId());
         IPage<StudentCourseHomework> homeworkIPage =  this.page(ipage,queryWrapper);
 
@@ -115,21 +115,21 @@ public class StudentCourseHomeworkServiceImpl extends ServiceImpl<StudentCourseH
     public BaseResponse getHomeWorkDetail(HomeWorkDetailReq req) {
 
         HomeWrokDetailResp resp = new HomeWrokDetailResp();
-        MusicGroup musicGroup = musicGroupService.getById(req.getMusicGroupId());
+       /* MusicGroup musicGroup = musicGroupService.getById(req.getMusicGroupId());
         if(musicGroup == null){
             return  BaseResponse.noDataExists();
         }
         ClassGroup classGroup =  classGroupService.getById(req.getClassGroupId());
         if(classGroup == null){
             return  BaseResponse.noDataExists();
-        }
+        }*/
         StudentCourseHomework homework = this.getById(req.getWorkId());
         if(homework == null){
             return  BaseResponse.noDataExists();
         }
         BeanUtils.copyProperties(homework,resp);
-        resp.setGroupName(musicGroup.getName());
-        resp.setClassName(classGroup.getName());
+        //resp.setGroupName(musicGroup.getName());
+        //resp.setClassName(classGroup.getName());
 
         //回复留言
         QueryWrapper<StudentCourseHomeworkReply> queryWrapper = new QueryWrapper<>();

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherAttendanceServiceImpl.java

@@ -57,7 +57,7 @@ public class TeacherAttendanceServiceImpl extends ServiceImpl<TeacherAttendanceM
         if (!CollectionUtils.isEmpty(page.getRecords())) {
             page.getRecords().forEach(item -> {
                 TeacherAttendanceResp teacherAttendanceResp = new TeacherAttendanceResp();
-                teacherAttendanceResp.setTeacherAttendanceStatus(SignStatusEnum.getMsgByCode(item.getStatus()));
+                teacherAttendanceResp.setTeacherAttendanceStatus(SignStatusEnum.getMsgByCode(item.getSignInStatus()));
                 CourseSchedule courseSchedule = courseScheduleService.getById(item.getCourseScheduleId());
                 if (Objects.nonNull(courseSchedule)) {
                     if (Objects.nonNull(courseSchedule.getClassDate())) {

+ 1 - 0
mec-education/src/main/java/com/ym/mec/education/utils/DateUtil.java

@@ -24,6 +24,7 @@ public class DateUtil {
     public static final String DATE_FORMAT_HOUR = "MM-dd HH:mm";
     public static final String DATE_FORMAT_MIN = "yyyy年MM月dd日 HH:mm";
     public static final String DATE_FORMAT_EXTRA = "yyyy/MM/dd";
+    public static final String DATE_FORMAT_DATE = "yyyy-MM-dd HH:mm:ss";
     private static ThreadLocal<DateFormat> threadLocal = new ThreadLocal<DateFormat>();
 
     public static DateFormat getDateFormat(String dateFormat) {

+ 4 - 3
mec-education/src/main/resources/mapper/TeacherAttendanceMapper.xml

@@ -10,6 +10,7 @@
         <result column="class_group_id_" property="classGroupId"/>
         <result column="course_schedule_id_" property="courseScheduleId"/>
         <result column="sign_in_time_" property="signInTime"/>
+        <result column="sign_out_time_" property="signOutTime"/>
         <result column="status_" property="status"/>
         <result column="remark_" property="remark"/>
         <result column="create_time_" property="createTime"/>
@@ -17,13 +18,13 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id_, teacher_id_, music_group_id_, class_group_id_, course_schedule_id_, sign_in_time_, status_, remark_, create_time_
+        id_, teacher_id_, music_group_id_, class_group_id_, course_schedule_id_, sign_in_time_, sign_in_status_, remark_, create_time_,sign_out_time_
     </sql>
     <sql id="Column_List">
         teacher_attendance.id_, teacher_attendance.teacher_id_, teacher_attendance.music_group_id_,
         teacher_attendance.class_group_id_, teacher_attendance.course_schedule_id_,
-        teacher_attendance.sign_in_time_, teacher_attendance.status_,
-        teacher_attendance.remark_, teacher_attendance.create_time_
+        teacher_attendance.sign_in_time_, teacher_attendance.sign_in_status_,
+        teacher_attendance.remark_, teacher_attendance.create_time_,teacher_attendance.sign_out_time_
     </sql>
 
     <!--上课记录-->

+ 0 - 12
mec-student/src/main/java/com/ym/mec/student/StudentApplication.java

@@ -1,21 +1,17 @@
 package com.ym.mec.student;
 
 import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.client.loadbalancer.LoadBalanced;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.client.RestTemplate;
 
 import com.spring4all.swagger.EnableSwagger2Doc;
-import com.ym.mec.common.redis.service.RedisCache;
 
 @SpringBootApplication
 @EnableDiscoveryClient
@@ -26,9 +22,6 @@ import com.ym.mec.common.redis.service.RedisCache;
 @EnableSwagger2Doc
 public class StudentApplication {
 
-	@Autowired
-	private RedisTemplate<String, Object> redisTemplate;
-
 	public static void main(String[] args) {
 		SpringApplication.run(StudentApplication.class, args);
 	}
@@ -39,9 +32,4 @@ public class StudentApplication {
 		return new RestTemplate();
 	}
 
-	@Bean
-	@ConditionalOnBean(RedisTemplate.class)
-	public RedisCache<String, Object> redisCache() {
-		return new RedisCache<String, Object>(redisTemplate);
-	}
 }

+ 3 - 13
mec-teacher/src/main/java/com/ym/mec/teacher/TeacherApplication.java

@@ -1,21 +1,18 @@
 package com.ym.mec.teacher;
 
-import com.spring4all.swagger.EnableSwagger2Doc;
-import com.ym.mec.common.redis.service.RedisCache;
 import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.client.loadbalancer.LoadBalanced;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.client.RestTemplate;
 
+import com.spring4all.swagger.EnableSwagger2Doc;
+
 @SpringBootApplication
 @EnableDiscoveryClient
 @EnableFeignClients("com.ym.mec")
@@ -24,22 +21,15 @@ import org.springframework.web.client.RestTemplate;
 @Configuration
 @EnableSwagger2Doc
 public class TeacherApplication {
+	
 	public static void main(String[] args) {
 		SpringApplication.run(TeacherApplication.class, args);
 	}
 
-	@Autowired
-	private RedisTemplate<String, Object> redisTemplate;
-
 	@Bean
 	@LoadBalanced
 	public RestTemplate restTemplate() {
 		return new RestTemplate();
 	}
 
-	@Bean
-	@ConditionalOnBean(RedisTemplate.class)
-	public RedisCache<String, Object> redisCache() {
-		return new RedisCache<String, Object>(redisTemplate);
-	}
 }

+ 0 - 13
mec-web/src/main/java/com/ym/mec/web/WebApplication.java

@@ -1,21 +1,17 @@
 package com.ym.mec.web;
 
 import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.client.loadbalancer.LoadBalanced;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.client.RestTemplate;
 
 import com.spring4all.swagger.EnableSwagger2Doc;
-import com.ym.mec.common.redis.service.RedisCache;
 
 @SpringBootApplication
 @EnableDiscoveryClient
@@ -26,9 +22,6 @@ import com.ym.mec.common.redis.service.RedisCache;
 @EnableSwagger2Doc
 public class WebApplication {
 
-	@Autowired
-	private RedisTemplate<String, Object> redisTemplate;
-	
 	public static void main(String[] args) {
 		SpringApplication.run(WebApplication.class, args);
 	}
@@ -38,10 +31,4 @@ public class WebApplication {
 	public RestTemplate restTemplate() {
 		return new RestTemplate();
 	}
-
-	@Bean
-	@ConditionalOnBean(RedisTemplate.class)
-	public RedisCache<String, Object> redisCache() {
-		return new RedisCache<String, Object>(redisTemplate);
-	}
 }

+ 16 - 0
mec-workflow/src/main/java/com/ym/mec/workfow/WorkflowApplication.java

@@ -1,12 +1,18 @@
 package com.ym.mec.workfow;
 
+import javax.sql.DataSource;
+
 import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
 
 import com.spring4all.swagger.EnableSwagger2Doc;
 
@@ -18,7 +24,17 @@ import com.spring4all.swagger.EnableSwagger2Doc;
 @Configuration
 @EnableSwagger2Doc
 public class WorkflowApplication {
+
+	@Autowired
+	private DataSource dataSource;
+	
 	public static void main(String[] args) {
 		SpringApplication.run(WorkflowApplication.class, args);
 	}
+
+	@Bean
+	public DataSourceTransactionManager transactionManager(DataSourceProperties properties) {
+		DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(this.dataSource);
+		return transactionManager;
+	}
 }

+ 18 - 0
mec-workflow/src/main/resources/application.yml

@@ -34,6 +34,24 @@ spring:
     poolPreparedStatements: true
     maxOpenPreparedStatements: 20
     
+  redis:
+    host: 120.26.238.168
+    port: 6379
+    password: ehjinrong
+    database: 0
+    #连接超时时间(毫秒)
+    timeout: 10000
+    jedis:
+      pool:
+        #连接池最大连接数(使用负值表示没有限制)
+        max-active: 10
+        #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1
+        #连接池中的最大空闲连接
+        max-idle: 10
+        #连接池中的最小空闲连接
+        min-idle: 1
+    
 
 mybatis:
     mapperLocations: classpath:config/mybatis/*.xml

+ 0 - 6
pom.xml

@@ -177,12 +177,6 @@
 				<version>${google.zxing.version}</version>
 			</dependency>
 
-			<dependency>
-				<groupId>org.apache.commons</groupId>
-				<artifactId>commons-pool2</artifactId>
-				<version>2.6.2</version>
-			</dependency>
-
 		</dependencies>
 	</dependencyManagement>
 

+ 0 - 6
workflowy/src/main/java/org/snaker/SnakerFlowyApplication.java

@@ -6,7 +6,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
-import org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
@@ -21,8 +20,6 @@ public class SnakerFlowyApplication {
 	@Autowired
 	private DataSource dataSource;
 	
-	private TransactionManagerCustomizers transactionManagerCustomizers;
-
 	public static void main(String[] args) {
 		SpringApplication.run(SnakerFlowyApplication.class, args);
 	}
@@ -35,9 +32,6 @@ public class SnakerFlowyApplication {
 	@Bean
 	public DataSourceTransactionManager transactionManager(DataSourceProperties properties) {
 		DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(this.dataSource);
-		if (this.transactionManagerCustomizers != null) {
-			this.transactionManagerCustomizers.customize(transactionManager);
-		}
 		return transactionManager;
 	}
 }

+ 1 - 1
workflowy/src/main/java/org/snaker/engine/core/ManagerService.java

@@ -45,7 +45,7 @@ public class ManagerService extends AccessService implements IManagerService {
 		}
 	}
 
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void deleteSurrogate(String id) {
 		Surrogate surrogate = getSurrogate(id);
 		AssertHelper.notNull(surrogate);

+ 13 - 13
workflowy/src/main/java/org/snaker/engine/core/OrderService.java

@@ -44,7 +44,7 @@ public class OrderService extends AccessService implements IOrderService {
 	 * 创建活动实例
 	 * @see org.snaker.engine.core.OrderService#createOrder(Process, String, Map, String, String)
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order createOrder(Process process, String operator, Map<String, Object> args) {
 		return createOrder(process, operator, args, null, null);
 	}
@@ -52,7 +52,7 @@ public class OrderService extends AccessService implements IOrderService {
 	/**
 	 * 创建活动实例
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order createOrder(Process process, String operator, Map<String, Object> args, 
 			String parentId, String parentNodeName) {
 		Order order = new Order();
@@ -88,7 +88,7 @@ public class OrderService extends AccessService implements IOrderService {
      * @param orderId 实例id
      * @param args 变量数据
      */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
     public void addVariable(String orderId, Map<String, Object> args) {
         Order order = access().getOrder(orderId);
         Map<String, Object> data = order.getVariableMap();
@@ -100,7 +100,7 @@ public class OrderService extends AccessService implements IOrderService {
     /**
 	 * 创建实例的抄送
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void createCCOrder(String orderId, String creator, String... actorIds) {
 		for(String actorId : actorIds) {
 			CCOrder ccorder = new CCOrder();
@@ -116,7 +116,7 @@ public class OrderService extends AccessService implements IOrderService {
 	/**
 	 * 流程实例数据会保存至活动实例表、历史实例表
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void saveOrder(Order order) {
 		HistoryOrder history = new HistoryOrder(order);
 		history.setOrderState(STATE_ACTIVE);
@@ -127,7 +127,7 @@ public class OrderService extends AccessService implements IOrderService {
 	/**
 	 * 更新活动实例的last_Updator、last_Update_Time、expire_Time、version、variable
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void updateOrder(Order order) {
 		access().updateOrder(order);
 	}
@@ -135,7 +135,7 @@ public class OrderService extends AccessService implements IOrderService {
 	/**
 	 * 更新抄送记录状态为已阅
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void updateCCStatus(String orderId, String... actorIds) {
         List<CCOrder> ccorders = access().getCCOrder(orderId, actorIds);
         AssertHelper.notNull(ccorders);
@@ -149,7 +149,7 @@ public class OrderService extends AccessService implements IOrderService {
 	/**
 	 * 删除指定的抄送记录
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void deleteCCOrder(String orderId, String actorId) {
         List<CCOrder> ccorders = access().getCCOrder(orderId, actorId);
 		AssertHelper.notNull(ccorders);
@@ -161,7 +161,7 @@ public class OrderService extends AccessService implements IOrderService {
 	/**
 	 * 删除活动流程实例数据,更新历史流程实例的状态、结束时间
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void complete(String orderId) {
 		Order order = access().getOrder(orderId);
 		HistoryOrder history = access().getHistOrder(orderId);
@@ -180,7 +180,7 @@ public class OrderService extends AccessService implements IOrderService {
 	 * 强制中止流程实例
 	 * @see org.snaker.engine.core.OrderService#terminate(String, String)
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void terminate(String orderId) {
 		terminate(orderId, null);
 	}
@@ -188,7 +188,7 @@ public class OrderService extends AccessService implements IOrderService {
 	/**
 	 * 强制中止活动实例,并强制完成活动任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void terminate(String orderId, String operator) {
 		SnakerEngine engine = ServiceContext.getEngine();
 		List<Task> tasks = engine
@@ -215,7 +215,7 @@ public class OrderService extends AccessService implements IOrderService {
      * @param orderId 实例id
      * @return 活动实例对象
      */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
     public Order resume(String orderId) {
         HistoryOrder historyOrder = access().getHistOrder(orderId);
         Order order = historyOrder.undo();
@@ -241,7 +241,7 @@ public class OrderService extends AccessService implements IOrderService {
 	 * 4.wf_cc_order
 	 * @param id 实例id
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void cascadeRemove(String id) {
 		HistoryOrder historyOrder = access().getHistOrder(id);
 		AssertHelper.notNull(historyOrder);

+ 7 - 7
workflowy/src/main/java/org/snaker/engine/core/ProcessService.java

@@ -81,7 +81,7 @@ public class ProcessService extends AccessService implements IProcessService, Ca
 	/**
 	 * 保存process实体对象
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void saveProcess(Process process) {
 		access().saveProcess(process);
 	}
@@ -89,7 +89,7 @@ public class ProcessService extends AccessService implements IProcessService, Ca
 	/**
 	 * 更新process的类别
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void updateType(String id, String type) {
         Process entity = getProcessById(id);
         entity.setType(type);
@@ -177,7 +177,7 @@ public class ProcessService extends AccessService implements IProcessService, Ca
 	 * 根据流程定义xml的输入流解析为字节数组,保存至数据库中,并且put到缓存中
 	 * @param input 定义输入流
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public String deploy(InputStream input) {
 		return deploy(input, null);
 	}
@@ -187,7 +187,7 @@ public class ProcessService extends AccessService implements IProcessService, Ca
 	 * @param input 定义输入流
 	 * @param creator 创建人
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public String deploy(InputStream input, String creator) {
 		AssertHelper.notNull(input);
 		try {
@@ -219,7 +219,7 @@ public class ProcessService extends AccessService implements IProcessService, Ca
 	 * 根据流程定义id、xml的输入流解析为字节数组,保存至数据库中,并且重新put到缓存中
 	 * @param input 定义输入流
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void redeploy(String id, InputStream input) {
 		AssertHelper.notNull(input);
 		Process entity = access().getProcess(id);
@@ -248,7 +248,7 @@ public class ProcessService extends AccessService implements IProcessService, Ca
 	/**
 	 * 根据processId卸载流程
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void undeploy(String id) {
 		Process entity = access().getProcess(id);
 		entity.setState(STATE_FINISH);
@@ -259,7 +259,7 @@ public class ProcessService extends AccessService implements IProcessService, Ca
 	/**
 	 * 级联删除指定流程定义的所有数据
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void cascadeRemove(String id) {
 		Process entity = access().getProcess(id);
 		List<HistoryOrder> historyOrders = access().getHistoryOrders(null, new QueryFilter().setProcessId(id));

+ 16 - 16
workflowy/src/main/java/org/snaker/engine/core/SnakerEngineImpl.java

@@ -124,7 +124,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	/**
 	 * 根据流程定义ID启动流程实例
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order startInstanceById(String id) {
 		return startInstanceById(id, null, null);
 	}
@@ -132,7 +132,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	/**
 	 * 根据流程定义ID,操作人ID启动流程实例
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order startInstanceById(String id, String operator) {
 		return startInstanceById(id, operator, null);
 	}
@@ -140,7 +140,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	/**
 	 * 根据流程定义ID,操作人ID,参数列表启动流程实例
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order startInstanceById(String id, String operator, Map<String, Object> args) {
 		if(args == null) args = new HashMap<String, Object>();
 		Process process = process().getProcessById(id);
@@ -152,7 +152,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	 * 根据流程名称启动流程实例
 	 * @since 1.3
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order startInstanceByName(String name) {
 		return startInstanceByName(name, null, null, null);
 	}
@@ -161,7 +161,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	 * 根据流程名称、版本号启动流程实例
 	 * @since 1.3
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order startInstanceByName(String name, Integer version) {
 		return startInstanceByName(name, version, null, null);
 	}
@@ -170,7 +170,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	 * 根据流程名称、版本号、操作人启动流程实例
 	 * @since 1.3
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order startInstanceByName(String name, Integer version,
 			String operator) {
 		return startInstanceByName(name, version, operator, null);
@@ -180,7 +180,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	 * 根据流程名称、版本号、操作人、参数列表启动流程实例
 	 * @since 1.3
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order startInstanceByName(String name, Integer version,
 			String operator, Map<String, Object> args) {
 		if(args == null) args = new HashMap<String, Object>();
@@ -189,7 +189,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 		return startProcess(process, operator, args);
 	}
 
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	private Order startProcess(Process process, String operator, Map<String, Object> args) {
 		Execution execution = execute(process, operator, args, null, null);
 		if(process.getModel() != null) {
@@ -204,7 +204,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	/**
 	 * 根据父执行对象启动子流程实例(用于启动子流程)
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Order startInstanceByExecution(Execution execution) {
 		Process process = execution.getProcess();
 		StartModel start = process.getModel().getStart();
@@ -225,7 +225,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	 * @param parentNodeName 启动子流程的父流程节点名称
 	 * @return Execution
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	private Execution execute(Process process, String operator, Map<String, Object> args, 
 			String parentId, String parentNodeName) {
 		Order order = order().createOrder(process, operator, args, parentId, parentNodeName);
@@ -240,7 +240,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	/**
 	 * 根据任务主键ID执行任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public List<Task> executeTask(String taskId) {
 		return executeTask(taskId, null);
 	}
@@ -248,7 +248,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	/**
 	 * 根据任务主键ID,操作人ID执行任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public List<Task> executeTask(String taskId, String operator) {
 		return executeTask(taskId, operator, null);
 	}
@@ -256,7 +256,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	/**
 	 * 根据任务主键ID,操作人ID,参数列表执行任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public List<Task> executeTask(String taskId, String operator, Map<String, Object> args) {
 		//完成任务,并且构造执行对象
 		Execution execution = execute(taskId, operator, args);
@@ -275,7 +275,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	 * 1、nodeName为null时,则驳回至上一步处理
 	 * 2、nodeName不为null时,则任意跳转,即动态创建转移
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public List<Task> executeAndJumpTask(String taskId, String operator, Map<String, Object> args, String nodeName) {
 		Execution execution = execute(taskId, operator, args);
 		if(execution == null) return Collections.emptyList();
@@ -300,7 +300,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	/**
 	 * 根据流程实例ID,操作人ID,参数列表按照节点模型model创建新的自由任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public List<Task> createFreeTask(String orderId, String operator, Map<String, Object> args, TaskModel model) {
 		Order order = query().getOrder(orderId);
 		AssertHelper.notNull(order, "指定的流程实例[id=" + orderId + "]已完成或不存在");
@@ -319,7 +319,7 @@ public class SnakerEngineImpl implements SnakerEngine {
 	 * @param args 参数列表
 	 * @return Execution
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	private Execution execute(String taskId, String operator, Map<String, Object> args) {
 		if(args == null) args = new HashMap<String, Object>();
 		Task task = task().complete(taskId, operator, args);

+ 17 - 17
workflowy/src/main/java/org/snaker/engine/core/TaskService.java

@@ -48,7 +48,7 @@ public class TaskService extends AccessService implements ITaskService {
 	/**
 	 * 完成指定任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Task complete(String taskId) {
 		return complete(taskId, null, null);
 	}
@@ -56,7 +56,7 @@ public class TaskService extends AccessService implements ITaskService {
 	/**
 	 * 完成指定任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Task complete(String taskId, String operator) {
 		return complete(taskId, operator, null);
 	}
@@ -66,7 +66,7 @@ public class TaskService extends AccessService implements ITaskService {
 	 * 该方法仅仅结束活动任务,并不能驱动流程继续执行
 	 * @see SnakerEngineImpl#executeTask(String, String, java.util.Map)
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Task complete(String taskId, String operator, Map<String, Object> args) {
 		Task task = access().getTask(taskId);
 		AssertHelper.notNull(task, "指定的任务[id=" + taskId + "]不存在");
@@ -99,7 +99,7 @@ public class TaskService extends AccessService implements ITaskService {
 	 * 更新任务对象的finish_Time、operator、expire_Time、version、variable
 	 * @param task 任务对象
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void updateTask(Task task) {
 		access().updateTask(task);
 	}
@@ -110,7 +110,7 @@ public class TaskService extends AccessService implements ITaskService {
 	 * @param model 自定义节点模型
 	 * @return 历史任务对象
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public HistoryTask history(Execution execution, CustomModel model) {
 		HistoryTask historyTask = new HistoryTask();
 		historyTask.setId(StringHelper.getPrimaryKey());
@@ -132,7 +132,7 @@ public class TaskService extends AccessService implements ITaskService {
 	/**
 	 * 提取指定任务,设置完成时间及操作人,状态不改变
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Task take(String taskId, String operator) {
 		Task task = access().getTask(taskId);
 		AssertHelper.notNull(task, "指定的任务[id=" + taskId + "]不存在");
@@ -148,7 +148,7 @@ public class TaskService extends AccessService implements ITaskService {
     /**
      * 唤醒指定的历史任务
      */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
     public Task resume(String taskId, String operator) {
         HistoryTask histTask = access().getHistTask(taskId);
         AssertHelper.notNull(histTask, "指定的历史任务[id=" + taskId + "]不存在");
@@ -171,7 +171,7 @@ public class TaskService extends AccessService implements ITaskService {
 	/**
 	 * 向指定任务添加参与者
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void addTaskActor(String taskId, String... actors) {
 		addTaskActor(taskId, null, actors);
 	}
@@ -180,7 +180,7 @@ public class TaskService extends AccessService implements ITaskService {
 	 * 向指定任务添加参与者
 	 * 该方法根据performType类型判断是否需要创建新的活动任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void addTaskActor(String taskId, Integer performType, String... actors) {
 		Task task = access().getTask(taskId);
 		AssertHelper.notNull(task, "指定的任务[id=" + taskId + "]不存在");
@@ -221,7 +221,7 @@ public class TaskService extends AccessService implements ITaskService {
 	/**
 	 * 向指定任务移除参与者
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public void removeTaskActor(String taskId, String... actors) {
 		Task task = access().getTask(taskId);
 		AssertHelper.notNull(task, "指定的任务[id=" + taskId + "]不存在");
@@ -257,7 +257,7 @@ public class TaskService extends AccessService implements ITaskService {
 	/**
 	 * 撤回指定的任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Task withdrawTask(String taskId, String operator) {
 		HistoryTask hist = access().getHistTask(taskId);
 		AssertHelper.notNull(hist, "指定的历史任务[id=" + taskId + "]不存在");
@@ -286,7 +286,7 @@ public class TaskService extends AccessService implements ITaskService {
 	/**
 	 * 驳回任务
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public Task rejectTask(ProcessModel model, Task currentTask) {
 		String parentTaskId = currentTask.getParentTaskId();
 		if(StringHelper.isEmpty(parentTaskId) || parentTaskId.equals(START)) {
@@ -313,7 +313,7 @@ public class TaskService extends AccessService implements ITaskService {
 	 * @param taskId 任务id
 	 * @param actorIds 参与者id集合
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	private void assignTask(String taskId, String... actorIds) {
 		if(actorIds == null || actorIds.length == 0) return;
 		for(String actorId : actorIds) {
@@ -330,7 +330,7 @@ public class TaskService extends AccessService implements ITaskService {
 	 * 根据已有任务、任务类型、参与者创建新的任务
 	 * 适用于转派,动态协办处理
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public List<Task> createNewTask(String taskId, int taskType, String... actors) {
 		Task task = access().getTask(taskId);
 		AssertHelper.notNull(task, "指定的任务[id=" + taskId + "]不存在");
@@ -374,7 +374,7 @@ public class TaskService extends AccessService implements ITaskService {
 	 * @param execution 执行对象
 	 * @return List<Task> 任务列表
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	public List<Task> createTask(TaskModel taskModel, Execution execution) {
 		List<Task> tasks = new ArrayList<Task>();
 		
@@ -421,7 +421,7 @@ public class TaskService extends AccessService implements ITaskService {
 	 * @param execution 执行对象
 	 * @return Task任务对象
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	private Task createTaskBase(TaskModel model, Execution execution) {
 		Task task = new Task();
 		task.setOrderId(execution.getOrder().getId());
@@ -442,7 +442,7 @@ public class TaskService extends AccessService implements ITaskService {
 	/**
 	 * 由DBAccess实现类持久化task对象
 	 */
-	@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
+	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 	private Task saveTask(Task task, String... actors) {
 		task.setId(StringHelper.getPrimaryKey());
 		task.setPerformType(PerformType.ANY.ordinal());