diff --git a/pom.xml b/pom.xml index 1bd9e4a..c02788d 100644 --- a/pom.xml +++ b/pom.xml @@ -222,7 +222,6 @@ ruoyi-generator ruoyi-common ruoyi-api - ruoyi-plus-api pom diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiCode.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiCode.java index 724ab51..3bd0762 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiCode.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiCode.java @@ -1,29 +1,6 @@ -/** - * Copyright 2019-2029 geekidea(https://github.com/geekidea) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package com.ruoyi.app.common.api; -/** - *

- * REST API 响应码 - *

- * - * @author geekidea - * @since 2018-11-08 - */ + public enum ApiCode { SUCCESS(200, "操作成功"), diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiController.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiController.java index 71a1280..a7f3cbf 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiController.java @@ -1,31 +1,9 @@ -/** - * Copyright 2019-2029 geekidea(https://github.com/geekidea) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package com.ruoyi.app.common.api; import lombok.extern.slf4j.Slf4j; -/** - *

- * ApiResultEST API 公共控制器 - *

- * - * @author geekidea - * @since 2018-11-08 - */ + @Slf4j public class ApiController { diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiResult.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiResult.java index 18f7bfc..600f53a 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiResult.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/api/ApiResult.java @@ -1,19 +1,3 @@ -/** - * Copyright 2019-2029 geekidea(https://github.com/geekidea) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package com.ruoyi.app.common.api; import com.alibaba.fastjson.annotation.JSONField; @@ -29,14 +13,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Map; -/** - *

- * REST API 返回结果 - *

- * - * @author geekidea - * @since 2018-11-08 - */ + @Data @Accessors(chain = true) @Builder diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/api/Assert.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/api/Assert.java index 99e16e2..fda7107 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/api/Assert.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/api/Assert.java @@ -1,19 +1,3 @@ -/** - * Copyright 2019-2029 geekidea(https://github.com/geekidea) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package com.ruoyi.app.common.api; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; @@ -24,15 +8,7 @@ import com.baomidou.mybatisplus.extension.exceptions.ApiException; import java.util.Collection; import java.util.Map; -/** - *

- * REST API 业务断言
- * 参考:org.junit.Assert - *

- * - * @author geekidea - * @since 2018-11-08 - */ + public class Assert { protected Assert() { diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CacheKey.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CacheKey.java index 5a84ce6..e910fbf 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CacheKey.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CacheKey.java @@ -1,5 +1,3 @@ - - package com.ruoyi.app.common.constant; diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CommonConstant.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CommonConstant.java index 3be046e..a950664 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CommonConstant.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CommonConstant.java @@ -1,5 +1,3 @@ - - package com.ruoyi.app.common.constant; diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CommonRedisKey.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CommonRedisKey.java index 872a139..5f42ddf 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CommonRedisKey.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/CommonRedisKey.java @@ -1,5 +1,3 @@ - - package com.ruoyi.app.common.constant; public interface CommonRedisKey { diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/DatePattern.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/DatePattern.java index 5e103a0..adedd4a 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/DatePattern.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/constant/DatePattern.java @@ -1,5 +1,3 @@ - - package com.ruoyi.app.common.constant; diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/entity/BaseEntity.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/entity/BaseEntity.java index 71b8b36..c976c85 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/entity/BaseEntity.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/entity/BaseEntity.java @@ -1,4 +1,3 @@ - package com.ruoyi.app.common.entity; import io.swagger.annotations.ApiModel; diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/service/BaseService.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/service/BaseService.java index 769d458..6d96089 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/service/BaseService.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/service/BaseService.java @@ -1,4 +1,3 @@ - package com.ruoyi.app.common.service; import com.baomidou.mybatisplus.extension.service.IService; diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/common/service/impl/BaseServiceImpl.java b/ruoyi-api/src/main/java/com/ruoyi/app/common/service/impl/BaseServiceImpl.java index 8b07e4d..c32e8e7 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/common/service/impl/BaseServiceImpl.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/common/service/impl/BaseServiceImpl.java @@ -1,19 +1,3 @@ -/** - * Copyright 2019-2029 geekidea(https://github.com/geekidea) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package com.ruoyi.app.common.service.impl; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -28,10 +12,7 @@ import org.apache.commons.collections.CollectionUtils; import java.util.Arrays; import java.util.List; -/** - * @author geekidea - * @date 2018-11-08 - */ + public abstract class BaseServiceImpl, T> extends ServiceImpl implements BaseService { protected Page setPageParam(QueryParam queryParam) { diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/modular/shop/controller/IndexController.java b/ruoyi-api/src/main/java/com/ruoyi/app/modular/shop/controller/IndexController.java index cb13e5f..99c108e 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/modular/shop/controller/IndexController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/modular/shop/controller/IndexController.java @@ -41,7 +41,8 @@ public class IndexController { @GetMapping("/shop/index-list") @ApiOperation(value = "首页信息",notes = "首页信息") public R index(){ - int userId = userOperator.getUser().getId(); + //int userId = userOperator.getUser().getId(); + int userId = 0; List recommedGoods = goodsService.getList(0,1,3,userId,"",1); List newGoods = goodsService.getList(0,1,6,userId,"",2); List newsList = newsService.getList(1,3); diff --git a/ruoyi-api/src/main/java/com/ruoyi/app/modular/shop/controller/MallController.java b/ruoyi-api/src/main/java/com/ruoyi/app/modular/shop/controller/MallController.java index 1f5ca46..ca46143 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/app/modular/shop/controller/MallController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/app/modular/shop/controller/MallController.java @@ -46,7 +46,8 @@ public class MallController { @ApiOperation(value = "商品分类模块列表",notes = "商品分类模块列表") public R lists(@RequestParam(value = "page",defaultValue = "0") int page, @RequestParam(value = "limit",defaultValue = "10") int limit){ - int userId = userOperator.getUser().getId(); + //int userId = userOperator.getUser().getId(); + int userId = 0; List goodsCates = cateService.getList(); List recommedGoods = goodsService.getList(0, page,limit,userId,"",1); diff --git a/ruoyi-api/src/main/resources/application.yml b/ruoyi-api/src/main/resources/application.yml index d682848..bf57912 100644 --- a/ruoyi-api/src/main/resources/application.yml +++ b/ruoyi-api/src/main/resources/application.yml @@ -9,12 +9,12 @@ light-security: - http-method: ANY path: /shop/notify expression: "anon()" -# - http-method: ANY -# path: /shop/index-list -# expression: "anon()" -# - http-method: ANY -# path: /shop/mall-lists -# expression: "anon()" + - http-method: get + path: /shop/index-list + expression: "anon()" + - http-method: get + path: /shop/mall-lists + expression: "anon()" - http-method: get path: /doc.html expression: "anon()" @@ -68,8 +68,9 @@ spring: driver-class-name: com.p6spy.engine.spy.P6SpyDriver #driverClassName: com.mysql.cj.jdbc.Driver username: root - password: root - url: jdbc:p6spy:mysql://localhost:3306/ruoyi?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=UTC + password: supply#@147 + #password: root + url: jdbc:p6spy:mysql://localhost:3306/supply?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=UTC #url: jdbc:mysql://localhost:3306/ruoyi?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=UTC type: com.alibaba.druid.pool.DruidDataSource #这里是配置druid连接池,以下都是druid的配置信息 druid: diff --git a/ruoyi-api/src/test/java/com/ruoyi/plus/test/BaseTest.java b/ruoyi-api/src/test/java/com/ruoyi/plus/test/BaseTest.java index 53e0b56..90787ab 100644 --- a/ruoyi-api/src/test/java/com/ruoyi/plus/test/BaseTest.java +++ b/ruoyi-api/src/test/java/com/ruoyi/plus/test/BaseTest.java @@ -1,12 +1,12 @@ - -package com.ruoyi.plus.test; - -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@SpringBootTest -public class BaseTest { - -} +// +//package com.ruoyi.plus.test; +// +//import org.junit.runner.RunWith; +//import org.springframework.boot.test.context.SpringBootTest; +//import org.springframework.test.context.junit4.SpringRunner; +// +//@RunWith(SpringRunner.class) +//@SpringBootTest +//public class BaseTest { +// +//}