提交 73b15d48 编写于 作者: ibizdev's avatar ibizdev

zhouweidong 部署微服务接口 [ibz-wf,microservice]

上级 10a776ad
......@@ -4,57 +4,57 @@ server:
#zuul网关路由设置
zuul:
routes:
loginv7:
path: /v7/login
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
config:
path: /configs/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
oucore:
path: /ibzorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
oudict:
path: /dictionarys/**/Ibzou**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou:
path: /ibzdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
uaadict:
path: /dictionarys/**/SysOperator
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
dict:
path: /dictionarys/**
serviceId: ${ibiz.ref.service.dict:ibzdict-api}
stripPrefix: false
disk:
path: /net-disk/**
serviceId: ${ibiz.ref.service.disk:ibzdisk-api}
stripPrefix: false
ou_sys_org:
path: /sysorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou_sys_dept:
path: /sysdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
lite-core:
path: /lite/**
serviceId: ${ibiz.ref.service.lite:ibzlite-api}
stripPrefix: false
loginv7:
path: /v7/login
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
config:
path: /configs/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
oucore:
path: /ibzorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
oudict:
path: /dictionarys/**/Ibzou**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou:
path: /ibzdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
uaadict:
path: /dictionarys/**/SysOperator
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
dict:
path: /dictionarys/**
serviceId: ${ibiz.ref.service.dict:ibzdict-api}
stripPrefix: false
disk:
path: /net-disk/**
serviceId: ${ibiz.ref.service.disk:ibzdisk-api}
stripPrefix: false
ou_sys_org:
path: /sysorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou_sys_dept:
path: /sysdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
lite-core:
path: /lite/**
serviceId: ${ibiz.ref.service.lite:ibzlite-api}
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -19,6 +19,7 @@ import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
......
......@@ -18,7 +18,6 @@ import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.workflow.domain.WFGroup;
import cn.ibizlab.core.workflow.filter.WFGroupSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
......
......@@ -18,7 +18,6 @@ import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.workflow.domain.WFMember;
import cn.ibizlab.core.workflow.filter.WFMemberSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
......@@ -38,11 +37,11 @@ public interface IWFMemberService extends IService<WFMember>{
boolean save(WFMember et) ;
void saveBatch(List<WFMember> list) ;
Page<WFMember> searchDefault(WFMemberSearchContext context) ;
List<WFMember> selectByGroupid(String id) ;
void removeByGroupid(String id) ;
List<WFMember> selectByGroupid(String id);
void removeByGroupid(String id);
void saveByGroupid(String id,List<WFMember> list) ;
List<WFMember> selectByUserid(String id) ;
void removeByUserid(String id) ;
List<WFMember> selectByUserid(String id);
void removeByUserid(String id);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -18,7 +18,6 @@ import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.workflow.domain.WFProcessDefinition;
import cn.ibizlab.core.workflow.filter.WFProcessDefinitionSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
......
......@@ -18,7 +18,6 @@ import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.workflow.domain.WFSystem;
import cn.ibizlab.core.workflow.filter.WFSystemSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
......
......@@ -18,7 +18,6 @@ import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.workflow.domain.WFUser;
import cn.ibizlab.core.workflow.filter.WFUserSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
......
......@@ -198,6 +198,7 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
}
......
......@@ -165,7 +165,6 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
public List<WFMember> selectByGroupid(String id) {
return baseMapper.selectByGroupid(id);
}
@Override
public void removeByGroupid(String id) {
this.remove(new QueryWrapper<WFMember>().eq("groupid",id));
......@@ -207,7 +206,6 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
public List<WFMember> selectByUserid(String id) {
return baseMapper.selectByUserid(id);
}
@Override
public void removeByUserid(String id) {
this.remove(new QueryWrapper<WFMember>().eq("userid",id));
......@@ -305,6 +303,7 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
}
......
......@@ -191,6 +191,7 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
}
......
......@@ -191,6 +191,7 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
}
......
......@@ -213,6 +213,7 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
}
......
......@@ -233,12 +233,6 @@
<version>${jsonwebtoken-jjwt.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${alibaba-druid.version}</version>
</dependency>
<dependency>
<groupId>org.zalando</groupId>
<artifactId>problem-spring-web</artifactId>
......@@ -351,6 +345,8 @@
</dependency>
</dependencies>
</project>
......@@ -2,6 +2,7 @@ package cn.ibizlab.util.annotation;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DupCheck;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
......@@ -66,5 +67,14 @@ public @interface DEField
* @return
*/
String format() default "";
/**
* 重复性检查
* @return
*/
DupCheck dupCheck() default DupCheck.NONE;
/**
* 范围属性
*/
String dupCheckField() default "";
}
......@@ -6,9 +6,9 @@ public class EntityClient extends EntityBase {
@Override
public void modify(String field,Object val) {
getExtensionparams().put("dirtyflagenable",true);
if(val==null){
this.getFocusNull().add(field.toLowerCase());
getExtensionparams().put("dirtyflagenable",true);
getExtensionparams().put(field.toLowerCase()+"dirtyflag",true);
}
else{
......
package cn.ibizlab.util.enums;
/**
* 属性重复值检查
*/
public enum DupCheck {
/**
* 不检查
*/
NONE,
/**
* 全部检查
*/
ALL,
/**
* 非空检查
*/
NOTNULL,
/**
* 指定范围检查
*/
RANGE,
}
package cn.ibizlab.util.errors;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.dao.*;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.BindingResult;
......@@ -90,9 +90,18 @@ public class ExceptionTranslator implements ProblemHandling {
return create(ex, problem, request);
}
@ExceptionHandler(DataAccessException.class)
public ResponseEntity<Problem> handlerDataAccessFailure(DataAccessException ex, NativeWebRequest request){
Problem problem = Problem.builder()
.withStatus(Status.INTERNAL_SERVER_ERROR)
.with("message", ex.getMessage())
.build();
return create(ex, problem, request,createFailureAlert(ex.getClass().getSimpleName(), ex.getClass().getSimpleName(), ex.getMessage()));
}
public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) {
HttpHeaders headers = new HttpHeaders();
headers.add("X-ibz-error", "error." + errorKey);
headers.add("X-ibz-error", errorKey);
headers.add("X-ibz-params", entityName);
return headers;
}
......
......@@ -44,6 +44,7 @@ public class PermissionSyncJob implements ApplicationRunner {
@Lazy
IBZLiteFeignClient liteFeignClient;
@Override
public void run(ApplicationArguments args) {
try {
......@@ -92,5 +93,6 @@ public class PermissionSyncJob implements ApplicationRunner {
} catch (Exception e) {
log.error("推送消息模板失败");
}
}
}
\ No newline at end of file
......@@ -59,6 +59,7 @@ public class AppController {
appData.put("enablepermissionvalid",false);
else
appData.put("enablepermissionvalid",enablePermissionValid);
fillAppData(appData);
return ResponseEntity.status(HttpStatus.OK).body(appData);
}
......@@ -87,4 +88,12 @@ public class AppController {
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",configType);
return ResponseEntity.ok(ibzConfigService.getConfig(configType,targetType,userId));
}
/**
* 应用参数扩展
* @param appData
*/
protected void fillAppData(JSONObject appData){
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册