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

xignzi006 发布系统代码

上级 251bbd99
...@@ -17,7 +17,7 @@ zuul: ...@@ -17,7 +17,7 @@ zuul:
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api} serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false stripPrefix: false
config: config:
path: /config/** path: /configs/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api} serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false stripPrefix: false
oucore: oucore:
......
...@@ -195,13 +195,6 @@ public class Res_partner extends EntityMP implements Serializable { ...@@ -195,13 +195,6 @@ public class Res_partner extends EntityMP implements Serializable {
@JSONField(name = "has_unreconciled_entries") @JSONField(name = "has_unreconciled_entries")
@JsonProperty("has_unreconciled_entries") @JsonProperty("has_unreconciled_entries")
private Boolean hasUnreconciledEntries; private Boolean hasUnreconciledEntries;
/**
* 标签
*/
@TableField(exist = false)
@JSONField(name = "category_id")
@JsonProperty("category_id")
private String categoryId;
/** /**
* 网站业务伙伴的详细说明 * 网站业务伙伴的详细说明
*/ */
......
package cn.ibizlab.businesscentral.core.odoo_base.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.businesscentral.util.helper.DataObject;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.businesscentral.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.businesscentral.util.domain.EntityMP;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
/**
* 实体[联系人标签]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "res_partner_res_partner_category_rel",resultMap = "Res_partner_res_partner_category_relResultMap")
public class Res_partner_res_partner_category_rel extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@DEField(isKeyField=true)
@TableField(exist = false)
@JSONField(name = "id")
@JsonProperty("id")
private String id;
/**
* ID
*/
@DEField(name = "partner_id")
@TableField(value = "partner_id")
@JSONField(name = "partner_id")
@JsonProperty("partner_id")
private Long partnerId;
/**
* ID
*/
@DEField(name = "category_id")
@TableField(value = "category_id")
@JSONField(name = "category_id")
@JsonProperty("category_id")
private Long categoryId;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_category odooCategory;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner odooPartner;
/**
* 设置 [ID]
*/
public void setPartnerId(Long partnerId){
this.partnerId = partnerId ;
this.modify("partner_id",partnerId);
}
/**
* 设置 [ID]
*/
public void setCategoryId(Long categoryId){
this.categoryId = categoryId ;
this.modify("category_id",categoryId);
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("id");
return super.copyTo(targetEntity,bIncEmpty);
}
@TableField(exist = false)
@JsonIgnore
private String irmodel = "res.partner.res.partner.category.rel" ;
@Override
public String getIrModel(){
return this.irmodel ;
}
}
...@@ -113,13 +113,6 @@ public class Res_supplier extends EntityMP implements Serializable { ...@@ -113,13 +113,6 @@ public class Res_supplier extends EntityMP implements Serializable {
@JSONField(name = "website_url") @JSONField(name = "website_url")
@JsonProperty("website_url") @JsonProperty("website_url")
private String websiteUrl; private String websiteUrl;
/**
* 标签
*/
@TableField(exist = false)
@JSONField(name = "category_id")
@JsonProperty("category_id")
private String categoryId;
......
package cn.ibizlab.businesscentral.core.odoo_base.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.businesscentral.util.helper.DataObject;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.businesscentral.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.businesscentral.util.domain.EntityMP;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
/**
* 实体[供应商标签]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "res_partner_res_partner_category_rel",resultMap = "Res_supplier_res_partner_category_relResultMap")
public class Res_supplier_res_partner_category_rel extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@DEField(isKeyField=true)
@TableField(exist = false)
@JSONField(name = "id")
@JsonProperty("id")
private String id;
/**
* ID
*/
@DEField(name = "category_id")
@TableField(value = "category_id")
@JSONField(name = "category_id")
@JsonProperty("category_id")
private Long categoryId;
/**
* ID
*/
@DEField(name = "partner_id")
@TableField(value = "partner_id")
@JSONField(name = "partner_id")
@JsonProperty("partner_id")
private Long partnerId;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_category odooCategory;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_base.domain.Res_supplier odooSupplier;
/**
* 设置 [ID]
*/
public void setCategoryId(Long categoryId){
this.categoryId = categoryId ;
this.modify("category_id",categoryId);
}
/**
* 设置 [ID]
*/
public void setPartnerId(Long partnerId){
this.partnerId = partnerId ;
this.modify("partner_id",partnerId);
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("id");
return super.copyTo(targetEntity,bIncEmpty);
}
@TableField(exist = false)
@JsonIgnore
private String irmodel = "res.supplier.res.partner.category.rel" ;
@Override
public String getIrModel(){
return this.irmodel ;
}
}
package cn.ibizlab.businesscentral.core.odoo_base.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_res_partner_category_rel;
/**
* 关系型数据实体[Res_partner_res_partner_category_rel] 查询条件对象
*/
@Slf4j
@Data
public class Res_partner_res_partner_category_relSearchContext extends QueryWrapperContext<Res_partner_res_partner_category_rel> {
private Long n_partner_id_eq;//[ID]
public void setN_partner_id_eq(Long n_partner_id_eq) {
this.n_partner_id_eq = n_partner_id_eq;
if(!ObjectUtils.isEmpty(this.n_partner_id_eq)){
this.getSearchCond().eq("partner_id", n_partner_id_eq);
}
}
private Long n_category_id_eq;//[ID]
public void setN_category_id_eq(Long n_category_id_eq) {
this.n_category_id_eq = n_category_id_eq;
if(!ObjectUtils.isEmpty(this.n_category_id_eq)){
this.getSearchCond().eq("category_id", n_category_id_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("id", query)
);
}
}
}
package cn.ibizlab.businesscentral.core.odoo_base.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_supplier_res_partner_category_rel;
/**
* 关系型数据实体[Res_supplier_res_partner_category_rel] 查询条件对象
*/
@Slf4j
@Data
public class Res_supplier_res_partner_category_relSearchContext extends QueryWrapperContext<Res_supplier_res_partner_category_rel> {
private String n_id_like;//[ID]
public void setN_id_like(String n_id_like) {
this.n_id_like = n_id_like;
if(!ObjectUtils.isEmpty(this.n_id_like)){
this.getSearchCond().like("id", n_id_like);
}
}
private Long n_category_id_eq;//[ID]
public void setN_category_id_eq(Long n_category_id_eq) {
this.n_category_id_eq = n_category_id_eq;
if(!ObjectUtils.isEmpty(this.n_category_id_eq)){
this.getSearchCond().eq("category_id", n_category_id_eq);
}
}
private Long n_partner_id_eq;//[ID]
public void setN_partner_id_eq(Long n_partner_id_eq) {
this.n_partner_id_eq = n_partner_id_eq;
if(!ObjectUtils.isEmpty(this.n_partner_id_eq)){
this.getSearchCond().eq("partner_id", n_partner_id_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("id", query)
);
}
}
}
package cn.ibizlab.businesscentral.core.odoo_base.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_res_partner_category_rel;
import cn.ibizlab.businesscentral.core.odoo_base.filter.Res_partner_res_partner_category_relSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface Res_partner_res_partner_category_relMapper extends BaseMapper<Res_partner_res_partner_category_rel>{
Page<Res_partner_res_partner_category_rel> searchDefault(IPage page, @Param("srf") Res_partner_res_partner_category_relSearchContext context, @Param("ew") Wrapper<Res_partner_res_partner_category_rel> wrapper) ;
@Override
Res_partner_res_partner_category_rel selectById(Serializable id);
@Override
int insert(Res_partner_res_partner_category_rel entity);
@Override
int updateById(@Param(Constants.ENTITY) Res_partner_res_partner_category_rel entity);
@Override
int update(@Param(Constants.ENTITY) Res_partner_res_partner_category_rel entity, @Param("ew") Wrapper<Res_partner_res_partner_category_rel> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Res_partner_res_partner_category_rel> selectByCategoryId(@Param("id") Serializable id) ;
List<Res_partner_res_partner_category_rel> selectByPartnerId(@Param("id") Serializable id) ;
}
package cn.ibizlab.businesscentral.core.odoo_base.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_supplier_res_partner_category_rel;
import cn.ibizlab.businesscentral.core.odoo_base.filter.Res_supplier_res_partner_category_relSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface Res_supplier_res_partner_category_relMapper extends BaseMapper<Res_supplier_res_partner_category_rel>{
Page<Res_supplier_res_partner_category_rel> searchDefault(IPage page, @Param("srf") Res_supplier_res_partner_category_relSearchContext context, @Param("ew") Wrapper<Res_supplier_res_partner_category_rel> wrapper) ;
@Override
Res_supplier_res_partner_category_rel selectById(Serializable id);
@Override
int insert(Res_supplier_res_partner_category_rel entity);
@Override
int updateById(@Param(Constants.ENTITY) Res_supplier_res_partner_category_rel entity);
@Override
int update(@Param(Constants.ENTITY) Res_supplier_res_partner_category_rel entity, @Param("ew") Wrapper<Res_supplier_res_partner_category_rel> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Res_supplier_res_partner_category_rel> selectByCategoryId(@Param("id") Serializable id) ;
List<Res_supplier_res_partner_category_rel> selectByPartnerId(@Param("id") Serializable id) ;
}
package cn.ibizlab.businesscentral.core.odoo_base.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_res_partner_category_rel;
import cn.ibizlab.businesscentral.core.odoo_base.filter.Res_partner_res_partner_category_relSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[Res_partner_res_partner_category_rel] 服务对象接口
*/
public interface IRes_partner_res_partner_category_relService extends IService<Res_partner_res_partner_category_rel>{
boolean create(Res_partner_res_partner_category_rel et) ;
void createBatch(List<Res_partner_res_partner_category_rel> list) ;
boolean update(Res_partner_res_partner_category_rel et) ;
void updateBatch(List<Res_partner_res_partner_category_rel> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
Res_partner_res_partner_category_rel get(String key) ;
Res_partner_res_partner_category_rel getDraft(Res_partner_res_partner_category_rel et) ;
boolean checkKey(Res_partner_res_partner_category_rel et) ;
boolean save(Res_partner_res_partner_category_rel et) ;
void saveBatch(List<Res_partner_res_partner_category_rel> list) ;
Page<Res_partner_res_partner_category_rel> searchDefault(Res_partner_res_partner_category_relSearchContext context) ;
List<Res_partner_res_partner_category_rel> selectByCategoryId(Long id) ;
void removeByCategoryId(Long id) ;
List<Res_partner_res_partner_category_rel> selectByPartnerId(Long id) ;
void removeByPartnerId(Long id) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
package cn.ibizlab.businesscentral.core.odoo_base.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_supplier_res_partner_category_rel;
import cn.ibizlab.businesscentral.core.odoo_base.filter.Res_supplier_res_partner_category_relSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[Res_supplier_res_partner_category_rel] 服务对象接口
*/
public interface IRes_supplier_res_partner_category_relService extends IService<Res_supplier_res_partner_category_rel>{
boolean create(Res_supplier_res_partner_category_rel et) ;
void createBatch(List<Res_supplier_res_partner_category_rel> list) ;
boolean update(Res_supplier_res_partner_category_rel et) ;
void updateBatch(List<Res_supplier_res_partner_category_rel> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
Res_supplier_res_partner_category_rel get(String key) ;
Res_supplier_res_partner_category_rel getDraft(Res_supplier_res_partner_category_rel et) ;
boolean checkKey(Res_supplier_res_partner_category_rel et) ;
boolean save(Res_supplier_res_partner_category_rel et) ;
void saveBatch(List<Res_supplier_res_partner_category_rel> list) ;
Page<Res_supplier_res_partner_category_rel> searchDefault(Res_supplier_res_partner_category_relSearchContext context) ;
List<Res_supplier_res_partner_category_rel> selectByCategoryId(Long id) ;
void removeByCategoryId(Long id) ;
List<Res_supplier_res_partner_category_rel> selectByPartnerId(Long id) ;
void removeByPartnerId(Long id) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
...@@ -225,6 +225,9 @@ public class Res_partnerServiceImpl extends ServiceImpl<Res_partnerMapper, Res_p ...@@ -225,6 +225,9 @@ public class Res_partnerServiceImpl extends ServiceImpl<Res_partnerMapper, Res_p
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partner_bankService resPartnerBankService; protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partner_bankService resPartnerBankService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partner_res_partner_category_relService resPartnerResPartnerCategoryRelService;
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partnerService resPartnerService = this; protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partnerService resPartnerService = this;
@Autowired @Autowired
......
...@@ -52,6 +52,12 @@ public class Res_partner_categoryServiceImpl extends ServiceImpl<Res_partner_cat ...@@ -52,6 +52,12 @@ public class Res_partner_categoryServiceImpl extends ServiceImpl<Res_partner_cat
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partner_categoryService resPartnerCategoryService = this; protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partner_categoryService resPartnerCategoryService = this;
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partner_res_partner_category_relService resPartnerResPartnerCategoryRelService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_supplier_res_partner_category_relService resSupplierResPartnerCategoryRelService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_usersService resUsersService; protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_usersService resUsersService;
protected int batchSize = 500; protected int batchSize = 500;
......
package cn.ibizlab.businesscentral.core.odoo_base.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.businesscentral.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_res_partner_category_rel;
import cn.ibizlab.businesscentral.core.odoo_base.filter.Res_partner_res_partner_category_relSearchContext;
import cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partner_res_partner_category_relService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import cn.ibizlab.businesscentral.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partner_res_partner_category_relMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[联系人标签] 服务对象接口实现
*/
@Slf4j
@Service("Res_partner_res_partner_category_relServiceImpl")
public class Res_partner_res_partner_category_relServiceImpl extends ServiceImpl<Res_partner_res_partner_category_relMapper, Res_partner_res_partner_category_rel> implements IRes_partner_res_partner_category_relService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partner_categoryService resPartnerCategoryService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partnerService resPartnerService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(Res_partner_res_partner_category_rel et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
@Override
@Transactional
public void createBatch(List<Res_partner_res_partner_category_rel> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(Res_partner_res_partner_category_rel et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
@Override
@Transactional
public void updateBatch(List<Res_partner_res_partner_category_rel> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
@Transactional
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public Res_partner_res_partner_category_rel get(String key) {
Res_partner_res_partner_category_rel et = getById(key);
if(et==null){
et=new Res_partner_res_partner_category_rel();
et.setId(key);
}
else{
}
return et;
}
@Override
public Res_partner_res_partner_category_rel getDraft(Res_partner_res_partner_category_rel et) {
return et;
}
@Override
public boolean checkKey(Res_partner_res_partner_category_rel et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Res_partner_res_partner_category_rel et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Res_partner_res_partner_category_rel et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Res_partner_res_partner_category_rel> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Res_partner_res_partner_category_rel> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Res_partner_res_partner_category_rel> selectByCategoryId(Long id) {
return baseMapper.selectByCategoryId(id);
}
@Override
public void removeByCategoryId(Long id) {
this.remove(new QueryWrapper<Res_partner_res_partner_category_rel>().eq("category_id",id));
}
@Override
public List<Res_partner_res_partner_category_rel> selectByPartnerId(Long id) {
return baseMapper.selectByPartnerId(id);
}
@Override
public void removeByPartnerId(Long id) {
this.remove(new QueryWrapper<Res_partner_res_partner_category_rel>().eq("partner_id",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Res_partner_res_partner_category_rel> searchDefault(Res_partner_res_partner_category_relSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Res_partner_res_partner_category_rel> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Res_partner_res_partner_category_rel>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
...@@ -57,6 +57,9 @@ public class Res_supplierServiceImpl extends ServiceImpl<Res_supplierMapper, Res ...@@ -57,6 +57,9 @@ public class Res_supplierServiceImpl extends ServiceImpl<Res_supplierMapper, Res
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IPurchase_requisitionService purchaseRequisitionService; protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IPurchase_requisitionService purchaseRequisitionService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_supplier_res_partner_category_relService resSupplierResPartnerCategoryRelService;
protected int batchSize = 500; protected int batchSize = 500;
......
package cn.ibizlab.businesscentral.core.odoo_base.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.businesscentral.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_supplier_res_partner_category_rel;
import cn.ibizlab.businesscentral.core.odoo_base.filter.Res_supplier_res_partner_category_relSearchContext;
import cn.ibizlab.businesscentral.core.odoo_base.service.IRes_supplier_res_partner_category_relService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import cn.ibizlab.businesscentral.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_supplier_res_partner_category_relMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[供应商标签] 服务对象接口实现
*/
@Slf4j
@Service("Res_supplier_res_partner_category_relServiceImpl")
public class Res_supplier_res_partner_category_relServiceImpl extends ServiceImpl<Res_supplier_res_partner_category_relMapper, Res_supplier_res_partner_category_rel> implements IRes_supplier_res_partner_category_relService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partner_categoryService resPartnerCategoryService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_supplierService resSupplierService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(Res_supplier_res_partner_category_rel et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
@Override
@Transactional
public void createBatch(List<Res_supplier_res_partner_category_rel> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(Res_supplier_res_partner_category_rel et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
@Override
@Transactional
public void updateBatch(List<Res_supplier_res_partner_category_rel> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
@Transactional
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public Res_supplier_res_partner_category_rel get(String key) {
Res_supplier_res_partner_category_rel et = getById(key);
if(et==null){
et=new Res_supplier_res_partner_category_rel();
et.setId(key);
}
else{
}
return et;
}
@Override
public Res_supplier_res_partner_category_rel getDraft(Res_supplier_res_partner_category_rel et) {
return et;
}
@Override
public boolean checkKey(Res_supplier_res_partner_category_rel et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Res_supplier_res_partner_category_rel et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Res_supplier_res_partner_category_rel et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Res_supplier_res_partner_category_rel> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Res_supplier_res_partner_category_rel> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Res_supplier_res_partner_category_rel> selectByCategoryId(Long id) {
return baseMapper.selectByCategoryId(id);
}
@Override
public void removeByCategoryId(Long id) {
this.remove(new QueryWrapper<Res_supplier_res_partner_category_rel>().eq("category_id",id));
}
@Override
public List<Res_supplier_res_partner_category_rel> selectByPartnerId(Long id) {
return baseMapper.selectByPartnerId(id);
}
@Override
public void removeByPartnerId(Long id) {
this.remove(new QueryWrapper<Res_supplier_res_partner_category_rel>().eq("partner_id",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Res_supplier_res_partner_category_rel> searchDefault(Res_supplier_res_partner_category_relSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Res_supplier_res_partner_category_rel> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Res_supplier_res_partner_category_rel>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd">
<changeSet author="Think (generated)" id="1592547336292-1">
<preConditions onFail="MARK_RAN" >
<not >
<tableExists tableName="IBZCFG" />
</not>
</preConditions>
<createTable remarks="配置" tableName="IBZCFG">
<column name="CFGID" remarks="配置标识" type="VARCHAR(100)">
<constraints primaryKey="true"/>
</column>
<column name="SYSTEMID" remarks="系统标识" type="VARCHAR(100)"/>
<column name="CFGTYPE" remarks="配置类型" type="VARCHAR(100)"/>
<column name="TARGETTYPE" remarks="引用对象" type="VARCHAR(100)"/>
<column name="USERID" remarks="用户标识" type="VARCHAR(100)"/>
<column name="CFG" remarks="配置" type="MEDIUMTEXT"/>
<column name="UPDATEDATE" remarks="更新时间" type="datetime"/>
</createTable>
</changeSet>
</databaseChangeLog>
...@@ -966,12 +966,18 @@ ...@@ -966,12 +966,18 @@
<!--输出实体[RES_PARTNER_INDUSTRY]数据结构 --> <!--输出实体[RES_PARTNER_INDUSTRY]数据结构 -->
<!--输出实体[RES_PARTNER_RES_PARTNER_CATEGORY_REL]数据结构 -->
<!--输出实体[RES_PARTNER_TITLE]数据结构 --> <!--输出实体[RES_PARTNER_TITLE]数据结构 -->
<!--输出实体[RES_SUPPLIER]数据结构 --> <!--输出实体[RES_SUPPLIER]数据结构 -->
<!--输出实体[RES_SUPPLIER_RES_PARTNER_CATEGORY_REL]数据结构 -->
<!--输出实体[RES_USERS]数据结构 --> <!--输出实体[RES_USERS]数据结构 -->
...@@ -1535,8 +1541,10 @@ ...@@ -1535,8 +1541,10 @@
<!--输出实体[RES_PARTNER_BANK]外键关系 --> <!--输出实体[RES_PARTNER_BANK]外键关系 -->
<!--输出实体[RES_PARTNER_CATEGORY]外键关系 --> <!--输出实体[RES_PARTNER_CATEGORY]外键关系 -->
<!--输出实体[RES_PARTNER_INDUSTRY]外键关系 --> <!--输出实体[RES_PARTNER_INDUSTRY]外键关系 -->
<!--输出实体[RES_PARTNER_RES_PARTNER_CATEGORY_REL]外键关系 -->
<!--输出实体[RES_PARTNER_TITLE]外键关系 --> <!--输出实体[RES_PARTNER_TITLE]外键关系 -->
<!--输出实体[RES_SUPPLIER]外键关系 --> <!--输出实体[RES_SUPPLIER]外键关系 -->
<!--输出实体[RES_SUPPLIER_RES_PARTNER_CATEGORY_REL]外键关系 -->
<!--输出实体[RES_USERS]外键关系 --> <!--输出实体[RES_USERS]外键关系 -->
<!--输出实体[RES_USERS_LOG]外键关系 --> <!--输出实体[RES_USERS_LOG]外键关系 -->
<!--输出实体[RESOURCE_CALENDAR]外键关系 --> <!--输出实体[RESOURCE_CALENDAR]外键关系 -->
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
<result property="signupExpiration" column="signup_expiration" /> <result property="signupExpiration" column="signup_expiration" />
<result property="purchaseOrderCount" column="purchase_order_count" /> <result property="purchaseOrderCount" column="purchase_order_count" />
<result property="hasUnreconciledEntries" column="has_unreconciled_entries" /> <result property="hasUnreconciledEntries" column="has_unreconciled_entries" />
<result property="categoryId" column="category_id" />
<result property="websiteDescription" column="website_description" /> <result property="websiteDescription" column="website_description" />
<result property="messageMainAttachmentId" column="message_main_attachment_id" /> <result property="messageMainAttachmentId" column="message_main_attachment_id" />
<result property="meetingIds" column="meeting_ids" /> <result property="meetingIds" column="meeting_ids" />
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partner_res_partner_category_relMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_partner_res_partner_category_relResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CATEGORY_ID, t1.PARTNER_ID FROM res_partner_res_partner_category_rel t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_partner_res_partner_category_relResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_res_partner_category_rel" autoMapping="true">
<result property="partnerId" column="partner_id" />
<result property="categoryId" column="category_id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooCategory" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_category" column="category_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partner_categoryMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooPartner" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner" column="partner_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partnerMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_CATEGORY_CATEGORY_ID] -->
<select id="selectByCategoryId" resultMap="Res_partner_res_partner_category_relResultMap">
select t1.* from (
<include refid="Default" />
) t1
where category_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_PARTNER_ID] -->
<select id="selectByPartnerId" resultMap="Res_partner_res_partner_category_relResultMap">
select t1.* from (
<include refid="Default" />
) t1
where partner_id=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_partner_res_partner_category_relSearchContext" resultMap="Res_partner_res_partner_category_relResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CATEGORY_ID, t1.PARTNER_ID FROM res_partner_res_partner_category_rel t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CATEGORY_ID, t1.PARTNER_ID FROM res_partner_res_partner_category_rel t1
]]>
</sql>
</mapper>
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<id property="id" column="id" /><!--主键字段映射--> <id property="id" column="id" /><!--主键字段映射-->
<result property="companyType" column="company_type" /> <result property="companyType" column="company_type" />
<result property="websiteUrl" column="website_url" /> <result property="websiteUrl" column="website_url" />
<result property="categoryId" column="category_id" />
</resultMap> </resultMap>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_supplier_res_partner_category_relMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_supplier_res_partner_category_relResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CATEGORY_ID, t1.PARTNER_ID FROM res_partner_res_partner_category_rel t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_supplier_res_partner_category_relResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_supplier_res_partner_category_rel" autoMapping="true">
<result property="categoryId" column="category_id" />
<result property="partnerId" column="partner_id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooCategory" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_category" column="category_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partner_categoryMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooSupplier" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_supplier" column="partner_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_supplierMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_SUPPLIER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_CATEGORY_CATEGORY_ID] -->
<select id="selectByCategoryId" resultMap="Res_supplier_res_partner_category_relResultMap">
select t1.* from (
<include refid="Default" />
) t1
where category_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_SUPPLIER_RES_PARTNER_CATEGORY_REL_RES_SUPPLIER_PARTNER_ID] -->
<select id="selectByPartnerId" resultMap="Res_supplier_res_partner_category_relResultMap">
select t1.* from (
<include refid="Default" />
) t1
where partner_id=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_supplier_res_partner_category_relSearchContext" resultMap="Res_supplier_res_partner_category_relResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CATEGORY_ID, t1.PARTNER_ID FROM res_partner_res_partner_category_rel t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CATEGORY_ID, t1.PARTNER_ID FROM res_partner_res_partner_category_rel t1
]]>
</sql>
</mapper>
...@@ -137898,7 +137898,7 @@ ...@@ -137898,7 +137898,7 @@
"codename":"Category_id", "codename":"Category_id",
"field_logic_name":"标签", "field_logic_name":"标签",
"entity_name":"Res_partner", "entity_name":"Res_partner",
"field_type":"LONGTEXT", "field_type":"ONE2MANYDATA",
"nullable":1, "nullable":1,
"physical_field":0, "physical_field":0,
"data_type":"TEXT", "data_type":"TEXT",
...@@ -140120,6 +140120,12 @@ ...@@ -140120,6 +140120,12 @@
"entity_name":"RES_PARTNER_BANK", "entity_name":"RES_PARTNER_BANK",
"ref_entity_name":"RES_PARTNER" "ref_entity_name":"RES_PARTNER"
}, },
{"name":"DER1N_RES_PARTNER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_PARTNER_ID",
"relation_type":"DER1N",
"code_name":"Odoo_partner",
"entity_name":"RES_PARTNER_RES_PARTNER_CATEGORY_REL",
"ref_entity_name":"RES_PARTNER"
},
{"name":"DER1N_RES_PARTNER__RES_PARTNER__COMMERCIAL_PARTNER_ID", {"name":"DER1N_RES_PARTNER__RES_PARTNER__COMMERCIAL_PARTNER_ID",
"relation_type":"DER1N", "relation_type":"DER1N",
"code_name":"Odoo_commercial_partner", "code_name":"Odoo_commercial_partner",
...@@ -141280,6 +141286,18 @@ ...@@ -141280,6 +141286,18 @@
"code_name":"Odoo_parent", "code_name":"Odoo_parent",
"entity_name":"RES_PARTNER_CATEGORY", "entity_name":"RES_PARTNER_CATEGORY",
"ref_entity_name":"RES_PARTNER_CATEGORY" "ref_entity_name":"RES_PARTNER_CATEGORY"
},
{"name":"DER1N_RES_PARTNER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_CATEGORY_CATEGORY_ID",
"relation_type":"DER1N",
"code_name":"Odoo_category",
"entity_name":"RES_PARTNER_RES_PARTNER_CATEGORY_REL",
"ref_entity_name":"RES_PARTNER_CATEGORY"
},
{"name":"DER1N_RES_SUPPLIER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_CATEGORY_CATEGORY_ID",
"relation_type":"DER1N",
"code_name":"Odoo_category",
"entity_name":"RES_SUPPLIER_RES_PARTNER_CATEGORY_REL",
"ref_entity_name":"RES_PARTNER_CATEGORY"
} }
], ],
"parentEntitys":[ "parentEntitys":[
...@@ -141504,6 +141522,78 @@ ...@@ -141504,6 +141522,78 @@
"ref_entity_name":"RES_USERS" "ref_entity_name":"RES_USERS"
} }
] ]
}
,
{
"entity_name":"RES_PARTNER_RES_PARTNER_CATEGORY_REL",
"logic_name":"联系人标签",
"code_name":"Res_partner_res_partner_category_rel",
"table_name":"res_partner_res_partner_category_rel",
"system_id":"iBizBusinessCentral",
"system_name":"iBiz商业中心",
"fields":[
{
"fieldname":"ID" ,
"codename":"Id",
"field_logic_name":"ID",
"entity_name":"Res_partner_res_partner_category_rel",
"field_type":"GUID",
"nullable":1,
"physical_field":0,
"data_type":"VARCHAR",
"data_length":200,
"key_field":1,
"major_field":1
},
{
"fieldname":"PARTNER_ID" ,
"codename":"Partner_id",
"field_logic_name":"ID",
"entity_name":"Res_partner_res_partner_category_rel",
"ref_de":"RES_PARTNER",
"ref_field_name":"ID",
"relation_name":"DER1N_RES_PARTNER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_PARTNER_ID",
"relation_codename":"Odoo_partner",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"major_field":0
},
{
"fieldname":"CATEGORY_ID" ,
"codename":"Category_id",
"field_logic_name":"ID",
"entity_name":"Res_partner_res_partner_category_rel",
"ref_de":"RES_PARTNER_CATEGORY",
"ref_field_name":"ID",
"relation_name":"DER1N_RES_PARTNER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_CATEGORY_CATEGORY_ID",
"relation_codename":"Odoo_category",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_RES_PARTNER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_CATEGORY_CATEGORY_ID",
"relation_type":"DER1N",
"code_name":"Odoo_category",
"entity_name":"RES_PARTNER_RES_PARTNER_CATEGORY_REL",
"ref_entity_name":"RES_PARTNER_CATEGORY"
},
{"name":"DER1N_RES_PARTNER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_PARTNER_ID",
"relation_type":"DER1N",
"code_name":"Odoo_partner",
"entity_name":"RES_PARTNER_RES_PARTNER_CATEGORY_REL",
"ref_entity_name":"RES_PARTNER"
}
]
} }
, ,
{ {
...@@ -141853,7 +141943,7 @@ ...@@ -141853,7 +141943,7 @@
"codename":"Category_id", "codename":"Category_id",
"field_logic_name":"标签", "field_logic_name":"标签",
"entity_name":"Res_supplier", "entity_name":"Res_supplier",
"field_type":"LONGTEXT", "field_type":"ONE2MANYDATA",
"nullable":1, "nullable":1,
"physical_field":0, "physical_field":0,
"data_type":"TEXT", "data_type":"TEXT",
...@@ -141880,10 +141970,89 @@ ...@@ -141880,10 +141970,89 @@
"code_name":"Odoo_vendor", "code_name":"Odoo_vendor",
"entity_name":"PURCHASE_REQUISITION", "entity_name":"PURCHASE_REQUISITION",
"ref_entity_name":"RES_SUPPLIER" "ref_entity_name":"RES_SUPPLIER"
},
{"name":"DER1N_RES_SUPPLIER_RES_PARTNER_CATEGORY_REL_RES_SUPPLIER_PARTNER_ID",
"relation_type":"DER1N",
"code_name":"Odoo_supplier",
"entity_name":"RES_SUPPLIER_RES_PARTNER_CATEGORY_REL",
"ref_entity_name":"RES_SUPPLIER"
} }
], ],
"parentEntitys":[ "parentEntitys":[
] ]
}
,
{
"entity_name":"RES_SUPPLIER_RES_PARTNER_CATEGORY_REL",
"logic_name":"供应商标签",
"code_name":"Res_supplier_res_partner_category_rel",
"table_name":"res_partner_res_partner_category_rel",
"system_id":"iBizBusinessCentral",
"system_name":"iBiz商业中心",
"fields":[
{
"fieldname":"ID" ,
"codename":"Id",
"field_logic_name":"ID",
"entity_name":"Res_supplier_res_partner_category_rel",
"field_type":"GUID",
"nullable":1,
"physical_field":0,
"data_type":"VARCHAR",
"data_length":200,
"key_field":1,
"major_field":1
},
{
"fieldname":"CATEGORY_ID" ,
"codename":"Category_id",
"field_logic_name":"ID",
"entity_name":"Res_supplier_res_partner_category_rel",
"ref_de":"RES_PARTNER_CATEGORY",
"ref_field_name":"ID",
"relation_name":"DER1N_RES_SUPPLIER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_CATEGORY_CATEGORY_ID",
"relation_codename":"Odoo_category",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"major_field":0
},
{
"fieldname":"PARTNER_ID" ,
"codename":"Partner_id",
"field_logic_name":"ID",
"entity_name":"Res_supplier_res_partner_category_rel",
"ref_de":"RES_SUPPLIER",
"ref_field_name":"ID",
"relation_name":"DER1N_RES_SUPPLIER_RES_PARTNER_CATEGORY_REL_RES_SUPPLIER_PARTNER_ID",
"relation_codename":"Odoo_supplier",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"data_length":20,
"key_field":0,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_RES_SUPPLIER_RES_PARTNER_CATEGORY_REL_RES_PARTNER_CATEGORY_CATEGORY_ID",
"relation_type":"DER1N",
"code_name":"Odoo_category",
"entity_name":"RES_SUPPLIER_RES_PARTNER_CATEGORY_REL",
"ref_entity_name":"RES_PARTNER_CATEGORY"
},
{"name":"DER1N_RES_SUPPLIER_RES_PARTNER_CATEGORY_REL_RES_SUPPLIER_PARTNER_ID",
"relation_type":"DER1N",
"code_name":"Odoo_supplier",
"entity_name":"RES_SUPPLIER_RES_PARTNER_CATEGORY_REL",
"ref_entity_name":"RES_SUPPLIER"
}
]
} }
, ,
{ {
...@@ -208,15 +208,6 @@ public class Res_partnerDTO extends DTOBase implements Serializable { ...@@ -208,15 +208,6 @@ public class Res_partnerDTO extends DTOBase implements Serializable {
@JsonProperty("has_unreconciled_entries") @JsonProperty("has_unreconciled_entries")
private Boolean hasUnreconciledEntries; private Boolean hasUnreconciledEntries;
/**
* 属性 [CATEGORY_ID]
*
*/
@JSONField(name = "category_id")
@JsonProperty("category_id")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
private String categoryId;
/** /**
* 属性 [WEBSITE_DESCRIPTION] * 属性 [WEBSITE_DESCRIPTION]
* *
......
...@@ -119,15 +119,6 @@ public class Res_supplierDTO extends DTOBase implements Serializable { ...@@ -119,15 +119,6 @@ public class Res_supplierDTO extends DTOBase implements Serializable {
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String websiteUrl; private String websiteUrl;
/**
* 属性 [CATEGORY_ID]
*
*/
@JSONField(name = "category_id")
@JsonProperty("category_id")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
private String categoryId;
/** /**
* 设置 [NAME] * 设置 [NAME]
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册