diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/thrsys/ThrInvWarehouseDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/thrsys/ThrInvWarehouseDao.java new file mode 100644 index 00000000..13662716 --- /dev/null +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/thrsys/ThrInvWarehouseDao.java @@ -0,0 +1,30 @@ +package com.glxp.api.admin.dao.thrsys; + +import com.glxp.api.admin.entity.thrsys.ThrInvWarehouseEntity; +import com.glxp.api.admin.req.thrsys.FilterThrInvWarehouseRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ThrInvWarehouseDao { + + List filterThrInvWarehouse(FilterThrInvWarehouseRequest filterThrInvWarehouseRequest); + + List filterThrGroupInvWarehouse(FilterThrInvWarehouseRequest filterThrInvWarehouseRequest); + + boolean insertThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity); + + boolean updateThrInvWarehouse(ThrInvWarehouseEntity thrInvWarehouseEntity); + + ThrInvWarehouseEntity selectById(@Param("id") String id); + + boolean deleteById(@Param("id") String id); + + /** + * 根据code查询第三方仓库数据 + * + * @param code + * @return + */ + ThrInvWarehouseEntity selectByCode(@Param("code") String code); +} diff --git a/api-admin/src/main/java/com/glxp/api/admin/res/thrsys/ThrInvWarehouseResponse.java b/api-admin/src/main/java/com/glxp/api/admin/res/thrsys/ThrInvWarehouseResponse.java new file mode 100644 index 00000000..e150e099 --- /dev/null +++ b/api-admin/src/main/java/com/glxp/api/admin/res/thrsys/ThrInvWarehouseResponse.java @@ -0,0 +1,24 @@ +package com.glxp.api.admin.res.thrsys; + +import lombok.Data; + +import java.util.Date; +import java.util.List; + +@Data +public class ThrInvWarehouseResponse { + + + private Integer id; + private Integer pid; + private String code; + private String name; + private Boolean advanceType; + private Boolean isDefault; + private Integer status; + private Date updateTime; + private String remark; + + private List children; + +} diff --git a/api-admin/src/main/resources/mybatis/mapper/thrsys/ThrInvWarehouseDao.xml b/api-admin/src/main/resources/mybatis/mapper/thrsys/ThrInvWarehouseDao.xml new file mode 100644 index 00000000..a25f1c23 --- /dev/null +++ b/api-admin/src/main/resources/mybatis/mapper/thrsys/ThrInvWarehouseDao.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + insert INTO thr_inv_warehouse + (pid, code, name, advanceType, isDefault, + status, updateTime, remark) + values (#{pid}, #{code}, + #{name}, #{advanceType}, #{isDefault}, + #{status}, #{updateTime}, + #{remark}) + + + + + DELETE + FROM thr_inv_warehouse + WHERE id = #{id} + + + + UPDATE thr_inv_warehouse + + pid=#{pid}, + name=#{name}, + code=#{code}, + advanceType=#{advanceType}, + isDefault=#{isDefault}, + status=#{status}, + updateTime=#{updateTime}, + remark=#{remark}, + + WHERE id = #{id} + + + + \ No newline at end of file