springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyHelpApi.java
New file @@ -0,0 +1,97 @@ package com.panzhihua.applets.api; import cn.hutool.core.date.DateUtil; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComPropertyVO; import com.panzhihua.common.model.vos.property.ComPropertyHelpVO; import com.panzhihua.common.service.property.PropertyService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.io.Serializable; /** * (ComPropertyHelp)表控制层 * * @author makejava * @since 2021-09-18 16:43:12 */ @Slf4j @Api(tags = {"一件求助人员"}) @RestController @RequestMapping("/comPropertyHelp") public class ComPropertyHelpApi extends BaseController { /** * 服务对象 */ @Resource private PropertyService propertyService; /** * 分页查询所有数据 * * @param commonPage 查询实体 * @return 所有数据 */ @ApiOperation(value = "分页查询所有数据",response = ComPropertyVO.class) @PostMapping("queryAll") public R selectAll(@RequestBody CommonPage commonPage) { return this.propertyService.comPropertyHelpSelectAll(commonPage); } /** * 通过主键查询单条数据 * * @param id 主键 * @return 单条数据 */ @ApiOperation(value = "主键查询") @GetMapping("{id}") public R selectOne(@PathVariable("id") Serializable id) { return this.propertyService.comPropertyHelpSelectOne(id); } /** * 新增数据 * * @param comPropertyHelp 实体对象 * @return 新增结果 */ @ApiOperation(value = "新增数据") @PostMapping public R insert(@RequestBody ComPropertyHelpVO comPropertyHelp) { comPropertyHelp.setCommunityId(this.getCommunityId()); comPropertyHelp.setCreateTime(DateUtil.date()); return this.propertyService.comPropertyHelpInsert(comPropertyHelp); } /** * 修改数据 * * @param comPropertyHelp 实体对象 * @return 修改结果 */ @ApiOperation(value = "修改数据") @PostMapping("/update") public R update(@RequestBody ComPropertyHelpVO comPropertyHelp) { return this.propertyService.comPropertyHelpUpdate(comPropertyHelp); } /** * 删除数据 * * @param id 主键结合 * @return 删除结果 */ @ApiOperation(value = "删除数据") @GetMapping("del") public R delete(@RequestParam("id") Long id) { return this.propertyService.comPropertyHelpDelete(id); } } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActCommiteeVO.java
@@ -14,7 +14,7 @@ * 主键 */ @ApiModelProperty(value = "主键") private Integer id; private Long id; /** * 名称 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActSocialOrgVO.java
@@ -35,7 +35,7 @@ * 成立时间 */ @ApiModelProperty(value = "成立时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date buildDate; /** @@ -210,7 +210,7 @@ * 创建时间 */ @ApiModelProperty(value = "创建时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date createAt; /** @@ -223,7 +223,7 @@ * 更新时间 */ @ApiModelProperty(value = "更新时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date updateAt; private Long communityId; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComPropertyVO.java
New file @@ -0,0 +1,80 @@ package com.panzhihua.common.model.vos.community; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; /** * @author zzj */ @Data @ApiModel("物业公司实体") public class ComPropertyVO { /** * 主键 */ @ApiModelProperty(value = "主键") private Long id; /** * 名称 */ @ApiModelProperty(value = "名称") private String name; /** * 简介 */ @ApiModelProperty(value = "简介") private String introduction; /** * 联系人姓名 */ @ApiModelProperty(value = "联系人姓名") private String contactName; /** * 联系人手机 */ @ApiModelProperty(value = "联系人手机") private String phone; /** * 地址 */ @ApiModelProperty(value = "地址") private String address; /** * 用户id */ @ApiModelProperty(value = "用户id") private Long userId; /** * 社区id */ @ApiModelProperty(value = "社区id") private Long communityId; @ApiModelProperty("账号") private String account; @ApiModelProperty("密码") private String password; @ApiModelProperty("权限id") private Long roleId; @ApiModelProperty("创建时间") private Date createTime; @ApiModelProperty("小区名称") private String areaName; @ApiModelProperty("小区id") private Long areaId; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyEquipmentVO.java
@@ -64,4 +64,10 @@ */ @ApiModelProperty(value = "设备类型 1红外报警 2一键报警 ") private Integer type; @ApiModelProperty(value = "手机号") private String phone; @ApiModelProperty(value = "街路巷id") private Long villageId; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyHelpVO.java
New file @@ -0,0 +1,53 @@ package com.panzhihua.common.model.vos.property; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; /** * @author zzj */ @Data @ApiModel("一件求助人员实体") public class ComPropertyHelpVO { /** * 主键 */ @ApiModelProperty(value = "主键") private Integer id; /** * 姓名 */ @ApiModelProperty(value = "姓名") private String name; /** * 照片 */ @ApiModelProperty(value = "照片") private String imgUrl; /** * 手机号 */ @ApiModelProperty(value = "手机号") private String phone; /** * 状态 0 禁用 1启用 */ @ApiModelProperty(value = "状态 0 禁用 1启用") private Integer status; /** * 创建时间 */ @ApiModelProperty(value = "创建时间") private Date createTime; @ApiModelProperty(value = "社区id") private Long communityId; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -5263,4 +5263,38 @@ */ @GetMapping("/comActCommittee/del") R comActCommitteeDelete(@RequestParam("id") Long id); /** * 分页查询所有数据 * * @param commonPage 查询实体 * @return 所有数据 */ @PostMapping("/comProperty/queryAll") R comPropertySelectAll(@RequestBody CommonPage commonPage); /** * 新增数据 * * @param comPropertyVO 实体对象 * @return 新增结果 */ @PostMapping("/comProperty") R comPropertyInsert(@RequestBody ComPropertyVO comPropertyVO); /** * 修改数据 * * @param comPropertyVO 实体对象 * @return 修改结果 */ @PostMapping("/comProperty/update") R comPropertyUpdate(@RequestBody ComPropertyVO comPropertyVO); /** * 删除数据 * * @param id 主键结合 * @return 删除结果 */ @GetMapping("/comProperty/del") R comPropertyDelete(@RequestParam("id") Long id); } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/property/PropertyService.java
@@ -2,12 +2,11 @@ import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.property.ComPropertyAlarmSettingVO; import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; import com.panzhihua.common.model.vos.property.ComPropertyEquipmentVO; import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; import com.panzhihua.common.model.vos.property.*; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import java.io.Serializable; /** * 物业接口 @@ -162,4 +161,49 @@ */ @GetMapping("/comPropertyAlarmSetting") R comPropertyAlarmSettingSelectOne(@RequestParam("communityId") Long communityId); /** * 分页查询所有数据 * * @param commonPage 查询实体 * @return 所有数据 */ @PostMapping("/comPropertyHelp/queryAll") R comPropertyHelpSelectAll(@RequestBody CommonPage commonPage); /** * 通过主键查询单条数据 * * @param id 主键 * @return 单条数据 */ @GetMapping("/comPropertyHelp/{id}") R comPropertyHelpSelectOne(@PathVariable("id") Serializable id); /** * 新增数据 * * @param comPropertyHelp 实体对象 * @return 新增结果 */ @PostMapping("/comPropertyHelp") R comPropertyHelpInsert(@RequestBody ComPropertyHelpVO comPropertyHelp); /** * 修改数据 * * @param comPropertyHelp 实体对象 * @return 修改结果 */ @PostMapping("/comPropertyHelp/update") R comPropertyHelpUpdate(@RequestBody ComPropertyHelpVO comPropertyHelp); /** * 删除数据 * * @param id 主键结合 * @return 删除结果 */ @GetMapping("/comPropertyHelp/del") R comPropertyHelpDelete(@RequestParam("id") Long id); } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -127,6 +127,16 @@ R changePassword(@RequestBody ChangePasswordVO changePasswordVO); /** * 重置密码用户登录密码默认admin123456 * * @param userId * 新密码 * @return 修改结果 */ @GetMapping("resetPassword") R resetPassword(@RequestParam("userId") Long userId); /** * 某社区后台人员查询 * * @param param springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActCommitteeApi.java
@@ -33,6 +33,7 @@ @ApiOperation(value = "业主委员会列表",response = ComActCommiteeVO.class) @PostMapping("queryAll") public R selectAll(@RequestBody CommonPage commonPage) { commonPage.setParamId(this.getCommunityId()); return this.communityService.comActCommitteeSelectAll(commonPage); } /** springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActSocialOrgApi.java
@@ -32,6 +32,7 @@ @ApiOperation(value = "社会组织列表",response = ComActSocialOrgVO.class) @PostMapping("queryAll") public R selectAll(@RequestBody CommonPage commonPage) { commonPage.setParamId(this.getCommunityId()); return this.communityService.comActSocialOrgSelectAll(commonPage); } /** springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyApi.java
New file @@ -0,0 +1,75 @@ package com.panzhihua.community_backstage.api; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComActCommiteeVO; import com.panzhihua.common.model.vos.community.ComPropertyVO; import com.panzhihua.common.service.community.CommunityService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; /** * @author zzj */ @Slf4j @Api(tags = {"物业公司"}) @RestController @RequestMapping("/comProperty") public class ComPropertyApi extends BaseController { @Resource private CommunityService communityService; /** * 分页查询所有数据 * * @param commonPage 查询实体 * @return 所有数据 */ @ApiOperation(value = "物业公司列表",response = ComPropertyVO.class) @PostMapping("queryAll") public R selectAll(@RequestBody CommonPage commonPage) { commonPage.setParamId(this.getCommunityId()); return this.communityService.comPropertySelectAll(commonPage); } /** * 新增数据 * * @param comPropertyVO 实体对象 * @return 新增结果 */ @ApiOperation("新增物业公司") @PostMapping public R insert(@RequestBody ComPropertyVO comPropertyVO) { comPropertyVO.setCommunityId(this.getCommunityId()); return this.communityService.comPropertyInsert(comPropertyVO); } /** * 修改数据 * * @param comPropertyVO 实体对象 * @return 修改结果 */ @ApiOperation("修改物业公司") @PostMapping("/update") public R update(@RequestBody ComPropertyVO comPropertyVO) { return this.communityService.comPropertyUpdate(comPropertyVO); } /** * 删除数据 * * @param id 主键结合 * @return 删除结果 */ @ApiOperation("删除物业公司") @GetMapping("del") public R delete(@RequestParam("id") Long id) { return this.communityService.comPropertyDelete(id); } } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyHelpApi.java
New file @@ -0,0 +1,97 @@ package com.panzhihua.applets.api; import cn.hutool.core.date.DateUtil; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComPropertyVO; import com.panzhihua.common.model.vos.property.ComPropertyHelpVO; import com.panzhihua.common.service.property.PropertyService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.io.Serializable; /** * (ComPropertyHelp)表控制层 * * @author makejava * @since 2021-09-18 16:43:12 */ @Slf4j @Api(tags = {"一件求助人员"}) @RestController @RequestMapping("/comPropertyHelp") public class ComPropertyHelpApi extends BaseController { /** * 服务对象 */ @Resource private PropertyService propertyService; /** * 分页查询所有数据 * * @param commonPage 查询实体 * @return 所有数据 */ @ApiOperation(value = "分页查询所有数据",response = ComPropertyVO.class) @PostMapping("queryAll") public R selectAll(@RequestBody CommonPage commonPage) { return this.propertyService.comPropertyHelpSelectAll(commonPage); } /** * 通过主键查询单条数据 * * @param id 主键 * @return 单条数据 */ @ApiOperation(value = "主键查询") @GetMapping("{id}") public R selectOne(@PathVariable("id") Serializable id) { return this.propertyService.comPropertyHelpSelectOne(id); } /** * 新增数据 * * @param comPropertyHelp 实体对象 * @return 新增结果 */ @ApiOperation(value = "新增数据") @PostMapping public R insert(@RequestBody ComPropertyHelpVO comPropertyHelp) { comPropertyHelp.setCommunityId(this.getCommunityId()); comPropertyHelp.setCreateTime(DateUtil.date()); return this.propertyService.comPropertyHelpInsert(comPropertyHelp); } /** * 修改数据 * * @param comPropertyHelp 实体对象 * @return 修改结果 */ @ApiOperation(value = "修改数据") @PostMapping("/update") public R update(@RequestBody ComPropertyHelpVO comPropertyHelp) { return this.propertyService.comPropertyHelpUpdate(comPropertyHelp); } /** * 删除数据 * * @param id 主键结合 * @return 删除结果 */ @ApiOperation(value = "删除数据") @GetMapping("del") public R delete(@RequestParam("id") Long id) { return this.propertyService.comPropertyHelpDelete(id); } } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyRepairApi.java
@@ -29,6 +29,8 @@ @ApiOperation(value = "后台列表接口",response = ComPropertyRepairVO.class) @PostMapping("/queryAll") public R selectAll(@RequestBody CommonPage commonPage) { commonPage.setParamId(this.getCommunityId()); commonPage.setAreaId(this.getAreaId()); return this.propertyService.comPropertyRepairSelectAll(commonPage); } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/UserApi.java
@@ -48,6 +48,12 @@ return userService.changePassword(changePasswordVO); } @ApiOperation("重置密码") @GetMapping("resetPassword") public R resetPassword(@RequestParam("userId") Long userId){ return userService.resetPassword(userId); } @ApiOperation(value = "用户菜单获取", response = SysMenuVO.class) @GetMapping("listmenu") public R listmenu() { springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComPropertyApi.java
New file @@ -0,0 +1,76 @@ package com.panzhihua.service_community.api; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.api.ApiController; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.dtos.property.CommonPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.vos.community.ComPropertyVO; import com.panzhihua.service_community.entity.ComProperty; import com.panzhihua.service_community.service.ComPropertyService; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.io.Serializable; import java.util.List; /** * (ComProperty)表控制层 * * @author makejava * @since 2021-09-18 10:46:52 */ @RestController @RequestMapping("comProperty") public class ComPropertyApi { /** * 服务对象 */ @Resource private ComPropertyService comPropertyService; /** * 分页查询所有数据 * * @param commonPage 查询实体 * @return 所有数据 */ @PostMapping("queryAll") public R selectAll(@RequestBody CommonPage commonPage) { return this.comPropertyService.pageList(commonPage); } /** * 新增数据 * * @param comProperty 实体对象 * @return 新增结果 */ @PostMapping public R insert(@RequestBody ComPropertyVO comProperty) { return this.comPropertyService.insert(comProperty); } /** * 修改数据 * * @param comProperty 实体对象 * @return 修改结果 */ @PostMapping("/update") public R update(@RequestBody ComPropertyVO comProperty) { return this.comPropertyService.update(comProperty); } /** * 删除数据 * * @param id 主键结合 * @return 删除结果 */ @GetMapping("del") public R delete(@RequestParam("id") Long id) { return this.comPropertyService.delete(id); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPropertyDao.java
New file @@ -0,0 +1,28 @@ package com.panzhihua.service_community.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; import com.panzhihua.common.model.vos.community.ComPropertyVO; import org.apache.ibatis.annotations.Mapper; import com.panzhihua.service_community.entity.ComProperty; import org.apache.ibatis.annotations.Param; /** * (ComProperty)表数据库访问层 * * @author makejava * @since 2021-09-18 10:46:51 */ @Mapper public interface ComPropertyDao extends BaseMapper<ComProperty> { /** * 分页查询 * @param page * @param commonPage * @return */ IPage<ComPropertyVO> pageList(Page page, @Param("commonPage") CommonPage commonPage); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActCommittee.java
@@ -34,7 +34,7 @@ */ @ApiModelProperty(value = "主键") @TableId(type = IdType.AUTO) private Integer id; private Long id; /** * 名称 @@ -67,7 +67,10 @@ private Long userId; @ApiModelProperty(value = "创建时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date createTime; @ApiModelProperty(value = "社区Id") private Long communityId; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComProperty.java
New file @@ -0,0 +1,84 @@ package com.panzhihua.service_community.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.Date; /** * (ComProperty)表实体类 * * @author makejava * @since 2021-09-18 10:46:50 */ @Data @Builder @AllArgsConstructor @NoArgsConstructor @ApiModel("") public class ComProperty implements Serializable { private static final long serialVersionUID = 860578600976051156L; /** * 主键 */ @ApiModelProperty(value = "主键") @TableId(type = IdType.AUTO) private Long id; /** * 名称 */ @ApiModelProperty(value = "名称") private String name; /** * 简介 */ @ApiModelProperty(value = "简介") private String introduction; /** * 联系人姓名 */ @ApiModelProperty(value = "联系人姓名") private String contactName; /** * 联系人手机 */ @ApiModelProperty(value = "联系人手机") private String phone; /** * 地址 */ @ApiModelProperty(value = "地址") private String address; /** * 用户id */ @ApiModelProperty(value = "用户id") private Long userId; /** * 社区id */ @ApiModelProperty(value = "社区id") private Long communityId; private Date createTime; private Long areaId; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComPropertyService.java
New file @@ -0,0 +1,51 @@ package com.panzhihua.service_community.service; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.dtos.property.CommonPage; import com.baomidou.mybatisplus.extension.service.IService; import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; import com.panzhihua.common.model.vos.community.ComPropertyVO; import com.panzhihua.service_community.entity.ComProperty; /** * (ComProperty)表服务接口 * * @author makejava * @since 2021-09-18 10:46:51 */ public interface ComPropertyService extends IService<ComProperty> { /** * 分页查询 * @param commonPage * @return */ R pageList(CommonPage commonPage); /** * id查询详情 * @param id * @return */ R selectById(Long id); /** * 新增 * @param comPropertyVO * @return */ R insert(ComPropertyVO comPropertyVO); /** * 更新 * @param comPropertyVO * @return */ R update(ComPropertyVO comPropertyVO); /** * 删除 * @param id * @return */ R delete(Long id); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActCommitteeServiceImpl.java
@@ -48,9 +48,11 @@ administratorsUserVO.setAccount(comActCommiteeVO.getAccount()); administratorsUserVO.setPassword(comActCommiteeVO.getPassword()); administratorsUserVO.setRoleId(comActCommiteeVO.getRoleId()); administratorsUserVO.setCommunityId(comActCommiteeVO.getCommunityId()); administratorsUserVO.setAreaId(comActCommiteeVO.getAreaId()); R r=userService.addUserBackstageProperty(administratorsUserVO); if(R.isOk(r)){ comActCommiteeVO.setUserId(Long.parseLong(r.getData().toString())); comActCommittee.setUserId(Long.parseLong(r.getData().toString())); comActCommittee.setCreateTime(DateUtil.date()); this.comActCommitteeDao.insert(comActCommittee); return R.ok(); @@ -63,26 +65,10 @@ @Transactional(rollbackFor = Exception.class) public R update(ComActCommiteeVO comActCommiteeVO) { if(comActCommiteeVO!=null){ if(!comActCommiteeVO.getAccount().isEmpty()||!comActCommiteeVO.getPassword().isEmpty()){ AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); administratorsUserVO.setUserId(comActCommiteeVO.getUserId()); administratorsUserVO.setAccount(comActCommiteeVO.getAccount()); administratorsUserVO.setPassword(comActCommiteeVO.getPassword()); R r=userService.putUserBackstage(administratorsUserVO); if(R.isOk(r)){ ComActCommittee comActCommittee=new ComActCommittee(); BeanUtils.copyProperties(comActCommiteeVO,comActCommittee); this.comActCommitteeDao.updateById(comActCommittee); return R.ok(); } return R.fail("账号密码修改失败"); } else { ComActCommittee comActCommittee=new ComActCommittee(); BeanUtils.copyProperties(comActCommiteeVO,comActCommittee); this.comActCommitteeDao.updateById(comActCommittee); return R.ok(); } } return R.fail(); } @@ -95,6 +81,7 @@ if(comActCommittee.getUserId()!=null){ AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); administratorsUserVO.setUserId(comActCommittee.getUserId()); administratorsUserVO.setCommunityId(comActCommittee.getCommunityId()); R r=userService.deleteUserBackstage(administratorsUserVO); if(R.isOk(r)){ this.comActCommitteeDao.deleteById(id); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java
@@ -52,6 +52,7 @@ administratorsUserVO.setAccount(comActSocialOrgVO.getAccount()); administratorsUserVO.setPassword(comActSocialOrgVO.getPassword()); administratorsUserVO.setRoleId(comActSocialOrgVO.getRoleId()); administratorsUserVO.setCommunityId(comActSocialOrg.getCommunityId()); R r=userService.addUserBackstageProperty(administratorsUserVO); if(R.isOk(r)){ comActSocialOrg.setUserId(Long.parseLong(r.getData().toString())); @@ -64,29 +65,12 @@ } @Override @Transactional(rollbackFor = Exception.class) public R update(ComActSocialOrgVO comActSocialOrgVO) { if(comActSocialOrgVO!=null){ if(!comActSocialOrgVO.getAccount().isEmpty()||!comActSocialOrgVO.getPassword().isEmpty()){ AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); administratorsUserVO.setUserId(comActSocialOrgVO.getUserId()); administratorsUserVO.setAccount(comActSocialOrgVO.getAccount()); administratorsUserVO.setPassword(comActSocialOrgVO.getPassword()); R r=userService.putUserBackstage(administratorsUserVO); if(R.isOk(r)){ ComActSocialOrg comActSocialOrg=new ComActSocialOrg(); BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg); this.comActSocialOrgDao.updateById(comActSocialOrg); return R.ok(); } return R.fail("账号密码修改失败"); } else { ComActSocialOrg comActSocialOrg=new ComActSocialOrg(); BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg); this.comActSocialOrgDao.updateById(comActSocialOrg); return R.ok(); } } return R.fail(); } @@ -99,6 +83,7 @@ if(comActSocialOrg.getUserId()!=null){ AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); administratorsUserVO.setUserId(comActSocialOrg.getUserId()); administratorsUserVO.setCommunityId(comActSocialOrg.getCommunityId()); R r=userService.deleteUserBackstage(administratorsUserVO); if(R.isOk(r)){ this.comActSocialOrgDao.deleteById(id); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java
New file @@ -0,0 +1,98 @@ package com.panzhihua.service_community.service.impl; import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComPropertyVO; import com.panzhihua.common.model.vos.user.AdministratorsUserVO; import com.panzhihua.common.service.user.UserService; import com.panzhihua.service_community.entity.ComActSocialOrg; import com.panzhihua.service_community.entity.ComProperty; import com.panzhihua.service_community.dao.ComPropertyDao; import com.panzhihua.service_community.service.ComPropertyService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; /** * (ComProperty)表服务实现类 * * @author makejava * @since 2021-09-18 10:46:51 */ @Slf4j @Service public class ComPropertyServiceImpl extends ServiceImpl<ComPropertyDao, ComProperty> implements ComPropertyService { @Resource private ComPropertyDao comPropertyDao; @Resource private UserService userService; @Override public R pageList(CommonPage commonPage) { return R.ok(comPropertyDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); } @Override public R selectById(Long id) { return null; } @Override @Transactional(rollbackFor = Exception.class) public R insert(ComPropertyVO comPropertyVO) { if(comPropertyVO!=null){ ComProperty comProperty=new ComProperty(); BeanUtils.copyProperties(comPropertyVO,comProperty); AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); administratorsUserVO.setType(3); administratorsUserVO.setAccount(comPropertyVO.getAccount()); administratorsUserVO.setPassword(comPropertyVO.getPassword()); administratorsUserVO.setRoleId(comPropertyVO.getRoleId()); administratorsUserVO.setCommunityId(comPropertyVO.getCommunityId()); administratorsUserVO.setAreaId(comPropertyVO.getAreaId()); R r=userService.addUserBackstageProperty(administratorsUserVO); if(R.isOk(r)){ comProperty.setUserId(Long.parseLong(r.getData().toString())); comProperty.setCreateTime(DateUtil.date()); this.comPropertyDao.insert(comProperty); return R.ok(); } } return R.fail(); } @Override public R update(ComPropertyVO comPropertyVO) { if(comPropertyVO!=null){ ComProperty comProperty=new ComProperty(); BeanUtils.copyProperties(comPropertyVO,comProperty); this.comPropertyDao.updateById(comProperty); return R.ok(); } return R.fail(); } @Override public R delete(Long id) { ComProperty comProperty=comPropertyDao.selectById(id); if(comProperty!=null){ if(comProperty.getUserId()!=null){ AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); administratorsUserVO.setUserId(comProperty.getUserId()); administratorsUserVO.setCommunityId(comProperty.getCommunityId()); R r=userService.deleteUserBackstage(administratorsUserVO); if(R.isOk(r)){ this.comPropertyDao.deleteById(id); return R.ok(); } return R.fail("账号删除失败"); } } return R.fail("用户账号错误"); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActCommitteeMapper.xml
@@ -10,25 +10,30 @@ <result property="areaId" column="area_id"/> <result property="userId" column="user_id"/> <result property="createTime" column="create_time"/> <result property="communityId" column="communityId"/> </resultMap> <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComActCommiteeVO"> select t.*,t1.account,t1.password,t2.area_name as areaName from com_act_committee t select t.*,t1.account,t1.password,t2.area_name as areaName,t3.role_id as roleId from com_act_committee t left join sys_user t1 on t.user_id = t1.user_id left join com_mng_struct_area t2 on t.area_id = t2.id left join sys_user_role t3 on t.user_id = t3.user_id <where> 1=1 <if test="commonPage.systemName!=null and commonPage.systemName !=''"> and t2.area_name like concat(#{systemName},'%') <if test="commonPage.areaId!=null and commonPage.areaId !=''"> and t.area_id =#{commonPage.areaId} </if> <if test="commonPage.name!=null and commonPage.name!=''"> and t.name like concat(#{name},'%') and t.name like concat(#{commonPage.name},'%') </if> <if test="commonPage.phone!=null and commonPage.phone!=''"> and t.phone like concat(#{phone},'%') and t.phone like concat(#{commonPage.phone},'%') </if> <if test="commonPage.username!=null and commonPage.username!=''"> and t.contact_name like concat(#{username},'%') and t.contact_name like concat(#{commonPage.username},'%') </if> <if test="commonPage.paramId!=null"> and t.community_id =#{commonPage.paramId} </if> </where> order by t.create_time desc springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActSocialOrgMapper.xml
@@ -43,11 +43,13 @@ </resultMap> <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComActSocialOrgVO"> select t.*,t1.account,t1.password from com_act_social_org t left join sys_user t1 on t.user_id = t1.user_id select t.*,t1.account,t1.password,t2.role_id as roleId from com_act_social_org t left join sys_user t1 on t.user_id = t1.user_id left join sys_user_role t2 on t.user_id = t2.user_id <where> 1=1 <if test="commonPage.type!=null"> and t.type =#{commonPage.type} and t.company_type =#{commonPage.type} </if> <if test="commonPage.name!=null and commonPage.name!=''"> and t.name like concat(#{commonPage.name},'%') @@ -64,6 +66,9 @@ <if test="commonPage.paramId!=null"> and t.community_id =#{commonPage.paramId} </if> <if test="commonPage.phone!=null and commonPage.phone!=''"> and t.contact_phone like concat(#{commonPage.phone},'%') </if> </where> order by t.create_at desc </select> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyHelpMapper.xml
New file @@ -0,0 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.panzhihua.service_property.dao.ComPropertyHelpDao"> <resultMap type="com.panzhihua.service_property.entity.ComPropertyHelp" id="ComPropertyHelpBaseResultMap"> <result property="id" column="id"/> <result property="name" column="name"/> <result property="imgUrl" column="img_url"/> <result property="phone" column="phone"/> <result property="status" column="status"/> <result property="createTime" column="create_time"/> </resultMap> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyMapper.xml
New file @@ -0,0 +1,38 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.panzhihua.service_community.dao.ComPropertyDao"> <resultMap type="com.panzhihua.service_community.entity.ComProperty" id="ComPropertyBaseResultMap"> <result property="id" column="id"/> <result property="name" column="name"/> <result property="introduction" column="introduction"/> <result property="contactName" column="contact_name"/> <result property="phone" column="phone"/> <result property="address" column="address"/> <result property="userId" column="user_id"/> <result property="communityId" column="community_id"/> <result property="createTime" column="create_time"/> <result property="areaId" column="area_id"/> </resultMap> <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComPropertyVO"> select t.*,t1.account,t1.password,t2.area_name as areaName,t3.role_id as roleId from com_property t left join sys_user t1 on t.user_id = t1.user_id left join com_mng_struct_area t2 on t.area_id = t2.id left join sys_user_role t3 on t.user_id = t3.user_id <where> 1=1 <if test="commonPage.name !=null and commonPage.name !=''"> and t.name like concat(#{commonPage.name},'%') </if> <if test="commonPage.username !=null and commonPage.username !=''"> and t.contact_name like concat(#{commonPage.username},'%') </if> <if test="commonPage.phone !=null and commonPage.phone !=''"> and t.phone like concat(#{commonPage.phone},'%') </if> </where> order by t.create_time desc </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/api/ComPropertyHelpApi.java
New file @@ -0,0 +1,98 @@ package com.panzhihua.service_property.api; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.api.ApiController; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.dtos.property.CommonPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.vos.property.ComPropertyHelpVO; import com.panzhihua.service_property.entity.ComPropertyHelp; import com.panzhihua.service_property.service.ComPropertyHelpService; import org.springframework.beans.BeanUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.io.Serializable; import java.util.List; /** * (ComPropertyHelp)表控制层 * * @author makejava * @since 2021-09-18 16:43:12 */ @RestController @RequestMapping("comPropertyHelp") public class ComPropertyHelpApi { /** * 服务对象 */ @Resource private ComPropertyHelpService comPropertyHelpService; /** * 分页查询所有数据 * * @param commonPage 查询实体 * @return 所有数据 */ @PostMapping("queryAll") public R selectAll(@RequestBody CommonPage commonPage) { return this.comPropertyHelpService.pageList(commonPage); } /** * 通过主键查询单条数据 * * @param id 主键 * @return 单条数据 */ @GetMapping("{id}") public R selectOne(@PathVariable("id") Serializable id) { return R.ok(this.comPropertyHelpService.getById(id)); } /** * 新增数据 * * @param comPropertyHelp 实体对象 * @return 新增结果 */ @PostMapping public R insert(@RequestBody ComPropertyHelpVO comPropertyHelp) { if(comPropertyHelp!=null){ ComPropertyHelp comPropertyHelp1=new ComPropertyHelp(); BeanUtils.copyProperties(comPropertyHelp,comPropertyHelp1); return R.ok(this.comPropertyHelpService.save(comPropertyHelp1)); } return R.fail(); } /** * 修改数据 * * @param comPropertyHelp 实体对象 * @return 修改结果 */ @PostMapping("/update") public R update(@RequestBody ComPropertyHelpVO comPropertyHelp) { if(comPropertyHelp!=null){ ComPropertyHelp comPropertyHelp1=new ComPropertyHelp(); BeanUtils.copyProperties(comPropertyHelp,comPropertyHelp1); return R.ok(this.comPropertyHelpService.updateById(comPropertyHelp1)); } return R.fail(); } /** * 删除数据 * * @param id 主键结合 * @return 删除结果 */ @GetMapping("del") public R delete(@RequestParam("id") Long id) { return R.ok(this.comPropertyHelpService.removeById(id)); } } springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dao/ComPropertyHelpDao.java
New file @@ -0,0 +1,26 @@ package com.panzhihua.service_property.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.property.CommonPage; import org.apache.ibatis.annotations.Mapper; import com.panzhihua.service_property.entity.ComPropertyHelp; import org.apache.ibatis.annotations.Param; /** * (ComPropertyHelp)表数据库访问层 * * @author makejava * @since 2021-09-18 16:43:11 */ @Mapper public interface ComPropertyHelpDao extends BaseMapper<ComPropertyHelp> { /** * 分页查询 * @param page * @param commonPage * @return */ IPage<ComPropertyHelp> pageList(Page page, @Param("commonPage")CommonPage commonPage); } springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyEquipment.java
@@ -90,4 +90,10 @@ */ @ApiModelProperty("手机号") private String phone; /** * 街路巷id */ @ApiModelProperty("街路巷id") private Long villageId; } springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/entity/ComPropertyHelp.java
New file @@ -0,0 +1,73 @@ package com.panzhihua.service_property.entity; import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.Date; /** * (ComPropertyHelp)表实体类 * * @author makejava * @since 2021-09-18 16:43:11 */ @Data @Builder @AllArgsConstructor @NoArgsConstructor @ApiModel("") public class ComPropertyHelp implements Serializable { private static final long serialVersionUID = 804376246485599231L; /** * 主键 */ @ApiModelProperty(value = "主键") @TableId(type = IdType.AUTO) private Integer id; /** * 姓名 */ @ApiModelProperty(value = "姓名") private String name; /** * 照片 */ @ApiModelProperty(value = "照片") private String imgUrl; /** * 手机号 */ @ApiModelProperty(value = "手机号") private String phone; /** * 状态 0 禁用 1启用 */ @ApiModelProperty(value = "状态 0 禁用 1启用") private Integer status; /** * 创建时间 */ @ApiModelProperty(value = "创建时间") private Date createTime; @ApiModelProperty(value = "社区id") private Long communityId; } springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyHelpService.java
New file @@ -0,0 +1,21 @@ package com.panzhihua.service_property.service; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.dtos.property.CommonPage; import com.baomidou.mybatisplus.extension.service.IService; import com.panzhihua.service_property.entity.ComPropertyHelp; /** * (ComPropertyHelp)表服务接口 * * @author makejava * @since 2021-09-18 16:43:12 */ public interface ComPropertyHelpService extends IService<ComPropertyHelp> { /** * 分页查询 * @param commonPage * @return */ R pageList(CommonPage commonPage); } springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyHelpServiceImpl.java
New file @@ -0,0 +1,29 @@ package com.panzhihua.service_property.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; import com.panzhihua.service_property.entity.ComPropertyHelp; import com.panzhihua.service_property.dao.ComPropertyHelpDao; import com.panzhihua.service_property.service.ComPropertyHelpService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; /** * (ComPropertyHelp)表服务实现类 * * @author makejava * @since 2021-09-18 16:43:12 */ @Slf4j @Service public class ComPropertyHelpServiceImpl extends ServiceImpl<ComPropertyHelpDao, ComPropertyHelp> implements ComPropertyHelpService { @Resource private ComPropertyHelpDao comPropertyHelpDao; @Override public R pageList(CommonPage commonPage) { return null; } } springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyHelpMapper.xml
New file @@ -0,0 +1,30 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.panzhihua.service_property.dao.ComPropertyHelpDao"> <resultMap type="com.panzhihua.service_property.entity.ComPropertyHelp" id="ComPropertyHelpBaseResultMap"> <result property="id" column="id"/> <result property="name" column="name"/> <result property="imgUrl" column="img_url"/> <result property="phone" column="phone"/> <result property="status" column="status"/> <result property="createTime" column="create_time"/> <result property="communityId" column="community_id"/> </resultMap> <select id="pageList" resultMap="ComPropertyHelpBaseResultMap"> select * from com_property_help <where> 1=1 <if test="commonPage.status !=null"> and status =#{commonPage.status} </if> <if test="commonPage.paramId !=null"> and communityId =#{commonPage.paramId} </if> </where> order by create_time desc </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml
@@ -24,7 +24,7 @@ </resultMap> <select id="pageList" resultType="com.panzhihua.common.model.vos.property.ComPropertyRepairVO" parameterType="com.panzhihua.common.model.dtos.property.CommonPage"> select t.*,t1.name as feedback from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id select t.*,t1.name as feedback from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id left join com_property t2 on t.property_id = t2.area_id <where> 1=1 <if test="commonPage.status !=null"> @@ -48,8 +48,11 @@ <if test="commonPage.systemName !=null and commonPage.systemName.trim() !=''"> and t1.name like concat(#{commonPage.systemName},'%') </if> <if test="commonPage.paramId !=null"> and t.property_id =#{commonPage.paramId} <if test="commonPage.paramId !=null and commonPage.paramId !=0"> and t2.comunity_id =#{commonPage.paramId} </if> <if test="commonPage.areaId !=null and commonPage.areaId !=0"> and t2.area_id =#{commonPage.areaId} </if> <if test="commonPage.userId !=null"> and t.create_by =#{commonPage.userId} springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -125,6 +125,18 @@ } /** * 重置密码 * * @param userId * 新密码 * @return 修改结果 */ @GetMapping("resetPassword") public R resetPassword(@RequestParam("userId") Long userId) { return userService.resetPassword(userId); } /** * 某社区后台人员查询 * * @param param springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -687,4 +687,8 @@ */ R getUserListByCommunityId(Long communityId); /** * 重置密码 */ R resetPassword(Long userId); } springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -2428,4 +2428,17 @@ public R getUserListByCommunityId(Long communityId) { return R.ok(this.userDao.getUserListByCommunityId(communityId)); } @Override public R resetPassword(Long userId) { SysUserDO sysUserDO = new SysUserDO(); sysUserDO.setUserId(userId); String encode = new BCryptPasswordEncoder().encode("admin123456"); sysUserDO.setPassword(encode); int update = userDao.updateById(sysUserDO); if (update > 0) { return R.ok(); } return R.fail(); } }