effort 努力,尽量;一批数据中有一个失败,不影响其他的处理;
transaction 事务;一批数据中有一个失败,全部失败;
batch 批量处理;处理多个
physical 物理处理;用于删除
logic 逻辑处理;用于新增
id 根据主键进行删改查
condition 根据字段条件进行删改查
data 实例Bean
新增:
新增不考虑有ID的情况,有ID的情况交给全量更新处理;
新增要考虑逻辑删除的数据,如果出现内容和新增相同(除了ID,gmt_create,gmt_modified,且删除标志为1),且数量部位1就取第一个,就复用这个数据,并且把创建时间修改时间更新,删除标志设为0; ==》逻辑新增
单个新增/批量新增;物理新增/逻辑新增;批量事务/批量尽量;
post "" data
post /batchTransaction datas
post /batchEffort datas
post /logic data
post /logic/batchTransaction datas
post /logic/batchEffort datas
删除:
ID删除不需要传实体数据;逻辑删除把删除标志设为1;
Condition可以进行非空复杂(等于,大于等于,小于等于,集合,字符串模糊查询)条件的AND操作;
Example只对非空条件进行等于操作,然后AND;
如果遇到OR的条件,没有现成的接口可用,需要自己手动实现;
单个删除/批量删除;物理删除/逻辑删除;批量事务/批量尽量;ID删除/条件删除;Condition条件/Example条件;
delete /{id} id
delete /batchTransaction ids
delete /batchEffort ids
delete /conditionTransaction condition
delete /conditionEffort condition
delete /exampleTransaction example
delete /exampleEffort example
delete /physical/{id} id
delete /physical/batchTransaction ids
delete /physical/batchEffort ids
delete /physical/conditionTransaction condition
delete /physical/conditionEffort condition
delete /physical/exampleTransaction example
delete /physical/exampleEffort example
全量更新:
如果传入的实体中存在null的字段,则把数据库中的对应字段也设为null;
单个更新/批量更新;ID更新/条件更新;批量事务/批量尽量;Condition条件/Example条件;
put /{id} id,data
put /batchTransaction datas
put /batchEffort datas
put /conditionTransaction dataCondition
put /conditionEffort dataCondition
put /exampleTransaction dataExample
put /exampleEffort dataExample
非空更新:
只有字段为非空时才进行更新;
patch /{id} id,data
patch /batchTransaction datas
patch /batchEffort datas
patch /conditionTransaction dataCondition
patch /conditionEffort dataCondition
patch /exampleTransaction dataExample
patch /exampleEffort dataExample
查询:
条件查询返回值为分页;
ID查询/条件查询;Condition条件/Example条件;单个查询/批量查询;
get /{id} id
get "" 查询全部
get /ids ids 逗号分隔的ID串
post /queryIds ids ID列表
post /queryCondition condition
post /queryExample example