diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/EmptyController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/EmptyController.java deleted file mode 100644 index 3d698c3..0000000 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/EmptyController.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.mt.wms.empty.controller; - -import com.mt.wms.core.base.BaseController; -import com.mt.wms.core.constants.CommonConstant; -import com.mt.wms.core.params.EnabledParam; -import com.mt.wms.core.params.IdListParam; -import com.mt.wms.core.params.IdParam; -import com.mt.wms.core.validator.groups.AddGroup; -import com.mt.wms.core.validator.groups.PageGroup; -import com.mt.wms.core.validator.groups.UpdateGroup; -import com.mt.wms.core.vo.IdListVo; -import com.mt.wms.core.vo.IdVo; -import com.mt.wms.core.vo.PageVo; -import com.mt.wms.core.vo.R; -import com.mt.wms.empty.params.EmptyParam; -import com.mt.wms.empty.params.EmptyQueryParam; -import com.mt.wms.empty.service.EmptyService; -import com.mt.wms.empty.vo.EmptyVo; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.validation.groups.Default; -import java.util.List; - -/** - * @author jiff - * @date 2020/12/22 - * @since 1.0 - */ -@RestController -@RequestMapping(CommonConstant.API_MODULE_BASE + "empty") -@Slf4j -@Api(value = "xx管理", tags = "xx", hidden = false) -public class EmptyController extends BaseController { - @Autowired - private EmptyService emptyService; - - @PostMapping(value = "get") - @ApiOperation(value = "获取xx") - private R get(@Validated @RequestBody IdParam idParam) { - return emptyService.get(idParam); - } - - @PostMapping(value = "list") - @ApiOperation(value = "获取xx列表") - private R> list(@Validated({Default.class}) @RequestBody EmptyQueryParam emptyQueryParam) { - return emptyService.list(emptyQueryParam); - } - - @PostMapping(value = "page") - @ApiOperation(value = "获取分页xx") - private R> page(@Validated({PageGroup.class, Default.class}) @RequestBody EmptyQueryParam emptyQueryParam) { - return emptyService.page(emptyQueryParam); - } - - @PostMapping(value = "tree") - @ApiOperation(value = "获取xx树列表") - private R> tree(@Validated({Default.class}) @RequestBody EmptyQueryParam emptyQueryParam) { - return emptyService.tree(emptyQueryParam); - } - - @PostMapping(value = "add") - @ApiOperation(value = "新增") - private R add(@Validated({AddGroup.class, Default.class}) @RequestBody EmptyParam emptyParam) { - return emptyService.add(emptyParam); - } - - @PostMapping(value = "update") - @ApiOperation(value = "更新") - private R update(@Validated({UpdateGroup.class, Default.class}) @RequestBody EmptyParam emptyParam) { - return emptyService.update(emptyParam); - } - - @PostMapping(value = "enabled") - @ApiOperation(value = "启停xx") - private R enabled(@Validated @RequestBody EnabledParam enabledParam) { - return emptyService.enabled(enabledParam); - } - - @PostMapping(value = "delete") - @ApiOperation(value = "删除xx") - private R delete(@Validated @RequestBody IdParam idParam) { - return emptyService.delete(idParam); - } - - @PostMapping(value = "batchDelete") - @ApiOperation(value = "批量删除xx") - private R delete(@Validated @RequestBody IdListParam idListParam) { - return emptyService.delete(idListParam); - } - -} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/mapper/EmptyMapper.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/mapper/EmptyMapper.java deleted file mode 100644 index cecd502..0000000 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/mapper/EmptyMapper.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.mt.wms.empty.mapper; - -import com.mt.wms.empty.vo.EmptyVo; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * xxmapper类 - * - * @author jiff - * @date 2018/11/9 - * @since 1.0 - */ -@Repository -public interface EmptyMapper { - - /** - * 获取xx列表 - * - * @param id ID - * @param category 分类 - * @return xx列表 - */ - List listBy(@Param("id") Long id, @Param("category") Integer category); - -} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/EmptyParam.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/EmptyParam.java deleted file mode 100644 index e437d2d..0000000 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/EmptyParam.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.mt.wms.empty.params; - -import com.mt.wms.core.base.BaseParam; -import com.mt.wms.core.validator.groups.UpdateGroup; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - -/** - * @author jiff - * @date 2020/12/22 - * @since 1.0 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value = "xx参数对象", description = "用于新增和更新xx信息") -public class EmptyParam extends BaseParam { - - private static final long serialVersionUID = 1L; - - /** - * 主键,自增 - */ - @ApiModelProperty(value = "主键,更新时需要填写", example = "1") - @NotNull(message = "xxID不能为空", groups = {UpdateGroup.class}) - private Long id; - - /** - * xx名称 - */ - @ApiModelProperty(value = "xx名称", required = true, example = "xx管理") - @NotBlank(message = "xx名称不能为空") - private String name; -} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/EmptyQueryParam.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/EmptyQueryParam.java deleted file mode 100644 index cf4d969..0000000 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/EmptyQueryParam.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.mt.wms.empty.params; - -import com.mt.wms.core.params.BasePageParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * @author jiff - * @date 2020/12/22 - * @since 1.0 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value = "xx查询参数", description = "用于查询xx信息") -public class EmptyQueryParam extends BasePageParam { - - /** - * xx名称 - */ - @ApiModelProperty(value = "xx名称", required = false, example = "xx管理") - private String name; - -} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/EmptyService.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/EmptyService.java deleted file mode 100644 index bee7c82..0000000 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/EmptyService.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.mt.wms.empty.service; - -import com.mt.wms.core.params.EnabledParam; -import com.mt.wms.core.params.IdListParam; -import com.mt.wms.core.params.IdParam; -import com.mt.wms.core.vo.IdListVo; -import com.mt.wms.core.vo.IdVo; -import com.mt.wms.core.vo.PageVo; -import com.mt.wms.core.vo.R; -import com.mt.wms.empty.params.EmptyParam; -import com.mt.wms.empty.params.EmptyQueryParam; -import com.mt.wms.empty.vo.EmptyVo; - -import java.util.List; - -/** - * xx服务 - * - * @author jiff - * @date 2020/12/22 - * @since 1.0 - */ -public interface EmptyService { - /** - * 获取xx - * - * @param idParam 主键参数 - * @return xx - */ - R get(IdParam idParam); - - /** - * 获取xx列表 - * - * @param emptyQueryParam xx查询参数 - * @return xx列表 - */ - R> list(EmptyQueryParam emptyQueryParam); - - /** - * 获取xx分页列表 - * - * @param emptyQueryParam xx查询参数 - * @return xx分页列表 - */ - R> page(EmptyQueryParam emptyQueryParam); - - /** - * 获取xx树列表 - * - * @param emptyQueryParam xx查询参数 - * @return xx树列表 - */ - R> tree(EmptyQueryParam emptyQueryParam); - - /** - * 新增xx - * - * @param emptyParam xx参数 - * @return 主键 - */ - R add(EmptyParam emptyParam); - - /** - * 更新xx - * - * @param emptyParam xx参数 - * @return 主键 - */ - R update(EmptyParam emptyParam); - - /** - * 启用停用 - * - * @param enabledParam 启停参数 - * @return 主键 - */ - R enabled(EnabledParam enabledParam); - - /** - * 删除xx - * - * @param idParam 主键参数 - * @return 主键 - */ - R delete(IdParam idParam); - - /** - * 批量删除xx - * - * @param idListParam 主键列表参数 - * @return 主键列表 - */ - R delete(IdListParam idListParam); -} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/EmptyServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/EmptyServiceImpl.java deleted file mode 100644 index ceafae4..0000000 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/EmptyServiceImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.mt.wms.empty.service.impl; - -import com.mt.wms.core.base.BaseService; -import com.mt.wms.core.params.EnabledParam; -import com.mt.wms.core.params.IdListParam; -import com.mt.wms.core.params.IdParam; -import com.mt.wms.core.vo.IdListVo; -import com.mt.wms.core.vo.IdVo; -import com.mt.wms.core.vo.PageVo; -import com.mt.wms.core.vo.R; -import com.mt.wms.empty.params.EmptyParam; -import com.mt.wms.empty.params.EmptyQueryParam; -import com.mt.wms.empty.service.EmptyService; -import com.mt.wms.empty.vo.EmptyVo; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * xx服务实现类 - * - * @author jiff - * @date 2020/12/22 - * @since 1.0 - */ -@Service -@Transactional -public class EmptyServiceImpl extends BaseService implements EmptyService { - /** - * 获取xx - * - * @param idParam 主键参数 - * @return xx - */ - @Override - public R get(IdParam idParam) { - return null; - } - - /** - * 获取xx列表 - * - * @param emptyQueryParam xx查询参数 - * @return xx列表 - */ - @Override - public R> list(EmptyQueryParam emptyQueryParam) { - return null; - } - - /** - * 获取xx分页列表 - * - * @param emptyQueryParam xx查询参数 - * @return xx分页列表 - */ - @Override - public R> page(EmptyQueryParam emptyQueryParam) { - return null; - } - - /** - * 获取xx树列表 - * - * @param emptyQueryParam xx查询参数 - * @return xx树列表 - */ - @Override - public R> tree(EmptyQueryParam emptyQueryParam) { - return null; - } - - /** - * 新增xx - * - * @param emptyParam xx参数 - * @return 主键 - */ - @Override - public R add(EmptyParam emptyParam) { - return null; - } - - /** - * 更新xx - * - * @param emptyParam xx参数 - * @return 主键 - */ - @Override - public R update(EmptyParam emptyParam) { - return null; - } - - /** - * 启用停用 - * - * @param enabledParam 启停参数 - * @return 主键 - */ - @Override - public R enabled(EnabledParam enabledParam) { - return null; - } - - /** - * 删除xx - * - * @param idParam 主键参数 - * @return 主键 - */ - @Override - public R delete(IdParam idParam) { - return null; - } - - /** - * 批量删除xx - * - * @param idListParam 主键列表参数 - * @return 主键列表 - */ - @Override - public R delete(IdListParam idListParam) { - return null; - } -}