+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ //监听行工具事件
+ //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
+ //obj.data //获得当前行数据
+ //var layEvent = obj.event; //获得 lay-event 对应的值
+ table.on('tool(test)', function (obj) {
+ var event = obj.event;
+ var data = obj.data;
+ if (event === 'edit') { //执行编辑
+ layer.open({
+ type: 2,
+ title: '编辑管理员',
+ area: ['400px', '500px'],
+ content: '/admin/editAdmin/' + data.id
+ });
+ } else if (event === 'del') {//执行删除
+ var adminId = $("#adminId").val();
+ if (data.roleName == "超级管理员") {
+ layer.msg('超级管理员不能删除');
+ return;
+ }
+ if (data.id == adminId) {
+ layer.msg('不能删除自己');
+ return;
+ }
+ layer.confirm('确认删除', function (index) {
+ $.ajax({
+ url: '/admin/deleteAdmin/' + data.id,
+ type: 'delete',
+ dataType: 'json',
+ success: function (result) {
+ if (result.code == 200) {
+ layer.msg("删除成功", {icon: 1});
+ location.reload();
+ } else {
+ layer.msg("删除失败", {icon: 5});
+ }
+ }
+ })
+ layer.close(index);
+ })
+ }
+ })
+
+
+ });
+
+
+
+
+
\ No newline at end of file
diff --git a/pccenter/src/main/resources/templates/sys/complainList.html b/pccenter/src/main/resources/templates/sys/complainList.html
new file mode 100644
index 0000000000000000000000000000000000000000..24714708abb6b8a6587ad05ce769ca774cf9ebbe
--- /dev/null
+++ b/pccenter/src/main/resources/templates/sys/complainList.html
@@ -0,0 +1,161 @@
+
+
+
+
+
物业投诉列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pccenter/src/main/resources/templates/sys/dynamic_commentList.html b/pccenter/src/main/resources/templates/sys/dynamic_commentList.html
new file mode 100644
index 0000000000000000000000000000000000000000..9ad824aa01a414be6af08033462328498e0c6b73
--- /dev/null
+++ b/pccenter/src/main/resources/templates/sys/dynamic_commentList.html
@@ -0,0 +1,163 @@
+
+
+
+
+
活动评论列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pccenter/src/main/resources/templates/sys/editMenu.html b/pccenter/src/main/resources/templates/sys/editMenu.html
new file mode 100644
index 0000000000000000000000000000000000000000..47fc05fafebf118c4792d78d49431073e1a14ac7
--- /dev/null
+++ b/pccenter/src/main/resources/templates/sys/editMenu.html
@@ -0,0 +1,99 @@
+
+
+
+
+
编辑菜单
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pccenter/src/main/resources/templates/sys/editRole.html b/pccenter/src/main/resources/templates/sys/editRole.html
index 570fcac7668793ab364b251f3402b8fdf5e84cab..8a5799424cf1e1fe55a08bddc0d7e45f9bce5d58 100644
--- a/pccenter/src/main/resources/templates/sys/editRole.html
+++ b/pccenter/src/main/resources/templates/sys/editRole.html
@@ -33,7 +33,6 @@
diff --git a/pccenter/src/main/resources/templates/sys/index.html b/pccenter/src/main/resources/templates/sys/index.html
index 47fcf32ef3ded84627953cd3b611c2aa3c531366..7aaa30a4c5b94f8970df4f29ff54e063cb86d894 100644
--- a/pccenter/src/main/resources/templates/sys/index.html
+++ b/pccenter/src/main/resources/templates/sys/index.html
@@ -1,5 +1,5 @@
-
+
后台首页
@@ -24,19 +24,19 @@
修改密码
- 退出
+ 退出
-
+
- 个人资料
- 修改密码
- - 退出
+ - 退出
diff --git a/pccenter/src/main/resources/templates/sys/menuList.html b/pccenter/src/main/resources/templates/sys/menuList.html
index 95a1b818453a0d483e05df92c3034ae4edc2cd5f..a239710039d746ea6999d204116030bbc467f2aa 100644
--- a/pccenter/src/main/resources/templates/sys/menuList.html
+++ b/pccenter/src/main/resources/templates/sys/menuList.html
@@ -1,5 +1,5 @@
-
+
菜单列表
@@ -8,9 +8,12 @@
-
-
-
+
+
+
+
+
+
@@ -58,9 +61,6 @@
{title:'排序',field:'sorting',event:'sorting',style:'cursor:pointer'}
]
]
- })
- $("#editMenu").click(function () {
-
})
//添加菜单
$("#addMenu").click(function () {
@@ -82,10 +82,34 @@
layer.open({
type:2,
title:'添加菜单',
- area:['500px','600px'],
+ area:['400px','400px'],
content:'/menus/addMenu/'+parentId
})
})
+ //编辑菜单
+ $("#editMenu").click(function () {
+ var checkStatus = treeGrid.checkStatus('treeTable');
+ var data = checkStatus.data;//获取选中行的数据
+ if(data.length>1){
+ layer.msg('只能选择一条数据',{icon:5});
+ return ;
+ }
+ var menuId;
+
+ if(data != ''){
+ //获取当前行的节点菜单的Id
+ menuId = data[0].menuId;
+ }
+ //如果没有勾选复选框,默认id的值为0;即是根节点。
+ //parentId = parentId==undefined?0:parentId;
+
+ layer.open({
+ type:2,
+ title:'编辑菜单',
+ area:['400px','400px'],
+ content:'/menus/editMenu/'+menuId
+ })
+ })
//排序:监听行工具事件 tool()
treeGrid.on("tool(treeTable)",function (row) {
if(row.event === 'sorting'){
@@ -118,7 +142,7 @@
})
}
})
-
+
//删除菜单
$("#delMenu").click(function () {
var checkStatus = treeGrid.checkStatus('treeTable');
diff --git a/pccenter/src/main/resources/templates/sys/merchantList.html b/pccenter/src/main/resources/templates/sys/merchantList.html
new file mode 100644
index 0000000000000000000000000000000000000000..54fb4f82022acbdf74fcb993d39de35d7384e841
--- /dev/null
+++ b/pccenter/src/main/resources/templates/sys/merchantList.html
@@ -0,0 +1,187 @@
+
+
+
+
+
商家注册列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pccenter/src/main/resources/templates/sys/pmList.html b/pccenter/src/main/resources/templates/sys/pmList.html
new file mode 100644
index 0000000000000000000000000000000000000000..4af99772c727f0730465a47bce1beb0164e6c9fb
--- /dev/null
+++ b/pccenter/src/main/resources/templates/sys/pmList.html
@@ -0,0 +1,188 @@
+
+
+
+
+
物业审核
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pccenter/src/main/resources/templates/sys/reply.html b/pccenter/src/main/resources/templates/sys/reply.html
new file mode 100644
index 0000000000000000000000000000000000000000..cd2cb47caef10ea776bd5129dba42b2284a7dda4
--- /dev/null
+++ b/pccenter/src/main/resources/templates/sys/reply.html
@@ -0,0 +1,56 @@
+
+
+
+
+
Title
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pccenter/src/main/resources/templates/sys/roleList.html b/pccenter/src/main/resources/templates/sys/roleList.html
index 895701e40e68564dfb9578e93815c28652c0f21d..a2d3567ebd6d0895990af67116e6cdccc63fea57 100644
--- a/pccenter/src/main/resources/templates/sys/roleList.html
+++ b/pccenter/src/main/resources/templates/sys/roleList.html
@@ -1,5 +1,5 @@
-
+
角色列表
@@ -7,19 +7,29 @@
-
+
+
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/personcentor/pom.xml b/personcentor/pom.xml
index ec5773ba862efc94e0ef74bc825fad025554d711..93355173e8a1c756fc1ae368d6eeac5c76cf62bb 100644
--- a/personcentor/pom.xml
+++ b/personcentor/pom.xml
@@ -29,6 +29,7 @@
java-jwt
2.2.0
+
com.google.code.gson
gson
@@ -139,6 +140,36 @@
biz.aQute.bndlib
3.2.0
+
+ io.springfox
+ springfox-swagger2
+ 2.9.2
+
+
+ io.swagger
+ swagger-annotations
+
+
+ io.swagger
+ swagger-models
+
+
+
+
+ io.springfox
+ springfox-swagger-ui
+ 2.9.2
+
+
+ io.swagger
+ swagger-annotations
+ 1.5.21
+
+
+ io.swagger
+ swagger-models
+ 1.5.21
+
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/config/Swagger2Config.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/config/Swagger2Config.java
new file mode 100644
index 0000000000000000000000000000000000000000..473e92b0245455ec1261ab6156cb73e01804a266
--- /dev/null
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/config/Swagger2Config.java
@@ -0,0 +1,18 @@
+package com.team7.happycommunity.personcentor.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+@Configuration
+//@EnableSwagger2//启动
+public class Swagger2Config {
+
+ @Bean
+ public Docket decket(){
+ return new Docket(DocumentationType.SWAGGER_2);
+ }
+
+}
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/AreainfoController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/AreainfoController.java
deleted file mode 100644
index 87cfaf9239864487a6fc5b7f7ee319a714d9d0bc..0000000000000000000000000000000000000000
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/AreainfoController.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.team7.happycommunity.personcentor.controller;
-
-import com.team7.happycommunity.personcentor.entity.Areainfo;
-import com.team7.happycommunity.personcentor.service.AreainfoService;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-
-/**
- * 小区信息表(Areainfo)表控制层
- *
- * @author makejava
- * @since 2020-03-23 14:46:47
- */
-@RestController
-@RequestMapping("areainfo")
-public class AreainfoController {
- /**
- * 服务对象
- */
- @Resource
- private AreainfoService areainfoService;
-
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("selectOne")
- public Areainfo selectOne(Integer id) {
- return this.areainfoService.queryById(id);
- }
-
-}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/BusinessImageController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/BusinessImageController.java
deleted file mode 100644
index 01b46687c4d9fb6db7d05d6908833192876b53d8..0000000000000000000000000000000000000000
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/BusinessImageController.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.team7.happycommunity.personcentor.controller;
-
-import com.team7.happycommunity.personcentor.entity.BusinessImage;
-import com.team7.happycommunity.personcentor.service.BusinessImageService;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-
-/**
- * (BusinessImage)表控制层
- *
- * @author makejava
- * @since 2020-03-22 21:19:30
- */
-@RestController
-@RequestMapping("businessImage")
-public class BusinessImageController {
- /**
- * 服务对象
- */
- @Resource
- private BusinessImageService businessImageService;
-
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("selectOne")
- public BusinessImage selectOne(Integer id) {
- return this.businessImageService.queryById(id);
- }
-
-}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/BusinessInfoController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/BusinessInfoController.java
deleted file mode 100644
index dcffd6b892e052e7cb5a34ffb3ef509848e48d36..0000000000000000000000000000000000000000
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/BusinessInfoController.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.team7.happycommunity.personcentor.controller;
-
-import com.team7.happycommunity.personcentor.entity.BusinessInfo;
-import com.team7.happycommunity.personcentor.service.BusinessInfoService;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-
-/**
- * (BusinessInfo)表控制层
- *
- * @author makejava
- * @since 2020-03-22 21:19:30
- */
-@RestController
-@RequestMapping("businessInfo")
-public class BusinessInfoController {
- /**
- * 服务对象
- */
- @Resource
- private BusinessInfoService businessInfoService;
-
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("selectOne")
- public BusinessInfo selectOne(Integer id) {
- return this.businessInfoService.queryById(id);
- }
-
-}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityActivityComplaintController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityActivityComplaintController.java
deleted file mode 100644
index 0681a593e83b08f4e823f470996fa8dbfc1818cc..0000000000000000000000000000000000000000
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityActivityComplaintController.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.team7.happycommunity.personcentor.controller;
-
-import com.team7.happycommunity.personcentor.entity.CommunityActivityComplaint;
-import com.team7.happycommunity.personcentor.service.CommunityActivityComplaintService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-/**
- * (CommunityActivityComplaint)表控制层
- *
- * @author makejava
- * @since 2020-03-25 11:18:29
- */
-@RestController
-@RequestMapping("communityActivityComplaint")
-public class CommunityActivityComplaintController {
- /**
- * 服务对象
- */
- @Resource
- private CommunityActivityComplaintService communityActivityComplaintService;
-
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("selectOne")
- public CommunityActivityComplaint selectOne(Integer id) {
- return this.communityActivityComplaintService.queryById(id);
- }
-
-}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityActivityController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityActivityController.java
deleted file mode 100644
index e9052a6f8ec38c9cb9ee6f3cfed21426eb7c3053..0000000000000000000000000000000000000000
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityActivityController.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.team7.happycommunity.personcentor.controller;
-
-import com.team7.happycommunity.personcentor.entity.CommunityActivity;
-import com.team7.happycommunity.personcentor.service.CommunityActivityService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-/**
- * (CommunityActivity)表控制层
- *
- * @author makejava
- * @since 2020-03-25 11:18:29
- */
-@RestController
-@RequestMapping("communityActivity")
-public class CommunityActivityController {
- /**
- * 服务对象
- */
- @Resource
- private CommunityActivityService communityActivityService;
-
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("selectOne")
- public CommunityActivity selectOne(Integer id) {
- return this.communityActivityService.queryById(id);
- }
-
-}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityActivityUserController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityActivityUserController.java
deleted file mode 100644
index a0bf18c467c982d77c62945e424209aa2067d0e2..0000000000000000000000000000000000000000
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityActivityUserController.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.team7.happycommunity.personcentor.controller;
-
-import com.team7.happycommunity.personcentor.entity.CommunityActivityUser;
-import com.team7.happycommunity.personcentor.service.CommunityActivityUserService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-/**
- * (CommunityActivityUser)表控制层
- *
- * @author makejava
- * @since 2020-03-25 11:18:29
- */
-@RestController
-@RequestMapping("communityActivityUser")
-public class CommunityActivityUserController {
- /**
- * 服务对象
- */
- @Resource
- private CommunityActivityUserService communityActivityUserService;
-
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("selectOne")
- public CommunityActivityUser selectOne(Integer id) {
- return this.communityActivityUserService.queryById(id);
- }
-
-}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityChatController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityChatController.java
deleted file mode 100644
index 429f030d5cdc13ee4077d7d7d95c91d731210519..0000000000000000000000000000000000000000
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityChatController.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.team7.happycommunity.personcentor.controller;
-import com.team7.happycommunity.personcentor.entity.CommunityChat;
-import com.team7.happycommunity.personcentor.service.CommunityChatService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-/**
- * (CommunityChat)表控制层
- *
- * @author makejava
- * @since 2020-03-24 16:58:04
- */
-@RestController
-@RequestMapping("communityChat")
-public class CommunityChatController {
- /**
- * 服务对象
- */
- @Resource
- private CommunityChatService communityChatService;
-
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("selectOne")
- public CommunityChat selectOne(Integer id) {
- return this.communityChatService.queryById(id);
- }
-
-}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityDynamicCommentController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityDynamicCommentController.java
deleted file mode 100644
index 954faa837087041ddca002578fea960a0704e704..0000000000000000000000000000000000000000
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityDynamicCommentController.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.team7.happycommunity.personcentor.controller;
-
-import com.team7.happycommunity.personcentor.entity.CommunityDynamicComment;
-import com.team7.happycommunity.personcentor.service.CommunityDynamicCommentService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-/**
- * (CommunityDynamicComment)表控制层
- *
- * @author makejava
- * @since 2020-03-24 17:26:32
- */
-@RestController
-@RequestMapping("communityDynamicComment")
-public class CommunityDynamicCommentController {
- /**
- * 服务对象
- */
- @Resource
- private CommunityDynamicCommentService communityDynamicCommentService;
-
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("selectOne")
- public CommunityDynamicComment selectOne(Integer id) {
- return this.communityDynamicCommentService.queryById(id);
- }
-
-}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityDynamicController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityDynamicController.java
index 6bfc5a07832954689a79f25674fd6c787a680150..f6f09fe89175b4d9e3f2ffc3217d087cf49b424e 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityDynamicController.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/CommunityDynamicController.java
@@ -1,12 +1,19 @@
package com.team7.happycommunity.personcentor.controller;
+import com.team7.happycommunity.personcentor.common.CommonResult;
import com.team7.happycommunity.personcentor.entity.CommunityDynamic;
+import com.team7.happycommunity.personcentor.entity.CommunityDynamicComment;
+import com.team7.happycommunity.personcentor.entity.DynamicCommit;
+import com.team7.happycommunity.personcentor.service.CommunityDynamicCommentService;
import com.team7.happycommunity.personcentor.service.CommunityDynamicService;
+import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
/**
* (CommunityDynamic)表控制层
@@ -16,12 +23,15 @@ import javax.annotation.Resource;
*/
@RestController
@RequestMapping("communityDynamic")
+@Api(tags="社区动态接口")
public class CommunityDynamicController {
/**
* 服务对象
*/
@Resource
private CommunityDynamicService communityDynamicService;
+ @Resource
+ private CommunityDynamicCommentService communityDynamicCommentService;
/**
* 通过主键查询单条数据
@@ -34,4 +44,76 @@ public class CommunityDynamicController {
return this.communityDynamicService.queryById(id);
}
+ /**
+ * 查询当前动态的所有评论
+ * @param dynamicId 动态id
+ * @return 评论内容
+ */
+ @GetMapping("queryCommit")
+ @ApiOperation(value = "查询当前动态的所有评论")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "dynamicId",value = "动态id",required = true)
+ })
+ public List queryCommit(Integer dynamicId){
+ return communityDynamicService.queryCommit(dynamicId);
+ }
+
+ /**
+ * 添加评论
+ * @param dynamicId 动态id
+ * @param userId 评论用户的id
+ * @param cdcContent 评论内容
+ * @return
+ */
+ @GetMapping("addCommit")
+ @ApiOperation(value = "添加评论")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "dynamicId",value = "动态id",required = true),
+ @ApiImplicitParam(name = "userId",value = "评论用户的id",required = true),
+ @ApiImplicitParam(name = "userId",value = "评论内容",required = true)
+ })
+
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "评论成功"),
+ @ApiResponse(code = 500,message = "评论失败")
+ })
+ public CommonResult addCommit(Integer dynamicId,Integer userId,String cdcContent){
+ try {
+ CommunityDynamicComment comment=new CommunityDynamicComment();
+ comment.setCdcContent(cdcContent);
+ comment.setCdcDynamicId(dynamicId);
+ comment.setCdcUserId(userId);
+ comment.setCdcTime(new Date());
+ communityDynamicCommentService.insert(comment);
+ return CommonResult.success();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return CommonResult.failed();
+ }
+ }
+
+ /**
+ * 删除评论
+ * @param id 评论的id
+ * @return
+ */
+ @GetMapping("deleteCommit")
+ @ApiOperation(value = "删除评论")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id",value = "评论id",required = true)
+ })
+
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "删除成功"),
+ @ApiResponse(code = 500,message = "删除失败")
+ })
+ public CommonResult deleteCommit(Integer id){
+ try {
+ communityDynamicCommentService.deleteById(id);
+ return CommonResult.success();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return CommonResult.failed();
+ }
+ }
}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/PersonCollectUserController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/PersonCollectUserController.java
index 0bb033c0a0ce53a3d06d213203df6d0ce00cc9c5..21c02750b4a0290725ef26cc277255a40d7c6003 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/PersonCollectUserController.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/PersonCollectUserController.java
@@ -2,6 +2,7 @@ package com.team7.happycommunity.personcentor.controller;
import com.team7.happycommunity.personcentor.entity.PersonCollectUser;
import com.team7.happycommunity.personcentor.service.PersonCollectUserService;
+import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -14,6 +15,7 @@ import javax.annotation.Resource;
*/
@RestController
@RequestMapping("personCollectUser")
+
public class PersonCollectUserController {
/**
* 服务对象
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/PersonUserController.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/PersonUserController.java
index 8e5e50ae60abb5755a630a512934df2cb40ff0e2..1f0f57f715daa0fb7418f625352365db3a9b027f 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/PersonUserController.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/controller/PersonUserController.java
@@ -11,6 +11,7 @@ import com.team7.happycommunity.personcentor.exception.MailboxStatusException;
import com.team7.happycommunity.personcentor.service.PersonUserService;
import com.team7.happycommunity.personcentor.util.CookieUtils;
import com.team7.happycommunity.personcentor.util.QiniuUploadUtil;
+import io.swagger.annotations.*;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
@@ -35,6 +36,7 @@ import java.util.concurrent.locks.ReentrantLock;
*/
@RestController
@RequestMapping("personUser")
+@Api(tags="用户接口")
public class PersonUserController {
/**
* 服务对象
@@ -72,6 +74,16 @@ public class PersonUserController {
*/
@RequestMapping("/subLogin")
@ResponseBody
+ @ApiOperation(value = "登录")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "text",value = "登录的手机号或者邮箱",required = true),
+ @ApiImplicitParam(name = "password",value = "密码",required = true)
+ })
+
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "登录成功"),
+ @ApiResponse(code = 500,message = "登录失败")
+ })
public CommonResult login(String text, String password) throws Exception {
PersonUser user =null;
if(text==null||password==null){
@@ -90,12 +102,17 @@ public class PersonUserController {
}
/**
- * 邮箱注册
+ * 发送邮件
* @param user
* @return
*/
@PostMapping("/mailboxRegister")
@ResponseBody
+ @ApiOperation(value = "发送邮件")
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "邮件发送成功"),
+ @ApiResponse(code = 500,message = "邮件发送失败")
+ })
public CommonResult mailboxRegister(PersonUser user){
//1.搜索邮箱,邮箱不存在或邮箱状态不为0
boolean flag=personUserService.queryMailbox(user.getMailbox());
@@ -114,13 +131,23 @@ public class PersonUserController {
}
/**
- * 手机号码注册,密码重置
+ * 发送验证码
* @param phone 手机号码
* @param resetCode 密码重置参数,1密码重置,0注册
* @return
*/
@PostMapping("/phoneRegister")
@ResponseBody
+ @ApiOperation(value = "发送验证码")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "phone",value = "手机号码",required = true),
+ @ApiImplicitParam(name = "resetCode",value = "密码重置参数,1密码重置,0注册",required = true)
+ })
+
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "验证码发送成功"),
+ @ApiResponse(code = 500,message = "验证码发送失败")
+ })
public CommonResult phoneRegister(String phone,String resetCode){
try {
@@ -140,6 +167,16 @@ public class PersonUserController {
*/
@PostMapping("/codeCheck")
@ResponseBody
+ @ApiOperation(value = "验证码校正")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "phone",value = "手机号码",required = true),
+ @ApiImplicitParam(name = "code",value = "验证码",required = true)
+ })
+
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "校正成功"),
+ @ApiResponse(code = 500,message = "校正失败")
+ })
public CommonResult codeCheck(String phone,String code){
try {
personUserService.codeCheck(code,phone);
@@ -157,6 +194,11 @@ public class PersonUserController {
*/
@PostMapping("/addInfo")
@ResponseBody
+ @ApiOperation(value = "添加个人信息")
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "添加成功"),
+ @ApiResponse(code = 500,message = "添加失败")
+ })
public CommonResult addInfo(PersonUser user){
if(user.getPassword()==null){
return CommonResult.failed("注册失败,密码不能为空");
@@ -166,7 +208,7 @@ public class PersonUserController {
return CommonResult.success();
} catch (Exception e) {
e.printStackTrace();
- return CommonResult.failed("注册失败,请联系管理员");
+ return CommonResult.failed(e.getMessage());
}
}
/**
@@ -176,19 +218,30 @@ public class PersonUserController {
*/
@GetMapping("/activate")
@ResponseBody
- public ModelAndView activate(String code){
+ @ApiOperation(value = "修改邮箱状态")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "code",value = "邮箱的令牌")
+ })
+
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "激活成功"),
+ @ApiResponse(code = 500,message = "激活失败")
+ })
+ public CommonResult activate(String code){
//激活邮箱
ModelAndView mv=new ModelAndView();
try {
personUserService.updateMailboxStatus(code);
mv.setViewName("mailboxRegisterMessage");
- return mv;
+ return CommonResult.success("激活成功");
}catch (MailboxStatusException e){
e.printStackTrace();
+ return CommonResult.failed(e.getMessage());
}catch (Exception e) {
e.printStackTrace();
+ return CommonResult.failed(e.getMessage());
}
- return null;
+
}
/**
@@ -198,6 +251,15 @@ public class PersonUserController {
* @return
*/
@PostMapping("/resetPassword")
+ @ApiOperation(value = "密码修改")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "cellPhNumber",value = "手机号"),
+ @ApiImplicitParam(name = "password",value = "新密码")
+ })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "修改成功"),
+ @ApiResponse(code = 500,message = "修改失败")
+ })
public CommonResult resetPasswordByPhone(String cellPhNumber,String password){
if (password==null){
return CommonResult.failed("密码不能为空");
@@ -213,12 +275,13 @@ public class PersonUserController {
/**
* 个人中心,账户管理
- * @param userId 用户id
+ * @param
* @return
*/
@GetMapping("/personCenter")
@ResponseBody
- public CommonResult personCenter(Integer userId){
+ @ApiOperation(value = "个人中心,账户管理")
+ public CommonResult personCenter(){
String name = request.getHeader("userName");
if(name==null){
return CommonResult.failed("未登录");
@@ -233,6 +296,11 @@ public class PersonUserController {
*/
@GetMapping("/exit")
@ResponseBody
+ @ApiOperation(value = "退出登录")
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "退出成功"),
+ @ApiResponse(code = 500,message = "退出失败")
+ })
public CommonResult exit(){
String name = request.getHeader("userName");
if(name==null){
@@ -259,8 +327,18 @@ public class PersonUserController {
* @param password 新密码
* @return
*/
- @PostMapping(value="/resetPasswordBypassword",produces = "text/html;charset=UTF-8")
+ @PostMapping(value="/resetPasswordBypassword")
@ResponseBody
+ @ApiOperation(value = "密码修改")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "oldPassword",value = "旧密码",required = true),
+ @ApiImplicitParam(name = "password",value = "新密码",required = true)
+ })
+
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "修改成功"),
+ @ApiResponse(code = 500,message = "修改失败")
+ })
public CommonResult resetPasswordBypassword(String oldPassword,String password){
if (password==null||password.equals("")||oldPassword==null||oldPassword.equals("")){
return CommonResult.failed("密码不能为空");
@@ -283,6 +361,7 @@ public class PersonUserController {
* @return
*/
@GetMapping("/dynamic")
+ @ApiOperation(value = "帖子动态")
public List dynamic(){
String name = request.getHeader("userName");
if(name==null){
@@ -297,6 +376,7 @@ public class PersonUserController {
* @return
*/
@GetMapping("/myPublishAcitivity")
+ @ApiOperation(value = "我发布的活动")
public List myPublishAcitivity(){
String name = request.getHeader("userName");
if(name==null){
@@ -312,6 +392,7 @@ public class PersonUserController {
* @return
*/
@GetMapping("/acitivityDetail")
+
public List acitivityDetail(String acid){
return null;
@@ -322,6 +403,7 @@ public class PersonUserController {
* @return
*/
@GetMapping("/myJoinAcitivity")
+ @ApiOperation(value = "我参加的活动")
public List myJoinAcitivity(){
String name = request.getHeader("userName");
if(name==null){
@@ -336,6 +418,7 @@ public class PersonUserController {
* @return
*/
@GetMapping("/myAttentionDynamic")
+ @ApiOperation(value = "我收藏的帖子")
public List myAttentionDynamic(){
String userName = request.getHeader("userName");
if(userName==null){
@@ -345,8 +428,22 @@ public class PersonUserController {
return user;
}
+ /**
+ * 上传头像
+ * @param file
+ * @return
+ */
@ResponseBody
@PostMapping("/uploadHeadImage")
+ @ApiOperation(value = "上传头像")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "file",value = "图片",required = true)
+ })
+
+ @ApiResponses(value = {
+ @ApiResponse(code = 200,message = "上传成功"),
+ @ApiResponse(code = 500,message = "上传失败")
+ })
public CommonResult uploadHeadImage(MultipartFile file){
String userName = request.getHeader("userName");
if(userName==null){
@@ -367,6 +464,12 @@ public class PersonUserController {
return CommonResult.success("上传成功",map);
}
+
+ /**
+ * 测试专用
+ * @param request
+ * @return
+ */
@RequestMapping("/test")
@ResponseBody
public String test(HttpServletRequest request){
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/dao/CommunityDynamicDao.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/dao/CommunityDynamicDao.java
index a4a971833e9460307554deb4361716081e6c0ef8..8576af26f7b54075744483ea4f58696d1d484229 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/dao/CommunityDynamicDao.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/dao/CommunityDynamicDao.java
@@ -1,6 +1,7 @@
package com.team7.happycommunity.personcentor.dao;
import com.team7.happycommunity.personcentor.entity.CommunityDynamic;
+import com.team7.happycommunity.personcentor.entity.DynamicCommit;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -62,5 +63,10 @@ public interface CommunityDynamicDao {
* @return 影响行数
*/
int deleteById(Integer id);
-
+ /**
+ * 查询当前动态的所有评论
+ * @param dynamicId 动态id
+ * @return 评论内容
+ */
+ List queryCommit(Integer dynamicId);
}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/dao/PersonUserDao.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/dao/PersonUserDao.java
index 49356f8a4bba89cb24426d54eb24d448ca4b62b7..d599d059589b168f3b757130efcc7b6d2877600c 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/dao/PersonUserDao.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/dao/PersonUserDao.java
@@ -131,4 +131,10 @@ public interface PersonUserDao {
* @param imgurl 头像的url
*/
void updateHeadImage(@Param("id")Integer id, @Param("imgurl")String imgurl);
+
+ /**
+ * 根据邮箱删除数据
+ * @param mailbox
+ */
+ void deleteByMailbox(String mailbox);
}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/Areainfo.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/Areainfo.java
index 71508a450a41cd3445f09c426246a0d8cea4bcc3..581aab9eed9ec03732c03a609bce2aa3f54be8bb 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/Areainfo.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/Areainfo.java
@@ -1,5 +1,8 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.io.Serializable;
/**
@@ -8,15 +11,17 @@ import java.io.Serializable;
* @author makejava
* @since 2020-03-23 14:46:47
*/
+@ApiModel(value = "小区信息表")
public class Areainfo implements Serializable {
private static final long serialVersionUID = 893984337762180737L;
-
+
+ @ApiModelProperty(value = "id")
private Integer id;
-
+ @ApiModelProperty(value = "小区名称")
private String areaName;
-
+ @ApiModelProperty(value = "小区地址")
private String areaAddress;
-
+ @ApiModelProperty(value = "详细信息")
private String detail1;
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivity.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivity.java
index fd76b9bc18d38d8368b96b2d0263d5d78b58256a..23f916212169d4b6a84a810cef90a358801ad1e0 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivity.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivity.java
@@ -1,5 +1,8 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.io.Serializable;
import java.util.Date;
@@ -9,59 +12,73 @@ import java.util.Date;
* @author makejava
* @since 2020-03-25 11:18:29
*/
+@ApiModel(value = "社区动态")
public class CommunityActivity implements Serializable {
private static final long serialVersionUID = -32549005841184090L;
/**
* 动态id
*/
+ @ApiModelProperty(value = "id")
private Integer id;
/**
* 发布者id
*/
+ @ApiModelProperty(value = "发布者id")
private Integer caUserId;
/**
* 活动图片id
*/
+ @ApiModelProperty(value = "活动图片id")
private String caPicPath;
/**
* 活动类型
*/
+ @ApiModelProperty(value = "活动类型")
private Integer caType;
/**
* 活动标题
*/
+ @ApiModelProperty(value = "活动标题")
private String caTitle;
/**
* 活动内容
*/
+ @ApiModelProperty(value = "活动内容")
private String caContent;
/**
* 发起时间
*/
+ @ApiModelProperty(value = "发起时间")
private Date caStartTime;
/**
* 结束时间
*/
+ @ApiModelProperty(value = "结束时间")
private Date caEndTime;
/**
* 活动状态
*/
+ @ApiModelProperty(value = "活动状态")
private Integer caStatus;
/**
* 消费金额
*/
+ @ApiModelProperty(value = "消费金额")
private Object caMoney;
/**
* 参与人数
*/
+ @ApiModelProperty(value = "参与人数")
private Integer caPeopelCount;
/**
* 最大参与人数
*/
+ @ApiModelProperty(value = "最大参与人数")
private Integer caMaxPeopleCount;
/**
* 创建时间
*/
+ @ApiModelProperty(value = "创建时间")
private Date caCreateTime;
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivityComplaint.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivityComplaint.java
index 9f4bde478cdf5b72cfcb30093b149a46b98ad813..080101f7a6ba59ef19189074170b3b706960f379 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivityComplaint.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivityComplaint.java
@@ -1,5 +1,8 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.io.Serializable;
import java.util.Date;
@@ -9,29 +12,35 @@ import java.util.Date;
* @author makejava
* @since 2020-03-25 11:18:29
*/
+@ApiModel(value = "社区动态投诉实体类")
public class CommunityActivityComplaint implements Serializable {
private static final long serialVersionUID = -35019715504984022L;
-
+ @ApiModelProperty(value = "id")
private Integer id;
/**
* 投诉用户 id
*/
+ @ApiModelProperty(value = "投诉用户 id")
private Integer cacUserId;
/**
* 投诉活动 id
*/
+ @ApiModelProperty(value = "投诉活动 id")
private Integer cacActivityId;
/**
* 投诉理由
*/
+ @ApiModelProperty(value = "投诉理由")
private String cacReason;
/**
* 图片证据id
*/
+ @ApiModelProperty(value = "图片证据id")
private String cacPic;
/**
* 投诉时间(创建时间)
*/
+ @ApiModelProperty(value = "投诉时间(创建时间)")
private Date ccTime;
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivityUser.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivityUser.java
index bbcec491f790a265e49049d13d20c3c30d3f6658..58aac148a5e7f646ed12189eee234ed58b7f14ae 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivityUser.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityActivityUser.java
@@ -1,5 +1,8 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.io.Serializable;
/**
@@ -8,17 +11,20 @@ import java.io.Serializable;
* @author makejava
* @since 2020-03-25 11:18:29
*/
+@ApiModel(value = "社区活动用户实体类")
public class CommunityActivityUser implements Serializable {
private static final long serialVersionUID = 649975225445944595L;
-
+ @ApiModelProperty(value = "id")
private Integer id;
/**
* 活动id
*/
+ @ApiModelProperty(value = "活动id")
private Integer cauActivityId;
/**
* 用户id
*/
+ @ApiModelProperty(value = "用户id")
private Integer cauUserId;
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityChat.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityChat.java
index 2d1fd4cb170de5c80a5b9e5810e71529288e6b77..5e34aef5dab795de384985c1df50c9f4feef4346 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityChat.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityChat.java
@@ -1,5 +1,7 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+
import java.io.Serializable;
import java.util.Date;
@@ -9,6 +11,7 @@ import java.util.Date;
* @author makejava
* @since 2020-03-24 16:58:02
*/
+@ApiModel(value = "社区动态投诉实体类")
public class CommunityChat implements Serializable {
private static final long serialVersionUID = -63416663913483268L;
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityDynamic.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityDynamic.java
index 71199d8df38c57c01cac8f8cc8012b89d6bd9104..39e71c963124f3a9ea0dd70e63ae529e735482e4 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityDynamic.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityDynamic.java
@@ -1,5 +1,8 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@@ -10,35 +13,43 @@ import java.util.List;
* @author makejava
* @since 2020-03-24 17:26:32
*/
+@ApiModel(value = "社区动态实体类")
public class CommunityDynamic implements Serializable {
private static final long serialVersionUID = 744418746282083773L;
/**
* 动态id
*/
+ @ApiModelProperty(value = "动态id")
private Integer id;
/**
* 发布者id
*/
+ @ApiModelProperty(value = "发布者id")
private Integer cdUserId;
/**
* 动态图片id
*/
+ @ApiModelProperty(value = "动态图片id")
private String cdPicPath;
/**
* 动态类型
*/
+ @ApiModelProperty(value = "动态类型")
private Integer cdType;
/**
* 动态内容
*/
+ @ApiModelProperty(value = "动态内容")
private String cdContent;
/**
* 获赞数量
*/
+ @ApiModelProperty(value = "获赞数量")
private Integer cdFavor;
/**
* 发布时间(创建时间)
*/
+ @ApiModelProperty(value = "发布时间")
private Date cdTime;
private List communityDynamicComment;
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityDynamicComment.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityDynamicComment.java
index daa6dec7bc4b262a819cf6c16df4caaf114f7a48..d02006ee468dc9f5aefcccebc7092d3bdaa7571d 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityDynamicComment.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/CommunityDynamicComment.java
@@ -1,5 +1,8 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@@ -10,31 +13,37 @@ import java.util.List;
* @author makejava
* @since 2020-03-24 17:26:32
*/
+@ApiModel(value = "动态评论实体类")
public class CommunityDynamicComment implements Serializable {
private static final long serialVersionUID = 256951165143287277L;
-
+ @ApiModelProperty(value = "id")
private Integer id;
/**
* 动态id
*/
+ @ApiModelProperty(value = "动态id")
private Integer cdcDynamicId;
/**
* 评论者id
*/
+ @ApiModelProperty(value = "评论者id")
private Integer cdcUserId;
/**
* 其他评论者id,针对评论的评论
*/
+ @ApiModelProperty(value = "其他评论者id,针对评论的评论")
private Integer cdcOtherUserId;
/**
* 评论内容
*/
+ @ApiModelProperty(value = "评论内容")
private String cdcContent;
/**
* 评论时间(创建时间)
*/
+ @ApiModelProperty(value = "评论时间")
private Date cdcTime;
-
+ @ApiModelProperty(value = "用户")
private List personUser;
public List getPersonUser() {
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/Dynamic.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/Dynamic.java
index fa4cbb88b85d17e75d8a8f0a1dace8b8b1de0331..526568fac48cee1dae16bd172720d3183e77a5dd 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/Dynamic.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/Dynamic.java
@@ -1,16 +1,20 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.relational.core.sql.In;
import java.io.Serializable;
import java.util.Date;
-
+@ApiModel(value = "社区动态实体类")
public class Dynamic implements Serializable {
-
+ @ApiModelProperty(value = "图片链接")
private String url;
+ @ApiModelProperty(value = "图片主题")
private String title;
+ @ApiModelProperty(value = "发布时间")
private Date timee;
-
+ @ApiModelProperty(value = "动态id")
private Integer dynamicId;
public Integer getDynamicId() {
@@ -54,4 +58,5 @@ public class Dynamic implements Serializable {
public void setCommentName(String commentName) {
this.commentName = commentName;
}
+
}
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/DynamicCommit.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/DynamicCommit.java
new file mode 100644
index 0000000000000000000000000000000000000000..2864a00044300b96ddbd7bc38ca9dea3e9ebc4a9
--- /dev/null
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/DynamicCommit.java
@@ -0,0 +1,61 @@
+package com.team7.happycommunity.personcentor.entity;
+
+import aQute.bnd.service.repository.SearchableRepository;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+@ApiModel(value = "社区动态评论实体类")
+public class DynamicCommit implements Serializable {
+ @ApiModelProperty(value = "评论id")
+ private Integer id;//评论id
+ @ApiModelProperty(value = "评论内容")
+ private String cdcContent;
+ @ApiModelProperty(value = "评论时间")
+ private Date cdcTime;
+ @ApiModelProperty(value = "评论姓名")
+ private String name;
+ @ApiModelProperty(value = "用户头像")
+ private String url;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getCdcContent() {
+ return cdcContent;
+ }
+
+ public void setCdcContent(String cdcContent) {
+ this.cdcContent = cdcContent;
+ }
+
+ public Date getCdcTime() {
+ return cdcTime;
+ }
+
+ public void setCdcTime(Date cdcTime) {
+ this.cdcTime = cdcTime;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+}
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/MyPublishAcitivity.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/MyPublishAcitivity.java
index 33d4b947739c8eddcf06de45305de42893a38923..da3ebac508291cf3b2fa1f62fbb1a15b6afff9cc 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/MyPublishAcitivity.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/MyPublishAcitivity.java
@@ -1,18 +1,21 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.io.Serializable;
import java.util.Date;
-
+@ApiModel(value = "发表活动实体类")
public class MyPublishAcitivity implements Serializable {
-
+ @ApiModelProperty(value = "活动id")
private String acId;//活动id
-
+ @ApiModelProperty(value = "个人头像")
private String url;//个人头像
-
+ @ApiModelProperty(value = "个人别称")
private String nickname;//个人别称
-
+ @ApiModelProperty(value = "活动主题")
private String CaTitle;//活动主题
-
+ @ApiModelProperty(value = "活动创建时间")
private Date caCreateTime;//活动创建时间
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonCollectUser.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonCollectUser.java
index a5fc704de6cec2466cf5a1b526d617c295ae271d..0b14c5bc7062a7b6f6700758b1a7f688ad02fac8 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonCollectUser.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonCollectUser.java
@@ -1,5 +1,8 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.util.Date;
import java.io.Serializable;
@@ -9,17 +12,18 @@ import java.io.Serializable;
* @author makejava
* @since 2020-03-22 21:19:30
*/
+@ApiModel(value = "用户收藏实体类")
public class PersonCollectUser implements Serializable {
private static final long serialVersionUID = 828483762597894081L;
-
+ @ApiModelProperty(value = "收藏用户id")
private Integer collectUserId;
-
+ @ApiModelProperty(value = "评论用户id")
private Integer concernedUserId;
-
+ @ApiModelProperty(value = "关注用户id")
private Integer focusedUserId;
-
+ @ApiModelProperty(value = "评论id")
private Integer dynamicId;
-
+ @ApiModelProperty(value = "关注时间")
private Date attentTmie;
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonImage.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonImage.java
index e33f667ecb025c83e9fcac2e3337f3867f729f8f..477cb8879f8b096b3c3f680692eadf4030036faf 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonImage.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonImage.java
@@ -1,5 +1,8 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.util.Date;
import java.io.Serializable;
@@ -9,21 +12,22 @@ import java.io.Serializable;
* @author makejava
* @since 2020-03-22 21:19:30
*/
+@ApiModel(value = "图片实体类")
public class PersonImage implements Serializable {
private static final long serialVersionUID = 651560723597011661L;
-
+ @ApiModelProperty(value = "id")
private Integer id;
-
+ @ApiModelProperty(value = "小区id(小区图片)")
private Integer personPlotId;
-
+ @ApiModelProperty(value = "住宅表的id(住宅id)")
private Integer personHomeId;
-
+ @ApiModelProperty(value = "用户表的id")
private Integer personUserId;
-
+ @ApiModelProperty(value = "(0-用户空间图片,1-用户头像)")
private Integer state;
-
+ @ApiModelProperty(value = "上传时间")
private Date time;
-
+ @ApiModelProperty(value = "图片链接")
private String url;
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonUser.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonUser.java
index 90988128e80cbe66c691193c096c63d79e4ccba8..0ba6096c2d99b0a9cd8bd21fb579925808b2ad72 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonUser.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/entity/PersonUser.java
@@ -1,5 +1,8 @@
package com.team7.happycommunity.personcentor.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
import java.util.Date;
import java.io.Serializable;
import java.util.List;
@@ -10,41 +13,42 @@ import java.util.List;
* @author makejava
* @since 2020-03-20 19:21:36
*/
+@ApiModel(value = "用户实体类")
public class PersonUser implements Serializable {
private static final long serialVersionUID = 156440124825734371L;
-
+ @ApiModelProperty(value = "id")
private Integer id;
-
+ @ApiModelProperty(value = "身份证")
private String idNumber;
-
+ @ApiModelProperty(value = "手机号")
private String cellPhNumber;
-
+ @ApiModelProperty(value = "密码")
private String password;
-
+ @ApiModelProperty(value = "姓名")
private String name;
-
+ @ApiModelProperty(value = "性别")
private Integer sex;
-
+ @ApiModelProperty(value = "昵称")
private String nickname;
-
+ @ApiModelProperty(value = "邮箱")
private String mailbox;
-
+ @ApiModelProperty(value = "小区id")
private Integer plotId;
-
+ @ApiModelProperty(value = "标签")
private String tag;
-
+ @ApiModelProperty(value = "邮箱状态")
private Integer mailboxStatus;
-
+ @ApiModelProperty(value = "邮箱的令牌")
private String code;
-
+ @ApiModelProperty(value = "盐")
private String passwordSalt;
-
+ @ApiModelProperty(value = "账户创建时间")
private Date createTime;
-
+ @ApiModelProperty(value = "小区实体类")
private Areainfo areainfo;
-
+ @ApiModelProperty(value = "用户图片实体类")
private List personImage;
-
+ @ApiModelProperty(value = "动态评论实体类")
private List communityDynamic;
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/CommunityDynamicService.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/CommunityDynamicService.java
index ba35056652844ec2363078c762203bb29dcb1ae4..36175a1395665a18778e288d155dad800e7b144b 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/CommunityDynamicService.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/CommunityDynamicService.java
@@ -1,6 +1,7 @@
package com.team7.happycommunity.personcentor.service;
import com.team7.happycommunity.personcentor.entity.CommunityDynamic;
+import com.team7.happycommunity.personcentor.entity.DynamicCommit;
import java.util.List;
@@ -52,5 +53,10 @@ public interface CommunityDynamicService {
* @return 是否成功
*/
boolean deleteById(Integer id);
-
+ /**
+ * 查询当前动态的所有评论
+ * @param dynamicId 动态id
+ * @return 评论内容
+ */
+ List queryCommit(Integer dynamicId);
}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/impl/CommunityDynamicServiceImpl.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/impl/CommunityDynamicServiceImpl.java
index 66c9420d131109fd0cafc2881bce847f9d59d337..78327552679f01fbbe5137a8b5f66ebfa988d163 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/impl/CommunityDynamicServiceImpl.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/impl/CommunityDynamicServiceImpl.java
@@ -2,6 +2,7 @@ package com.team7.happycommunity.personcentor.service.impl;
import com.team7.happycommunity.personcentor.dao.CommunityDynamicDao;
import com.team7.happycommunity.personcentor.entity.CommunityDynamic;
+import com.team7.happycommunity.personcentor.entity.DynamicCommit;
import com.team7.happycommunity.personcentor.service.CommunityDynamicService;
import org.springframework.stereotype.Service;
@@ -76,4 +77,10 @@ public class CommunityDynamicServiceImpl implements CommunityDynamicService {
public boolean deleteById(Integer id) {
return this.communityDynamicDao.deleteById(id) > 0;
}
+
+ @Override
+ public List queryCommit(Integer dynamicId){
+
+ return communityDynamicDao.queryCommit(dynamicId);
+ }
}
\ No newline at end of file
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/impl/PersonUserServiceImpl.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/impl/PersonUserServiceImpl.java
index 575ca81564f31736a1d115a3edf590519e4cd522..b4dade0ae8fa8096c360adb2584753a375679d7d 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/impl/PersonUserServiceImpl.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/service/impl/PersonUserServiceImpl.java
@@ -96,13 +96,13 @@ public class PersonUserServiceImpl implements PersonUserService {
throw new RegisterException("姓名已存在");
}
PersonUser user2=new PersonUser();
- user.setNickname(personUser.getNickname());
+ user2.setNickname(personUser.getNickname());
List personUsers2 = personUserDao.queryAll(user2);
if(personUsers2!=null&&personUsers2.size()>0){
throw new RegisterException("昵称已存在");
}
PersonUser user3=new PersonUser();
- user.setMailbox(personUser.getMailbox());
+ user3.setMailbox(personUser.getMailbox());
List personUsers3 = personUserDao.queryAll(user3);
if(personUsers3!=null&&personUsers3.size()>0){
throw new RegisterException("邮箱已存在");
@@ -143,18 +143,20 @@ public class PersonUserServiceImpl implements PersonUserService {
public boolean queryMailbox(String mailbox) {
PersonUser user = personUserDao.queryByMailbox(mailbox);
if(user==null||user.getMailboxStatus()!=0){
+ if(user!=null&&user.getMailboxStatus()!=0){
+ personUserDao.deleteByMailbox(mailbox);
+ }
return true;
}
return false;
}
-
@Override
public void register(PersonUser user) {
// 发送邮件,存储邮箱,并将mailbox_status状态改为1,并随机生成一个code邮箱令牌,并存储到数据库,密码加密
//1.生成一个UUID数字
String code = UUID.randomUUID().toString().replace("_","");
user.setCode(code);
- String content="点击激活";
+ String content="点击激活";
MailUtils.sendMail(user.getMailbox(),content,"幸福小区邀请您注册,请点击链接");
//2.进行密码加密
try {
@@ -273,7 +275,7 @@ public class PersonUserServiceImpl implements PersonUserService {
PersonUser user = personUserDao.queryPersonInfoByName(name);
if(user.getPassword().equals(Md5Util.encodeByMd5(oldPassword))){
//2.修改新密码
- personUserDao.updatePasswordByName( name,password);
+ personUserDao.updatePasswordByName( name,Md5Util.encodeByMd5(password));
}else{
throw new UpdatePasswordException("输入密码不正确");
}
diff --git a/personcentor/src/main/java/com/team7/happycommunity/personcentor/util/MailUtils.java b/personcentor/src/main/java/com/team7/happycommunity/personcentor/util/MailUtils.java
index d59c040a5c72976bb4753b91b9964219655fac15..cefd71f5d3048ac43c53779fee0da365540e3e39 100644
--- a/personcentor/src/main/java/com/team7/happycommunity/personcentor/util/MailUtils.java
+++ b/personcentor/src/main/java/com/team7/happycommunity/personcentor/util/MailUtils.java
@@ -9,9 +9,9 @@ import java.util.Properties;
* 发邮件工具类
*/
public final class MailUtils {
- private static final String USER = "2870485806@qq.com"; // 发件人称号,同邮箱地址
+ private static final String USER = ""; // 发件人称号,同邮箱地址
//使用POP3/SMTP服务的授权码
- private static final String PASSWORD = "ubtdveqxwecsdcjg"; // 如果是qq邮箱可以使户端授权码,或者登录密码
+ private static final String PASSWORD = ""; // 如果是qq邮箱可以使户端授权码,或者登录密码
/**
*
diff --git a/personcentor/src/main/resources/application.properties b/personcentor/src/main/resources/application.properties
index 3827360f14b311d5a6bc76a19193eb7398403fce..12805e99f86e5216356d68604c96f6cc59b0f044 100644
--- a/personcentor/src/main/resources/application.properties
+++ b/personcentor/src/main/resources/application.properties
@@ -1,7 +1,7 @@
-accessKeyId=LTAI4FikHBhJzcaPm22pWeGS
-accessKeySecret=6Isjtn6eBPaas1NNBpfVczkAEY7BDB
-smsCode=SMS_186615599
+accessKeyId=
+accessKeySecret=
+smsCode=
param={"code":"[value]"}
website=localhost
-port=80
+port=9100
diff --git a/personcentor/src/main/resources/application.yml b/personcentor/src/main/resources/application.yml
index fbcbf80bfae82349c504faec2115b11a2ee018b4..5aef428ea9faa0f77de3b2f65947a806550400ba 100644
--- a/personcentor/src/main/resources/application.yml
+++ b/personcentor/src/main/resources/application.yml
@@ -15,10 +15,10 @@ spring:
port: 6379
rabbitmq:
port: 5672
- username: admin
+ username: t1
password: 123
- virtual-host: /myhost
- host: 192.168.43.112
+ virtual-host: /boothost
+ host: 192.168.190.128
listener:
simple:
acknowledge-mode: manual
diff --git a/personcentor/src/main/resources/mapper/CommunityDynamicDao.xml b/personcentor/src/main/resources/mapper/CommunityDynamicDao.xml
index efe247fc912ed6a25b8f50a5ee2c78337906b496..ebe0fe43f9503cec6cb8ceba8e9f436d5dd060e5 100644
--- a/personcentor/src/main/resources/mapper/CommunityDynamicDao.xml
+++ b/personcentor/src/main/resources/mapper/CommunityDynamicDao.xml
@@ -94,5 +94,8 @@
delete from happycommunity.community_dynamic where id = #{id}
-
+
\ No newline at end of file
diff --git a/personcentor/src/main/resources/mapper/PersonUserDao.xml b/personcentor/src/main/resources/mapper/PersonUserDao.xml
index 95fd1fb9eee02b600431a97c6288c5d8c5641547..8564f060f1ae663b46e7155ed7b8750129856de7 100644
--- a/personcentor/src/main/resources/mapper/PersonUserDao.xml
+++ b/personcentor/src/main/resources/mapper/PersonUserDao.xml
@@ -187,26 +187,31 @@
UPDATE person_user set password=#{password} where name=#{name}
update person_image set url=#{imgurl} where person_image.person_user_id=#{id} and state=1
+
+ delete from happycommunity.person_user where mailbox = #{mailbox}
+
\ No newline at end of file
diff --git a/propertydemo/src/main/java/com/woniu/controller/PayCollectController.java b/propertydemo/src/main/java/com/woniu/controller/PayCollectController.java
index 4cfabba35c883833b4c6839ffbeb1b26c252471b..f3870458bf7661797e5670e368721e63d836940b 100644
--- a/propertydemo/src/main/java/com/woniu/controller/PayCollectController.java
+++ b/propertydemo/src/main/java/com/woniu/controller/PayCollectController.java
@@ -20,9 +20,10 @@ public class PayCollectController {
private ServiceCollectService serviceCollectService;
//加载收藏服务列表
- @GetMapping("/selectCollectservice/{userid}")
- public @ResponseBody CommonResult collectServicelist(@PathVariable("userid") Integer userid)
+ @GetMapping("/selectCollectservice")
+ public @ResponseBody CommonResult collectServicelist()
{
+ Integer userid=1;
try {
List collects=serviceCollectService.selectCollectService(userid);
return CommonResult.success(collects);
diff --git a/propertydemo/src/main/java/com/woniu/controller/PayController.java b/propertydemo/src/main/java/com/woniu/controller/PayController.java
index 89f2bafec510c841ef312e916bc3e11e1497e4e3..9a9b5194402362e8cddba0672bd9c990ca7c3487 100644
--- a/propertydemo/src/main/java/com/woniu/controller/PayController.java
+++ b/propertydemo/src/main/java/com/woniu/controller/PayController.java
@@ -69,7 +69,7 @@ public class PayController {
}
//收藏服务
- @PostMapping("/collectservice")
+ @RequestMapping("/collectservice")
@ResponseBody
public CommonResult collectService(CollectService collectService){
collectService.setUserid(1);
@@ -87,14 +87,14 @@ public class PayController {
}
//删除收藏服务
- @PostMapping("/deleteCollectservice")
+ @RequestMapping("/deleteCollectservice")
@ResponseBody
- public CommonResult deletecollectService(CollectService collectService)
+ public CommonResult deletecollectService(Integer serviceid)
{
- System.out.println(collectService.getServiceid());
- collectService.setUserid(1);
+ System.out.println(serviceid);
+ Integer userid=1;
try {
- serviceCollectService.deleteCollectService(collectService.getServiceid(),collectService.getUserid());
+ serviceCollectService.deleteCollectService(serviceid,userid);
return CommonResult.success("删除成功");
} catch (Exception e) {
e.printStackTrace();
diff --git a/propertydemo/src/main/java/com/woniu/controller/PayOrderController.java b/propertydemo/src/main/java/com/woniu/controller/PayOrderController.java
index 1bce5d5ddc1810617d781d4edd2ea67c9f864668..82969b6bf0f9bbf2c11639e884515130caeb18b9 100644
--- a/propertydemo/src/main/java/com/woniu/controller/PayOrderController.java
+++ b/propertydemo/src/main/java/com/woniu/controller/PayOrderController.java
@@ -71,7 +71,7 @@ public class PayOrderController {
serviceOrder.setStarttime(start);
serviceOrder.setEndtime(end);
serviceOrder.setOrdernumber(ordernumber);
- serviceOrder.setStatus(0);
+ serviceOrder.setStatus(6);
serviceOrder.setOrdername(payname);
serviceOrder.setOrdertype(0);
try {
diff --git a/propertydemo/src/main/java/com/woniu/dao/CollectServiceMapper.java b/propertydemo/src/main/java/com/woniu/dao/CollectServiceMapper.java
index ca2ce9bc4a27fff80621000e8a247f2815b0691d..6649097ea94a8d588bdba7b96b598b226e9eed72 100644
--- a/propertydemo/src/main/java/com/woniu/dao/CollectServiceMapper.java
+++ b/propertydemo/src/main/java/com/woniu/dao/CollectServiceMapper.java
@@ -1,6 +1,7 @@
package com.woniu.dao;
import com.woniu.pojo.CollectService;
+import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
public interface CollectServiceMapper {
@@ -16,6 +17,7 @@ public interface CollectServiceMapper {
int updateByPrimaryKey(CollectService record);
+ @Delete("delete from collect_service where serviceid=#{serviceid} and userid=#{userid}")
void deleteByuserIdAndServiceId(Integer serviceid,Integer userid);
@Select("select serviceid from collect_service where userid=#{value}")
diff --git a/propertydemo/src/main/java/com/woniu/dao/PropertyPaydtoMapper.java b/propertydemo/src/main/java/com/woniu/dao/PropertyPaydtoMapper.java
index a89d10568143c8c4e1e6b169831bccb1684651d0..97bc415abd60476092fea47ae19640e785b08fa8 100644
--- a/propertydemo/src/main/java/com/woniu/dao/PropertyPaydtoMapper.java
+++ b/propertydemo/src/main/java/com/woniu/dao/PropertyPaydtoMapper.java
@@ -14,6 +14,6 @@ public interface PropertyPaydtoMapper {
@Select("select pp.payname,pp.payprice,pp.paytime,pp.icon,pp.id,bi.nickname from pp_payservice pp,business_info bi where pp.shopid=bi.id and pp.service_type=0 and pp.shopid=#{value}")
List selectByShopId(Integer ShopId);
- @Select("select pp.payname,pp.payprice,pp.paytime,pp.icon,pm.username,pp.id from pp_payservice pp,property_manage pm,collect_service cs where pp.propertyid=pm.id and cs.serviceid=pp.id and cs.userid=#{value}")
+ @Select("select pp.payname,pp.payprice,pp.paytime,pp.icon,pp.id from pp_payservice pp,collect_service cs where cs.serviceid=pp.id and cs.userid=#{value}")
List selectcollectPayByUserId(Integer userid);
}
diff --git a/propertydemo/src/main/java/com/woniu/service/ServiceCollectService.java b/propertydemo/src/main/java/com/woniu/service/ServiceCollectService.java
index 7bf582d5f4b7ad7b25eb08a7146c0ed400fd1fdd..ead93123dacb69df06c66c42fd8444150ee52d1e 100644
--- a/propertydemo/src/main/java/com/woniu/service/ServiceCollectService.java
+++ b/propertydemo/src/main/java/com/woniu/service/ServiceCollectService.java
@@ -11,7 +11,7 @@ public interface ServiceCollectService {
List selectCollectService(Integer userid);
- void deleteCollectService(Integer serviceid,Integer userid);
+ void deleteCollectService(Integer userid,Integer serviceid);
Integer selectserviceidByuserid(Integer userid);
}
diff --git a/propertydemo/src/main/resources/application.yml b/propertydemo/src/main/resources/application.yml
index be91b0b9462238a276cff8e92ea6fe4a1c7d4cae..b632c01604fbac92f49ec9c0b5311687c43f684e 100644
--- a/propertydemo/src/main/resources/application.yml
+++ b/propertydemo/src/main/resources/application.yml
@@ -17,7 +17,7 @@ spring:
eureka:
client:
service-url:
- defaultZone: http://106.12.148.100:8081/registor-0.1/eureka
+ defaultZone: http://localhost:8761/eureka
mybatis:
mapper-locations: classpath:mapper/*.xml
configuration:
diff --git a/propertydemo/src/test/java/com/woniu/propertydemo/PropertydemoApplicationTests.java b/propertydemo/src/test/java/com/woniu/propertydemo/PropertydemoApplicationTests.java
index 358d6db27e00feecdc2170fff333690732af6fda..08dd37d1b61952ac39e34dec5e411fcbeaff0d3e 100644
--- a/propertydemo/src/test/java/com/woniu/propertydemo/PropertydemoApplicationTests.java
+++ b/propertydemo/src/test/java/com/woniu/propertydemo/PropertydemoApplicationTests.java
@@ -7,7 +7,7 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@SpringBootTest
@EnableEurekaClient //启动Eureka客户端
class PropertydemoApplicationTests {
-
+
@Test
void contextLoads() {
}
diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingInfoMapper.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingInfoMapper.java
index 0cdbca7b4ff6ee7386a98d03dd9d22ae66f5bc79..c999e9db09eddf5baaf94369cf4824824f43c76b 100644
--- a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingInfoMapper.java
+++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/dao/ParkingInfoMapper.java
@@ -19,7 +19,7 @@ public interface ParkingInfoMapper {
int updateByPrimaryKey(ParkingInfo record);
- @Select("select * from parking_info where community_id = #{areaid} and status = 0")
+ @Select("select parking_info.*,areainfo.area_name area_name from parking_info left join areainfo on areainfo.id = parking_info.community_id where parking_info.community_id = #{areaid} and parking_info.status = 0")
List selectByPageAndareaId(@Param("currentPage")Integer currentPage,
@Param("pageSize") Integer pageSize,
@Param("areaid") Integer areaid);
diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/OwnerParkingApply.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/OwnerParkingApply.java
index 5f20d219435a2619dd6606cb688a872e867afb0e..469c4f35eb3b5c3ec2e04e34e3ce0d7070304050 100644
--- a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/OwnerParkingApply.java
+++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/OwnerParkingApply.java
@@ -26,4 +26,6 @@ public class OwnerParkingApply implements Serializable {
private String name;
private String cellphone;
+
+ private Integer costPerDay;
}
\ No newline at end of file
diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingInfo.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingInfo.java
index a6e8ccbef7183e2a9610d251308b3e9073dc4ae4..3f3aeff8c532754265dcbae6eb8695d47954f1ea 100644
--- a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingInfo.java
+++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/ParkingInfo.java
@@ -22,8 +22,21 @@ public class ParkingInfo implements Serializable {
private Integer communityId;
private Integer ownerId;
-
+ // 0 小区 1 业主委托
private Integer type;
private Integer status;
+
+ private String areaName;
+
+ private String typeStr;
+
+ public void setType(Integer type){
+ this.type = type;
+ if (type == 0){
+ typeStr = "小区车位";
+ }else{
+ typeStr = "业主车位";
+ }
+ }
}
\ No newline at end of file
diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PpPayservice.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PpPayservice.java
index 85b0a44effec6e08b0c594a4fef91de23f362d2a..152709fa9a3a6f1f11675dd9cfffba84bc55d064 100644
--- a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PpPayservice.java
+++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/pojo/PpPayservice.java
@@ -27,4 +27,27 @@ public class PpPayservice implements Serializable {
private Integer payway;
private String servicecontext;
+
+ // 衍生属性 支付方式
+ private String paywayStr;
+ // 衍生属性 服务类型
+ private String serviceTypeStr;
+
+ public void setServiceType(Integer serviceType){
+ this.serviceType = serviceType;
+ if(serviceType !=null && serviceType == 0){
+ serviceTypeStr = "商家服务";
+ }else{
+ serviceTypeStr = "物业服务";
+ }
+ }
+
+ public void setPayway(Integer payway){
+ this.payway = payway;
+ if(payway == 0){
+ paywayStr = "线上";
+ }else{
+ paywayStr = "线下";
+ }
+ }
}
\ No newline at end of file
diff --git a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/service/impl/OwnerParkingApplyServiceImpl.java b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/service/impl/OwnerParkingApplyServiceImpl.java
index 128c2b6988dd49dcf7a10560e908e932380deec5..ef25754f1e1dc280549cc97fdd9b61852aa0e32d 100644
--- a/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/service/impl/OwnerParkingApplyServiceImpl.java
+++ b/propertymanagement/src/main/java/com/team7/happycommunity/propertymanagement/service/impl/OwnerParkingApplyServiceImpl.java
@@ -55,7 +55,7 @@ public class OwnerParkingApplyServiceImpl implements OwnerParkingApplyService {
parkingInfo.setCommunityId(ownerParkingApplyold.getCommunityId());
parkingInfo.setBeginTime(ownerParkingApplyold.getBeginTime());
parkingInfo.setEndTime(ownerParkingApplyold.getEndTime());
- parkingInfo.setCostPerDay(10);
+ parkingInfo.setCostPerDay(ownerParkingApplyold.getCostPerDay());
parkingInfo.setParkingNumber(ownerParkingApplyold.getParkingCode());
parkingInfo.setParkingInfos(ownerParkingApplyold.getParkingInfo());
parkingInfoMapper.insertSelective(parkingInfo);
diff --git a/propertymanagement/src/main/resources/mapper/OwnerParkingApplyMapper.xml b/propertymanagement/src/main/resources/mapper/OwnerParkingApplyMapper.xml
index 9dc98c23c61a6dc79fca841797fd8a994581a15e..d6540bd0b669ba58741e276aba0fa6ee30b6a6eb 100644
--- a/propertymanagement/src/main/resources/mapper/OwnerParkingApplyMapper.xml
+++ b/propertymanagement/src/main/resources/mapper/OwnerParkingApplyMapper.xml
@@ -9,9 +9,10 @@
+
- id, owner_id, parking_code, parking_info, begin_time, end_time, community_id
+ id, owner_id, parking_code, parking_info, begin_time, end_time, community_id, cost_per_day