| | |
| | | hashMap.put("/swagger-resources/configuration/ui/**", "anon"); |
| | | hashMap.put("/swagger-resources/configuration/security/**", "anon"); |
| | | |
| | | // hashMap.put("/base/**", "anon"); |
| | | hashMap.put("/base/**", "anon"); |
| | | hashMap.put("/upload/**", "anon"); |
| | | hashMap.put("/api/**", "anon"); |
| | | hashMap.put("/auth/**", "anon"); |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping ("/list") |
| | | @ApiOperation(value = "查询用户(房东)", tags = {"后台-用户管理"}) |
| | | @GetMapping (value = "/list") |
| | | @ApiOperation(value = "查询用户(房东)", tags = {"后台-用户管理"},response = Host.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "nickname", value = "微信昵称", required = false), |
| | | @ApiImplicitParam(name = "userType", value = "用户类型(1=普通,2=房东)",dataType = "int",required = false), |
| | |
| | | @ApiImplicitParam(name = "pageSize",required = false), |
| | | |
| | | }) |
| | | public List<Host> list(String nickname,Integer userType,Integer status,String phone,@RequestParam() int pageNo, @RequestParam()int pageSize){ |
| | | int index = (pageNo-1)*pageSize; |
| | | int size = pageSize; |
| | | public Object list(String nickname,Integer userType,Integer status,String phone,@RequestParam() int pageNum, @RequestParam()int pageSize){ |
| | | // int index = (pageNum-1)*pageSize; |
| | | // int size = pageSize; |
| | | |
| | | |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<Host> hosts = appUserService.listHost(nickname,userType,status,phone); |
| | | |
| | | List<Host> hosts = appUserService.listHost(nickname,userType,status,phone,index,size); |
| | | |
| | | PageHelper.startPage(0,4); |
| | | PageInfo<Host> info=new PageInfo<>(hosts); |
| | | System.err.println(info); |
| | | |
| | | return hosts; |
| | | return info; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", tags = {"后台-房源管理"}) |
| | | @ApiOperation(value = "列表", tags = {"后台-房源管理"},response = THouseResource.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "int", paramType = "query"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页数量", required = true, dataType = "int", paramType = "query"), |
| | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/au/list") |
| | | @ApiOperation(value = "审核列表", tags = {"后台-房源管理"}) |
| | | @ApiOperation(value = "审核列表", tags = {"后台-房源管理"},response = THouseResource.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "int", paramType = "query"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页数量", required = true, dataType = "int", paramType = "query"), |
| | |
| | | package com.stylefeng.guns.modular.code.controller; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.stylefeng.guns.modular.system.dto.Host; |
| | | import com.stylefeng.guns.modular.system.dto.Medium; |
| | | import com.stylefeng.guns.modular.system.dto.THouseResource; |
| | | import com.stylefeng.guns.modular.system.model.AppUser; |
| | | import com.stylefeng.guns.modular.system.service.IAppUserService; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "查询中介列表", tags = {"后台-中介管理"}) |
| | | @ApiOperation(value = "查询中介列表", tags = {"后台-中介管理"},response = Medium.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "nickname", value = "微信昵称", required = false), |
| | | @ApiImplicitParam(name = "userType", value = "3(房东)",dataType = "int",required = true), |
| | | // @ApiImplicitParam(name = "userType", value = "3(中介)",dataType = "int",required = true), |
| | | @ApiImplicitParam(name = "status", value = "状态(1=正常,2=冻结,3=删除)",dataType = "int",required = false), |
| | | @ApiImplicitParam(name = "phone", value = "电话",required = false), |
| | | @ApiImplicitParam(name = "pageNo", required = false), |
| | | @ApiImplicitParam(name = "pageNum", required = false), |
| | | @ApiImplicitParam(name = "pageSize",required = false), |
| | | |
| | | }) |
| | | public List<Medium> list(String nickname, Integer userType, Integer status, String phone, @RequestParam() int pageNo, @RequestParam()int pageSize){ |
| | | int index = (pageNo-1)*pageSize; |
| | | int size = pageSize; |
| | | List<Medium> medius = appUserService.listMedium(nickname,userType,status,phone,index,size); |
| | | return medius; |
| | | public Object list(String nickname, Integer status, String phone, @RequestParam() int pageNum, @RequestParam()int pageSize){ |
| | | Integer userType = 3; |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | |
| | | List<Medium> medius = appUserService.listMedium(nickname,userType,status,phone); |
| | | PageInfo<Medium> info=new PageInfo<>(medius); |
| | | System.err.println(info); |
| | | return info; |
| | | } |
| | | |
| | | |
| | |
| | | appUserService.updateById(appUser); |
| | | return ResultUtil.success("编辑成功"); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/auth/list") |
| | | @ApiOperation(value = "查询中介审核列表", tags = {"后台-中介审核管理"},response = Medium.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "nickname", value = "微信昵称", required = false), |
| | | @ApiImplicitParam(name = "userType", value = "3(中介)",dataType = "int",required = true), |
| | | @ApiImplicitParam(name = "status", value = "状态(1=正常,2=冻结,3=删除)",dataType = "int",required = false), |
| | | @ApiImplicitParam(name = "phone", value = "电话",required = false), |
| | | @ApiImplicitParam(name = "pageNum", required = true), |
| | | @ApiImplicitParam(name = "pageSize",required = true), |
| | | |
| | | }) |
| | | public Object aulist(String nickname, Integer userType, Integer status, String phone, int pageNum, int pageSize){ |
| | | |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<Medium> medius = appUserService.listAuMedium(nickname,userType,status,phone); |
| | | PageInfo<Medium> info=new PageInfo<>(medius); |
| | | System.err.println(info); |
| | | return info; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PutMapping("/auth/change") |
| | | @ApiOperation(value = "更改状态1=审核通过,2=审核拒绝,3=删除", tags = {"后台-中介审核管理"}) |
| | | public ResultUtil frozen(Integer id,Integer status,String reason){ |
| | | AppUser appUser = appUserService.selectById(id); |
| | | if (status==1){ |
| | | appUser.setAuditStatus(2); |
| | | }else if (status==2){ |
| | | appUser.setAuditStatus(1); |
| | | appUser.setAuditNote(reason); |
| | | }else if (status==3){ |
| | | appUser.setStatus(3); |
| | | } |
| | | |
| | | appUserService.updateById(appUser); |
| | | |
| | | return ResultUtil.success("操作成功"); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.code.controller; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.stylefeng.guns.modular.system.dto.FeedBackVo; |
| | | import com.stylefeng.guns.modular.system.dto.THouseResource; |
| | | import com.stylefeng.guns.modular.system.model.ReportHouseResource; |
| | | import com.stylefeng.guns.modular.system.service.IFeedBackService; |
| | | import com.stylefeng.guns.modular.system.service.IHouseResourceService; |
| | | import com.stylefeng.guns.modular.system.service.IReportHouseResourceService; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Controller |
| | | @RequestMapping("/base/report") |
| | | public class ReportController { |
| | | |
| | | @Autowired |
| | | private IHouseResourceService houseResourceService; |
| | | @Autowired |
| | | private IReportHouseResourceService reportHouseResourceService; |
| | | |
| | | @Autowired |
| | | private IFeedBackService feedBackService; |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", tags = {"后台-房源举报管理"},response = THouseResource.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "int", paramType = "query"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页数量", required = true, dataType = "int", paramType = "query"), |
| | | @ApiImplicitParam(name = "cellName", value = "小区名称", dataType = "String", paramType = "query"), |
| | | @ApiImplicitParam(name = "dataType", value = "房屋类型(1=出租,2=卖房)", dataType = "Integer", paramType = "query"), |
| | | @ApiImplicitParam(name = "isManage", value = "1后台2房东3中介", dataType = "Integer", paramType = "query"), |
| | | @ApiImplicitParam(name = "name", value = "姓名", dataType = "String", paramType = "query"), |
| | | @ApiImplicitParam(name = "saleAmount", value = "售卖金额区间'-'分隔", dataType = "String", paramType = "query"), |
| | | @ApiImplicitParam(name = "size", value = "面积", dataType = "Integer", paramType = "query") |
| | | }) |
| | | public Object auList(@RequestParam int pageNum, |
| | | @RequestParam int pageSize, |
| | | String cellName, |
| | | Integer dataType, |
| | | Integer isManage, |
| | | String name, |
| | | String saleAmount, |
| | | Integer id, String size){ |
| | | |
| | | |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<THouseResource> houseResources =houseResourceService.reprotList(id,cellName,dataType,isManage,name,saleAmount,size); |
| | | PageInfo<THouseResource> info=new PageInfo<>(houseResources); |
| | | System.err.println(info); |
| | | return info; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PutMapping("/change") |
| | | @ApiOperation(value = "status 1=通过,2=拒绝,3删除)", tags = {"后台-房源举报管理"}) |
| | | public ResultUtil change(Integer id, Integer status,String reason){ |
| | | ReportHouseResource reportHouseResource = reportHouseResourceService.selectById(id); |
| | | if (status==1){ |
| | | reportHouseResource.setAudit(1); |
| | | }else if (status ==2){ |
| | | reportHouseResource.setAudit(2); |
| | | reportHouseResource.setBackReason(reason); |
| | | }else if (status == 3){ |
| | | reportHouseResourceService.deleteById(id); |
| | | return ResultUtil.success(); |
| | | } |
| | | reportHouseResourceService.updateById(reportHouseResource); |
| | | return ResultUtil.success(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/feedback") |
| | | @ApiOperation(value = "列表", tags = {"后台-意见反馈"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "int", paramType = "query"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页数量", required = true, dataType = "int", paramType = "query"), |
| | | @ApiImplicitParam(name = "phone", value = "电话号码", dataType = "String", paramType = "query"), |
| | | @ApiImplicitParam(name = "name", value = "提交用户", dataType = "String", paramType = "query") |
| | | |
| | | }) |
| | | public PageInfo<FeedBackVo> auList(@RequestParam int pageNum, |
| | | @RequestParam int pageSize, |
| | | String phone,String name){ |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<FeedBackVo> backVos = feedBackService.list(phone,name); |
| | | PageInfo<FeedBackVo> info=new PageInfo<>(backVos); |
| | | System.err.println(info); |
| | | return info; |
| | | |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @DeleteMapping("/feedback/delete") |
| | | @ApiOperation(value = "删除", tags = {"后台-意见反馈"}) |
| | | public ResultUtil delete(Integer id){ |
| | | feedBackService.deleteById(id); |
| | | return ResultUtil.success("删除成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @GetMapping(value = "/list") |
| | | @ApiOperation(value = "列表", tags = {"后台-部门管理"}) |
| | | @ResponseBody |
| | | public Object list(String name) { |
| | | List<Map<String, Object>> list = this.deptService.list(name); |
| | | public Object list(String fullname) { |
| | | List<Map<String, Object>> list = this.deptService.list(fullname); |
| | | return list; |
| | | } |
| | | |
| | |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | | //完善pids,根据pid拿到pid的pids |
| | | dept.setPid(0); |
| | | deptSetPids(dept); |
| | | this.deptService.insert(dept); |
| | | return ResultUtil.success("添加成功"); |
| | |
| | | |
| | | @DataSource(name = "dataSourceBiz") |
| | | @GetMapping(value = "/tree") |
| | | @ApiOperation(value = "获取部门树", tags = {"后台-部门管理"}) |
| | | @ApiOperation(value = "获取部下拉框", tags = {"后台-部门管理"}) |
| | | @ResponseBody |
| | | public List<ZTreeNode> tree() { |
| | | public List<Dept> tree() { |
| | | List<ZTreeNode> tree = this.deptService.tree(); |
| | | tree.add(ZTreeNode.createParent()); |
| | | return tree; |
| | | |
| | | return deptService.selectList(null); |
| | | // return tree; |
| | | } |
| | | |
| | | @DataSource(name = "dataSourceBiz") |
| | | @DeleteMapping ("/delete") |
| | | @ResponseBody |
| | | @ApiOperation(value = "删除部门", tags = {"后台-部门管理"}) |
| | | public ResultUtil delete(Integer id) { |
| | | deptService.deleteById(id); |
| | | return ResultUtil.success("删除成功"); |
| | | } |
| | | |
| | | @GetMapping ("pre/edit/{deptId}") |
| | | public Dept deptUpdate(@PathVariable Integer deptId, Model model) { |
| | | Dept dept = deptService.selectById(deptId); |
| | |
| | | if (ToolUtil.isEmpty(dept) || dept.getId() == null) { |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | | dept.setPid(0); |
| | | deptSetPids(dept); |
| | | Dept dept1 = deptService.selectById(dept.getId()); |
| | | deptService.updateById(dept); |
| | |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | | role.setId(null); |
| | | role.setInsetTime(new Date()); |
| | | role.setDeptid(0); |
| | | role.setPid(0); |
| | | role.setInsertTime(new Date()); |
| | | this.roleService.insert(role); |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | |
| | | if (result.hasErrors()) { |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | | role.setDeptid(0); |
| | | role.setPid(0); |
| | | this.roleService.updateById(role); |
| | | return ResultUtil.success("修改成功"); |
| | | } |
| | |
| | | |
| | | |
| | | @GetMapping(value = "/roleTreeList") |
| | | @ApiOperation(value = "获取角色树", tags = {"后台-角色管理"}) |
| | | @ApiOperation(value = "获取角色下拉框", tags = {"后台-角色管理"}) |
| | | @ResponseBody |
| | | public List<ZTreeNode> roleTreeList() { |
| | | List<ZTreeNode> roleTreeList = this.roleService.roleTreeList(); |
| | | roleTreeList.add(ZTreeNode.createParent()); |
| | | return roleTreeList; |
| | | public List<Role> roleTreeList() { |
| | | // List<ZTreeNode> roleTreeList = this.roleService.roleTreeList(); |
| | | // roleTreeList.add(ZTreeNode.createParent()); |
| | | return roleService.selectList(null); |
| | | // return roleTreeList; |
| | | } |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.code.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.base.tips.Tip; |
| | | import com.stylefeng.guns.core.common.annotion.BussinessLog; |
| | |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.UserMapper; |
| | | import com.stylefeng.guns.modular.system.dto.Host; |
| | | import com.stylefeng.guns.modular.system.dto.Medium; |
| | | import com.stylefeng.guns.modular.system.factory.UserFactory; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.IBannerService; |
| | |
| | | @ApiOperation(value = "查询管理员", tags = {"后台-系统设置"}) |
| | | @GetMapping("/list") |
| | | @ResponseBody |
| | | public Object list(String account, @RequestParam()int pageNo, @RequestParam()int pageSize,@RequestParam("1=平台管理员 2=员工") int version) { |
| | | int index = (pageNo-1)*pageSize; |
| | | int size = pageSize; |
| | | List<Map<String, Object>> users = userService.getUsers(account,index,size,version); |
| | | return users; |
| | | public Object list(String account, @RequestParam()int pageNo, @RequestParam()int pageSize) { |
| | | // int index = (pageNo-1)*pageSize; |
| | | // int size = pageSize; |
| | | PageHelper.startPage(pageNo,pageSize); |
| | | |
| | | List<Map<String, Object>> users = userService.getUsers(account); |
| | | PageInfo<Map<String, Object>> info=new PageInfo<>(users); |
| | | System.err.println(info); |
| | | return info; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @ResponseBody |
| | | @GetMapping ("/text") |
| | | @ApiOperation(value = "3系统公告....", tags = {"后台-基础信息管理"}) |
| | | @ApiOperation(value = "3系统公告.4隐私5用户协议", tags = {"后台-基础信息管理"}) |
| | | public List<Banner> text(){ |
| | | Integer [] ids = {3,4,5}; |
| | | return bannerService.selectList(new EntityWrapper<Banner>().in("position",ids)); |
| | |
| | | |
| | | @ResponseBody |
| | | @GetMapping ("/know/list") |
| | | @ApiOperation(value = "列表", tags = {"后台-知识百科"}) |
| | | @ApiOperation(value = "列表", tags = {"后台-知识百科"},response = EncyclopedicKnowledge.class) |
| | | public List<EncyclopedicKnowledge> list(Integer type, String title,@RequestParam int pageNo,@RequestParam int pageSize){ |
| | | |
| | | int index = (pageNo-1)*pageSize; |
| | |
| | | List<Host> listHost(@Param("nickname")String nickname, |
| | | @Param("userType")Integer userType, |
| | | @Param("status")Integer status, |
| | | @Param("phone")String phone, |
| | | @Param("index")int index, |
| | | @Param("size")int size); |
| | | @Param("phone")String phone); |
| | | |
| | | List<Medium> listMedium(String nickname, Integer userType, Integer status, String phone, int index, int size); |
| | | List<Medium> listMedium(String nickname, Integer userType, Integer status, String phone); |
| | | List<Medium> listAuMedium(String nickname, Integer userType, Integer status, String phone); |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.AppUser; |
| | | import com.stylefeng.guns.modular.system.dto.FeedBackVo; |
| | | import com.stylefeng.guns.modular.system.model.FeedBack; |
| | | import com.stylefeng.guns.modular.system.warpper.req.SearchIntermediaryReq; |
| | | import com.stylefeng.guns.modular.system.warpper.res.SearchIntermediaryListRes; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface FeedBackMapper extends BaseMapper<FeedBack> { |
| | | |
| | | |
| | | |
| | | List<FeedBackVo> list(String phone,String name); |
| | | } |
| | |
| | | List<THouseResource> list(String cellName, Integer dataType, Integer isManage, String name, String min,String max, Integer status); |
| | | |
| | | List<THouseResource> aulist(Integer id,String cellName, Integer dataType, Integer isManage, String name, String min,String max, String size); |
| | | List<THouseResource> reprotList(Integer id,String cellName, Integer dataType, Integer isManage, String name, String min,String max, String size); |
| | | |
| | | } |
| | |
| | | |
| | | Map<String, Object> getSysUserDetails(Integer id); |
| | | |
| | | List<Map<String, Object>> getUsers(String account, int index, int size,int version); |
| | | List<Map<String, Object>> getUsers(String account); |
| | | } |
| | |
| | | and phone like CONCAT('%', #{phone}, '%') |
| | | </if> |
| | | </where> |
| | | limit #{index},#{size} |
| | | |
| | | |
| | | </select> |
| | | <select id="listMedium" resultType="com.stylefeng.guns.modular.system.dto.Medium"> |
| | | SELECT id,insert_time,nickname,company_name,agent_licence_code,wechat_qr_code,watch_app,phone,status |
| | | from t_app_user |
| | | <where> |
| | | status != 3 and audit_status = 2 |
| | | <if test="null != nickname and '' != nickname"> |
| | | and nickname like CONCAT('%', #{nickname}, '%') |
| | | </if> |
| | | <if test="null != userType"> |
| | | and user_type = #{userType} |
| | | </if> |
| | | <if test="null != status"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="null != phone and '' != phone"> |
| | | and phone like CONCAT('%', #{phone}, '%') |
| | | </if> |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="listAuMedium" resultType="com.stylefeng.guns.modular.system.dto.Medium"> |
| | | SELECT id,insert_time as insertTime,nickname,company_name as companyName, |
| | | agent_licence_code as agentLicenceCode,wechat_qr_code as wechatQrCode,watch_app as watchapp,phone,status,audit_status as auditStatus,audit_note as auditNote |
| | | ,refuse_date as refuseDate |
| | | from t_app_user |
| | | <where> |
| | | status != 3 |
| | |
| | | and phone like CONCAT('%', #{phone}, '%') |
| | | </if> |
| | | </where> |
| | | limit #{index},#{size} |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.FeedBackMapper"> |
| | | |
| | | |
| | | <select id="list" resultType="com.stylefeng.guns.modular.system.dto.FeedBackVo"> |
| | | |
| | | SELECT tf.insert_time as insertTime, au.nickname,au.phone,tf.content |
| | | from t_feedback tf |
| | | LEFT JOIN t_app_user au ON tf.app_user_id =au.id |
| | | <where> |
| | | <if test="null != name and '' != name"> |
| | | and au.nickname like CONCAT('%', #{name}, '%') |
| | | </if> |
| | | <if test="null != phone and '' != phone"> |
| | | and au.phone like CONCAT('%', #{phone}, '%') |
| | | </if> |
| | | |
| | | |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | </where> |
| | | |
| | | </select> |
| | | <select id="reprotList" resultType="com.stylefeng.guns.modular.system.dto.THouseResource"> |
| | | select * from ( |
| | | SELECT hs.insert_time as insertTime, hs.id, hs.cell_name as cellName, hs.house_address as houseAddress, |
| | | hs.data_type as dataType, |
| | | CASE |
| | | WHEN hs.is_manage IS NULL AND ap.user_type = 2 THEN 2 |
| | | WHEN hs.is_manage IS NULL AND ap.user_type = 3 THEN 3 |
| | | ELSE hs.is_manage |
| | | END AS isManage, |
| | | IFNULL(ap.nickname,su.`name`) as name, IFNULL(ap.phone,su.phone) as phone, |
| | | hs.house_model as houseModel, hs.building_orientation as buildingOrientation, hs.sale_amount as saleAmount, |
| | | hs.house_area as houseArea , hs.status,hr.content,hr.audit,hr.back_reason as backReason,hr.back_date as backDate |
| | | from t_report_house_resource hr |
| | | LEFT JOIN t_house_resource hs on hr.house_resource_id = hs.id |
| | | LEFT JOIN t_app_user ap ON hs.insert_user_id = ap.id |
| | | LEFT JOIN sys_user su ON hs.insert_user_id = su.id AND hs.is_manage = 1 |
| | | where hs.is_delete = 0 and hs.auth_status = 2 |
| | | |
| | | ) a |
| | | <where> |
| | | |
| | | <if test="null != id"> |
| | | and a.id = #{id} |
| | | </if> |
| | | |
| | | <if test="null != cellName and '' != cellName"> |
| | | and a.cellName like CONCAT('%', #{cellName}, '%') |
| | | </if> |
| | | <if test="null != dataType"> |
| | | and a.dataType = #{dataType} |
| | | </if> |
| | | <if test="null != isManage"> |
| | | and a.isManage = #{isManage} |
| | | </if> |
| | | <if test="null != name and '' != name"> |
| | | and a.name like CONCAT('%', #{name}, '%') |
| | | </if> |
| | | <if test="null != min and '' != min"> |
| | | and a.saleAmount between #{min} and #{max} |
| | | </if> |
| | | <if test="null != size and '' != size"> |
| | | and a.houseArea = #{size} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <select id="selectRoles" resultType="map"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sys_role |
| | | sr.id, sr.num, sr.pid, sr.name, sr.deptid, sr.tips, sr.version,su.name as createBy |
| | | from sys_role sr |
| | | left join sys_user su on sr.create_by = su.id |
| | | <if test="condition != null"> |
| | | where name like CONCAT('%',#{condition},'%') |
| | | </if> |
| | |
| | | LEFT JOIN sys_role sr ON us.roleid = sr.id |
| | | LEFT JOIN sys_dept sd on us.deptid = sd.id |
| | | <where> |
| | | us.version = #{version} and us.status != 3 |
| | | us.status != 3 |
| | | <if test="null != account and '' != account"> |
| | | and us.account like CONCAT('%', #{account}, '%') |
| | | </if> |
| | | </where> |
| | | |
| | | limit #{index},#{size} |
| | | |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | @Data |
| | | public class FeedBackVo { |
| | | private Integer id; |
| | | private Date insertTime; |
| | | private String nickname; |
| | | private String phone; |
| | | private String content; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class Medium { |
| | | @TableField("profile_photo") |
| | | @ApiModelProperty(value = "头像", required = true) |
| | |
| | | private Integer cityId; |
| | | @ApiModelProperty(value = "区id", required = true) |
| | | private Integer districtId; |
| | | @ApiModelProperty(value = "是否审核通过(1=待审核,2=审核通过,3=审核拒绝)", required = false) |
| | | private Integer auditStatus; |
| | | |
| | | private String auditNote; |
| | | |
| | | private Date refuseDate; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private Integer status; |
| | | @ApiModelProperty(value = "1=待审核,2=已通过,3=已拒绝", required = false) |
| | | private Integer authStatus; |
| | | @ApiModelProperty(value = "举报信息", required = false) |
| | | private Integer content; |
| | | @ApiModelProperty(value = "举报模块:审核状态0待审核 1通过 2未通过", required = false) |
| | | private Integer audit; |
| | | @ApiModelProperty(value = "拒绝理由", required = false) |
| | | private String backReason; |
| | | @ApiModelProperty(value = "拒绝日期", required = false) |
| | | private Date backDate; |
| | | } |
| | |
| | | /** |
| | | * 父部门id |
| | | */ |
| | | @ApiModelProperty(value = "父级部门id", required = true) |
| | | private Integer pid; |
| | | /** |
| | | * 父级ids |
| | |
| | | */ |
| | | @TableField("insert_time") |
| | | private Date insertTime; |
| | | |
| | | @TableField("audit") |
| | | private Integer audit; |
| | | @TableField("back_reason") |
| | | private String backReason; |
| | | |
| | | @TableField("back_date") |
| | | private Date backDate; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | |
| | | /** |
| | | * 父角色id |
| | | */ |
| | | @ApiModelProperty(value = "上级角色id", required = true) |
| | | private Integer pid; |
| | | /** |
| | | * 角色名称 |
| | |
| | | /** |
| | | * 部门名称 |
| | | */ |
| | | @ApiModelProperty(value = "部门id", required = true) |
| | | private Integer deptid; |
| | | /** |
| | | * 提示 |
| | |
| | | @ApiModelProperty(value = "别名", required = false) |
| | | private String tips; |
| | | |
| | | private Date insetTime; |
| | | @TableField("insert_time") |
| | | private Date insertTime; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | ResultUtil<CollectRes> release(UserInfoQuery query); |
| | | |
| | | List<Host> listHost(String nickname, Integer userType, Integer status, String phone, int index, int size); |
| | | List<Host> listHost(String nickname, Integer userType, Integer status, String phone); |
| | | |
| | | List<Medium> listMedium(String nickname, Integer userType, Integer status, String phone, int index, int size); |
| | | List<Medium> listMedium(String nickname, Integer userType, Integer status, String phone); |
| | | List<Medium> listAuMedium(String nickname, Integer userType, Integer status, String phone); |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.AppUser; |
| | | import com.stylefeng.guns.modular.system.dto.FeedBackVo; |
| | | import com.stylefeng.guns.modular.system.model.FeedBack; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.req.RegisterAccountReq; |
| | | import com.stylefeng.guns.modular.system.warpper.req.SearchIntermediaryReq; |
| | | import com.stylefeng.guns.modular.system.warpper.res.AppletLoginRes; |
| | | import com.stylefeng.guns.modular.system.warpper.res.SearchIntermediaryRes; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | */ |
| | | public interface IFeedBackService extends IService<FeedBack> { |
| | | |
| | | List<FeedBackVo> list(String phone,String name); |
| | | } |
| | |
| | | List<THouseResource> list(String cellName, Integer dataType, Integer isManage, String name, String saleAmount, Integer status); |
| | | |
| | | List<THouseResource> aulist(Integer id,String cellName, Integer dataType, Integer isManage, String name, String saleAmount,String size); |
| | | List<THouseResource> reprotList(Integer id,String cellName, Integer dataType, Integer isManage, String name, String saleAmount,String size); |
| | | |
| | | } |
| | |
| | | |
| | | Map<String,Object> getSysUserDetails(Integer id); |
| | | |
| | | List<Map<String, Object>> getUsers(String account, int index, int size,int version); |
| | | List<Map<String, Object>> getUsers(String account); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Host> listHost(String nickname, Integer userType, Integer status, String phone, int index, int size) { |
| | | return this.baseMapper.listHost(nickname,userType,status,phone,index,size); |
| | | public List<Host> listHost(String nickname, Integer userType, Integer status, String phone) { |
| | | return this.baseMapper.listHost(nickname,userType,status,phone); |
| | | } |
| | | |
| | | @Override |
| | | public List<Medium> listMedium(String nickname, Integer userType, Integer status, String phone, int index, int size) { |
| | | return this.baseMapper.listMedium(nickname,userType,status,phone,index,size); |
| | | public List<Medium> listMedium(String nickname, Integer userType, Integer status, String phone) { |
| | | return this.baseMapper.listMedium(nickname,userType,status,phone); |
| | | } |
| | | |
| | | @Override |
| | | public List<Medium> listAuMedium(String nickname, Integer userType, Integer status, String phone) { |
| | | return this.baseMapper.listAuMedium(nickname,userType,status,phone); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加新用户到数据库 |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.JwtTokenUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.AppUserMapper; |
| | | import com.stylefeng.guns.modular.system.dao.FeedBackMapper; |
| | | import com.stylefeng.guns.modular.system.model.AppUser; |
| | | import com.stylefeng.guns.modular.system.dto.FeedBackVo; |
| | | import com.stylefeng.guns.modular.system.model.FeedBack; |
| | | import com.stylefeng.guns.modular.system.model.Region; |
| | | import com.stylefeng.guns.modular.system.service.IAppUserService; |
| | | import com.stylefeng.guns.modular.system.service.IFeedBackService; |
| | | import com.stylefeng.guns.modular.system.service.IHouseResourceService; |
| | | import com.stylefeng.guns.modular.system.service.IRegionService; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.UUIDUtil; |
| | | import com.stylefeng.guns.modular.system.util.weChat.WXCore; |
| | | import com.stylefeng.guns.modular.system.util.weChat.WeChatUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.req.RegisterAccountReq; |
| | | import com.stylefeng.guns.modular.system.warpper.req.SearchIntermediaryReq; |
| | | import com.stylefeng.guns.modular.system.warpper.res.AppletLoginRes; |
| | | import com.stylefeng.guns.modular.system.warpper.res.SearchIntermediaryListRes; |
| | | import com.stylefeng.guns.modular.system.warpper.res.SearchIntermediaryRes; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | public class FeedBackServiceImpl extends ServiceImpl<FeedBackMapper, FeedBack> implements IFeedBackService { |
| | | |
| | | |
| | | @Override |
| | | public List<FeedBackVo> list(String phone,String name) { |
| | | return this.baseMapper.list(phone,name); |
| | | |
| | | } |
| | | } |
| | |
| | | return this.baseMapper.aulist(id,cellName,dataType,isManage,name,null,null,size); |
| | | |
| | | } |
| | | @Override |
| | | public List<THouseResource> reprotList(Integer id ,String cellName, Integer dataType, Integer isManage, String name, String saleAmount, String size) { |
| | | |
| | | if (saleAmount!=null) { |
| | | String [] split = saleAmount.split("-"); |
| | | return this.baseMapper.reprotList(id,cellName,dataType,isManage,name,split[0],split[1],size); |
| | | |
| | | } |
| | | |
| | | return this.baseMapper.reprotList(id,cellName,dataType,isManage,name,null,null,size); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public ResultUtil confirm(Integer userType) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getUsers(String account, int index, int size,int version) { |
| | | return this.baseMapper.getUsers(account,index,size,version); |
| | | public List<Map<String, Object>> getUsers(String account) { |
| | | return this.baseMapper.getUsers(account); |
| | | } |
| | | } |
| | |
| | | private String email; |
| | | @ApiModelProperty(value = "电话", required = true) |
| | | private String phone; |
| | | @ApiModelProperty(value = "角色id", required = true) |
| | | private String roleid; |
| | | @ApiModelProperty(value = "部门id", required = true) |
| | | private Integer deptid; |
| | |
| | | and phone like CONCAT('%', #{phone}, '%') |
| | | </if> |
| | | </where> |
| | | limit #{index},#{size} |
| | | |
| | | |
| | | </select> |
| | | <select id="listMedium" resultType="com.stylefeng.guns.modular.system.dto.Medium"> |
| | | SELECT id,insert_time,nickname,company_name,agent_licence_code,wechat_qr_code,watch_app,phone,status |
| | | from t_app_user |
| | | <where> |
| | | status != 3 and audit_status = 2 |
| | | <if test="null != nickname and '' != nickname"> |
| | | and nickname like CONCAT('%', #{nickname}, '%') |
| | | </if> |
| | | <if test="null != userType"> |
| | | and user_type = #{userType} |
| | | </if> |
| | | <if test="null != status"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="null != phone and '' != phone"> |
| | | and phone like CONCAT('%', #{phone}, '%') |
| | | </if> |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="listAuMedium" resultType="com.stylefeng.guns.modular.system.dto.Medium"> |
| | | SELECT id,insert_time as insertTime,nickname,company_name as companyName, |
| | | agent_licence_code as agentLicenceCode,wechat_qr_code as wechatQrCode,watch_app as watchapp,phone,status,audit_status as auditStatus,audit_note as auditNote |
| | | ,refuse_date as refuseDate |
| | | from t_app_user |
| | | <where> |
| | | status != 3 |
| | |
| | | and phone like CONCAT('%', #{phone}, '%') |
| | | </if> |
| | | </where> |
| | | limit #{index},#{size} |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.FeedBackMapper"> |
| | | |
| | | |
| | | <select id="list" resultType="com.stylefeng.guns.modular.system.dto.FeedBackVo"> |
| | | |
| | | SELECT tf.insert_time as insertTime, au.nickname,au.phone,tf.content |
| | | from t_feedback tf |
| | | LEFT JOIN t_app_user au ON tf.app_user_id =au.id |
| | | <where> |
| | | <if test="null != name and '' != name"> |
| | | and au.nickname like CONCAT('%', #{name}, '%') |
| | | </if> |
| | | <if test="null != phone and '' != phone"> |
| | | and au.phone like CONCAT('%', #{phone}, '%') |
| | | </if> |
| | | |
| | | |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | </where> |
| | | |
| | | </select> |
| | | <select id="reprotList" resultType="com.stylefeng.guns.modular.system.dto.THouseResource"> |
| | | select * from ( |
| | | SELECT hs.insert_time as insertTime, hs.id, hs.cell_name as cellName, hs.house_address as houseAddress, |
| | | hs.data_type as dataType, |
| | | CASE |
| | | WHEN hs.is_manage IS NULL AND ap.user_type = 2 THEN 2 |
| | | WHEN hs.is_manage IS NULL AND ap.user_type = 3 THEN 3 |
| | | ELSE hs.is_manage |
| | | END AS isManage, |
| | | IFNULL(ap.nickname,su.`name`) as name, IFNULL(ap.phone,su.phone) as phone, |
| | | hs.house_model as houseModel, hs.building_orientation as buildingOrientation, hs.sale_amount as saleAmount, |
| | | hs.house_area as houseArea , hs.status,hr.content,hr.audit,hr.back_reason as backReason,hr.back_date as backDate |
| | | from t_report_house_resource hr |
| | | LEFT JOIN t_house_resource hs on hr.house_resource_id = hs.id |
| | | LEFT JOIN t_app_user ap ON hs.insert_user_id = ap.id |
| | | LEFT JOIN sys_user su ON hs.insert_user_id = su.id AND hs.is_manage = 1 |
| | | where hs.is_delete = 0 and hs.auth_status = 2 |
| | | |
| | | ) a |
| | | <where> |
| | | |
| | | <if test="null != id"> |
| | | and a.id = #{id} |
| | | </if> |
| | | |
| | | <if test="null != cellName and '' != cellName"> |
| | | and a.cellName like CONCAT('%', #{cellName}, '%') |
| | | </if> |
| | | <if test="null != dataType"> |
| | | and a.dataType = #{dataType} |
| | | </if> |
| | | <if test="null != isManage"> |
| | | and a.isManage = #{isManage} |
| | | </if> |
| | | <if test="null != name and '' != name"> |
| | | and a.name like CONCAT('%', #{name}, '%') |
| | | </if> |
| | | <if test="null != min and '' != min"> |
| | | and a.saleAmount between #{min} and #{max} |
| | | </if> |
| | | <if test="null != size and '' != size"> |
| | | and a.houseArea = #{size} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <select id="selectRoles" resultType="map"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sys_role |
| | | sr.id, sr.num, sr.pid, sr.name, sr.deptid, sr.tips, sr.version,su.name as createBy |
| | | from sys_role sr |
| | | left join sys_user su on sr.create_by = su.id |
| | | <if test="condition != null"> |
| | | where name like CONCAT('%',#{condition},'%') |
| | | </if> |
| | |
| | | LEFT JOIN sys_role sr ON us.roleid = sr.id |
| | | LEFT JOIN sys_dept sd on us.deptid = sd.id |
| | | <where> |
| | | us.version = #{version} and us.status != 3 |
| | | us.status != 3 |
| | | <if test="null != account and '' != account"> |
| | | and us.account like CONCAT('%', #{account}, '%') |
| | | </if> |
| | | </where> |
| | | |
| | | limit #{index},#{size} |
| | | |
| | | </select> |
| | | </mapper> |