|  | @ -9,6 +9,7 @@ import com.yihu.jw.exception.ApiException;
 | 
												
													
														
															|  | import com.yihu.jw.exception.code.ExceptionCode;
 |  | import com.yihu.jw.exception.code.ExceptionCode;
 | 
												
													
														
															|  | import com.yihu.jw.rm.base.BaseUserRequestMapping;
 |  | import com.yihu.jw.rm.base.BaseUserRequestMapping;
 | 
												
													
														
															|  | import org.springframework.beans.factory.annotation.Autowired;
 |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
												
													
														
															|  | 
 |  | import org.springframework.cache.annotation.*;
 | 
												
													
														
															|  | import org.springframework.stereotype.Service;
 |  | import org.springframework.stereotype.Service;
 | 
												
													
														
															|  | import org.springframework.transaction.annotation.Transactional;
 |  | import org.springframework.transaction.annotation.Transactional;
 | 
												
													
														
															|  | import org.springframework.util.StringUtils;
 |  | import org.springframework.util.StringUtils;
 | 
												
											
												
													
														
															|  | @ -19,7 +20,10 @@ import java.util.List;
 | 
												
													
														
															|  |  * Created by chenweida on 2017/5/11.
 |  |  * Created by chenweida on 2017/5/11.
 | 
												
													
														
															|  |  * 用户信息功能
 |  |  * 用户信息功能
 | 
												
													
														
															|  |  */
 |  |  */
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | @Service
 |  | @Service
 | 
												
													
														
															|  | 
 |  | @EnableCaching
 | 
												
													
														
															|  | 
 |  | @CacheConfig(cacheNames = "employ")
 | 
												
													
														
															|  | public class EmployService extends BaseJpaService<BaseEmployDO,EmployDao> {
 |  | public class EmployService extends BaseJpaService<BaseEmployDO,EmployDao> {
 | 
												
													
														
															|  |     @Autowired
 |  |     @Autowired
 | 
												
													
														
															|  |     private EmployDao employDao;
 |  |     private EmployDao employDao;
 | 
												
											
												
													
														
															|  | @ -29,6 +33,7 @@ public class EmployService extends BaseJpaService<BaseEmployDO,EmployDao> {
 | 
												
													
														
															|  |      * @param employeeDO
 |  |      * @param employeeDO
 | 
												
													
														
															|  |      * @return
 |  |      * @return
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  | 
 |  |     @Cacheable(value = "employ#600#300")
 | 
												
													
														
															|  |     @Transactional
 |  |     @Transactional
 | 
												
													
														
															|  |     public BaseEmployDO createBaseEmployDO(BaseEmployDO employeeDO){
 |  |     public BaseEmployDO createBaseEmployDO(BaseEmployDO employeeDO){
 | 
												
													
														
															|  |         if (StringUtils.isEmpty(employeeDO.getId())) {
 |  |         if (StringUtils.isEmpty(employeeDO.getId())) {
 | 
												
											
												
													
														
															|  | @ -45,6 +50,7 @@ public class EmployService extends BaseJpaService<BaseEmployDO,EmployDao> {
 | 
												
													
														
															|  |      * @param employeeDO
 |  |      * @param employeeDO
 | 
												
													
														
															|  |      * @return
 |  |      * @return
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  | 
 |  |     @CachePut(value = "employ#600#300",key = "#employeeDO.id")
 | 
												
													
														
															|  |     @Transactional
 |  |     @Transactional
 | 
												
													
														
															|  |     public BaseEmployDO updateBaseEmployDO(BaseEmployDO employeeDO){
 |  |     public BaseEmployDO updateBaseEmployDO(BaseEmployDO employeeDO){
 | 
												
													
														
															|  |         if (StringUtils.isEmpty(employeeDO.getId())) {
 |  |         if (StringUtils.isEmpty(employeeDO.getId())) {
 | 
												
											
												
													
														
															|  | @ -61,6 +67,7 @@ public class EmployService extends BaseJpaService<BaseEmployDO,EmployDao> {
 | 
												
													
														
															|  |      * @param id
 |  |      * @param id
 | 
												
													
														
															|  |      * @return
 |  |      * @return
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  | 
 |  |     @Cacheable(value = "employ#600#300",key = "#employeeDO.id")
 | 
												
													
														
															|  |     public BaseEmployDO findById(String id){
 |  |     public BaseEmployDO findById(String id){
 | 
												
													
														
															|  |         if (StringUtils.isEmpty(id)) {
 |  |         if (StringUtils.isEmpty(id)) {
 | 
												
													
														
															|  |             throw new ApiException(BaseUserRequestMapping.BaseEmploy.message_fail_id_is_null,ExceptionCode.common_error_params_code);
 |  |             throw new ApiException(BaseUserRequestMapping.BaseEmploy.message_fail_id_is_null,ExceptionCode.common_error_params_code);
 | 
												
											
												
													
														
															|  | @ -77,6 +84,7 @@ public class EmployService extends BaseJpaService<BaseEmployDO,EmployDao> {
 | 
												
													
														
															|  |      * @param saasId
 |  |      * @param saasId
 | 
												
													
														
															|  |      * @return
 |  |      * @return
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  | 
 |  |     @Cacheable(value = "employ#600#300",key = "#employeeDO.id")
 | 
												
													
														
															|  |     public List<BaseEmployDO> findAllBySaasId(String saasId){
 |  |     public List<BaseEmployDO> findAllBySaasId(String saasId){
 | 
												
													
														
															|  |         if (StringUtils.isEmpty(saasId)) {
 |  |         if (StringUtils.isEmpty(saasId)) {
 | 
												
													
														
															|  |             throw new ApiException(BaseUserRequestMapping.BaseEmploy.message_param_saasid_is_null,ExceptionCode.common_error_params_code);
 |  |             throw new ApiException(BaseUserRequestMapping.BaseEmploy.message_param_saasid_is_null,ExceptionCode.common_error_params_code);
 | 
												
											
												
													
														
															|  | @ -93,6 +101,7 @@ public class EmployService extends BaseJpaService<BaseEmployDO,EmployDao> {
 | 
												
													
														
															|  |      * @param saasId
 |  |      * @param saasId
 | 
												
													
														
															|  |      * @return
 |  |      * @return
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  | 
 |  |     @Cacheable(value = "employ#600#300",key = "#employeeDO.id")
 | 
												
													
														
															|  |     public List<BaseEmployDO> findAllByNameAndSaasId(String name,String saasId){
 |  |     public List<BaseEmployDO> findAllByNameAndSaasId(String name,String saasId){
 | 
												
													
														
															|  |         if (StringUtils.isEmpty(saasId)) {
 |  |         if (StringUtils.isEmpty(saasId)) {
 | 
												
													
														
															|  |             throw new ApiException(BaseUserRequestMapping.BaseEmploy.message_param_saasid_is_null,ExceptionCode.common_error_params_code);
 |  |             throw new ApiException(BaseUserRequestMapping.BaseEmploy.message_param_saasid_is_null,ExceptionCode.common_error_params_code);
 | 
												
											
												
													
														
															|  | @ -109,6 +118,7 @@ public class EmployService extends BaseJpaService<BaseEmployDO,EmployDao> {
 | 
												
													
														
															|  |      * 根据Id删除用户
 |  |      * 根据Id删除用户
 | 
												
													
														
															|  |      * @param employDO
 |  |      * @param employDO
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  | 
 |  |     @CacheEvict(key = "#employDO.id")
 | 
												
													
														
															|  |     @Transactional
 |  |     @Transactional
 | 
												
													
														
															|  |     public void deleteBaseEmploy(BaseEmployDO employDO){
 |  |     public void deleteBaseEmploy(BaseEmployDO employDO){
 | 
												
													
														
															|  |         if (StringUtils.isEmpty(employDO.getId())) {
 |  |         if (StringUtils.isEmpty(employDO.getId())) {
 |