From ffc306c53a5fe6b8306109aaf40b8c0998ca6a4e Mon Sep 17 00:00:00 2001 From: jingkang <1248303996@qq.com> Date: Tue, 7 Apr 2020 11:36:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?PC=E5=B9=B3=E5=8F=B0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pccenter/pom.xml | 13 +- .../java/com/woniu/PccenterApplication.java | 1 + .../java/com/woniu/config/ShiroConfig.java | 42 +-- .../java/com/woniu/config/WebMvcConfig.java | 9 +- .../ActivityComplainController.java | 97 +++++ .../woniu/controller/ActivityController.java | 101 ++++++ .../com/woniu/controller/AdminController.java | 18 +- .../woniu/controller/ComplainController.java | 101 ++++++ .../controller/DynamicCommentController.java | 69 ++++ .../com/woniu/controller/MenusController.java | 29 +- .../woniu/controller/MerchantController.java | 103 ++++++ .../controller/PropertyManageController.java | 108 ++++++ .../com/woniu/controller/RolesController.java | 6 + .../controller/ServiceCommentController.java | 83 +++++ .../com/woniu/dao/ActivityComplainMapper.java | 24 ++ .../java/com/woniu/dao/ActivityMapper.java | 24 ++ .../java/com/woniu/dao/ComplainMapper.java | 38 ++ .../com/woniu/dao/DynamicCommentMapper.java | 19 + .../java/com/woniu/dao/InformationMapper.java | 17 - .../main/java/com/woniu/dao/MenusMapper.java | 5 + .../java/com/woniu/dao/MerchantMapper.java | 24 ++ .../com/woniu/dao/PropertyManageMapper.java | 23 ++ .../main/java/com/woniu/dao/RolesMapper.java | 2 +- .../com/woniu/dao/ServiceCommentMapper.java | 20 ++ .../main/java/com/woniu/dao/UsersMapper.java | 17 - .../com/woniu/dto/ActivityComplainDTO.java | 89 +++++ .../main/java/com/woniu/dto/ActivityDTO.java | 96 +++++ .../main/java/com/woniu/dto/ComplainDTO.java | 89 +++++ .../java/com/woniu/dto/DynamicCommentDTO.java | 79 +++++ .../main/java/com/woniu/dto/MerchantDTO.java | 88 +++++ .../java/com/woniu/dto/ServiceCommentDTO.java | 70 ++++ .../exception/GlobalExceptionHandler.java | 60 ++++ .../com/woniu/exception/LoginException.java | 22 ++ .../main/java/com/woniu/pojo/Information.java | 93 ----- .../java/com/woniu/pojo/PropertyManage.java | 95 +++++ .../java/com/woniu/pojo/RolesMenusKey.java | 2 +- .../src/main/java/com/woniu/pojo/Users.java | 93 ----- .../java/com/woniu/realm/CustomRealm.java | 2 +- .../service/ActivityComplainService.java | 15 + .../com/woniu/service/ActivityService.java | 16 + .../com/woniu/service/ComplainService.java | 15 + .../woniu/service/DynamicCommentService.java | 13 + .../java/com/woniu/service/MenusService.java | 4 + .../com/woniu/service/MerchantService.java | 16 + .../woniu/service/ProperManageService.java | 17 + .../woniu/service/ServiceCommentService.java | 15 + .../impl/ActivityComplainServiceImpl.java | 41 +++ .../service/impl/ActivityServiceImpl.java | 40 +++ .../woniu/service/impl/AdminServiceImpl.java | 8 + .../service/impl/ComplainServiceImpl.java | 41 +++ .../impl/DynamicCommentServiceImpl.java | 32 ++ .../woniu/service/impl/MenusServiceImpl.java | 11 + .../service/impl/MerchantServiceImpl.java | 40 +++ .../impl/PropertyManageServiceImpl.java | 42 +++ .../impl/ServiceCommentServiceImpl.java | 32 ++ pccenter/src/main/resources/application.yml | 12 +- .../src/main/resources/generatorConfig.xml | 18 +- .../mapper/ActivityComplainMapper.xml | 17 + .../main/resources/mapper/ActivityMapper.xml | 18 + .../src/main/resources/mapper/AdminMapper.xml | 2 +- .../main/resources/mapper/ComplainMapper.xml | 20 ++ .../resources/mapper/DynamicCommentMapper.xml | 18 + .../resources/mapper/InformationMapper.xml | 141 -------- .../main/resources/mapper/MerchantMapper.xml | 19 + .../resources/mapper/PropertyManageMapper.xml | 22 ++ .../resources/mapper/ServiceCommentMapper.xml | 18 + .../src/main/resources/mapper/UsersMapper.xml | 141 -------- .../src/main/resources/templates/403.html | 152 ++++++++ .../src/main/resources/templates/login.html | 15 +- .../templates/sys/ac_complainList.html | 155 ++++++++ .../resources/templates/sys/ac_reply.html | 55 +++ .../resources/templates/sys/activityList.html | 196 +++++++++++ .../resources/templates/sys/addAdmin.html | 3 +- .../resources/templates/sys/adminList.html | 331 +++++++++--------- .../resources/templates/sys/complainList.html | 161 +++++++++ .../templates/sys/dynamic_commentList.html | 163 +++++++++ .../resources/templates/sys/editMenu.html | 99 ++++++ .../resources/templates/sys/editRole.html | 1 - .../main/resources/templates/sys/index.html | 8 +- .../resources/templates/sys/menuList.html | 42 ++- .../resources/templates/sys/merchantList.html | 187 ++++++++++ .../main/resources/templates/sys/pmList.html | 188 ++++++++++ .../main/resources/templates/sys/reply.html | 56 +++ .../resources/templates/sys/roleList.html | 25 +- .../templates/sys/service_commentList.html | 140 ++++++++ 85 files changed, 3922 insertions(+), 770 deletions(-) create mode 100644 pccenter/src/main/java/com/woniu/controller/ActivityComplainController.java create mode 100644 pccenter/src/main/java/com/woniu/controller/ActivityController.java create mode 100644 pccenter/src/main/java/com/woniu/controller/ComplainController.java create mode 100644 pccenter/src/main/java/com/woniu/controller/DynamicCommentController.java create mode 100644 pccenter/src/main/java/com/woniu/controller/MerchantController.java create mode 100644 pccenter/src/main/java/com/woniu/controller/PropertyManageController.java create mode 100644 pccenter/src/main/java/com/woniu/controller/ServiceCommentController.java create mode 100644 pccenter/src/main/java/com/woniu/dao/ActivityComplainMapper.java create mode 100644 pccenter/src/main/java/com/woniu/dao/ActivityMapper.java create mode 100644 pccenter/src/main/java/com/woniu/dao/ComplainMapper.java create mode 100644 pccenter/src/main/java/com/woniu/dao/DynamicCommentMapper.java delete mode 100644 pccenter/src/main/java/com/woniu/dao/InformationMapper.java create mode 100644 pccenter/src/main/java/com/woniu/dao/MerchantMapper.java create mode 100644 pccenter/src/main/java/com/woniu/dao/PropertyManageMapper.java create mode 100644 pccenter/src/main/java/com/woniu/dao/ServiceCommentMapper.java delete mode 100644 pccenter/src/main/java/com/woniu/dao/UsersMapper.java create mode 100644 pccenter/src/main/java/com/woniu/dto/ActivityComplainDTO.java create mode 100644 pccenter/src/main/java/com/woniu/dto/ActivityDTO.java create mode 100644 pccenter/src/main/java/com/woniu/dto/ComplainDTO.java create mode 100644 pccenter/src/main/java/com/woniu/dto/DynamicCommentDTO.java create mode 100644 pccenter/src/main/java/com/woniu/dto/MerchantDTO.java create mode 100644 pccenter/src/main/java/com/woniu/dto/ServiceCommentDTO.java create mode 100644 pccenter/src/main/java/com/woniu/exception/GlobalExceptionHandler.java create mode 100644 pccenter/src/main/java/com/woniu/exception/LoginException.java delete mode 100644 pccenter/src/main/java/com/woniu/pojo/Information.java create mode 100644 pccenter/src/main/java/com/woniu/pojo/PropertyManage.java delete mode 100644 pccenter/src/main/java/com/woniu/pojo/Users.java create mode 100644 pccenter/src/main/java/com/woniu/service/ActivityComplainService.java create mode 100644 pccenter/src/main/java/com/woniu/service/ActivityService.java create mode 100644 pccenter/src/main/java/com/woniu/service/ComplainService.java create mode 100644 pccenter/src/main/java/com/woniu/service/DynamicCommentService.java create mode 100644 pccenter/src/main/java/com/woniu/service/MerchantService.java create mode 100644 pccenter/src/main/java/com/woniu/service/ProperManageService.java create mode 100644 pccenter/src/main/java/com/woniu/service/ServiceCommentService.java create mode 100644 pccenter/src/main/java/com/woniu/service/impl/ActivityComplainServiceImpl.java create mode 100644 pccenter/src/main/java/com/woniu/service/impl/ActivityServiceImpl.java create mode 100644 pccenter/src/main/java/com/woniu/service/impl/ComplainServiceImpl.java create mode 100644 pccenter/src/main/java/com/woniu/service/impl/DynamicCommentServiceImpl.java create mode 100644 pccenter/src/main/java/com/woniu/service/impl/MerchantServiceImpl.java create mode 100644 pccenter/src/main/java/com/woniu/service/impl/PropertyManageServiceImpl.java create mode 100644 pccenter/src/main/java/com/woniu/service/impl/ServiceCommentServiceImpl.java create mode 100644 pccenter/src/main/resources/mapper/ActivityComplainMapper.xml create mode 100644 pccenter/src/main/resources/mapper/ActivityMapper.xml create mode 100644 pccenter/src/main/resources/mapper/ComplainMapper.xml create mode 100644 pccenter/src/main/resources/mapper/DynamicCommentMapper.xml delete mode 100644 pccenter/src/main/resources/mapper/InformationMapper.xml create mode 100644 pccenter/src/main/resources/mapper/MerchantMapper.xml create mode 100644 pccenter/src/main/resources/mapper/PropertyManageMapper.xml create mode 100644 pccenter/src/main/resources/mapper/ServiceCommentMapper.xml delete mode 100644 pccenter/src/main/resources/mapper/UsersMapper.xml create mode 100644 pccenter/src/main/resources/templates/403.html create mode 100644 pccenter/src/main/resources/templates/sys/ac_complainList.html create mode 100644 pccenter/src/main/resources/templates/sys/ac_reply.html create mode 100644 pccenter/src/main/resources/templates/sys/activityList.html create mode 100644 pccenter/src/main/resources/templates/sys/complainList.html create mode 100644 pccenter/src/main/resources/templates/sys/dynamic_commentList.html create mode 100644 pccenter/src/main/resources/templates/sys/editMenu.html create mode 100644 pccenter/src/main/resources/templates/sys/merchantList.html create mode 100644 pccenter/src/main/resources/templates/sys/pmList.html create mode 100644 pccenter/src/main/resources/templates/sys/reply.html create mode 100644 pccenter/src/main/resources/templates/sys/service_commentList.html diff --git a/pccenter/pom.xml b/pccenter/pom.xml index ac5365a..c0d7080 100644 --- a/pccenter/pom.xml +++ b/pccenter/pom.xml @@ -9,9 +9,9 @@ com.woniu - rbacdemo + pccenter 0.0.1-SNAPSHOT - rbacdemo + pccenter Demo project for Spring Boot @@ -122,8 +122,15 @@ 1.5.21 + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + - + + org.springframework.cloud + spring-cloud-starter-netflix-zuul + diff --git a/pccenter/src/main/java/com/woniu/PccenterApplication.java b/pccenter/src/main/java/com/woniu/PccenterApplication.java index 8bf7ea7..56afdaf 100644 --- a/pccenter/src/main/java/com/woniu/PccenterApplication.java +++ b/pccenter/src/main/java/com/woniu/PccenterApplication.java @@ -3,6 +3,7 @@ package com.woniu; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cache.annotation.EnableCaching; @SpringBootApplication @MapperScan(value = "com.woniu.dao") diff --git a/pccenter/src/main/java/com/woniu/config/ShiroConfig.java b/pccenter/src/main/java/com/woniu/config/ShiroConfig.java index 30c1bd0..401acde 100644 --- a/pccenter/src/main/java/com/woniu/config/ShiroConfig.java +++ b/pccenter/src/main/java/com/woniu/config/ShiroConfig.java @@ -8,6 +8,7 @@ import org.apache.shiro.spring.web.ShiroFilterFactoryBean; import org.apache.shiro.web.mgt.CookieRememberMeManager; import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.apache.shiro.web.servlet.SimpleCookie; +import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -18,6 +19,7 @@ import java.util.Map; @Configuration public class ShiroConfig { + //自定义域 @Bean public CustomRealm customRealm(HashedCredentialsMatcher credentialsMatcher,MemoryConstrainedCacheManager cacheManager){ CustomRealm customRealm = new CustomRealm(); @@ -25,7 +27,7 @@ public class ShiroConfig { customRealm.setCacheManager(cacheManager); return customRealm; } - + // @Bean public DefaultWebSecurityManager securityManager(CustomRealm customRealm,CookieRememberMeManager rememberMeManager){ DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); @@ -33,7 +35,7 @@ public class ShiroConfig { securityManager.setRememberMeManager(rememberMeManager); return securityManager; } - + //过滤器 @Bean public ShiroFilterFactoryBean shiroFilterFactoryBean(DefaultWebSecurityManager securityManager){ ShiroFilterFactoryBean filterFactoryBean = new ShiroFilterFactoryBean(); @@ -44,11 +46,12 @@ public class ShiroConfig { map.put("/login","anon");//访问登录 map.put("/admin/subLogin","anon"); map.put("/src/**","anon"); + map.put("/logout","logout"); map.put("/**","authc"); filterFactoryBean.setFilterChainDefinitionMap(map); return filterFactoryBean; } - + // 盐值加密 @Bean public HashedCredentialsMatcher credentialsMatcher(){ HashedCredentialsMatcher credentialsMatcher = new HashedCredentialsMatcher(); @@ -56,17 +59,19 @@ public class ShiroConfig { credentialsMatcher.setHashIterations(1024); return credentialsMatcher; } - + //缓存管理 @Bean public MemoryConstrainedCacheManager cacheManager(){ return new MemoryConstrainedCacheManager(); } - @Bean //thymeleaf整合shiro;支持 shiro标签 + //thymeleaf整合shiro;支持 shiro标签 + @Bean public ShiroDialect shiroDialect(){ return new ShiroDialect(); } + //记住我管理器 @Bean public CookieRememberMeManager rememberMeManager(SimpleCookie cookie){ CookieRememberMeManager rememberMeManager = new CookieRememberMeManager(); @@ -74,6 +79,7 @@ public class ShiroConfig { return rememberMeManager; } + //cookie设置 @Bean public SimpleCookie simpleCookie(){ SimpleCookie cookie = new SimpleCookie(); @@ -82,25 +88,13 @@ public class ShiroConfig { return cookie; } - - - - - - - - - - - - - - - - - - - + //解决shiro 整合 spring aop 的时候,访问资源404的问题 + @Bean + public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator(){ + DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator(); + defaultAdvisorAutoProxyCreator.setUsePrefix(true); + return defaultAdvisorAutoProxyCreator; + } } diff --git a/pccenter/src/main/java/com/woniu/config/WebMvcConfig.java b/pccenter/src/main/java/com/woniu/config/WebMvcConfig.java index 8411616..6dd5d19 100644 --- a/pccenter/src/main/java/com/woniu/config/WebMvcConfig.java +++ b/pccenter/src/main/java/com/woniu/config/WebMvcConfig.java @@ -16,6 +16,13 @@ public class WebMvcConfig implements WebMvcConfigurer { registry.addViewController("sys/roleList").setViewName("/sys/roleList"); registry.addViewController("sys/addRole").setViewName("/sys/addRole"); registry.addViewController("sys/menuList").setViewName("/sys/menuList"); - registry.addViewController("sys/editMenu").setViewName("/sys/editList"); + registry.addViewController("sys/pmList").setViewName("/sys/pmList"); + registry.addViewController("sys/complainList").setViewName("/sys/complainList"); + registry.addViewController("sys/merchantList").setViewName("/sys/merchantList"); + registry.addViewController("sys/activityList").setViewName("/sys/activityList"); + registry.addViewController("sys/ac_complainList").setViewName("/sys/ac_complainList"); + registry.addViewController("sys/service_commentList").setViewName("/sys/service_commentList"); + registry.addViewController("sys/dynamic_commentList").setViewName("/sys/dynamic_commentList"); + registry.addViewController("403").setViewName("/403"); } } diff --git a/pccenter/src/main/java/com/woniu/controller/ActivityComplainController.java b/pccenter/src/main/java/com/woniu/controller/ActivityComplainController.java new file mode 100644 index 0000000..f0a5a5f --- /dev/null +++ b/pccenter/src/main/java/com/woniu/controller/ActivityComplainController.java @@ -0,0 +1,97 @@ +package com.woniu.controller; + +import com.github.pagehelper.PageInfo; +import com.woniu.common.CommonResult; +import com.woniu.dto.ActivityComplainDTO; +import com.woniu.service.ActivityComplainService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import java.util.List; + +@Controller +@RequestMapping("/ac_complain") +public class ActivityComplainController { + + @Autowired + private ActivityComplainService acComplainService; + + /** + * 分页查询活动投诉的列表信息 + * @param currentPage + * @param pageSize + * @return + */ + @RequestMapping("list") + @ResponseBody + @RequiresPermissions("sys:acc:list") + public CommonResult list(@RequestParam(value = "page",defaultValue = "1",required = false)Integer currentPage, + @RequestParam(value = "limit",defaultValue = "5",required = false)Integer pageSize){ + PageInfo info=null; + try { + List list=acComplainService.findByPage(currentPage,pageSize); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } + /** + * 导航到回复投诉的页面 + * @param id + * @return + */ + @RequestMapping("/reply/{id}") + @ResponseBody + @RequiresPermissions("sys:acc:reply") + public ModelAndView reply(@PathVariable("id")Integer id){ + ActivityComplainDTO activityComplainDTO=acComplainService.findById(id); + ModelAndView model=new ModelAndView("sys/ac_reply"); + model.addObject("ActivityComplainDTO",activityComplainDTO); + return model; + } + + /** + * 投诉回复内容的添加 + * @param activityComplainDTO + * @return + */ + @PutMapping("/editComplain") + @ResponseBody + public CommonResult addReply(ActivityComplainDTO activityComplainDTO){ + try { + acComplainService.addReply(activityComplainDTO); + return CommonResult.success("回复上传成功!"); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("回复上传失败!"); + } + + } + + /** + * 搜索功能 + * @param nickName + * @param title + * @return + */ + @RequestMapping("/select") + @ResponseBody + public CommonResult select(String nickName,String title){ + PageInfo info=null; + try { + List list=acComplainService.select(nickName,title); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + + } + +} diff --git a/pccenter/src/main/java/com/woniu/controller/ActivityController.java b/pccenter/src/main/java/com/woniu/controller/ActivityController.java new file mode 100644 index 0000000..b55dc5d --- /dev/null +++ b/pccenter/src/main/java/com/woniu/controller/ActivityController.java @@ -0,0 +1,101 @@ +package com.woniu.controller; + +import com.github.pagehelper.PageInfo; +import com.woniu.common.CommonResult; +import com.woniu.dto.ActivityDTO; +import com.woniu.service.ActivityService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.Date; +import java.util.List; +@Controller +@RequestMapping("/activity") +public class ActivityController { + + @Autowired + private ActivityService activityService; + + /** + * 分页查询活动审批数据 + * @param currentPage + * @param pageSize + * @return + */ + @RequestMapping("/list") + @ResponseBody + @RequiresPermissions("sys:al:list") + public CommonResult pmList(@RequestParam(value = "page",defaultValue = "1",required = false)Integer currentPage, + @RequestParam(value = "limit",defaultValue = "5",required = false)Integer pageSize){ + PageInfo info = null; + try { + List list=activityService.findListByPage(currentPage,pageSize); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + + } + + /** + * 修改审批状态 + * @param id + * @return + */ + @PutMapping("/confirm/{id}") + @ResponseBody + @RequiresPermissions("sys:al:examine") + public CommonResult confirmPM(@PathVariable("id") Integer id){ + Date examineTime=new Date(); + try { + activityService.editStatusById(id,examineTime); + } catch (Exception e) { + e.printStackTrace(); + CommonResult.failed("审批失败"); + } + return CommonResult.success("审批成功"); + } + + /** + * 页面查询功能 + * @param name + * @param status + * @return + */ + @RequestMapping("/select") + @ResponseBody + public CommonResult select(String name,Integer status){ + PageInfo info=null; + try { + List list=activityService.select(name,status); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } + + /** + * 拒绝审批操作 + * @param id + * @return + */ + @RequestMapping("/refuse/{id}") + @ResponseBody + public CommonResult refuse(@PathVariable("id")Integer id){ + //获取当前时间 + Date operationTime=new Date(); + try { + activityService.refuse(id,operationTime); + return CommonResult.success("操作成功!"); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("操作失败!"); + } + } +} diff --git a/pccenter/src/main/java/com/woniu/controller/AdminController.java b/pccenter/src/main/java/com/woniu/controller/AdminController.java index fe47338..e1c98c4 100644 --- a/pccenter/src/main/java/com/woniu/controller/AdminController.java +++ b/pccenter/src/main/java/com/woniu/controller/AdminController.java @@ -14,6 +14,7 @@ import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.UnknownAccountException; import org.apache.shiro.authc.UsernamePasswordToken; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.subject.Subject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -26,7 +27,6 @@ import java.util.Arrays; import java.util.List; - @Controller @RequestMapping("/admin") public class AdminController { @@ -46,6 +46,7 @@ public class AdminController { */ @RequestMapping("/list") @ResponseBody + @RequiresPermissions("sys:admin:list") public CommonResult list(@RequestParam(value = "page", defaultValue = "1", required = false) Integer currentPage, @RequestParam(value = "limit", defaultValue = "10", required = false) Integer pageSize) { PageInfo info = null; @@ -84,6 +85,7 @@ public class AdminController { */ @PostMapping("/saveAdmin") @ResponseBody + @RequiresPermissions("sys:admin:save") public CommonResult saveAdmin(Admin admin) { //验证用户名是否重复 @@ -108,8 +110,8 @@ public class AdminController { */ @DeleteMapping("/delAdmin/{keys}") @ResponseBody + @RequiresPermissions("sys:admin:delete") public CommonResult delAdmin(@PathVariable("keys") String keys) { - //List list = Arrays.stream(keys.split(",")).map(s->Long.parseLong(s)).collect(Collectors.toList()); List keysStringList = Arrays.asList(keys.split(",")); List list = new ArrayList<>(); CollectionUtils.collect(keysStringList, new Transformer() { @@ -150,6 +152,7 @@ public class AdminController { */ @PutMapping("/updateAdmin") @ResponseBody + @RequiresPermissions("sys:admin:update") public CommonResult updateAdmin(Admin admin) { Admin dbAdmin = adminService.checkName(admin); if (dbAdmin != null) { @@ -173,6 +176,7 @@ public class AdminController { */ @DeleteMapping("/deleteAdmin/{id}") @ResponseBody + @RequiresPermissions("sys:admin:delete") public CommonResult deleteAdmin(@PathVariable("id") Integer id) { try { adminService.deleteById(id); @@ -184,10 +188,17 @@ public class AdminController { } - //平台管理员登录 + /** + * 登录的验证 + * @param admin + * @return + */ + @PostMapping("/subLogin") @ResponseBody public CommonResult subLogin(Admin admin) { + System.out.println("传入的账号:"+admin.getUsername()); + System.out.println("传入的密码:"+admin.getPassword()); if (StringUtils.isEmpty(admin.getUsername())) { return CommonResult.failed("用户名不能为空"); } @@ -209,7 +220,6 @@ public class AdminController { return CommonResult.failed("认证失败"); } return CommonResult.success("登录成功"); - } diff --git a/pccenter/src/main/java/com/woniu/controller/ComplainController.java b/pccenter/src/main/java/com/woniu/controller/ComplainController.java new file mode 100644 index 0000000..78d932a --- /dev/null +++ b/pccenter/src/main/java/com/woniu/controller/ComplainController.java @@ -0,0 +1,101 @@ +package com.woniu.controller; + +import com.github.pagehelper.PageInfo; +import com.woniu.common.CommonResult; +import com.woniu.dto.ComplainDTO; +import com.woniu.service.ComplainService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import java.util.List; + +@Controller +@RequestMapping("/complain") +public class ComplainController { + + @Autowired + private ComplainService complainService; + + /** + * 分页查询投诉订单列表 + * @param currentPage + * @param pageSize + * @return + */ + @RequestMapping("/list") + @ResponseBody + @RequiresPermissions("sys:pmc:list") + public CommonResult list(@RequestParam(value = "page",defaultValue = "1",required = false)Integer currentPage, + @RequestParam(value = "limit",defaultValue = "5",required = false)Integer pageSize){ + PageInfo info=null; + try { + List list=complainService.findByPage(currentPage,pageSize); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } + + /** + * 导航到回复投诉的页面 + * @param id + * @return + */ + @RequestMapping("/reply/{id}") + @ResponseBody + public ModelAndView reply(@PathVariable("id")Integer id){ + System.out.println("传入的id值为:"+id); + ComplainDTO complainDTO=complainService.findById(id); + ModelAndView model=new ModelAndView("sys/reply"); + model.addObject("complainDTO",complainDTO); + return model; + } + + /** + * 投诉回复内容的添加 + * @param complainDTO + * @return + */ + @PutMapping("/editComplain") + @ResponseBody + @RequiresPermissions("sys:pmc:reply") + public CommonResult addReply(ComplainDTO complainDTO){ + System.out.println("回复投诉传入的id值:"+complainDTO.getId()); + System.out.println("回复的内容:"+complainDTO.getContext()); + try{ + complainService.addReply(complainDTO); + return CommonResult.success("回复上传成功"); + }catch (Exception e){ + e.printStackTrace(); + return CommonResult.failed("回复上传失败"); + } + + } + + /** + * 页面的查询功能 + * @param userName + * @param status + * @return + */ + @RequestMapping("/select") + @ResponseBody + public CommonResult select(String userName,Integer status){ + System.out.println("传入的userName:"+userName); + System.out.println("传入的Status:"+status); + PageInfo info=null; + try { + List list=complainService.select(userName,status); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } +} diff --git a/pccenter/src/main/java/com/woniu/controller/DynamicCommentController.java b/pccenter/src/main/java/com/woniu/controller/DynamicCommentController.java new file mode 100644 index 0000000..10dda96 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/controller/DynamicCommentController.java @@ -0,0 +1,69 @@ +package com.woniu.controller; + +import com.github.pagehelper.PageInfo; +import com.woniu.common.CommonResult; +import com.woniu.dto.DynamicCommentDTO; +import com.woniu.service.DynamicCommentService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Controller +@RequestMapping("/dynamic_comment") +public class DynamicCommentController { + @Autowired + private DynamicCommentService dc_Service; + + @RequestMapping("/list") + @ResponseBody + @RequiresPermissions("sys:dc:list") + public CommonResult list(@RequestParam(value = "page",defaultValue = "1",required = false)Integer currentPage, + @RequestParam(value = "limit",defaultValue = "5",required = false)Integer pageSize){ + PageInfo info=null; + try { + List list=dc_Service.findByPage(currentPage,pageSize); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } + + /** + * 删除评论 + * @param id + * @return + */ + @DeleteMapping("/delComment/{id}") + @ResponseBody + @RequiresPermissions("sys:dc:update") + public CommonResult delComment(@PathVariable("id")Integer id){ + try { + dc_Service.delComment(id); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("删除失败"); + } + return CommonResult.success("删除成功!"); + } + + @RequestMapping("/select") + @ResponseBody + public CommonResult select(String nickName,Integer dynamicType){ + System.out.println("nickName:"+nickName); + System.out.println("dynamicType:"+dynamicType); + PageInfo info=null; + try { + List list=dc_Service.select(nickName,dynamicType); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } +} diff --git a/pccenter/src/main/java/com/woniu/controller/MenusController.java b/pccenter/src/main/java/com/woniu/controller/MenusController.java index cf731af..26a38be 100644 --- a/pccenter/src/main/java/com/woniu/controller/MenusController.java +++ b/pccenter/src/main/java/com/woniu/controller/MenusController.java @@ -9,6 +9,7 @@ import com.woniu.pojo.Admin; import com.woniu.pojo.Menus; import com.woniu.service.MenusService; import org.apache.shiro.SecurityUtils; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -34,8 +35,6 @@ public class MenusController { public List getMenus(){ //根据当前登录用户的角色来获取该用户能够访问哪些资源 Admin admin = (Admin) SecurityUtils.getSubject().getPrincipal(); - System.out.println(admin.getRoleId()); - System.out.println(admin.getUsername()); List list = menusService.findMenusByRoles(admin.getRoleId()); return list; } @@ -83,8 +82,8 @@ public class MenusController { */ @GetMapping("/loadMenus") @ResponseBody + @RequiresPermissions("sys:menu:list") public Map loadMenus(){ - //code =0 msg count data List menus = menusService.findAll(); Map result = new HashMap(); result.put("code","0"); @@ -112,6 +111,7 @@ public class MenusController { */ @PostMapping("/saveMenu") @ResponseBody + @RequiresPermissions("sys:menu:save") public CommonResult saveMenu(Menus menus){ //验证同级目录下的菜单节点名称不能重复 if(menusService.checkMenuName(menus)){ @@ -133,6 +133,7 @@ public class MenusController { */ @DeleteMapping("/del/{id}") @ResponseBody + @RequiresPermissions("sys:menu:delete") public CommonResult del(@PathVariable("id") Integer mid){ try { menusService.delMenus(mid); @@ -152,20 +153,30 @@ public class MenusController { * @param menuId * @return */ - @RequestMapping("/updateMenu/{menuId}") + @RequestMapping("/editMenu/{menuId}") public String updateMenu(Model model,@PathVariable("menuId") Integer menuId){ - model.addAttribute("menuId",menuId);//修改菜单的id值 - return "/sys/editMenu"; + //查询该menuId下的数据 + Menus menus=menusService.findByMenuId(menuId); + model.addAttribute("menus",menus);//查询到的menu表数据存入model + return "sys/editMenu"; } /** * 菜单编辑 * @return */ - @PutMapping("/updateMenus") + @PutMapping("/editMenu") @ResponseBody - public CommonResult updateMenus(){ - return null; + @RequiresPermissions("sys:menu:update") + public CommonResult updateMenus(Menus menus){ + try { + menusService.updateMenus(menus); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("更新失败"); + } + return CommonResult.success("更新成功"); + } /** diff --git a/pccenter/src/main/java/com/woniu/controller/MerchantController.java b/pccenter/src/main/java/com/woniu/controller/MerchantController.java new file mode 100644 index 0000000..f591193 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/controller/MerchantController.java @@ -0,0 +1,103 @@ +package com.woniu.controller; + +import com.github.pagehelper.PageInfo; +import com.woniu.common.CommonResult; +import com.woniu.dto.MerchantDTO; +import com.woniu.service.MerchantService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + + +import java.util.Date; +import java.util.List; + +@Controller +@RequestMapping("/merchant") +public class MerchantController { + + @Autowired + private MerchantService merchantService; + + /** + * 分页查询商家列表 + * @param currentPage + * @param pageSize + * @return + */ + @RequestMapping("/list") + @ResponseBody + @RequiresPermissions("sys:ml:list") + public CommonResult list(@RequestParam(value = "page",defaultValue = "1",required = false)Integer currentPage, + @RequestParam(value = "limit",defaultValue = "5",required = false)Integer pageSize){ + PageInfo info=null; + try { + List list=merchantService.findByPage(currentPage,pageSize); + System.out.println("查询到的列表数据条数:"+list.size()); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } + + /** + * 修改商家审核状态 + * @param id + * @return + */ + @PutMapping("/confirm/{id}") + @ResponseBody + @RequiresPermissions("sys:ml:examine") + private CommonResult confirmPM(@PathVariable("id") Integer id){ + //获取当前操作的时间 + Date examineTime=new Date(); + try { + merchantService.editStatusById(id,examineTime); + } catch (Exception e) { + e.printStackTrace(); + CommonResult.failed("审批失败"); + } + return CommonResult.success("审批成功"); + } + + /** + * 页面搜索功能 + * @param nickName + * @param status + * @return + */ + @RequestMapping("/select") + @ResponseBody + public CommonResult select(String nickName,Integer status){ + PageInfo info=null; + try { + List list= merchantService.select(nickName,status); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } + + /** + * 拒绝审批操作 + * @param id + * @return + */ + @RequestMapping("/refuse/{id}") + @ResponseBody + public CommonResult refuse(@PathVariable("id")Integer id){ + Date refuseTime=new Date(); + try { + merchantService.refuse(id,refuseTime); + return CommonResult.success("操作成功!"); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("操作失败!"); + } + } +} diff --git a/pccenter/src/main/java/com/woniu/controller/PropertyManageController.java b/pccenter/src/main/java/com/woniu/controller/PropertyManageController.java new file mode 100644 index 0000000..9ea489a --- /dev/null +++ b/pccenter/src/main/java/com/woniu/controller/PropertyManageController.java @@ -0,0 +1,108 @@ +package com.woniu.controller; + +import com.github.pagehelper.PageInfo; +import com.woniu.common.CommonResult; +import com.woniu.dto.MerchantDTO; +import com.woniu.pojo.PropertyManage; +import com.woniu.service.ProperManageService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +@Controller +@RequestMapping("/pm") +public class PropertyManageController { + + @Autowired + private ProperManageService pmService; + + /** + * 分页查询物业管理列表 + * @param currentPage + * @param pageSize + * @return + */ + @RequestMapping("/list") + @ResponseBody + @RequiresPermissions("sys:pm:list") + public CommonResult pmList(@RequestParam(value = "page",defaultValue = "1",required = false)Integer currentPage, + @RequestParam(value = "limit",defaultValue = "5",required = false)Integer pageSize){ + PageInfo info = null; + try { + List list=pmService.findListByPage(currentPage,pageSize); + System.out.println("查询到的列表数据条数:"+list.size()); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + + } + + /** + * 审批操作 + * @param id + * @return + */ + @PutMapping("/confirm/{id}") + @ResponseBody + @RequiresPermissions("sys:pm:examine") + public CommonResult confirmPM(@PathVariable("id") Integer id){ + //获取当前时间 + Date passTime=new Date(); + try { + pmService.editStatusById(id,passTime); + } catch (Exception e) { + e.printStackTrace(); + CommonResult.failed("审批失败"); + } + return CommonResult.success("审批成功"); + } + + /** + * 页面搜索功能 + * @param userName + * @param status + * @return + */ + @RequestMapping("/select") + @ResponseBody + public CommonResult select(String userName,Integer status){ + PageInfo info=null; + try { + List list=pmService.findList(userName,status); + System.out.println("查询到的列表数据条数:"+list.size()); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("查询失败"); + } + } + + /** + * 拒绝审批操作 + * @param id + * @return + */ + @PutMapping("/refuse/{id}") + @ResponseBody + public CommonResult refuse(@PathVariable("id")Integer id){ + //获取当前时间 + Date refuseTime=new Date(); + try { + pmService.refuse(id,refuseTime); + return CommonResult.success("执行成功!"); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("执行失败!"); + } + } + +} diff --git a/pccenter/src/main/java/com/woniu/controller/RolesController.java b/pccenter/src/main/java/com/woniu/controller/RolesController.java index 568d8c1..b0089c7 100644 --- a/pccenter/src/main/java/com/woniu/controller/RolesController.java +++ b/pccenter/src/main/java/com/woniu/controller/RolesController.java @@ -7,6 +7,7 @@ import com.woniu.pojo.Roles; import com.woniu.service.RolesService; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.Transformer; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -26,6 +27,7 @@ public class RolesController { @RequestMapping("/list") @ResponseBody + @RequiresPermissions("sys:role:list") public CommonResult list(@RequestParam(value="page",defaultValue = "1",required = false)Integer currentPage, @RequestParam(value = "limit",defaultValue = "5",required = false)Integer pageSize){ List roles = rolesService.findByPage(currentPage,pageSize); @@ -42,6 +44,7 @@ public class RolesController { */ @PostMapping("/saveRole") @ResponseBody + @RequiresPermissions("sys:role:save") public CommonResult saveRole(Roles roles,String menuId){ //检查角色的名称不能重复 Roles result = rolesService.findByRoleName(roles.getRoleName()); @@ -87,6 +90,7 @@ public class RolesController { */ @PutMapping("/updateRole") @ResponseBody + @RequiresPermissions("sys:role:update") public CommonResult updateRole(Roles roles,String menuId){ //检查更新的角色名称是否已经存 @@ -119,6 +123,7 @@ public class RolesController { */ @DeleteMapping("/del/{id}") @ResponseBody + @RequiresPermissions("sys:role:delete") public CommonResult del(@PathVariable("id")Integer roleId){ try { rolesService.delRole(roleId); @@ -139,6 +144,7 @@ public class RolesController { */ @DeleteMapping("/batchDel/{keys}") @ResponseBody + @RequiresPermissions("sys:role:delete") public CommonResult batchDel(@PathVariable("keys")String keys){ //List rolesId =Arrays.stream(keys.split(",")).map(s->Long.parseLong(s)).collect(Collectors.toList()); List keysStringList = Arrays.asList(keys.split(",")); diff --git a/pccenter/src/main/java/com/woniu/controller/ServiceCommentController.java b/pccenter/src/main/java/com/woniu/controller/ServiceCommentController.java new file mode 100644 index 0000000..241e081 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/controller/ServiceCommentController.java @@ -0,0 +1,83 @@ +package com.woniu.controller; + +import com.github.pagehelper.PageInfo; +import com.woniu.common.CommonResult; +import com.woniu.dto.ServiceCommentDTO; +import com.woniu.service.ServiceCommentService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Controller +@RequestMapping("/service_comment") +@RequiresPermissions("sys:sc:list") +public class ServiceCommentController { + + @Autowired + private ServiceCommentService scService; + + /** + * 分页查询服务评论列表数据 + * @param currentPage + * @param pageSize + * @return + */ + @RequestMapping("/list") + @ResponseBody + public CommonResult list(@RequestParam(value = "page",defaultValue = "1",required = false)Integer currentPage, + @RequestParam(value = "limit",defaultValue = "5",required = false)Integer pageSize){ + PageInfo info=null; + try { + List list=scService.findByPage(currentPage,pageSize); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } + + /** + * 删除评论 + * @param id + * @return + */ + @DeleteMapping("/delComment/{id}") + @ResponseBody + @RequiresPermissions("sys:sc:delete") + public CommonResult delComment(@PathVariable("id")Integer id){ + try { + scService.delComment(id); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed("删除失败!"); + } + return CommonResult.success("删除成功!"); + } + + /** + * 查询功能 + * @param nickName + * @param payName + * @return + */ + @RequestMapping("/select") + @ResponseBody + public CommonResult select(String nickName,String payName){ + System.out.println("nickName:"+nickName); + System.out.println("payName:"+payName); + PageInfo info=null; + try { + List list=scService.select(nickName,payName); + System.out.println("controller中list的条数:"+list.size()); + info=new PageInfo(list); + return CommonResult.success(info); + } catch (Exception e) { + e.printStackTrace(); + return CommonResult.failed(); + } + } +} diff --git a/pccenter/src/main/java/com/woniu/dao/ActivityComplainMapper.java b/pccenter/src/main/java/com/woniu/dao/ActivityComplainMapper.java new file mode 100644 index 0000000..f219e32 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/ActivityComplainMapper.java @@ -0,0 +1,24 @@ +package com.woniu.dao; + +import com.woniu.dto.ActivityComplainDTO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import java.util.Date; +import java.util.List; + +public interface ActivityComplainMapper { + + @Select("select cac.id,pu.nickname nickName,pu.sex,pu.mailbox mailBox,ca.ca_title title,ca.ca_create_time createTime,cac.cac_reason reason,cac.cac_examine_status `status`,cac.cac_reply context " + + "from person_user pu INNER JOIN community_activity_complaint cac ON pu.id=cac.cac_user_id INNER JOIN community_activity ca ON ca.id=cac.cac_activity_id order by cac.id desc ") + List findByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize); + + @Select("select cac.id,cac.cac_reason reason,cac.cac_examine_status `status` from community_activity_complaint cac where id=#{value}") + ActivityComplainDTO findById(Integer id); + + @Update("update community_activity_complaint set cac_reply=#{context},cac_examine_status = 1,cac_replyTime = #{replyTime} where id=#{id}") + void addReply(@Param("id") Integer id, @Param("context") String context, @Param("replyTime") Date replyTime); + + List select(@Param("nickName") String nickName,@Param("title") String title); +} diff --git a/pccenter/src/main/java/com/woniu/dao/ActivityMapper.java b/pccenter/src/main/java/com/woniu/dao/ActivityMapper.java new file mode 100644 index 0000000..32b13b7 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/ActivityMapper.java @@ -0,0 +1,24 @@ +package com.woniu.dao; + +import com.woniu.dto.ActivityDTO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import java.util.Date; +import java.util.List; + +public interface ActivityMapper { + + @Select("select ca.id,ca.ca_type type,ca.ca_examineTime operationTime,ca.ca_title title,ca.ca_content content,ca.ca_money money,ca.ca_peopel_count number,ca.ca_create_time createTime,ca.ca_examine_status status,pu.nickname name from " + + "person_user pu inner join community_activity ca on pu.id=ca.ca_user_id order by ca.id desc") + List findByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize); + + @Update("update community_activity set ca_examine_status = 1,ca_examineTime = #{operationTime} where id=#{value}") + void editStatusById(@Param("id") Integer id,@Param("examineTime") Date examineTime); + + List select(@Param("name") String name, @Param("status") Integer status); + + @Update("update community_activity set ca_examine_status = 2,ca_examineTime = #{operationTime} where id=#{value}") + void refuse(@Param("id") Integer id, @Param("operationTime") Date operationTime); +} diff --git a/pccenter/src/main/java/com/woniu/dao/ComplainMapper.java b/pccenter/src/main/java/com/woniu/dao/ComplainMapper.java new file mode 100644 index 0000000..dfbc6ab --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/ComplainMapper.java @@ -0,0 +1,38 @@ +package com.woniu.dao; + +import com.woniu.dto.ComplainDTO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import java.util.List; + +public interface ComplainMapper { + + @Select("SELECT ss.id,ss.statecontext reason,ss.`status`,ss.reply_context context,so.starttime startTime,so.id orderId,\n" + + "pu.nickname nickName,pu.mailbox mailBox,pu.sex FROM state_service ss LEFT JOIN service_order so ON ss.serviceid=so.id\n" + + "INNER JOIN person_user pu ON pu.id=so.userid order by ss.id desc") + List findByPage(@Param("currentPage")Integer currentPage,@Param("pageSize")Integer pageSize); + + @Update("update state_service set status=1,reply_context=#{context} where id=#{id}") + void addReply(@Param("id") Integer id, @Param("context") String context); + + @Select("select * from state_service where id=#{value}") + ComplainDTO findById(Integer id); + + /*@Select("")*/ + List select(@Param("userName") String userName,@Param("status") Integer status); +} diff --git a/pccenter/src/main/java/com/woniu/dao/DynamicCommentMapper.java b/pccenter/src/main/java/com/woniu/dao/DynamicCommentMapper.java new file mode 100644 index 0000000..e8ac1e6 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/DynamicCommentMapper.java @@ -0,0 +1,19 @@ +package com.woniu.dao; + +import com.woniu.dto.DynamicCommentDTO; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface DynamicCommentMapper { + + @Select("select pu.nickname nickName,cdc.id,cd.cd_type dynamicType,cd.cd_favor favor,cd.cd_content dynamicContent,cd.cd_time issueTime,cdc.cdc_content `comment`,cdc.cdc_time commentTime from person_user pu INNER JOIN community_dynamic_comment cdc ON pu.id = cdc.cdc_user_id INNER JOIN community_dynamic cd ON cdc.cdc_dynamic_id=cd.id order by cdc.id desc") + List findByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize); + + @Delete("delete from community_dynamic_comment where id = #{value}") + void delComment(Integer id); + + List select(@Param("nickName") String nickName,@Param("dynamicType") Integer dynamicType); +} diff --git a/pccenter/src/main/java/com/woniu/dao/InformationMapper.java b/pccenter/src/main/java/com/woniu/dao/InformationMapper.java deleted file mode 100644 index 41e2c3d..0000000 --- a/pccenter/src/main/java/com/woniu/dao/InformationMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.woniu.dao; - -import com.woniu.pojo.Information; - -public interface InformationMapper { - int deleteByPrimaryKey(Integer id); - - int insert(Information record); - - int insertSelective(Information record); - - Information selectByPrimaryKey(Integer id); - - int updateByPrimaryKeySelective(Information record); - - int updateByPrimaryKey(Information record); -} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/dao/MenusMapper.java b/pccenter/src/main/java/com/woniu/dao/MenusMapper.java index e678973..285e485 100644 --- a/pccenter/src/main/java/com/woniu/dao/MenusMapper.java +++ b/pccenter/src/main/java/com/woniu/dao/MenusMapper.java @@ -19,6 +19,7 @@ public interface MenusMapper { int updateByPrimaryKeySelective(Menus record); int updateByPrimaryKey(Menus record); + @Select("select perms from pc_menus m left join pc_roles_menus rm on m.menu_id = rm.menu_id left join " + "pc_roles r on rm.role_id = r.role_id where r.role_id = #{value}") List findPermsByRoles(Integer roleId); @@ -38,4 +39,8 @@ public interface MenusMapper { @Update("update pc_menus set sorting = #{sorting} where menu_id = #{menuId}") void updateSorting(@Param("menuId") Integer menuId, @Param("sorting") Integer sorting); + + @Select("select * from pc_menus where menu_id=#{value}") + Menus findByMenuId(Integer menuId); + } \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/dao/MerchantMapper.java b/pccenter/src/main/java/com/woniu/dao/MerchantMapper.java new file mode 100644 index 0000000..1ff3888 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/MerchantMapper.java @@ -0,0 +1,24 @@ +package com.woniu.dao; + +import com.woniu.dto.MerchantDTO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import java.util.Date; +import java.util.List; + +public interface MerchantMapper { + + @Select("select ai.area_name areaName,bi.id,bi.nickname nickName,bi.operationTime operationTime,bi.mailbox mailBox,create_time createTime" + + ",bi.address,bi.introduce,bi.status from areainfo ai inner join business_info bi on ai.id=bi.plot_id order by bi.id desc") + List findByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize); + + @Update("update business_info set status=1,operationTime=#{examineTime} where id=#{id}") + void editStatusById(@Param("id") Integer id, @Param("examineTime") Date examineTime); + + List select(@Param("nickName") String nickName, @Param("status") Integer status); + + @Update("update business_info set status=2,operationTime=#{refuseTime} where id=#{id}") + void refuse(@Param("id") Integer id, @Param("refuseTime") Date refuseTime); +} diff --git a/pccenter/src/main/java/com/woniu/dao/PropertyManageMapper.java b/pccenter/src/main/java/com/woniu/dao/PropertyManageMapper.java new file mode 100644 index 0000000..a9996d8 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/PropertyManageMapper.java @@ -0,0 +1,23 @@ +package com.woniu.dao; + +import com.woniu.pojo.PropertyManage; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; + + +import java.util.Date; +import java.util.List; + +public interface PropertyManageMapper { + + List findByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize); + + @Update("update property_manage set status = 1,pass_time=#{passTime} where id=#{id}") + void editStatusById(@Param("id") Integer id, @Param("passTime") Date passTime); + + + List findList(@Param("userName") String userName,@Param("status") Integer status); + + @Update("update property_manage set status = 2 ,pass_time=#{refuseTime}where id=#{id}") + void refuse(@Param("id") Integer id,@Param("refuseTime") Date refuseTime); +} diff --git a/pccenter/src/main/java/com/woniu/dao/RolesMapper.java b/pccenter/src/main/java/com/woniu/dao/RolesMapper.java index 4e20195..aba8b1f 100644 --- a/pccenter/src/main/java/com/woniu/dao/RolesMapper.java +++ b/pccenter/src/main/java/com/woniu/dao/RolesMapper.java @@ -23,7 +23,7 @@ public interface RolesMapper { @Select("select * from pc_roles") List selectAll(); - @Select("select * from pc_roles") + @Select("select * from pc_roles order by pc_roles.role_id desc") List selectByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize); @Select("select * from pc_roles where role_name = #{roleName}") diff --git a/pccenter/src/main/java/com/woniu/dao/ServiceCommentMapper.java b/pccenter/src/main/java/com/woniu/dao/ServiceCommentMapper.java new file mode 100644 index 0000000..107c5de --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dao/ServiceCommentMapper.java @@ -0,0 +1,20 @@ +package com.woniu.dao; + +import com.woniu.dto.ServiceCommentDTO; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + + +import java.util.List; + +public interface ServiceCommentMapper { + + @Select("select pu.mailbox mailBox,pu.nickname nickName,es.id,es.evalute,pp.payname payName,pp.payprice payPrice,pp.servicecontext context from person_user pu INNER JOIN evaluate_service es ON pu.id = es.userid INNER JOIN pp_payservice pp ON pp.id=es.serviceid order by es.id desc") + List findByPage(@Param("currentPage") Integer currentPage,@Param("pageSize") Integer pageSize); + + @Delete("delete from evaluate_service where id = #{value}") + void delComment(Integer id); + + List select(@Param("nickName") String nickName, @Param("payName") String payName); +} diff --git a/pccenter/src/main/java/com/woniu/dao/UsersMapper.java b/pccenter/src/main/java/com/woniu/dao/UsersMapper.java deleted file mode 100644 index f9fbcb0..0000000 --- a/pccenter/src/main/java/com/woniu/dao/UsersMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.woniu.dao; - -import com.woniu.pojo.Users; - -public interface UsersMapper { - int deleteByPrimaryKey(Integer uid); - - int insert(Users record); - - int insertSelective(Users record); - - Users selectByPrimaryKey(Integer uid); - - int updateByPrimaryKeySelective(Users record); - - int updateByPrimaryKey(Users record); -} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/dto/ActivityComplainDTO.java b/pccenter/src/main/java/com/woniu/dto/ActivityComplainDTO.java new file mode 100644 index 0000000..3d5bb4f --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dto/ActivityComplainDTO.java @@ -0,0 +1,89 @@ +package com.woniu.dto; + +import java.io.Serializable; +import java.util.Date; + +public class ActivityComplainDTO implements Serializable { + private Integer id; + private String nickName; + private String sex; + private String mailBox; + private String title; + private Date createTime; + private String reason; + private Integer status; + private String context; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getMailBox() { + return mailBox; + } + + public void setMailBox(String mailBox) { + this.mailBox = mailBox; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getContext() { + return context; + } + + public void setContext(String context) { + this.context = context; + } +} diff --git a/pccenter/src/main/java/com/woniu/dto/ActivityDTO.java b/pccenter/src/main/java/com/woniu/dto/ActivityDTO.java new file mode 100644 index 0000000..3b67ea0 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dto/ActivityDTO.java @@ -0,0 +1,96 @@ +package com.woniu.dto; + +import java.io.Serializable; +import java.util.Date; + +public class ActivityDTO implements Serializable { + private Integer id; + private String name; + private Integer type; + private String title; + private String content; + private Integer number; + private Date createTime; + private Integer status; + private Double money; + private Date operationTime; + + public Date getOperationTime() { + return operationTime; + } + + public void setOperationTime(Date operationTime) { + this.operationTime = operationTime; + } + public Double getMoney() { + return money; + } + + public void setMoney(Double money) { + this.money = money; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } +} diff --git a/pccenter/src/main/java/com/woniu/dto/ComplainDTO.java b/pccenter/src/main/java/com/woniu/dto/ComplainDTO.java new file mode 100644 index 0000000..273dd52 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dto/ComplainDTO.java @@ -0,0 +1,89 @@ +package com.woniu.dto; + +import java.io.Serializable; +import java.util.Date; + +public class ComplainDTO implements Serializable { + private Integer id; + private String nickName; + private String sex; + private String mailBox; + private Integer orderId; + private Date startTime; + private String reason; + private Integer status; + //private Date passTime; + private String context; + + public String getContext() { + return context; + } + + public void setContext(String context) { + this.context = context; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getMailBox() { + return mailBox; + } + + public void setMailBox(String mailBox) { + this.mailBox = mailBox; + } + + public Integer getOrderId() { + return orderId; + } + + public void setOrderId(Integer orderId) { + this.orderId = orderId; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } +} diff --git a/pccenter/src/main/java/com/woniu/dto/DynamicCommentDTO.java b/pccenter/src/main/java/com/woniu/dto/DynamicCommentDTO.java new file mode 100644 index 0000000..c6de36f --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dto/DynamicCommentDTO.java @@ -0,0 +1,79 @@ +package com.woniu.dto; + +import java.io.Serializable; +import java.util.Date; + +public class DynamicCommentDTO implements Serializable { + private Integer id; + private String nickName; + private Integer dynamicType; + private String dynamicContent; + private Integer favor; + private Date issueTime; + private String comment; + private Date commentTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public Integer getDynamicType() { + return dynamicType; + } + + public void setDynamicType(Integer dynamicType) { + this.dynamicType = dynamicType; + } + + public String getDynamicContent() { + return dynamicContent; + } + + public void setDynamicContent(String dynamicContent) { + this.dynamicContent = dynamicContent; + } + + public Integer getFavor() { + return favor; + } + + public void setFavor(Integer favor) { + this.favor = favor; + } + + public Date getIssueTime() { + return issueTime; + } + + public void setIssueTime(Date issueTime) { + this.issueTime = issueTime; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public Date getCommentTime() { + return commentTime; + } + + public void setCommentTime(Date commentTime) { + this.commentTime = commentTime; + } +} diff --git a/pccenter/src/main/java/com/woniu/dto/MerchantDTO.java b/pccenter/src/main/java/com/woniu/dto/MerchantDTO.java new file mode 100644 index 0000000..baaa0ac --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dto/MerchantDTO.java @@ -0,0 +1,88 @@ +package com.woniu.dto; + +import java.io.Serializable; +import java.util.Date; + +public class MerchantDTO implements Serializable{ + private Integer id; + private String nickName; + private String areaName; + private String mailBox; + private Date createTime; + private String address; + private String introduce; + private Integer status; + private Date operationTime; + + public Date getOperationTime() { + return operationTime; + } + + public void setOperationTime(Date operationTime) { + this.operationTime = operationTime; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getAreaName() { + return areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getMailBox() { + return mailBox; + } + + public void setMailBox(String mailBox) { + this.mailBox = mailBox; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getAddress() { + return address; + } + + public void setAddress(String adress) { + this.address = adress; + } + + public String getIntroduce() { + return introduce; + } + + public void setIntroduce(String introduce) { + this.introduce = introduce; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } +} diff --git a/pccenter/src/main/java/com/woniu/dto/ServiceCommentDTO.java b/pccenter/src/main/java/com/woniu/dto/ServiceCommentDTO.java new file mode 100644 index 0000000..97b2b15 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/dto/ServiceCommentDTO.java @@ -0,0 +1,70 @@ +package com.woniu.dto; + +import java.io.Serializable; + + +public class ServiceCommentDTO implements Serializable { + private Integer id; + private String nickName; + private String payName; + private String evalute; + private String mailBox; + private Integer payPrice; + private String context; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getPayName() { + return payName; + } + + public void setPayName(String payName) { + this.payName = payName; + } + + public String getEvalute() { + return evalute; + } + + public void setEvalute(String evalute) { + this.evalute = evalute; + } + + public String getMailBox() { + return mailBox; + } + + public void setMailBox(String mailBox) { + this.mailBox = mailBox; + } + + public Integer getPayPrice() { + return payPrice; + } + + public void setPayPrice(Integer payPrice) { + this.payPrice = payPrice; + } + + public String getContext() { + return context; + } + + public void setContext(String context) { + this.context = context; + } +} diff --git a/pccenter/src/main/java/com/woniu/exception/GlobalExceptionHandler.java b/pccenter/src/main/java/com/woniu/exception/GlobalExceptionHandler.java new file mode 100644 index 0000000..56fdf05 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/exception/GlobalExceptionHandler.java @@ -0,0 +1,60 @@ +package com.woniu.exception; + +import com.woniu.common.CommonResult; +import org.apache.shiro.authz.UnauthorizedException; +import org.springframework.validation.BindException; +import org.springframework.validation.BindingResult; +import org.springframework.validation.FieldError; +import org.springframework.web.HttpRequestMethodNotSupportedException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestControllerAdvice; + +import java.util.List; + +@ControllerAdvice +public class GlobalExceptionHandler { + + @ExceptionHandler(UnauthorizedException.class) + public String unauthorizedExceptionHandler(UnauthorizedException e){ + e.printStackTrace(); + return "/403";//跳转到 403.html + } + + + @ExceptionHandler(HttpRequestMethodNotSupportedException.class) + @ResponseBody + public String httpRequestMethodNotSupportedExceptionHandler(HttpRequestMethodNotSupportedException e){ + e.printStackTrace(); + return "访问方式不支持"; + } + + + /*@ExceptionHandler(LoginException.class) + @ResponseBody + public CommonResult loginExceptionHandler(LoginException e){ + return CommonResult.failed(e.getMessage()); + }*/ + + /* @ExceptionHandler(BindException.class) + @ResponseBody + public CommonResult bindExceionHandler(BindException e){ + e.printStackTrace(); + BindingResult result = e.getBindingResult();//BindingResult对象存放了Spring校验抛出的异常 + List list = result.getFieldErrors(); + for (FieldError fieldError : list) { + String msg = fieldError.getDefaultMessage(); + return CommonResult.valetateFailed(msg); + } + return CommonResult.valetateFailed(); + }*/ + + @ExceptionHandler(Exception.class) + @ResponseBody + public CommonResult exceptionHandler(Exception e){ + e.printStackTrace(); + System.out.println(e.getClass().getName()); + return CommonResult.failed("网络异常"); + } +} diff --git a/pccenter/src/main/java/com/woniu/exception/LoginException.java b/pccenter/src/main/java/com/woniu/exception/LoginException.java new file mode 100644 index 0000000..ef7339f --- /dev/null +++ b/pccenter/src/main/java/com/woniu/exception/LoginException.java @@ -0,0 +1,22 @@ +package com.woniu.exception; + +public class LoginException extends RuntimeException{ + public LoginException() { + } + + public LoginException(String message) { + super(message); + } + + public LoginException(String message, Throwable cause) { + super(message, cause); + } + + public LoginException(Throwable cause) { + super(cause); + } + + public LoginException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } +} diff --git a/pccenter/src/main/java/com/woniu/pojo/Information.java b/pccenter/src/main/java/com/woniu/pojo/Information.java deleted file mode 100644 index 2f1c550..0000000 --- a/pccenter/src/main/java/com/woniu/pojo/Information.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.woniu.pojo; - -public class Information { - private Integer id; - - private Integer account; - - private String password; - - private String name; - - private String nickname; - - private String roletype; - - private String stage; - - private Integer phone; - - private String adress; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getAccount() { - return account; - } - - public void setAccount(Integer account) { - this.account = account; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getNickname() { - return nickname; - } - - public void setNickname(String nickname) { - this.nickname = nickname; - } - - public String getRoletype() { - return roletype; - } - - public void setRoletype(String roletype) { - this.roletype = roletype; - } - - public String getStage() { - return stage; - } - - public void setStage(String stage) { - this.stage = stage; - } - - public Integer getPhone() { - return phone; - } - - public void setPhone(Integer phone) { - this.phone = phone; - } - - public String getAdress() { - return adress; - } - - public void setAdress(String adress) { - this.adress = adress; - } -} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/pojo/PropertyManage.java b/pccenter/src/main/java/com/woniu/pojo/PropertyManage.java new file mode 100644 index 0000000..0a37b7f --- /dev/null +++ b/pccenter/src/main/java/com/woniu/pojo/PropertyManage.java @@ -0,0 +1,95 @@ +package com.woniu.pojo; + +import java.util.Date; + +public class PropertyManage { + private Integer id; + + private Integer villageId; + + private String userName; + + private String saltValue; + + private String phone; + + private Integer status; + + private Date createTime; + + private Date passTime; + + /* private String areaName; + + public String getAreaName() { + return areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + }*/ + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getVillageId() { + return villageId; + } + + public void setVillageId(Integer villageId) { + this.villageId = villageId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getSaltValue() { + return saltValue; + } + + public void setSaltValue(String saltValue) { + this.saltValue = saltValue; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getPassTime() { + return passTime; + } + + public void setPassTime(Date passTime) { + this.passTime = passTime; + } +} diff --git a/pccenter/src/main/java/com/woniu/pojo/RolesMenusKey.java b/pccenter/src/main/java/com/woniu/pojo/RolesMenusKey.java index da24ad7..06ab7a6 100644 --- a/pccenter/src/main/java/com/woniu/pojo/RolesMenusKey.java +++ b/pccenter/src/main/java/com/woniu/pojo/RolesMenusKey.java @@ -4,7 +4,7 @@ import java.io.Serializable; import lombok.Data; /** - * tb_roles_menus + * pc_roles_menus * @author */ @Data diff --git a/pccenter/src/main/java/com/woniu/pojo/Users.java b/pccenter/src/main/java/com/woniu/pojo/Users.java deleted file mode 100644 index 73ad250..0000000 --- a/pccenter/src/main/java/com/woniu/pojo/Users.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.woniu.pojo; - -public class Users { - private Integer uid; - - private Integer account; - - private String name; - - private String password; - - private Integer phone; - - private String adress; - - private String status; - - private String nickname; - - private String roleType; - - public Integer getUid() { - return uid; - } - - public void setUid(Integer uid) { - this.uid = uid; - } - - public Integer getAccount() { - return account; - } - - public void setAccount(Integer account) { - this.account = account; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public Integer getPhone() { - return phone; - } - - public void setPhone(Integer phone) { - this.phone = phone; - } - - public String getAdress() { - return adress; - } - - public void setAdress(String adress) { - this.adress = adress; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getNickname() { - return nickname; - } - - public void setNickname(String nickname) { - this.nickname = nickname; - } - - public String getRoleType() { - return roleType; - } - - public void setRoleType(String roleType) { - this.roleType = roleType; - } -} \ No newline at end of file diff --git a/pccenter/src/main/java/com/woniu/realm/CustomRealm.java b/pccenter/src/main/java/com/woniu/realm/CustomRealm.java index ae780f7..5df85c7 100644 --- a/pccenter/src/main/java/com/woniu/realm/CustomRealm.java +++ b/pccenter/src/main/java/com/woniu/realm/CustomRealm.java @@ -47,7 +47,7 @@ public class CustomRealm extends AuthorizingRealm { throw new UnknownAccountException("账号不存在"); } SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(admin,admin.getPassword(),ByteSource.Util.bytes(admin.getSalt()),super.getName()); - //info.setCredentialsSalt(ByteSource.Util.bytes(admin.getSalt())); + info.setCredentialsSalt(ByteSource.Util.bytes(admin.getSalt())); return info; } } diff --git a/pccenter/src/main/java/com/woniu/service/ActivityComplainService.java b/pccenter/src/main/java/com/woniu/service/ActivityComplainService.java new file mode 100644 index 0000000..dc5d465 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/ActivityComplainService.java @@ -0,0 +1,15 @@ +package com.woniu.service; + +import com.woniu.dto.ActivityComplainDTO; + +import java.util.List; + +public interface ActivityComplainService { + List findByPage(Integer currentPage, Integer pageSize); + + ActivityComplainDTO findById(Integer id); + + void addReply(ActivityComplainDTO activityComplainDTO); + + List select(String nickName, String title); +} diff --git a/pccenter/src/main/java/com/woniu/service/ActivityService.java b/pccenter/src/main/java/com/woniu/service/ActivityService.java new file mode 100644 index 0000000..466e268 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/ActivityService.java @@ -0,0 +1,16 @@ +package com.woniu.service; + +import com.woniu.dto.ActivityDTO; + +import java.util.Date; +import java.util.List; + +public interface ActivityService { + List findListByPage(Integer currentPage, Integer pageSize); + + void editStatusById(Integer id,Date examineTime); + + List select(String name, Integer status); + + void refuse(Integer id, Date operationTime); +} diff --git a/pccenter/src/main/java/com/woniu/service/ComplainService.java b/pccenter/src/main/java/com/woniu/service/ComplainService.java new file mode 100644 index 0000000..3205a12 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/ComplainService.java @@ -0,0 +1,15 @@ +package com.woniu.service; + +import com.woniu.dto.ComplainDTO; + +import java.util.List; + +public interface ComplainService { + List findByPage(Integer currentPage, Integer pageSize); + + void addReply(ComplainDTO complainDTO); + + ComplainDTO findById(Integer id); + + List select(String userName, Integer status); +} diff --git a/pccenter/src/main/java/com/woniu/service/DynamicCommentService.java b/pccenter/src/main/java/com/woniu/service/DynamicCommentService.java new file mode 100644 index 0000000..12d62f7 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/DynamicCommentService.java @@ -0,0 +1,13 @@ +package com.woniu.service; + +import com.woniu.dto.DynamicCommentDTO; + +import java.util.List; + +public interface DynamicCommentService { + List findByPage(Integer currentPage, Integer pageSize); + + void delComment(Integer id); + + List select(String nickName,Integer dynamicType); +} diff --git a/pccenter/src/main/java/com/woniu/service/MenusService.java b/pccenter/src/main/java/com/woniu/service/MenusService.java index 91ae56a..2744df9 100644 --- a/pccenter/src/main/java/com/woniu/service/MenusService.java +++ b/pccenter/src/main/java/com/woniu/service/MenusService.java @@ -19,4 +19,8 @@ public interface MenusService { void delMenus(Integer mid); void updateMenusSorting(Integer menuId, Integer parseLong); + + Menus findByMenuId(Integer menuId); + + void updateMenus(Menus menus); } diff --git a/pccenter/src/main/java/com/woniu/service/MerchantService.java b/pccenter/src/main/java/com/woniu/service/MerchantService.java new file mode 100644 index 0000000..17b933f --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/MerchantService.java @@ -0,0 +1,16 @@ +package com.woniu.service; + +import com.woniu.dto.MerchantDTO; + +import java.util.Date; +import java.util.List; + +public interface MerchantService { + List findByPage(Integer currentPage, Integer pageSize); + + void editStatusById(Integer id,Date examineTime); + + List select(String nickName, Integer status); + + void refuse(Integer id, Date refuseTime); +} diff --git a/pccenter/src/main/java/com/woniu/service/ProperManageService.java b/pccenter/src/main/java/com/woniu/service/ProperManageService.java new file mode 100644 index 0000000..3247b0f --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/ProperManageService.java @@ -0,0 +1,17 @@ +package com.woniu.service; + +import com.woniu.pojo.PropertyManage; + +import java.util.Date; +import java.util.List; + +public interface ProperManageService { + List findListByPage(Integer currentPage, Integer pageSize); + + + void editStatusById(Integer id, Date passTime); + + List findList(String userName, Integer status); + + void refuse(Integer id, Date refuseTime); +} diff --git a/pccenter/src/main/java/com/woniu/service/ServiceCommentService.java b/pccenter/src/main/java/com/woniu/service/ServiceCommentService.java new file mode 100644 index 0000000..077905c --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/ServiceCommentService.java @@ -0,0 +1,15 @@ +package com.woniu.service; + +import com.woniu.dto.ServiceCommentDTO; + +import java.util.List; + +public interface ServiceCommentService { + + + List findByPage(Integer currentPage, Integer pageSize); + + void delComment(Integer id); + + List select(String nickName, String payName); +} diff --git a/pccenter/src/main/java/com/woniu/service/impl/ActivityComplainServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/ActivityComplainServiceImpl.java new file mode 100644 index 0000000..91099c4 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/impl/ActivityComplainServiceImpl.java @@ -0,0 +1,41 @@ +package com.woniu.service.impl; + +import com.woniu.dao.ActivityComplainMapper; +import com.woniu.dto.ActivityComplainDTO; +import com.woniu.service.ActivityComplainService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +public class ActivityComplainServiceImpl implements ActivityComplainService { + + @Autowired + private ActivityComplainMapper acComplainMapper; + @Override + public List findByPage(Integer currentPage, Integer pageSize) { + List list = acComplainMapper.findByPage(currentPage,pageSize); + return list; + } + + @Override + public ActivityComplainDTO findById(Integer id) { + return acComplainMapper.findById(id); + } + + @Override + public void addReply(ActivityComplainDTO activityComplainDTO) { + String context=activityComplainDTO.getContext(); + Integer id=activityComplainDTO.getId(); + Date replyTime=new Date(); + acComplainMapper.addReply(id,context,replyTime); + } + + @Override + public List select(String nickName, String title) { + List list=acComplainMapper.select(nickName,title); + return list; + } +} diff --git a/pccenter/src/main/java/com/woniu/service/impl/ActivityServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/ActivityServiceImpl.java new file mode 100644 index 0000000..9d4a0a2 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/impl/ActivityServiceImpl.java @@ -0,0 +1,40 @@ +package com.woniu.service.impl; + +import com.woniu.dao.ActivityMapper; +import com.woniu.dto.ActivityDTO; +import com.woniu.pojo.PropertyManage; +import com.woniu.service.ActivityService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +public class ActivityServiceImpl implements ActivityService { + + @Autowired + private ActivityMapper activityMapper; + + @Override + public List findListByPage(Integer currentPage, Integer pageSize) { + List list=activityMapper.findByPage(currentPage,pageSize); + return list; + } + + @Override + public void editStatusById(Integer id,Date examineTime) { + activityMapper.editStatusById(id,examineTime); + } + + @Override + public List select(String name, Integer status) { + List list=activityMapper.select(name,status); + return list; + } + + @Override + public void refuse(Integer id, Date operationTime) { + activityMapper.refuse(id,operationTime); + } +} diff --git a/pccenter/src/main/java/com/woniu/service/impl/AdminServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/AdminServiceImpl.java index adb8163..721aec8 100644 --- a/pccenter/src/main/java/com/woniu/service/impl/AdminServiceImpl.java +++ b/pccenter/src/main/java/com/woniu/service/impl/AdminServiceImpl.java @@ -3,10 +3,12 @@ package com.woniu.service.impl; import com.woniu.dao.AdminMapper; import com.woniu.pojo.Admin; import com.woniu.service.AdminService; +import org.apache.shiro.crypto.hash.Md5Hash; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; +import java.util.UUID; @Service public class AdminServiceImpl implements AdminService { @@ -22,6 +24,12 @@ public class AdminServiceImpl implements AdminService { @Override public void saveAdmin(Admin admin) { + //密码加密 + String salt = UUID.randomUUID().toString(); + System.out.println(salt); + admin.setSalt(salt); + Md5Hash hash = new Md5Hash(admin.getPassword(),salt,1024); + admin.setPassword(hash.toString());//加密后的密码 adminMapper.insertSelective(admin); } diff --git a/pccenter/src/main/java/com/woniu/service/impl/ComplainServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/ComplainServiceImpl.java new file mode 100644 index 0000000..3906d7a --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/impl/ComplainServiceImpl.java @@ -0,0 +1,41 @@ +package com.woniu.service.impl; + +import com.woniu.dao.ComplainMapper; +import com.woniu.dto.ComplainDTO; +import com.woniu.service.ComplainService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ComplainServiceImpl implements ComplainService { + + @Autowired + private ComplainMapper complainMapper; + + @Override + public List findByPage(Integer currentPage, Integer pageSize) { + List list=complainMapper.findByPage(currentPage,pageSize); + return list; + } + + @Override + public void addReply(ComplainDTO complainDTO) { + String context=complainDTO.getContext(); + Integer id=complainDTO.getId(); + complainMapper.addReply(id,context); + } + + @Override + public ComplainDTO findById(Integer id) { + ComplainDTO complainDTO= complainMapper.findById(id); + return complainDTO; + } + + @Override + public List select(String userName, Integer status) { + List list=complainMapper.select(userName,status); + return list; + } +} diff --git a/pccenter/src/main/java/com/woniu/service/impl/DynamicCommentServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/DynamicCommentServiceImpl.java new file mode 100644 index 0000000..c50a944 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/impl/DynamicCommentServiceImpl.java @@ -0,0 +1,32 @@ +package com.woniu.service.impl; + +import com.woniu.dao.DynamicCommentMapper; +import com.woniu.dto.DynamicCommentDTO; +import com.woniu.service.DynamicCommentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +@Service +public class DynamicCommentServiceImpl implements DynamicCommentService { + + @Autowired + private DynamicCommentMapper dc_mapper; + + @Override + public List findByPage(Integer currentPage, Integer pageSize) { + List list = dc_mapper.findByPage(currentPage,pageSize); + return list; + } + + @Override + public void delComment(Integer id) { + dc_mapper.delComment(id); + } + + @Override + public List select(String nickName,Integer dynamicType) { + List list=dc_mapper.select(nickName,dynamicType); + return list; + } +} diff --git a/pccenter/src/main/java/com/woniu/service/impl/MenusServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/MenusServiceImpl.java index 4e098f8..ac5c69f 100644 --- a/pccenter/src/main/java/com/woniu/service/impl/MenusServiceImpl.java +++ b/pccenter/src/main/java/com/woniu/service/impl/MenusServiceImpl.java @@ -117,4 +117,15 @@ public class MenusServiceImpl implements MenusService { menusMapper.updateSorting(menuId,sorting); } + @Override + public Menus findByMenuId(Integer menuId) { + return menusMapper.findByMenuId(menuId); + } + + @Override + public void updateMenus(Menus menus) { + menus.setSpread("false"); + menusMapper.updateByPrimaryKey(menus); + } + } diff --git a/pccenter/src/main/java/com/woniu/service/impl/MerchantServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/MerchantServiceImpl.java new file mode 100644 index 0000000..6206b69 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/impl/MerchantServiceImpl.java @@ -0,0 +1,40 @@ +package com.woniu.service.impl; + +import com.woniu.dao.MerchantMapper; +import com.woniu.dto.MerchantDTO; +import com.woniu.service.MerchantService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +public class MerchantServiceImpl implements MerchantService { + + @Autowired + private MerchantMapper merchantMapper; + + @Override + public List findByPage(Integer currentPage, Integer pageSize) { + List list=merchantMapper.findByPage(currentPage,pageSize); + return list; + } + + @Override + public void editStatusById(Integer id, Date examineTime) { + merchantMapper.editStatusById(id,examineTime); + } + + @Override + public List select(String nickName, Integer status) { + List list=merchantMapper.select(nickName,status); + return list; + } + + @Override + public void refuse(Integer id, Date refuseTime) { + merchantMapper.refuse(id,refuseTime); + + } +} diff --git a/pccenter/src/main/java/com/woniu/service/impl/PropertyManageServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/PropertyManageServiceImpl.java new file mode 100644 index 0000000..91fc171 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/impl/PropertyManageServiceImpl.java @@ -0,0 +1,42 @@ +package com.woniu.service.impl; + +import com.woniu.dao.PropertyManageMapper; +import com.woniu.pojo.PropertyManage; +import com.woniu.service.ProperManageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +import java.util.Date; +import java.util.List; + +@Service +public class PropertyManageServiceImpl implements ProperManageService { + + @Autowired + private PropertyManageMapper pmMapper; + + @Override + public List findListByPage(Integer currentPage, Integer pageSize) { + List list=pmMapper.findByPage(currentPage,pageSize); + return list; + } + + @Override + public void editStatusById(Integer id, Date passTime) { + pmMapper.editStatusById(id,passTime); + } + + @Override + public List findList(String userName, Integer status) { + List list=pmMapper.findList(userName,status); + return list; + } + + @Override + public void refuse(Integer id, Date refuseTime) { + pmMapper.refuse(id,refuseTime); + } + + +} diff --git a/pccenter/src/main/java/com/woniu/service/impl/ServiceCommentServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/ServiceCommentServiceImpl.java new file mode 100644 index 0000000..1e3a7c9 --- /dev/null +++ b/pccenter/src/main/java/com/woniu/service/impl/ServiceCommentServiceImpl.java @@ -0,0 +1,32 @@ +package com.woniu.service.impl; + +import com.woniu.dao.ServiceCommentMapper; +import com.woniu.dto.ServiceCommentDTO; +import com.woniu.service.ServiceCommentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +@Service +public class ServiceCommentServiceImpl implements ServiceCommentService { + + @Autowired + private ServiceCommentMapper scMapper; + @Override + public List findByPage(Integer currentPage, Integer pageSize) { + List list=scMapper.findByPage(currentPage,pageSize); + return list; + } + + @Override + public void delComment(Integer id) { + scMapper.delComment(id); + } + + @Override + public List select(String nickName, String payName) { + List list=scMapper.select(nickName,payName); + //System.out.println(list.size()); + return list; + } +} diff --git a/pccenter/src/main/resources/application.yml b/pccenter/src/main/resources/application.yml index 2f77018..5b1dc9b 100644 --- a/pccenter/src/main/resources/application.yml +++ b/pccenter/src/main/resources/application.yml @@ -1,8 +1,10 @@ spring: + application: + name: pccenter datasource: - username: root - password: root - url: jdbc:mysql://localhost:3306/pccenter?serverTimezone=GMT%2B8 + username: develop + password: 20200322 + url: jdbc:mysql://106.12.148.100:3307/happycommunity?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8 driver-class-name: com.mysql.jdbc.Driver druid: filters: stat,wall,logback @@ -29,3 +31,7 @@ pagehelper: logging: level: com.woniu.dao: debug +eureka: + client: + service-url: + defaultZone: http://localhost:8761/eureka diff --git a/pccenter/src/main/resources/generatorConfig.xml b/pccenter/src/main/resources/generatorConfig.xml index 2a08fdd..d610019 100644 --- a/pccenter/src/main/resources/generatorConfig.xml +++ b/pccenter/src/main/resources/generatorConfig.xml @@ -9,8 +9,8 @@ - + @@ -24,7 +24,7 @@ domainObjectName实体类的名称 enableCountByExample 接口中是否生成对应的方法 --> - -
- -
- --> +
+ + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/ActivityMapper.xml b/pccenter/src/main/resources/mapper/ActivityMapper.xml new file mode 100644 index 0000000..a537259 --- /dev/null +++ b/pccenter/src/main/resources/mapper/ActivityMapper.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/AdminMapper.xml b/pccenter/src/main/resources/mapper/AdminMapper.xml index c9e7f6b..3d1808e 100644 --- a/pccenter/src/main/resources/mapper/AdminMapper.xml +++ b/pccenter/src/main/resources/mapper/AdminMapper.xml @@ -162,7 +162,7 @@ diff --git a/pccenter/src/main/resources/mapper/ComplainMapper.xml b/pccenter/src/main/resources/mapper/ComplainMapper.xml new file mode 100644 index 0000000..0ecc93d --- /dev/null +++ b/pccenter/src/main/resources/mapper/ComplainMapper.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/DynamicCommentMapper.xml b/pccenter/src/main/resources/mapper/DynamicCommentMapper.xml new file mode 100644 index 0000000..129244f --- /dev/null +++ b/pccenter/src/main/resources/mapper/DynamicCommentMapper.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/InformationMapper.xml b/pccenter/src/main/resources/mapper/InformationMapper.xml deleted file mode 100644 index ec8f53a..0000000 --- a/pccenter/src/main/resources/mapper/InformationMapper.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - id, account, password, name, nickname, roletype, stage, phone, adress - - - - delete from pc_information - where id = #{id,jdbcType=INTEGER} - - - insert into pc_information (id, account, password, - name, nickname, roletype, - stage, phone, adress - ) - values (#{id,jdbcType=INTEGER}, #{account,jdbcType=INTEGER}, #{password,jdbcType=VARCHAR}, - #{name,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{roletype,jdbcType=VARCHAR}, - #{stage,jdbcType=VARCHAR}, #{phone,jdbcType=INTEGER}, #{adress,jdbcType=VARCHAR} - ) - - - insert into pc_information - - - id, - - - account, - - - password, - - - name, - - - nickname, - - - roletype, - - - stage, - - - phone, - - - adress, - - - - - #{id,jdbcType=INTEGER}, - - - #{account,jdbcType=INTEGER}, - - - #{password,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - #{nickname,jdbcType=VARCHAR}, - - - #{roletype,jdbcType=VARCHAR}, - - - #{stage,jdbcType=VARCHAR}, - - - #{phone,jdbcType=INTEGER}, - - - #{adress,jdbcType=VARCHAR}, - - - - - update pc_information - - - account = #{account,jdbcType=INTEGER}, - - - password = #{password,jdbcType=VARCHAR}, - - - name = #{name,jdbcType=VARCHAR}, - - - nickname = #{nickname,jdbcType=VARCHAR}, - - - roletype = #{roletype,jdbcType=VARCHAR}, - - - stage = #{stage,jdbcType=VARCHAR}, - - - phone = #{phone,jdbcType=INTEGER}, - - - adress = #{adress,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - update pc_information - set account = #{account,jdbcType=INTEGER}, - password = #{password,jdbcType=VARCHAR}, - name = #{name,jdbcType=VARCHAR}, - nickname = #{nickname,jdbcType=VARCHAR}, - roletype = #{roletype,jdbcType=VARCHAR}, - stage = #{stage,jdbcType=VARCHAR}, - phone = #{phone,jdbcType=INTEGER}, - adress = #{adress,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/MerchantMapper.xml b/pccenter/src/main/resources/mapper/MerchantMapper.xml new file mode 100644 index 0000000..d579a54 --- /dev/null +++ b/pccenter/src/main/resources/mapper/MerchantMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/PropertyManageMapper.xml b/pccenter/src/main/resources/mapper/PropertyManageMapper.xml new file mode 100644 index 0000000..a97f838 --- /dev/null +++ b/pccenter/src/main/resources/mapper/PropertyManageMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/ServiceCommentMapper.xml b/pccenter/src/main/resources/mapper/ServiceCommentMapper.xml new file mode 100644 index 0000000..501b9c5 --- /dev/null +++ b/pccenter/src/main/resources/mapper/ServiceCommentMapper.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/mapper/UsersMapper.xml b/pccenter/src/main/resources/mapper/UsersMapper.xml deleted file mode 100644 index 5249caf..0000000 --- a/pccenter/src/main/resources/mapper/UsersMapper.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - uid, account, name, password, phone, adress, status, nickname, role_type - - - - delete from pc_users - where uid = #{uid,jdbcType=INTEGER} - - - insert into pc_users (uid, account, name, - password, phone, adress, - status, nickname, role_type - ) - values (#{uid,jdbcType=INTEGER}, #{account,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, - #{password,jdbcType=VARCHAR}, #{phone,jdbcType=INTEGER}, #{adress,jdbcType=VARCHAR}, - #{status,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{roleType,jdbcType=VARCHAR} - ) - - - insert into pc_users - - - uid, - - - account, - - - name, - - - password, - - - phone, - - - adress, - - - status, - - - nickname, - - - role_type, - - - - - #{uid,jdbcType=INTEGER}, - - - #{account,jdbcType=INTEGER}, - - - #{name,jdbcType=VARCHAR}, - - - #{password,jdbcType=VARCHAR}, - - - #{phone,jdbcType=INTEGER}, - - - #{adress,jdbcType=VARCHAR}, - - - #{status,jdbcType=VARCHAR}, - - - #{nickname,jdbcType=VARCHAR}, - - - #{roleType,jdbcType=VARCHAR}, - - - - - update pc_users - - - account = #{account,jdbcType=INTEGER}, - - - name = #{name,jdbcType=VARCHAR}, - - - password = #{password,jdbcType=VARCHAR}, - - - phone = #{phone,jdbcType=INTEGER}, - - - adress = #{adress,jdbcType=VARCHAR}, - - - status = #{status,jdbcType=VARCHAR}, - - - nickname = #{nickname,jdbcType=VARCHAR}, - - - role_type = #{roleType,jdbcType=VARCHAR}, - - - where uid = #{uid,jdbcType=INTEGER} - - - update pc_users - set account = #{account,jdbcType=INTEGER}, - name = #{name,jdbcType=VARCHAR}, - password = #{password,jdbcType=VARCHAR}, - phone = #{phone,jdbcType=INTEGER}, - adress = #{adress,jdbcType=VARCHAR}, - status = #{status,jdbcType=VARCHAR}, - nickname = #{nickname,jdbcType=VARCHAR}, - role_type = #{roleType,jdbcType=VARCHAR} - where uid = #{uid,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/pccenter/src/main/resources/templates/403.html b/pccenter/src/main/resources/templates/403.html new file mode 100644 index 0000000..01661de --- /dev/null +++ b/pccenter/src/main/resources/templates/403.html @@ -0,0 +1,152 @@ + + + + +403禁止页面模板 + + + + + +

403

+

> ERROR CODE: "HTTP 403 Forbidden"

+

> ERROR DESCRIPTION: "Access Denied. You Do Not Have The Permission To Access This Page On This Server"

+

> ERROR POSSIBLY CAUSED BY: [execute access forbidden, read access forbidden, write access forbidden, ssl required, ssl 128 required, ip address rejected, client certificate required, site access denied, too many users, invalid configuration, password change, mapper denied access, client certificate revoked, directory listing denied, client access licenses exceeded, client certificate is untrusted or invalid, client certificate has expired or is not yet valid, passport logon failed, source access denied, infinite depth is denied, too many requests from the same client ip...]

+

> SOME PAGES ON THIS SERVER THAT YOU DO HAVE PERMISSION TO ACCESS: [Home Page, About Us, Contact Us, Blog...]

> HAVE A NICE DAY SIR AXLEROD :-)

+
+ + + + + + diff --git a/pccenter/src/main/resources/templates/login.html b/pccenter/src/main/resources/templates/login.html index 4755c5c..8d21cff 100644 --- a/pccenter/src/main/resources/templates/login.html +++ b/pccenter/src/main/resources/templates/login.html @@ -27,27 +27,15 @@ -
-
还没有账号?免费注册
- @@ -69,10 +57,11 @@ if(result.code == 200){ location.href = "/sys/index"; }else{ - layer.msg('登录失败',{icon:5}); + layer.msg(result.message,{icon:5}); } } }); + return false; }) }) diff --git a/pccenter/src/main/resources/templates/sys/ac_complainList.html b/pccenter/src/main/resources/templates/sys/ac_complainList.html new file mode 100644 index 0000000..7ab2277 --- /dev/null +++ b/pccenter/src/main/resources/templates/sys/ac_complainList.html @@ -0,0 +1,155 @@ + + + + + 活动投诉列表 + + + +
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+ + +
+ +
+ +
+
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/templates/sys/ac_reply.html b/pccenter/src/main/resources/templates/sys/ac_reply.html new file mode 100644 index 0000000..a8706f5 --- /dev/null +++ b/pccenter/src/main/resources/templates/sys/ac_reply.html @@ -0,0 +1,55 @@ + + + + + Title + + + +
+ +
+ +
+ +
+
+
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/templates/sys/activityList.html b/pccenter/src/main/resources/templates/sys/activityList.html new file mode 100644 index 0000000..59e33f4 --- /dev/null +++ b/pccenter/src/main/resources/templates/sys/activityList.html @@ -0,0 +1,196 @@ + + + + + 社区活动审核 + + + +
+
+
+
+
+
+ +
+ +
+
+
+ + +
+ +
+
+
+
+ +
+ +
+ + +
+ +
+
+
+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/pccenter/src/main/resources/templates/sys/addAdmin.html b/pccenter/src/main/resources/templates/sys/addAdmin.html index ae108e7..99bb10a 100644 --- a/pccenter/src/main/resources/templates/sys/addAdmin.html +++ b/pccenter/src/main/resources/templates/sys/addAdmin.html @@ -104,8 +104,7 @@ //参数data就是表单中的数据 form.on('submit(addAdmin)',function (data) { - //data.field;//当前容器的全部表单字段,名值对形式:{name: value} - + $.ajax({ url:'/admin/saveAdmin', data:data.field, diff --git a/pccenter/src/main/resources/templates/sys/adminList.html b/pccenter/src/main/resources/templates/sys/adminList.html index 1d51848..825cd29 100644 --- a/pccenter/src/main/resources/templates/sys/adminList.html +++ b/pccenter/src/main/resources/templates/sys/adminList.html @@ -1,210 +1,201 @@ - + - Title + 管理员列表 -
+
- - - - - - - - - - - - - - - - + //监听行工具事件 + //注: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', '5000px'], + 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 0000000..7c02c80 --- /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 0000000..9ad824a --- /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 0000000..47fc05f --- /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 570fcac..8a57994 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 47fcf32..7aaa30a 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 95a1b81..a239710 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 0000000..c21d63b --- /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 0000000..6e4aaf1 --- /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 0000000..dae2c28 --- /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 895701e..a2d3567 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 -- Gitee From 7ced510f4371979b73c5fe378c254d8bb10e55bd Mon Sep 17 00:00:00 2001 From: jingkang <1248303996@qq.com> Date: Wed, 8 Apr 2020 11:32:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pccenter/src/main/java/com/woniu/config/ShiroConfig.java | 2 +- .../java/com/woniu/controller/ActivityController.java | 5 +++-- pccenter/src/main/java/com/woniu/dao/ActivityMapper.java | 8 ++++---- .../src/main/java/com/woniu/service/ActivityService.java | 2 +- .../java/com/woniu/service/impl/ActivityServiceImpl.java | 4 ++-- pccenter/src/main/resources/mapper/ActivityMapper.xml | 2 +- .../src/main/resources/mapper/PropertyManageMapper.xml | 4 ++-- pccenter/src/main/resources/templates/login.html | 9 +++++++-- pccenter/src/main/resources/templates/sys/ac_reply.html | 2 +- .../src/main/resources/templates/sys/activityList.html | 8 ++++---- pccenter/src/main/resources/templates/sys/addAdmin.html | 2 +- pccenter/src/main/resources/templates/sys/adminList.html | 2 +- .../src/main/resources/templates/sys/complainList.html | 2 +- .../src/main/resources/templates/sys/merchantList.html | 2 +- pccenter/src/main/resources/templates/sys/pmList.html | 2 +- pccenter/src/main/resources/templates/sys/reply.html | 2 +- 16 files changed, 32 insertions(+), 26 deletions(-) diff --git a/pccenter/src/main/java/com/woniu/config/ShiroConfig.java b/pccenter/src/main/java/com/woniu/config/ShiroConfig.java index 401acde..e40264f 100644 --- a/pccenter/src/main/java/com/woniu/config/ShiroConfig.java +++ b/pccenter/src/main/java/com/woniu/config/ShiroConfig.java @@ -27,7 +27,7 @@ public class ShiroConfig { customRealm.setCacheManager(cacheManager); return customRealm; } - // + //shiro核心控制器 @Bean public DefaultWebSecurityManager securityManager(CustomRealm customRealm,CookieRememberMeManager rememberMeManager){ DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); diff --git a/pccenter/src/main/java/com/woniu/controller/ActivityController.java b/pccenter/src/main/java/com/woniu/controller/ActivityController.java index b55dc5d..fc5f701 100644 --- a/pccenter/src/main/java/com/woniu/controller/ActivityController.java +++ b/pccenter/src/main/java/com/woniu/controller/ActivityController.java @@ -50,6 +50,7 @@ public class ActivityController { @ResponseBody @RequiresPermissions("sys:al:examine") public CommonResult confirmPM(@PathVariable("id") Integer id){ + System.out.println("活动确认审核"+id); Date examineTime=new Date(); try { activityService.editStatusById(id,examineTime); @@ -89,9 +90,9 @@ public class ActivityController { @ResponseBody public CommonResult refuse(@PathVariable("id")Integer id){ //获取当前时间 - Date operationTime=new Date(); + Date examineTime=new Date(); try { - activityService.refuse(id,operationTime); + activityService.refuse(id,examineTime); return CommonResult.success("操作成功!"); } catch (Exception e) { e.printStackTrace(); diff --git a/pccenter/src/main/java/com/woniu/dao/ActivityMapper.java b/pccenter/src/main/java/com/woniu/dao/ActivityMapper.java index 32b13b7..049eb36 100644 --- a/pccenter/src/main/java/com/woniu/dao/ActivityMapper.java +++ b/pccenter/src/main/java/com/woniu/dao/ActivityMapper.java @@ -10,15 +10,15 @@ import java.util.List; public interface ActivityMapper { - @Select("select ca.id,ca.ca_type type,ca.ca_examineTime operationTime,ca.ca_title title,ca.ca_content content,ca.ca_money money,ca.ca_peopel_count number,ca.ca_create_time createTime,ca.ca_examine_status status,pu.nickname name from " + + @Select("select ca.id,ca.ca_type type,ca.ca_examinetime operationTime,ca.ca_title title,ca.ca_content content,ca.ca_money money,ca.ca_peopel_count number,ca.ca_create_time createTime,ca.ca_examine_status status,pu.nickname name from " + "person_user pu inner join community_activity ca on pu.id=ca.ca_user_id order by ca.id desc") List findByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize); - @Update("update community_activity set ca_examine_status = 1,ca_examineTime = #{operationTime} where id=#{value}") + @Update("update community_activity set ca_examine_status = 1,ca_examinetime = #{examineTime} where id=#{id}") void editStatusById(@Param("id") Integer id,@Param("examineTime") Date examineTime); List select(@Param("name") String name, @Param("status") Integer status); - @Update("update community_activity set ca_examine_status = 2,ca_examineTime = #{operationTime} where id=#{value}") - void refuse(@Param("id") Integer id, @Param("operationTime") Date operationTime); + @Update("update community_activity set ca_examine_status = 2,ca_examinetime = #{operationTime} where id=#{id}") + void refuse(@Param("id") Integer id, @Param("operationTime") Date examineTime); } diff --git a/pccenter/src/main/java/com/woniu/service/ActivityService.java b/pccenter/src/main/java/com/woniu/service/ActivityService.java index 466e268..001d445 100644 --- a/pccenter/src/main/java/com/woniu/service/ActivityService.java +++ b/pccenter/src/main/java/com/woniu/service/ActivityService.java @@ -12,5 +12,5 @@ public interface ActivityService { List select(String name, Integer status); - void refuse(Integer id, Date operationTime); + void refuse(Integer id, Date examineTime); } diff --git a/pccenter/src/main/java/com/woniu/service/impl/ActivityServiceImpl.java b/pccenter/src/main/java/com/woniu/service/impl/ActivityServiceImpl.java index 9d4a0a2..fa79c86 100644 --- a/pccenter/src/main/java/com/woniu/service/impl/ActivityServiceImpl.java +++ b/pccenter/src/main/java/com/woniu/service/impl/ActivityServiceImpl.java @@ -34,7 +34,7 @@ public class ActivityServiceImpl implements ActivityService { } @Override - public void refuse(Integer id, Date operationTime) { - activityMapper.refuse(id,operationTime); + public void refuse(Integer id, Date examineTime) { + activityMapper.refuse(id,examineTime); } } diff --git a/pccenter/src/main/resources/mapper/ActivityMapper.xml b/pccenter/src/main/resources/mapper/ActivityMapper.xml index a537259..6c956fb 100644 --- a/pccenter/src/main/resources/mapper/ActivityMapper.xml +++ b/pccenter/src/main/resources/mapper/ActivityMapper.xml @@ -3,7 +3,7 @@ - select manage.id,manage.username userName,manage.phone phone,manage.status,manage.create_time createTime,manage.pass_time passTime,af.area_name areaName from property_manage manage left join areainfo af on manage.village_id=af.id order by manage.id desc + select manage.id,manage.username userName,manage.phone phone,manage.status,manage.create_time createTime,manage.pass_time passTime,af.area_name areaName from property_manage manage inner join areainfo af on manage.village_id=af.id order by manage.id desc
    - +
    diff --git a/pccenter/src/main/resources/templates/sys/activityList.html b/pccenter/src/main/resources/templates/sys/activityList.html index 59e33f4..4abd18c 100644 --- a/pccenter/src/main/resources/templates/sys/activityList.html +++ b/pccenter/src/main/resources/templates/sys/activityList.html @@ -12,7 +12,7 @@
    - +
    @@ -87,14 +87,14 @@ {type: 'checkbox'}, {title: '编号ID', field: 'id', width: 80}, {title: '用户名称', field: 'name', width: 120}, - {title: '活动类型', field: 'type', width: 120, templet: '#typeEdit'}, + {title: '活动类型', field: 'type', width: 100, templet: '#typeEdit'}, {title: '活动标题', field: 'title', width: 120}, {title: '活动内容', field: 'content', width: 120}, - {title: '参与人数', field: 'number', width: 120}, + {title: '参与人数', field: 'number', width: 100}, {title: '创建时间', field: 'createTime', width: 120}, {title: '操作时间', field: 'operationTime', width: 120}, {title: '审批状态', field: 'status', templet: '#statusEdit', width: 120}, - {title: '操作', templet: '#barEdit', width: 170} + {title: '操作', templet: '#barEdit', width: 180} ] ], parseData: function (result) { diff --git a/pccenter/src/main/resources/templates/sys/addAdmin.html b/pccenter/src/main/resources/templates/sys/addAdmin.html index 99bb10a..328f878 100644 --- a/pccenter/src/main/resources/templates/sys/addAdmin.html +++ b/pccenter/src/main/resources/templates/sys/addAdmin.html @@ -40,7 +40,7 @@
    - +
    diff --git a/pccenter/src/main/resources/templates/sys/adminList.html b/pccenter/src/main/resources/templates/sys/adminList.html index 825cd29..4c7a54d 100644 --- a/pccenter/src/main/resources/templates/sys/adminList.html +++ b/pccenter/src/main/resources/templates/sys/adminList.html @@ -143,7 +143,7 @@ layer.open({ type: 2, title: '编辑管理员', - area: ['400px', '5000px'], + area: ['400px', '500px'], content: '/admin/editAdmin/' + data.id }); } else if (event === 'del') {//执行删除 diff --git a/pccenter/src/main/resources/templates/sys/complainList.html b/pccenter/src/main/resources/templates/sys/complainList.html index 7c02c80..2471470 100644 --- a/pccenter/src/main/resources/templates/sys/complainList.html +++ b/pccenter/src/main/resources/templates/sys/complainList.html @@ -107,7 +107,7 @@ layer.open({ type: 2, title: '投诉回复', - area: ['400px', '400px'], + area: ['350px', '350px'], content: '/complain/reply/' + data.id }); } diff --git a/pccenter/src/main/resources/templates/sys/merchantList.html b/pccenter/src/main/resources/templates/sys/merchantList.html index c21d63b..54fb4f8 100644 --- a/pccenter/src/main/resources/templates/sys/merchantList.html +++ b/pccenter/src/main/resources/templates/sys/merchantList.html @@ -83,7 +83,7 @@ {title: '商家介绍', field: 'introduce', width: 120}, {title: '审批状态', field: 'status', templet: '#statusEdit', width: 120}, {title: '操作时间', field: 'operationTime', width: 120}, - {title: '操作', templet: '#barEdit', width: 170} + {title: '操作', templet: '#barEdit', width: 180} ] ], parseData: function (result) { diff --git a/pccenter/src/main/resources/templates/sys/pmList.html b/pccenter/src/main/resources/templates/sys/pmList.html index 6e4aaf1..4af9977 100644 --- a/pccenter/src/main/resources/templates/sys/pmList.html +++ b/pccenter/src/main/resources/templates/sys/pmList.html @@ -100,7 +100,7 @@ {title: '审批状态', field: 'status', templet: '#statusEdit', width: 150}, {title: '创建时间', field: 'createTime', width: 150}, {title: '操作时间', field: 'passTime', width: 150}, - {title: '操作', templet: '#barEdit'} + {title: '操作', templet: '#barEdit', width: 180} ] ], parseData: function (result) { diff --git a/pccenter/src/main/resources/templates/sys/reply.html b/pccenter/src/main/resources/templates/sys/reply.html index dae2c28..cd2cb47 100644 --- a/pccenter/src/main/resources/templates/sys/reply.html +++ b/pccenter/src/main/resources/templates/sys/reply.html @@ -9,7 +9,7 @@
    - +
    -- Gitee