diff --git a/ruoyi-api/src/main/java/com/ruoyi/LightSecurityApplication.java b/ruoyi-api/src/main/java/com/ruoyi/LightSecurityApplication.java index cb7a15c..c7c3f38 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/LightSecurityApplication.java +++ b/ruoyi-api/src/main/java/com/ruoyi/LightSecurityApplication.java @@ -10,7 +10,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; */ @SpringBootApplication //@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) -@MapperScan(basePackages = {"com.ruoyi.app.common.persistence.dao"}) +@MapperScan(basePackages = {"com.ruoyi.app.common.persistence.dao","com.ruoyi.app.modular.*.dao"}) public class LightSecurityApplication { public static void main(String[] args) { SpringApplication.run(LightSecurityApplication.class, args); diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/web/controller/IndexController.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/web/controller/IndexController.java deleted file mode 100644 index db84eb0..0000000 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/web/controller/IndexController.java +++ /dev/null @@ -1,21 +0,0 @@ - - -package com.ruoyi.app.common.web.controller; - -import com.ruoyi.app.common.api.ApiResult; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import springfox.documentation.annotations.ApiIgnore; - -@RestController -@ApiIgnore -@Slf4j -public class IndexController { - - @RequestMapping("/index") - public ApiResult index(){ - log.debug("index..."); - return ApiResult.ok("Welcome to Spring Boot Plus Project..."); - } -} diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/entity/StoreSubstitute.java b/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/entity/StoreSubstitute.java deleted file mode 100644 index 7470cd0..0000000 --- a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/entity/StoreSubstitute.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.ruoyi.app.modular.distribution.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import java.util.Date; -import com.baomidou.mybatisplus.annotation.TableId; -import com.ruoyi.app.common.entity.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -/** - *

- * 代发货表 - *

- * - * @author hupeng - * @since 2019-09-30 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@ApiModel(value="StoreSubstitute对象", description="代发货表") -public class StoreSubstitute extends BaseEntity { - - private static final long serialVersionUID = 1L; - -@TableId(value = "id", type = IdType.AUTO) -private Long id; - -@ApiModelProperty(value = "用户id") -private Integer userId; - -@ApiModelProperty(value = "收货人姓名") -private String username; - -@ApiModelProperty(value = "收货手机号") -private String phone; - -@ApiModelProperty(value = "城市信息") -private String cityInfo; - -@ApiModelProperty(value = "收货详细地址") -private String address; - -@ApiModelProperty(value = "产品明细") -private String productInfo; - -@ApiModelProperty(value = "创建时间") -private Integer createTime; - -private Date updatedAt; - -} diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/mapper/StoreSubstituteMapper.java b/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/mapper/StoreSubstituteMapper.java deleted file mode 100644 index 21340dc..0000000 --- a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/mapper/StoreSubstituteMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.ruoyi.app.modular.distribution.mapper; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.app.modular.distribution.entity.StoreSubstitute; -import com.ruoyi.app.distribution.web.param.StoreSubstituteQueryParam; -import com.ruoyi.app.distribution.web.vo.StoreSubstituteQueryVo; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.io.Serializable; - -/** - *

- * 代发货表 Mapper 接口 - *

- * - * @author hupeng - * @since 2019-09-30 - */ -@Repository -public interface StoreSubstituteMapper extends BaseMapper { - - /** - * 根据ID获取查询对象 - * @param id - * @return - */ - StoreSubstituteQueryVo getStoreSubstituteById(Serializable id); - - /** - * 获取分页对象 - * @param page - * @param storeSubstituteQueryParam - * @return - */ - IPage getStoreSubstitutePageList(@Param("page") Page page, @Param("param") StoreSubstituteQueryParam storeSubstituteQueryParam); - -} diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/service/StoreSubstituteService.java b/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/service/StoreSubstituteService.java deleted file mode 100644 index ad6ca4d..0000000 --- a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/service/StoreSubstituteService.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.ruoyi.app.modular.distribution.service; - -import com.ruoyi.app.modular.distribution.entity.StoreSubstitute; -import com.ruoyi.app.common.service.BaseService; -import com.ruoyi.app.distribution.web.param.StoreSubstituteQueryParam; -import com.ruoyi.app.distribution.web.vo.StoreSubstituteQueryVo; -import com.ruoyi.app.common.web.vo.Paging; - -import java.io.Serializable; - -/** - *

- * 代发货表 服务类 - *

- * - * @author hupeng - * @since 2019-09-30 - */ -public interface StoreSubstituteService extends BaseService { - - /** - * 根据ID获取查询对象 - * @param id - * @return - */ - StoreSubstituteQueryVo getStoreSubstituteById(Serializable id) throws Exception; - - /** - * 获取分页对象 - * @param storeSubstituteQueryParam - * @return - */ - Paging getStoreSubstitutePageList(StoreSubstituteQueryParam storeSubstituteQueryParam) throws Exception; - -} diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/service/impl/StoreSubstituteServiceImpl.java b/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/service/impl/StoreSubstituteServiceImpl.java deleted file mode 100644 index daa663a..0000000 --- a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/service/impl/StoreSubstituteServiceImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.ruoyi.app.modular.distribution.service.impl; - -import com.ruoyi.app.modular.distribution.entity.StoreSubstitute; -import com.ruoyi.app.modular.distribution.mapper.StoreSubstituteMapper; -import com.ruoyi.app.modular.distribution.service.StoreSubstituteService; -import com.ruoyi.app.distribution.web.param.StoreSubstituteQueryParam; -import com.ruoyi.app.distribution.web.vo.StoreSubstituteQueryVo; -import com.ruoyi.app.common.service.impl.BaseServiceImpl; -import com.ruoyi.app.common.web.vo.Paging; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.beans.factory.annotation.Autowired; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.metadata.OrderItem; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import java.io.Serializable; - - -/** - *

- * 代发货表 服务实现类 - *

- * - * @author hupeng - * @since 2019-09-30 - */ -@Slf4j -@Service -@Transactional(rollbackFor = Exception.class) -public class StoreSubstituteServiceImpl extends BaseServiceImpl implements StoreSubstituteService { - - @Autowired - private StoreSubstituteMapper storeSubstituteMapper; - - @Override - public StoreSubstituteQueryVo getStoreSubstituteById(Serializable id) throws Exception{ - return storeSubstituteMapper.getStoreSubstituteById(id); - } - - @Override - public Paging getStoreSubstitutePageList(StoreSubstituteQueryParam storeSubstituteQueryParam) throws Exception{ - Page page = setPageParam(storeSubstituteQueryParam,OrderItem.desc("create_time")); - IPage iPage = storeSubstituteMapper.getStoreSubstitutePageList(page,storeSubstituteQueryParam); - return new Paging(iPage); - } - -} diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/web/controller/StoreSubstituteController.java b/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/web/controller/StoreSubstituteController.java deleted file mode 100644 index 34cee0c..0000000 --- a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/web/controller/StoreSubstituteController.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.ruoyi.app.modular.distribution.web.controller; - -import com.ruoyi.app.modular.distribution.entity.StoreSubstitute; -import com.ruoyi.app.modular.distribution.service.StoreSubstituteService; -import com.ruoyi.app.distribution.web.param.StoreSubstituteQueryParam; -import com.ruoyi.app.distribution.web.vo.StoreSubstituteQueryVo; -import com.ruoyi.app.common.web.controller.BaseController; -import com.ruoyi.app.common.api.ApiResult; -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.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.Valid; - -import com.ruoyi.app.common.web.vo.Paging; -import com.ruoyi.app.common.web.param.IdParam; - -/** - *

- * 代发货表 前端控制器 - *

- * - * @author hupeng - * @since 2019-09-30 - */ -@Slf4j -@RestController -@RequestMapping("/storeSubstitute") -@Api("代发货表 API") -public class StoreSubstituteController extends BaseController { - - @Autowired - private StoreSubstituteService storeSubstituteService; - - /** - * 添加代发货表 - */ - @PostMapping("/add") - @ApiOperation(value = "添加StoreSubstitute对象",notes = "添加代发货表",response = ApiResult.class) - public ApiResult addStoreSubstitute(@Valid @RequestBody StoreSubstitute storeSubstitute) throws Exception{ - boolean flag = storeSubstituteService.save(storeSubstitute); - return ApiResult.result(flag); - } - - /** - * 修改代发货表 - */ - @PostMapping("/update") - @ApiOperation(value = "修改StoreSubstitute对象",notes = "修改代发货表",response = ApiResult.class) - public ApiResult updateStoreSubstitute(@Valid @RequestBody StoreSubstitute storeSubstitute) throws Exception{ - boolean flag = storeSubstituteService.updateById(storeSubstitute); - return ApiResult.result(flag); - } - - /** - * 删除代发货表 - */ - @PostMapping("/delete") - @ApiOperation(value = "删除StoreSubstitute对象",notes = "删除代发货表",response = ApiResult.class) - public ApiResult deleteStoreSubstitute(@Valid @RequestBody IdParam idParam) throws Exception{ - boolean flag = storeSubstituteService.removeById(idParam.getId()); - return ApiResult.result(flag); - } - - /** - * 获取代发货表 - */ - @PostMapping("/info") - @ApiOperation(value = "获取StoreSubstitute对象详情",notes = "查看代发货表",response = StoreSubstituteQueryVo.class) - public ApiResult getStoreSubstitute(@Valid @RequestBody IdParam idParam) throws Exception{ - StoreSubstituteQueryVo storeSubstituteQueryVo = storeSubstituteService.getStoreSubstituteById(idParam.getId()); - return ApiResult.ok(storeSubstituteQueryVo); - } - - /** - * 代发货表分页列表 - */ - @PostMapping("/getPageList") - @ApiOperation(value = "获取StoreSubstitute分页列表",notes = "代发货表分页列表",response = StoreSubstituteQueryVo.class) - public ApiResult> getStoreSubstitutePageList(@Valid @RequestBody(required = false) StoreSubstituteQueryParam storeSubstituteQueryParam) throws Exception{ - Paging paging = storeSubstituteService.getStoreSubstitutePageList(storeSubstituteQueryParam); - return ApiResult.ok(paging); - } - -} - diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/web/param/StoreSubstituteQueryParam.java b/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/web/param/StoreSubstituteQueryParam.java deleted file mode 100644 index fcd69a9..0000000 --- a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/web/param/StoreSubstituteQueryParam.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.ruoyi.app.distribution.web.param; - -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import com.ruoyi.app.common.web.param.QueryParam; - -/** - *

- * 代发货表 查询参数对象 - *

- * - * @author hupeng - * @date 2019-09-30 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@ApiModel(value="StoreSubstituteQueryParam对象", description="代发货表查询参数") -public class StoreSubstituteQueryParam extends QueryParam { - private static final long serialVersionUID = 1L; -} diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/web/vo/StoreSubstituteQueryVo.java b/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/web/vo/StoreSubstituteQueryVo.java deleted file mode 100644 index 4050fb5..0000000 --- a/ruoyi-api/src/main/java/com/ruoyi/app/modular/distribution/web/vo/StoreSubstituteQueryVo.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.ruoyi.app.distribution.web.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.io.Serializable; - -import java.util.Date; - -/** - *

- * 代发货表 查询结果对象 - *

- * - * @author hupeng - * @date 2019-09-30 - */ -@Data -@ApiModel(value="StoreSubstituteQueryVo对象", description="代发货表查询参数") -public class StoreSubstituteQueryVo implements Serializable{ - private static final long serialVersionUID = 1L; - -private Long id; - -@ApiModelProperty(value = "用户id") -private Integer userId; - -@ApiModelProperty(value = "收货人姓名") -private String username; - -@ApiModelProperty(value = "收货手机号") -private String phone; - -@ApiModelProperty(value = "城市信息") -private String cityInfo; - -@ApiModelProperty(value = "收货详细地址") -private String address; - -@ApiModelProperty(value = "产品明细") -private String productInfo; - -@ApiModelProperty(value = "创建时间") -private Integer createTime; - -private Date updatedAt; - -} \ No newline at end of file diff --git a/ruoyi-api/src/main/resources/application.yml b/ruoyi-api/src/main/resources/application.yml index 743a360..d682848 100644 --- a/ruoyi-api/src/main/resources/application.yml +++ b/ruoyi-api/src/main/resources/application.yml @@ -43,7 +43,7 @@ light-security: mybatis-plus: - mapper-locations: classpath*:com/ruoyi/app/common/persistence/dao/mapping/*.xml + mapper-locations: classpath*:com/ruoyi/app/common/persistence/dao/mapping/*.xml,classpath*:mapper/**/*Mapper.xml typeAliasesPackage: com.ruoyi.app.common.persistence.model global-config: banner: false diff --git a/ruoyi-api/src/main/resources/mapper/distribution/StoreSubstituteMapper.xml b/ruoyi-api/src/main/resources/mapper/distribution/StoreSubstituteMapper.xml deleted file mode 100644 index d5ab6b3..0000000 --- a/ruoyi-api/src/main/resources/mapper/distribution/StoreSubstituteMapper.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - id, user_id, username, phone, city_info, address, product_info, create_time, updated_at - - - - - - - diff --git a/ruoyi-api/src/main/resources/mapper/modular.distribution/StoreSubstituteMapper.xml b/ruoyi-api/src/main/resources/mapper/modular.distribution/StoreSubstituteMapper.xml deleted file mode 100644 index 70c93ac..0000000 --- a/ruoyi-api/src/main/resources/mapper/modular.distribution/StoreSubstituteMapper.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - id, user_id, username, phone, city_info, address, product_info, create_time, updated_at - - - - - - - diff --git a/ruoyi-api/src/test/java/com/ruoyi/plus/test/CodeGenerator.java b/ruoyi-api/src/test/java/com/ruoyi/plus/test/CodeGenerator.java index a7edfcf..866ebe5 100644 --- a/ruoyi-api/src/test/java/com/ruoyi/plus/test/CodeGenerator.java +++ b/ruoyi-api/src/test/java/com/ruoyi/plus/test/CodeGenerator.java @@ -43,7 +43,7 @@ public class CodeGenerator { // 作者 private static final String AUTHOR = "hupeng"; // 生成的表名称 - private static final String TABLE_NAME = "store_substitute"; + private static final String TABLE_NAME = "store_goods_consult"; // 主键数据库列名称 private static final String PK_ID_COLUMN_NAME = "id"; // 代码生成策略 true:All/false:SIMPLE @@ -62,7 +62,7 @@ public class CodeGenerator { String projectPath = System.getProperty("user.dir"); gc.setOutputDir(projectPath + "/ruoyi-api/src/main/java"); gc.setAuthor(AUTHOR); - gc.setOpen(true); // 是否打开输出目录 + gc.setOpen(false); // 是否打开输出目录 gc.setSwagger2(true); // 启用swagger注解 gc.setIdType(IdType.ID_WORKER); // 主键类型:ID_WORKER gc.setServiceName("%sService"); // 自定义文件命名,注意 %s 会自动填充表实体属性! @@ -85,6 +85,7 @@ public class CodeGenerator { pc.setModuleName(MODULE_NAME); pc.setParent("com.ruoyi.app.modular"); pc.setController("web.controller"); + pc.setMapper("dao"); mpg.setPackageInfo(pc);