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

xignzi006 发布系统代码

上级 a9b23dbf
server:
port: 8080
#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: /config/**
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
......@@ -56,6 +56,20 @@ public class Res_supplier extends EntityMP implements Serializable {
@JSONField(name = "name")
@JsonProperty("name")
private String name;
/**
* 地址类型
*/
@TableField(value = "type")
@JSONField(name = "type")
@JsonProperty("type")
private String type;
/**
* 公司类别
*/
@TableField(exist = false)
@JSONField(name = "company_type")
@JsonProperty("company_type")
private String companyType;
......@@ -67,6 +81,14 @@ public class Res_supplier extends EntityMP implements Serializable {
this.modify("name",name);
}
/**
* 设置 [地址类型]
*/
public void setType(String type){
this.type = type ;
this.modify("type",type);
}
@Override
public Serializable getDefaultKey(boolean gen) {
......
......@@ -34,6 +34,20 @@ public class Res_supplierSearchContext extends QueryWrapperContext<Res_supplier>
this.getSearchCond().like("name", n_name_like);
}
}
private String n_type_eq;//[地址类型]
public void setN_type_eq(String n_type_eq) {
this.n_type_eq = n_type_eq;
if(!ObjectUtils.isEmpty(this.n_type_eq)){
this.getSearchCond().eq("type", n_type_eq);
}
}
private String n_company_type_eq;//[公司类别]
public void setN_company_type_eq(String n_company_type_eq) {
this.n_company_type_eq = n_company_type_eq;
if(!ObjectUtils.isEmpty(this.n_company_type_eq)){
this.getSearchCond().eq("company_type", n_company_type_eq);
}
}
/**
* 启用快速搜索
......
......@@ -5,12 +5,13 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_supplierResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ID, t1.NAME FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.ID, t1.NAME, t1.TYPE FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_supplierResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_supplier" autoMapping="true">
<id property="id" column="id" /><!--主键字段映射-->
<result property="companyType" column="company_type" />
</resultMap>
......@@ -27,12 +28,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.ID, t1.NAME FROM RES_PARTNER t1
<![CDATA[ SELECT t1.ID, t1.NAME, t1.TYPE FROM RES_PARTNER t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ID, t1.NAME FROM RES_PARTNER t1
<![CDATA[ SELECT t1.ID, t1.NAME, t1.TYPE FROM RES_PARTNER t1
]]>
</sql>
</mapper>
......
......@@ -140614,6 +140614,34 @@
"data_length":100,
"key_field":0,
"major_field":1
},
{
"fieldname":"TYPE" ,
"codename":"Type",
"field_logic_name":"地址类型",
"entity_name":"Res_supplier",
"field_type":"SSCODELIST",
"dict":"RES_PARTNER__TYPE",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":60,
"key_field":0,
"major_field":0
},
{
"fieldname":"COMPANY_TYPE" ,
"codename":"Company_type",
"field_logic_name":"公司类别",
"entity_name":"Res_supplier",
"field_type":"SSCODELIST",
"dict":"RES_PARTNER__COMPANY_TYPE",
"nullable":1,
"physical_field":0,
"data_type":"VARCHAR",
"data_length":200,
"key_field":0,
"major_field":0
}
],
"subEntitys":[
......@@ -19,7 +19,7 @@ import java.util.Optional;
import java.util.function.Function;
@Component
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.token.util:UAATokenUtil}'.equals('SimpleTokenUtil')")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.token.util:SimpleTokenUtil}'.equals('SimpleTokenUtil')")
public class SimpleTokenUtil implements AuthTokenUtil,Serializable {
private static final long serialVersionUID = -3301605591108950415L;
......
......@@ -30,7 +30,7 @@ import java.util.Map;
import java.util.function.Function;
@Component
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.token.util:UAATokenUtil}'.equals('UAATokenUtil')")
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.token.util:SimpleTokenUtil}'.equals('UAATokenUtil')")
public class UAATokenUtil implements AuthTokenUtil, Serializable {
private static final long serialVersionUID = -3301605591108950415L;
......
......@@ -15,12 +15,12 @@ public interface AuthenticationUserService extends UserDetailsService {
@Override
@Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0")
@Cacheable( value="businesscentral_users",key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByUsername(String username);
@Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0")
@Cacheable( value="businesscentral_users",key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByLogin(String username,String password);
@CacheEvict( value="ibzuaa_users",key = "'getByUsername:'+#p0")
@CacheEvict( value="businesscentral_users",key = "'getByUsername:'+#p0")
void resetByUsername(String username);
}
......@@ -26,7 +26,7 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@Value("${ibiz.admin.userid:0100}")
private String adminuserid;
@Cacheable( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
@Cacheable( value="businesscentral_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public JSONObject getConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
......@@ -41,7 +41,7 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
return JSON.parseObject(config.getCfg());
}
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
@CacheEvict( value="businesscentral_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public boolean saveConfig(String cfgType,String targetType,String userId,JSONObject config)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
......@@ -52,7 +52,7 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build());
}
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
@CacheEvict( value="businesscentral_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public void resetConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
......
......@@ -18,7 +18,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
* 实体[IBZUSER] 服务对象接口实现
*/
@Service("IBZUAAUserService")
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.service:IBZUAAUserService}'.equals('IBZUAAUserService')")
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.service:SimpleUserService}'.equals('IBZUAAUserService')")
public class IBZUAAUserService implements AuthenticationUserService{
@Autowired
......
......@@ -20,7 +20,7 @@ import org.springframework.security.core.authority.AuthorityUtils;
* 实体[IBZUSER] 服务对象接口实现
*/
@Service("IBZUSERService")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:IBZUAAUserService}'.equals('IBZUSERService')")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:SimpleUserService}'.equals('IBZUSERService')")
public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> implements IBZUSERService,AuthenticationUserService{
@Value("${ibiz.auth.pwencrymode:0}")
......
......@@ -18,7 +18,7 @@ import org.springframework.security.core.authority.AuthorityUtils;
*/
@Primary
@Service("SimpleUserService")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:IBZUAAUserService}'.equals('SimpleUserService')")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:SimpleUserService}'.equals('SimpleUserService')")
public class SimpleUserService implements AuthenticationUserService{
@Override
......
......@@ -89,7 +89,7 @@ ribbon:
#系统是否开启权限验证、是否开启缓存
#缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2)
ibiz:
enablePermissionValid: true
enablePermissionValid: false
cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
### jobs
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册