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

MoneyQ 部署微服务接口 [后台服务,接口示例]

上级 b5ca18c6
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
git clone -b master $para2 demosys/ git clone -b master $para2 demosys/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd demosys/ cd demosys/
mvn clean package -Pdemoapi
cd demo-provider/demo-provider-demoapi
mvn -Pdemoapi docker:build
mvn -Pdemoapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/demo-provider-demoapi.yaml iBizDemo --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -83,6 +83,10 @@ zuul: ...@@ -83,6 +83,10 @@ zuul:
path: /ibizsample0020s/** path: /ibizsample0020s/**
serviceId: ${ibiz.ref.service.demosys-demoapi:demosys-demoapi} serviceId: ${ibiz.ref.service.demosys-demoapi:demosys-demoapi}
stripPrefix: false stripPrefix: false
ibizsample0021:
path: /ibizsample0021s/**
serviceId: ${ibiz.ref.service.demosys-demoapi:demosys-demoapi}
stripPrefix: false
ibizsample0011: ibizsample0011:
path: /ibizsample0011s/** path: /ibizsample0011s/**
serviceId: ${ibiz.ref.service.demosys-demoapi:demosys-demoapi} serviceId: ${ibiz.ref.service.demosys-demoapi:demosys-demoapi}
......
package cn.ibizlab.core.sample.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.util.domain.EntityBase;
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;
import cn.ibizlab.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
/**
* 实体[订单]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "T_IBIZSAMPLE0021", resultMap = "IBIZSample0021ResultMap")
public class IBIZSample0021 extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 订单标识
*/
@DEField(isKeyField = true)
@TableId(value = "ibizsample0021id", type = IdType.ASSIGN_UUID)
@JSONField(name = "ibizsample0021id")
@JsonProperty("ibizsample0021id")
private String ibizsample0021id;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman", fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate", fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "createdate", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 订单名称
*/
@TableField(value = "ibizsample0021name")
@JSONField(name = "ibizsample0021name")
@JsonProperty("ibizsample0021name")
private String ibizsample0021name;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "updatedate", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 订单状态
*/
@DEField(defaultValue = "10")
@TableField(value = "orderstate")
@JSONField(name = "orderstate")
@JsonProperty("orderstate")
private String orderstate;
/**
* 订单时间
*/
@TableField(value = "ordertime")
@JsonFormat(pattern = "yyyy-MM-dd", locale = "zh", timezone = "GMT+8")
@JSONField(name = "ordertime", format = "yyyy-MM-dd")
@JsonProperty("ordertime")
private Timestamp ordertime;
/**
* 备注
*/
@TableField(value = "memo")
@JSONField(name = "memo")
@JsonProperty("memo")
private String memo;
/**
* 设置 [订单名称]
*/
public void setIbizsample0021name(String ibizsample0021name) {
this.ibizsample0021name = ibizsample0021name;
this.modify("ibizsample0021name", ibizsample0021name);
}
/**
* 设置 [订单状态]
*/
public void setOrderstate(String orderstate) {
this.orderstate = orderstate;
this.modify("orderstate", orderstate);
}
/**
* 设置 [订单时间]
*/
public void setOrdertime(Timestamp ordertime) {
this.ordertime = ordertime;
this.modify("ordertime", ordertime);
}
/**
* 格式化日期 [订单时间]
*/
public String formatOrdertime() {
if (this.ordertime == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(ordertime);
}
/**
* 设置 [备注]
*/
public void setMemo(String memo) {
this.memo = memo;
this.modify("memo", memo);
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("ibizsample0021id");
return super.copyTo(targetEntity, bIncEmpty);
}
}
package cn.ibizlab.core.sample.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.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.sample.domain.IBIZSample0021;
/**
* 关系型数据实体[IBIZSample0021] 查询条件对象
*/
@Slf4j
@Data
public class IBIZSample0021SearchContext extends QueryWrapperContext<IBIZSample0021> {
private String n_ibizsample0021name_like;//[订单名称]
public void setN_ibizsample0021name_like(String n_ibizsample0021name_like) {
this.n_ibizsample0021name_like = n_ibizsample0021name_like;
if(!ObjectUtils.isEmpty(this.n_ibizsample0021name_like)){
this.getSearchCond().like("ibizsample0021name", n_ibizsample0021name_like);
}
}
private String n_orderstate_eq;//[订单状态]
public void setN_orderstate_eq(String n_orderstate_eq) {
this.n_orderstate_eq = n_orderstate_eq;
if(!ObjectUtils.isEmpty(this.n_orderstate_eq)){
this.getSearchCond().eq("orderstate", n_orderstate_eq);
}
}
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("ibizsample0021name", query)
);
}
}
}
package cn.ibizlab.core.sample.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.core.sample.domain.IBIZSample0021;
import cn.ibizlab.core.sample.filter.IBIZSample0021SearchContext;
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 IBIZSample0021Mapper extends BaseMapper<IBIZSample0021> {
Page<IBIZSample0021> searchDefault(IPage page, @Param("srf") IBIZSample0021SearchContext context, @Param("ew") Wrapper<IBIZSample0021> wrapper);
@Override
IBIZSample0021 selectById(Serializable id);
@Override
int insert(IBIZSample0021 entity);
@Override
int updateById(@Param(Constants.ENTITY) IBIZSample0021 entity);
@Override
int update(@Param(Constants.ENTITY) IBIZSample0021 entity, @Param("ew") Wrapper<IBIZSample0021> 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);
}
...@@ -8,16 +8,16 @@ import java.util.List; ...@@ -8,16 +8,16 @@ import java.util.List;
public interface IBIZBOOKDataImport { public interface IBIZBOOKDataImport {
@Mappings({ @Mappings({
@Mapping(target = "ibizbookid", source = "ibizbookid"), @Mapping(target = "ibizbookid", source = "ibizbookid"),
@Mapping(target = "press", source = "press"),
@Mapping(target = "author", source = "author"),
@Mapping(target = "price", source = "price"),
@Mapping(target = "createdate", source = "createdate"),
@Mapping(target = "booknumber", source = "booknumber"), @Mapping(target = "booknumber", source = "booknumber"),
@Mapping(target = "createman", source = "createman"),
@Mapping(target = "ibizbookname", source = "ibizbookname"),
@Mapping(target = "updateman", source = "updateman"), @Mapping(target = "updateman", source = "updateman"),
@Mapping(target = "createman", source = "createman"),
@Mapping(target = "updatedate", source = "updatedate"), @Mapping(target = "updatedate", source = "updatedate"),
@Mapping(target = "type", source = "type"), @Mapping(target = "type", source = "type"),
@Mapping(target = "press", source = "press"),
@Mapping(target = "createdate", source = "createdate"),
@Mapping(target = "author", source = "author"),
@Mapping(target = "price", source = "price"),
@Mapping(target = "ibizbookname", source = "ibizbookname"),
}) })
@BeanMapping(ignoreByDefault = true) @BeanMapping(ignoreByDefault = true)
IBIZBOOK toDomain(IBIZBOOK entity); IBIZBOOK toDomain(IBIZBOOK entity);
......
package cn.ibizlab.core.sample.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.core.sample.domain.IBIZSample0021;
import cn.ibizlab.core.sample.filter.IBIZSample0021SearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[IBIZSample0021] 服务对象接口
*/
public interface IIBIZSample0021Service extends IService<IBIZSample0021> {
boolean create(IBIZSample0021 et);
void createBatch(List<IBIZSample0021> list);
boolean update(IBIZSample0021 et);
void updateBatch(List<IBIZSample0021> list);
boolean remove(String key);
void removeBatch(Collection<String> idList);
IBIZSample0021 get(String key);
IBIZSample0021 getDraft(IBIZSample0021 et);
boolean checkKey(IBIZSample0021 et);
boolean save(IBIZSample0021 et);
void saveBatch(List<IBIZSample0021> list);
Page<IBIZSample0021> searchDefault(IBIZSample0021SearchContext context);
/**
*自定义查询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);
List<IBIZSample0021> getIbizsample0021ByIds(List<String> ids);
List<IBIZSample0021> getIbizsample0021ByEntities(List<IBIZSample0021> entities);
}
package cn.ibizlab.core.sample.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.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.sample.domain.IBIZSample0021;
import cn.ibizlab.core.sample.filter.IBIZSample0021SearchContext;
import cn.ibizlab.core.sample.service.IIBIZSample0021Service;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.sample.mapper.IBIZSample0021Mapper;
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("IBIZSample0021ServiceImpl")
public class IBIZSample0021ServiceImpl extends ServiceImpl<IBIZSample0021Mapper, IBIZSample0021> implements IIBIZSample0021Service {
protected int batchSize = 500;
@Override
@Transactional
public boolean create(IBIZSample0021 et) {
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getIbizsample0021id()), et);
return true;
}
@Override
@Transactional
public void createBatch(List<IBIZSample0021> list) {
this.saveBatch(list, batchSize);
}
@Override
@Transactional
public boolean update(IBIZSample0021 et) {
if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("ibizsample0021id", et.getIbizsample0021id()))) {
return false;
}
CachedBeanCopier.copy(get(et.getIbizsample0021id()), et);
return true;
}
@Override
@Transactional
public void updateBatch(List<IBIZSample0021> 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 IBIZSample0021 get(String key) {
IBIZSample0021 et = getById(key);
if(et == null){
et = new IBIZSample0021();
et.setIbizsample0021id(key);
}
else {
}
return et;
}
@Override
public IBIZSample0021 getDraft(IBIZSample0021 et) {
return et;
}
@Override
public boolean checkKey(IBIZSample0021 et) {
return (!ObjectUtils.isEmpty(et.getIbizsample0021id())) && (!Objects.isNull(this.getById(et.getIbizsample0021id())));
}
@Override
@Transactional
public boolean save(IBIZSample0021 et) {
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(IBIZSample0021 et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<IBIZSample0021> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<IBIZSample0021> list) {
saveOrUpdateBatch(list,batchSize);
}
/**
* 查询集合 数据集
*/
@Override
public Page<IBIZSample0021> searchDefault(IBIZSample0021SearchContext context) {
fillWFTaskContext(context);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBIZSample0021> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<IBIZSample0021>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Autowired
private cn.ibizlab.util.client.IBZWFFeignClient ibzwfFeignClient;
/**
* 查询工作流待办
* @param context
*/
private void fillWFTaskContext(IBIZSample0021SearchContext context){
if(!StringUtils.isEmpty(context.getUserTaskId()) && !StringUtils.isEmpty(context.getProcessDefinitionKey())){
List<String> businessKeys= ibzwfFeignClient.getbusinesskeysByUserId("demosys", cn.ibizlab.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"ibizsample0021s",context.getProcessDefinitionKey(),context.getUserTaskId());
if(businessKeys.size()>0){
context.getSelectCond().in("ibizsample0021id",businessKeys);
}
else{
context.getSelectCond().apply("1<>1");
}
}
}
@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;
}
@Override
public List<IBIZSample0021> getIbizsample0021ByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<IBIZSample0021> getIbizsample0021ByEntities(List<IBIZSample0021> entities) {
List ids =new ArrayList();
for(IBIZSample0021 entity : entities){
Serializable id=entity.getIbizsample0021id();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0) {
return this.listByIds(ids);
}
else {
return entities;
}
}
}
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<!--输出实体[IBIZBOOK]数据结构 --> <!--输出实体[IBIZBOOK]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizbook-965-6"> <changeSet author="a_LAB01_df847bdfd" id="tab-ibizbook-967-6">
<createTable tableName="T_IBIZBOOK"> <createTable tableName="T_IBIZBOOK">
<column name="CREATEMAN" remarks="" type="VARCHAR(60)"> <column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column> </column>
...@@ -1135,8 +1135,34 @@ ...@@ -1135,8 +1135,34 @@
</changeSet> </changeSet>
<!--输出实体[IBIZSAMPLE0021]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizsample0021-13-38">
<createTable tableName="T_IBIZSAMPLE0021">
<column name="IBIZSAMPLE0021ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBIZSAMPLE0021_IBIZSAMPLE00"/>
</column>
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="IBIZSAMPLE0021NAME" remarks="" type="VARCHAR(200)">
</column>
<column name="UPDATEMAN" remarks="" type="VARCHAR(60)">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
<column name="ORDERSTATE" remarks="" type="VARCHAR(60)">
</column>
<column name="ORDERTIME" remarks="" type="DATETIME">
</column>
<column name="MEMO" remarks="" type="VARCHAR(2000)">
</column>
</createTable>
</changeSet>
<!--输出实体[IBIZSOFTWARESUIT]数据结构 --> <!--输出实体[IBIZSOFTWARESUIT]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizsoftwaresuit-6-38"> <changeSet author="a_LAB01_df847bdfd" id="tab-ibizsoftwaresuit-6-39">
<createTable tableName="T_IBIZSOFTWARESUIT"> <createTable tableName="T_IBIZSOFTWARESUIT">
<column name="CREATEMAN" remarks="" type="VARCHAR(60)"> <column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column> </column>
...@@ -1156,7 +1182,7 @@ ...@@ -1156,7 +1182,7 @@
<!--输出实体[IBIZSTORAGE]数据结构 --> <!--输出实体[IBIZSTORAGE]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizstorage-4-39"> <changeSet author="a_LAB01_df847bdfd" id="tab-ibizstorage-4-40">
<createTable tableName="T_IBIZSTORAGE"> <createTable tableName="T_IBIZSTORAGE">
<column name="IBIZSTORAGEID" remarks="" type="VARCHAR(100)"> <column name="IBIZSTORAGEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBIZSTORAGE_IBIZSTORAGEID"/> <constraints primaryKey="true" primaryKeyName="PK_IBIZSTORAGE_IBIZSTORAGEID"/>
...@@ -1176,7 +1202,7 @@ ...@@ -1176,7 +1202,7 @@
<!--输出实体[IBIZSUPPLIER]数据结构 --> <!--输出实体[IBIZSUPPLIER]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizsupplier-4-40"> <changeSet author="a_LAB01_df847bdfd" id="tab-ibizsupplier-4-41">
<createTable tableName="t_supplier"> <createTable tableName="t_supplier">
<column name="DELETEFLAG" remarks="" type="VARCHAR(100)"> <column name="DELETEFLAG" remarks="" type="VARCHAR(100)">
</column> </column>
...@@ -1202,7 +1228,7 @@ ...@@ -1202,7 +1228,7 @@
<!--输出实体[IBIZUNIPRODUCT]数据结构 --> <!--输出实体[IBIZUNIPRODUCT]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizuniproduct-9-41"> <changeSet author="a_LAB01_df847bdfd" id="tab-ibizuniproduct-9-42">
<createTable tableName="T_IBIZUNIPRODUCT"> <createTable tableName="T_IBIZUNIPRODUCT">
<column name="UNITPRICE" remarks="" type="FLOAT"> <column name="UNITPRICE" remarks="" type="FLOAT">
</column> </column>
...@@ -1228,7 +1254,7 @@ ...@@ -1228,7 +1254,7 @@
<!--输出实体[IBIZVIEWMSG]数据结构 --> <!--输出实体[IBIZVIEWMSG]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizviewmsg-3-42"> <changeSet author="a_LAB01_df847bdfd" id="tab-ibizviewmsg-3-43">
<createTable tableName="T_IBIZVIEWMSG"> <createTable tableName="T_IBIZVIEWMSG">
<column name="IBIZVIEWMSGID" remarks="" type="VARCHAR(100)"> <column name="IBIZVIEWMSGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBIZVIEWMSG_IBIZVIEWMSGID"/> <constraints primaryKey="true" primaryKeyName="PK_IBIZVIEWMSG_IBIZVIEWMSGID"/>
...@@ -1264,7 +1290,7 @@ ...@@ -1264,7 +1290,7 @@
<!--输出实体[IBIZQJ]外键关系 --> <!--输出实体[IBIZQJ]外键关系 -->
<!--输出实体[IBIZSAMPLE]外键关系 --> <!--输出实体[IBIZSAMPLE]外键关系 -->
<!--输出实体[IBIZSAMPLE0001]外键关系 --> <!--输出实体[IBIZSAMPLE0001]外键关系 -->
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0001-407-43"> <changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0001-407-44">
<addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0002ID" baseTableName="T_IBIZSAMPLE0001" constraintName="DER1N_IBIZSAMPLE0001_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0002ID" referencedTableName="T_IBIZSAMPLE0002" validate="true"/> <addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0002ID" baseTableName="T_IBIZSAMPLE0001" constraintName="DER1N_IBIZSAMPLE0001_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0002ID" referencedTableName="T_IBIZSAMPLE0002" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[IBIZSAMPLE0002]外键关系 --> <!--输出实体[IBIZSAMPLE0002]外键关系 -->
...@@ -1273,7 +1299,7 @@ ...@@ -1273,7 +1299,7 @@
<!--输出实体[IBIZSAMPLE0005]外键关系 --> <!--输出实体[IBIZSAMPLE0005]外键关系 -->
<!--输出实体[IBIZSAMPLE0006]外键关系 --> <!--输出实体[IBIZSAMPLE0006]外键关系 -->
<!--输出实体[IBIZSAMPLE0007]外键关系 --> <!--输出实体[IBIZSAMPLE0007]外键关系 -->
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0007-4-44"> <changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0007-4-45">
<addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0006ID" baseTableName="T_IBIZSAMPLE0007" constraintName="DER1N_IBIZSAMPLE0007_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0006ID" referencedTableName="T_IBIZSAMPLE0006" validate="true"/> <addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0006ID" baseTableName="T_IBIZSAMPLE0007" constraintName="DER1N_IBIZSAMPLE0007_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0006ID" referencedTableName="T_IBIZSAMPLE0006" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[IBIZSAMPLE0008]外键关系 --> <!--输出实体[IBIZSAMPLE0008]外键关系 -->
...@@ -1289,9 +1315,10 @@ ...@@ -1289,9 +1315,10 @@
<!--输出实体[IBIZSAMPLE0018]外键关系 --> <!--输出实体[IBIZSAMPLE0018]外键关系 -->
<!--输出实体[IBIZSAMPLE0019]外键关系 --> <!--输出实体[IBIZSAMPLE0019]外键关系 -->
<!--输出实体[IBIZSAMPLE0020]外键关系 --> <!--输出实体[IBIZSAMPLE0020]外键关系 -->
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0020-4-45"> <changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0020-4-46">
<addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0019ID" baseTableName="T_IBIZSAMPLE0020" constraintName="DER1N_IBIZSAMPLE0020_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0019ID" referencedTableName="T_IBIZSAMPLE0019" validate="true"/> <addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0019ID" baseTableName="T_IBIZSAMPLE0020" constraintName="DER1N_IBIZSAMPLE0020_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0019ID" referencedTableName="T_IBIZSAMPLE0019" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[IBIZSAMPLE0021]外键关系 -->
<!--输出实体[IBIZSOFTWARESUIT]外键关系 --> <!--输出实体[IBIZSOFTWARESUIT]外键关系 -->
<!--输出实体[IBIZSTORAGE]外键关系 --> <!--输出实体[IBIZSTORAGE]外键关系 -->
<!--输出实体[IBIZSUPPLIER]外键关系 --> <!--输出实体[IBIZSUPPLIER]外键关系 -->
......
<?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.core.sample.mapper.IBIZSample0021Mapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="IBIZSample0021ResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZSAMPLE0021ID`, t1.`IBIZSAMPLE0021NAME`, t1.`MEMO`, t1.`ORDERSTATE`, t1.`ORDERTIME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZSAMPLE0021` t1 ) t1 where ibizsample0021id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="IBIZSample0021ResultMap" type="cn.ibizlab.core.sample.domain.IBIZSample0021" autoMapping="true">
<id property="ibizsample0021id" column="ibizsample0021id" /><!--主键字段映射-->
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.sample.filter.IBIZSample0021SearchContext" resultMap="IBIZSample0021ResultMap">
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="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZSAMPLE0021ID`, t1.`IBIZSAMPLE0021NAME`, t1.`MEMO`, t1.`ORDERSTATE`, t1.`ORDERTIME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZSAMPLE0021` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZSAMPLE0021ID`, t1.`IBIZSAMPLE0021NAME`, t1.`MEMO`, t1.`ORDERSTATE`, t1.`ORDERTIME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZSAMPLE0021` t1
]]>
</sql>
</mapper>
...@@ -297,6 +297,14 @@ ...@@ -297,6 +297,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}] "datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
} }
, { , {
"dename":"IBIZSample0021",
"delogicname":"订单",
"sysmoudle":{"id":"SAMPLE","name":"示例"},
"dedataset":[{"id":"Default" , "name":"数据集"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"IBIZSoftwareSuit", "dename":"IBIZSoftwareSuit",
"delogicname":"软件", "delogicname":"软件",
"sysmoudle":{"id":"SAMPLE","name":"示例"}, "sysmoudle":{"id":"SAMPLE","name":"示例"},
......
...@@ -7764,6 +7764,155 @@ ...@@ -7764,6 +7764,155 @@
"ref_entity_name":"IBIZSAMPLE0019" "ref_entity_name":"IBIZSAMPLE0019"
} }
] ]
}
,
{
"entity_name":"IBIZSAMPLE0021",
"logic_name":"订单",
"code_name":"IBIZSample0021",
"table_name":"T_IBIZSAMPLE0021",
"system_id":"DemoSys",
"system_name":"DemoSys",
"module_id":"Sample",
"module_name":"示例",
"fields":[
{
"fieldname":"IBIZSAMPLE0021ID" ,
"codename":"IBIZSample0021Id",
"field_logic_name":"订单标识",
"entity_name":"IBIZSample0021",
"field_type":"GUID",
"nullable":0,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":1,
"show_order":1000,
"major_field":0
},
{
"fieldname":"CREATEMAN" ,
"codename":"CreateMan",
"field_logic_name":"建立人",
"entity_name":"IBIZSample0021",
"field_type":"TEXT",
"dict":"SysOperator",
"nullable":0,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":60,
"predefined":"CREATEMAN",
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"CREATEDATE" ,
"codename":"CreateDate",
"field_logic_name":"建立时间",
"entity_name":"IBIZSample0021",
"field_type":"DATETIME",
"nullable":0,
"physical_field":1,
"data_type":"DATETIME",
"data_length":8,
"predefined":"CREATEDATE",
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"IBIZSAMPLE0021NAME" ,
"codename":"IBIZSample0021Name",
"field_logic_name":"订单名称",
"entity_name":"IBIZSample0021",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":200,
"key_field":0,
"show_order":1000,
"major_field":1
},
{
"fieldname":"UPDATEMAN" ,
"codename":"UpdateMan",
"field_logic_name":"更新人",
"entity_name":"IBIZSample0021",
"field_type":"TEXT",
"dict":"SysOperator",
"nullable":0,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":60,
"predefined":"UPDATEMAN",
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"UPDATEDATE" ,
"codename":"UpdateDate",
"field_logic_name":"更新时间",
"entity_name":"IBIZSample0021",
"field_type":"DATETIME",
"nullable":0,
"physical_field":1,
"data_type":"DATETIME",
"data_length":8,
"predefined":"UPDATEDATE",
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"ORDERSTATE" ,
"codename":"OrderState",
"field_logic_name":"订单状态",
"entity_name":"IBIZSample0021",
"field_type":"SSCODELIST",
"dict":"ORDERSTATE",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":60,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"ORDERTIME" ,
"codename":"OrderTime",
"field_logic_name":"订单时间",
"entity_name":"IBIZSample0021",
"field_type":"DATE",
"nullable":1,
"physical_field":1,
"data_type":"DATETIME",
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"MEMO" ,
"codename":"Memo",
"field_logic_name":"备注",
"entity_name":"IBIZSample0021",
"field_type":"LONGTEXT_1000",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":2000,
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
]
} }
, ,
{ {
......
...@@ -4,6 +4,21 @@ ...@@ -4,6 +4,21 @@
<extensionElements> <extensionElements>
<flowable:eventListener delegateExpression="${processInstanceListener}" /> <flowable:eventListener delegateExpression="${processInstanceListener}" />
<flowable:field name="bookings">
<flowable:string>ibizsample0021s</flowable:string>
</flowable:field>
<flowable:field name="bookingapps_ibizsample0021s">
<flowable:string>Web</flowable:string>
</flowable:field>
<flowable:field name="udstatefield_ibizsample0021s">
<flowable:string>orderstate</flowable:string>
</flowable:field>
<flowable:field name="udstateingval_ibizsample0021s">
<flowable:string>20</flowable:string>
</flowable:field>
<flowable:field name="majortext_ibizsample0021s">
<flowable:string>ibizsample0021name</flowable:string>
</flowable:field>
</extensionElements> </extensionElements>
<startEvent id="sid-3c7cbc7deeb1177d73e9647df35ba7b7" name="开始"/> <startEvent id="sid-3c7cbc7deeb1177d73e9647df35ba7b7" name="开始"/>
...@@ -12,7 +27,7 @@ ...@@ -12,7 +27,7 @@
<documentation>${majortext}</documentation> <documentation>${majortext}</documentation>
</userTask> </userTask>
<endEvent id="sid-216251a03f16216cc13936346c9ee68b" name="结束"/> <endEvent id="sid-216251a03f16216cc13936346c9ee68b" name="结束"/>
<userTask flowable:category="${businessKey}" flowable:candidateUsers="" flowable:exclusive="true" id="tid-1-4125d1c26a85d94fadef7323d35f424d" name="发起人调整" > <userTask flowable:category="${businessKey}" flowable:candidateUsers="${activedata.createman}" flowable:exclusive="true" id="tid-1-4125d1c26a85d94fadef7323d35f424d" name="发起人调整" >
<documentation>${majortext}</documentation> <documentation>${majortext}</documentation>
</userTask> </userTask>
<userTask flowable:category="${businessKey}" flowable:candidateUsers="" flowable:exclusive="true" id="tid-5-169c10a35ed0da0f748ed4176aab8351" name="部门经理审核" > <userTask flowable:category="${businessKey}" flowable:candidateUsers="" flowable:exclusive="true" id="tid-5-169c10a35ed0da0f748ed4176aab8351" name="部门经理审核" >
...@@ -65,31 +80,31 @@ ...@@ -65,31 +80,31 @@
<bpmndi:BPMNDiagram id="BPMNDiagram_demosys-actv1"> <bpmndi:BPMNDiagram id="BPMNDiagram_demosys-actv1">
<bpmndi:BPMNPlane id="BPMNPlane_demosys-actv1" bpmnElement="demosys-actv1"> <bpmndi:BPMNPlane id="BPMNPlane_demosys-actv1" bpmnElement="demosys-actv1">
<bpmndi:BPMNShape id="BPMNShape-3c7cbc7deeb1177d73e9647df35ba7b7" bpmnElement="sid-3c7cbc7deeb1177d73e9647df35ba7b7"> <bpmndi:BPMNShape id="BPMNShape-3c7cbc7deeb1177d73e9647df35ba7b7" bpmnElement="sid-3c7cbc7deeb1177d73e9647df35ba7b7">
<omgdi:Bounds x="0" y="0" width="30" height="30" /> <omgdi:Bounds x="15" y="55" width="30" height="30" />
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape-7beb141fff9888c0e14b4bf505f2d87f" bpmnElement="sid-7beb141fff9888c0e14b4bf505f2d87f"> <bpmndi:BPMNShape id="BPMNShape-7beb141fff9888c0e14b4bf505f2d87f" bpmnElement="sid-7beb141fff9888c0e14b4bf505f2d87f">
<omgdi:Bounds x="0" y="0" width="30" height="30" /> <omgdi:Bounds x="780" y="221" width="30" height="30" />
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape-231a5bc1d07984bb6688e43908488b9a" bpmnElement="tid-20-231a5bc1d07984bb6688e43908488b9a"> <bpmndi:BPMNShape id="BPMNShape-231a5bc1d07984bb6688e43908488b9a" bpmnElement="tid-20-231a5bc1d07984bb6688e43908488b9a">
<omgdi:Bounds x="0" y="0" width="100" height="80" /> <omgdi:Bounds x="555" y="195" width="100" height="80" />
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape-216251a03f16216cc13936346c9ee68b" bpmnElement="sid-216251a03f16216cc13936346c9ee68b"> <bpmndi:BPMNShape id="BPMNShape-216251a03f16216cc13936346c9ee68b" bpmnElement="sid-216251a03f16216cc13936346c9ee68b">
<omgdi:Bounds x="0" y="0" width="30" height="30" /> <omgdi:Bounds x="186" y="389" width="30" height="30" />
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape-4125d1c26a85d94fadef7323d35f424d" bpmnElement="tid-1-4125d1c26a85d94fadef7323d35f424d"> <bpmndi:BPMNShape id="BPMNShape-4125d1c26a85d94fadef7323d35f424d" bpmnElement="tid-1-4125d1c26a85d94fadef7323d35f424d">
<omgdi:Bounds x="0" y="0" width="100" height="80" /> <omgdi:Bounds x="150" y="195" width="100" height="80" />
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape-169c10a35ed0da0f748ed4176aab8351" bpmnElement="tid-5-169c10a35ed0da0f748ed4176aab8351"> <bpmndi:BPMNShape id="BPMNShape-169c10a35ed0da0f748ed4176aab8351" bpmnElement="tid-5-169c10a35ed0da0f748ed4176aab8351">
<omgdi:Bounds x="0" y="0" width="100" height="80" /> <omgdi:Bounds x="150" y="30" width="100" height="80" />
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape-cec5ba3ae05225e0f4b71f4fd4bc080b" bpmnElement="tid-10-cec5ba3ae05225e0f4b71f4fd4bc080b"> <bpmndi:BPMNShape id="BPMNShape-cec5ba3ae05225e0f4b71f4fd4bc080b" bpmnElement="tid-10-cec5ba3ae05225e0f4b71f4fd4bc080b">
<omgdi:Bounds x="0" y="0" width="100" height="80" /> <omgdi:Bounds x="360" y="30" width="100" height="80" />
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape-949b4465982b3effb960001f33003315" bpmnElement="sid-949b4465982b3effb960001f33003315"> <bpmndi:BPMNShape id="BPMNShape-949b4465982b3effb960001f33003315" bpmnElement="sid-949b4465982b3effb960001f33003315">
<omgdi:Bounds x="0" y="0" width="40" height="40" /> <omgdi:Bounds x="585" y="50" width="40" height="40" />
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape-58dbe066e02f3b8769d564ddc9316e6d" bpmnElement="tid-30-58dbe066e02f3b8769d564ddc9316e6d"> <bpmndi:BPMNShape id="BPMNShape-58dbe066e02f3b8769d564ddc9316e6d" bpmnElement="tid-30-58dbe066e02f3b8769d564ddc9316e6d">
<omgdi:Bounds x="0" y="0" width="100" height="80" /> <omgdi:Bounds x="555" y="360" width="100" height="80" />
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge-lid-C69-e6091fcb70c21ad75f289038f1a968dc" bpmnElement="lid-C69-e6091fcb70c21ad75f289038f1a968dc"> <bpmndi:BPMNEdge id="BPMNEdge-lid-C69-e6091fcb70c21ad75f289038f1a968dc" bpmnElement="lid-C69-e6091fcb70c21ad75f289038f1a968dc">
<omgdi:waypoint x="0" y="0" /> <omgdi:waypoint x="0" y="0" />
......
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /demo-provider-demoapi.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /demo-provider-demoapi.jar
EXPOSE 8081 EXPOSE 51000
ADD demo-provider-demoapi.jar /demo-provider-demoapi.jar ADD demo-provider-demoapi.jar /demo-provider-demoapi.jar
...@@ -3,9 +3,24 @@ services: ...@@ -3,9 +3,24 @@ services:
demo-provider-demoapi: demo-provider-demoapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/demo-provider-demoapi:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/demo-provider-demoapi:latest
ports: ports:
- "8081:8081" - "51000:51000"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=51000
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_df847bdfd
- SPRING_DATASOURCE_PASSWORD=3d6@460A
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_df847bdfd?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_df847bdfd
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy: deploy:
resources: resources:
limits: limits:
......
package cn.ibizlab.demoapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
/**
* 服务DTO对象[IBIZSample0021DTO]
*/
@Data
public class IBIZSample0021DTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [IBIZSAMPLE0021ID]
*
*/
@JSONField(name = "ibizsample0021id")
@JsonProperty("ibizsample0021id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String ibizsample0021id;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String createman;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [IBIZSAMPLE0021NAME]
*
*/
@JSONField(name = "ibizsample0021name")
@JsonProperty("ibizsample0021name")
@Size(min = 0, max = 200, message = "内容长度必须小于等于[200]")
private String ibizsample0021name;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String updateman;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [ORDERSTATE]
*
*/
@JSONField(name = "orderstate")
@JsonProperty("orderstate")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String orderstate;
/**
* 属性 [ORDERTIME]
*
*/
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "ordertime" , format="yyyy-MM-dd")
@JsonProperty("ordertime")
private Timestamp ordertime;
/**
* 属性 [MEMO]
*
*/
@JSONField(name = "memo")
@JsonProperty("memo")
@Size(min = 0, max = 2000, message = "内容长度必须小于等于[2000]")
private String memo;
/**
* 设置 [IBIZSAMPLE0021NAME]
*/
public void setIbizsample0021name(String ibizsample0021name){
this.ibizsample0021name = ibizsample0021name ;
this.modify("ibizsample0021name",ibizsample0021name);
}
/**
* 设置 [ORDERSTATE]
*/
public void setOrderstate(String orderstate){
this.orderstate = orderstate ;
this.modify("orderstate",orderstate);
}
/**
* 设置 [ORDERTIME]
*/
public void setOrdertime(Timestamp ordertime){
this.ordertime = ordertime ;
this.modify("ordertime",ordertime);
}
/**
* 设置 [MEMO]
*/
public void setMemo(String memo){
this.memo = memo ;
this.modify("memo",memo);
}
}
package cn.ibizlab.demoapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.core.sample.domain.IBIZSample0021;
import cn.ibizlab.demoapi.dto.IBIZSample0021DTO;
import cn.ibizlab.util.domain.MappingBase;
@Mapper(componentModel = "spring", uses = {}, implementationName = "DemoAPIIBIZSample0021Mapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBIZSample0021Mapping extends MappingBase<IBIZSample0021DTO, IBIZSample0021> {
}
package cn.ibizlab.demoapi.rest;
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 lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.demoapi.dto.*;
import cn.ibizlab.demoapi.mapping.*;
import cn.ibizlab.core.sample.domain.IBIZSample0021;
import cn.ibizlab.core.sample.service.IIBIZSample0021Service;
import cn.ibizlab.core.sample.filter.IBIZSample0021SearchContext;
import cn.ibizlab.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"订单" })
@RestController("DemoAPI-ibizsample0021")
@RequestMapping("")
public class IBIZSample0021Resource {
@Autowired
public IIBIZSample0021Service ibizsample0021Service;
@Autowired
@Lazy
public IBIZSample0021Mapping ibizsample0021Mapping;
@PreAuthorize("hasPermission(this.ibizsample0021Mapping.toDomain(#ibizsample0021dto),'DemoSys-IBIZSample0021-Create')")
@ApiOperation(value = "新建订单", tags = {"订单" }, notes = "新建订单")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0021s")
public ResponseEntity<IBIZSample0021DTO> create(@Validated @RequestBody IBIZSample0021DTO ibizsample0021dto) {
IBIZSample0021 domain = ibizsample0021Mapping.toDomain(ibizsample0021dto);
ibizsample0021Service.create(domain);
IBIZSample0021DTO dto = ibizsample0021Mapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.ibizsample0021Mapping.toDomain(#ibizsample0021dtos),'DemoSys-IBIZSample0021-Create')")
@ApiOperation(value = "批量新建订单", tags = {"订单" }, notes = "批量新建订单")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0021s/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBIZSample0021DTO> ibizsample0021dtos) {
ibizsample0021Service.createBatch(ibizsample0021Mapping.toDomain(ibizsample0021dtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "ibizsample0021" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.ibizsample0021Service.get(#ibizsample0021_id),'DemoSys-IBIZSample0021-Update')")
@ApiOperation(value = "更新订单", tags = {"订单" }, notes = "更新订单")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizsample0021s/{ibizsample0021_id}")
public ResponseEntity<IBIZSample0021DTO> update(@PathVariable("ibizsample0021_id") String ibizsample0021_id, @RequestBody IBIZSample0021DTO ibizsample0021dto) {
IBIZSample0021 domain = ibizsample0021Mapping.toDomain(ibizsample0021dto);
domain .setIbizsample0021id(ibizsample0021_id);
ibizsample0021Service.update(domain );
IBIZSample0021DTO dto = ibizsample0021Mapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.ibizsample0021Service.getIbizsample0021ByEntities(this.ibizsample0021Mapping.toDomain(#ibizsample0021dtos)),'DemoSys-IBIZSample0021-Update')")
@ApiOperation(value = "批量更新订单", tags = {"订单" }, notes = "批量更新订单")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizsample0021s/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBIZSample0021DTO> ibizsample0021dtos) {
ibizsample0021Service.updateBatch(ibizsample0021Mapping.toDomain(ibizsample0021dtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.ibizsample0021Service.get(#ibizsample0021_id),'DemoSys-IBIZSample0021-Remove')")
@ApiOperation(value = "删除订单", tags = {"订单" }, notes = "删除订单")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizsample0021s/{ibizsample0021_id}")
public ResponseEntity<Boolean> remove(@PathVariable("ibizsample0021_id") String ibizsample0021_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibizsample0021Service.remove(ibizsample0021_id));
}
@PreAuthorize("hasPermission(this.ibizsample0021Service.getIbizsample0021ByIds(#ids),'DemoSys-IBIZSample0021-Remove')")
@ApiOperation(value = "批量删除订单", tags = {"订单" }, notes = "批量删除订单")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizsample0021s/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
ibizsample0021Service.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.ibizsample0021Mapping.toDomain(returnObject.body),'DemoSys-IBIZSample0021-Get')")
@ApiOperation(value = "获取订单", tags = {"订单" }, notes = "获取订单")
@RequestMapping(method = RequestMethod.GET, value = "/ibizsample0021s/{ibizsample0021_id}")
public ResponseEntity<IBIZSample0021DTO> get(@PathVariable("ibizsample0021_id") String ibizsample0021_id) {
IBIZSample0021 domain = ibizsample0021Service.get(ibizsample0021_id);
IBIZSample0021DTO dto = ibizsample0021Mapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取订单草稿", tags = {"订单" }, notes = "获取订单草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibizsample0021s/getdraft")
public ResponseEntity<IBIZSample0021DTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(ibizsample0021Mapping.toDto(ibizsample0021Service.getDraft(new IBIZSample0021())));
}
@ApiOperation(value = "检查订单", tags = {"订单" }, notes = "检查订单")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0021s/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBIZSample0021DTO ibizsample0021dto) {
return ResponseEntity.status(HttpStatus.OK).body(ibizsample0021Service.checkKey(ibizsample0021Mapping.toDomain(ibizsample0021dto)));
}
@PreAuthorize("hasPermission(this.ibizsample0021Mapping.toDomain(#ibizsample0021dto),'DemoSys-IBIZSample0021-Save')")
@ApiOperation(value = "保存订单", tags = {"订单" }, notes = "保存订单")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0021s/save")
public ResponseEntity<Boolean> save(@RequestBody IBIZSample0021DTO ibizsample0021dto) {
return ResponseEntity.status(HttpStatus.OK).body(ibizsample0021Service.save(ibizsample0021Mapping.toDomain(ibizsample0021dto)));
}
@PreAuthorize("hasPermission(this.ibizsample0021Mapping.toDomain(#ibizsample0021dtos),'DemoSys-IBIZSample0021-Save')")
@ApiOperation(value = "批量保存订单", tags = {"订单" }, notes = "批量保存订单")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0021s/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBIZSample0021DTO> ibizsample0021dtos) {
ibizsample0021Service.saveBatch(ibizsample0021Mapping.toDomain(ibizsample0021dtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZSample0021-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZSample0021-Get')")
@ApiOperation(value = "获取数据集", tags = {"订单" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/ibizsample0021s/fetchdefault")
public ResponseEntity<List<IBIZSample0021DTO>> fetchDefault(IBIZSample0021SearchContext context) {
Page<IBIZSample0021> domains = ibizsample0021Service.searchDefault(context) ;
List<IBIZSample0021DTO> list = ibizsample0021Mapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZSample0021-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZSample0021-Get')")
@ApiOperation(value = "查询数据集", tags = {"订单" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/ibizsample0021s/searchdefault")
public ResponseEntity<Page<IBIZSample0021DTO>> searchDefault(@RequestBody IBIZSample0021SearchContext context) {
Page<IBIZSample0021> domains = ibizsample0021Service.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibizsample0021Mapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册