| | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/encyclopedicKnowledge/upvoteEncyclopedicKnowledge") |
| | | @PostMapping("/base/encyclopedicKnowledge/upvoteEncyclopedicKnowledge") |
| | | @ApiOperation(value = "点赞/取消点赞", tags = {"知识百科"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "数据id", required = true), |
| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/housingDemand/getSurplusPushNumber1") |
| | | @PostMapping("/base/housingDemand/getSurplusPushNumber1") |
| | | @ApiOperation(value = "获取剩余发布数量", tags = {"房源"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | |
| | | return ResultUtil.success(houseResource.getQrCode()); |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/api/housingDemand/addHousingDemand") |
| | | @PostMapping("/base/housingDemand/addHousingDemand") |
| | | @ApiOperation(value = "添加房源", tags = {"求房源"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/housingDemand/housingDemandInfo") |
| | | @PostMapping("/base/housingDemand/housingDemandInfo") |
| | | @ApiOperation(value = "获取求房源详情", tags = {"求房源"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "数据id", required = true), |
| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/housingDemand/collectionHousingDemand") |
| | | @PostMapping("/base/housingDemand/collectionHousingDemand") |
| | | @ApiOperation(value = "收藏/取消收藏房源操作", tags = {"求房源"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header") |
| | |
| | | * 删除标识(0=否,1=是) |
| | | */ |
| | | @TableField("is_delete") |
| | | |
| | | private Integer isDelete; |
| | | /** |
| | | * 状态(0=下架,1=上架) |
New file |
| | |
| | | package com.stylefeng.guns.config; |
| | | |
| | | import com.aliyun.oss.OSS; |
| | | import com.aliyun.oss.OSSClientBuilder; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | @Configuration |
| | | public class OSSConfig { |
| | | |
| | | @Value("${oss.endpoint}") |
| | | private String endpoint; |
| | | |
| | | @Value("${oss.accessKeyId}") |
| | | private String accessKeyId; |
| | | |
| | | @Value("${oss.accessKeySecret}") |
| | | private String accessKeySecret; |
| | | |
| | | @Bean |
| | | public OSS ossClient() { |
| | | return new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config; |
| | | |
| | | import com.aliyun.oss.OSS; |
| | | import com.aliyun.oss.OSSException; |
| | | import com.aliyun.oss.common.comm.ResponseMessage; |
| | | import com.aliyun.oss.common.comm.ServiceClient; |
| | | import com.aliyun.oss.model.OSSObject; |
| | | import com.aliyun.oss.model.ObjectMetadata; |
| | | import com.aliyun.oss.model.PutObjectResult; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.http.client.methods.CloseableHttpResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URL; |
| | | import java.util.Date; |
| | | |
| | | @Service |
| | | public class OSSService { |
| | | |
| | | @Autowired |
| | | private OSS ossClient; |
| | | |
| | | @Value("${oss.bucketName}") |
| | | private String bucketName; |
| | | |
| | | public String uploadFile(MultipartFile file) { |
| | | try { |
| | | String fileName = file.getOriginalFilename(); |
| | | // if (fileName.equals("")){ |
| | | // fileName = "test.jpg"; |
| | | // } |
| | | ossClient.putObject(bucketName, fileName, file.getInputStream()); |
| | | String uri ="https://bizuphk.oss-cn-hongkong.aliyuncs.com/"; |
| | | System.err.println("小程序二维码:"+uri+fileName); |
| | | return uri+fileName; |
| | | // String fileName = file.getOriginalFilename(); |
| | | // PutObjectResult putObjectResult = ossClient.putObject(bucketName, fileName, file.getInputStream()); |
| | | // System.err.println("看看返回的文件名"); |
| | | // System.err.println(fileName); |
| | | // return fileName; |
| | | } catch (IOException e) { |
| | | // 处理上传失败的逻辑 |
| | | } |
| | | return null; |
| | | } |
| | | public InputStream downloadFile(String fileName) { |
| | | try { |
| | | OSSObject object = ossClient.getObject(bucketName, fileName); |
| | | return object.getObjectContent(); |
| | | } catch (OSSException e) { |
| | | // 处理下载失败的逻辑 |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | * 上传到OSS服务器 如果同名文件会覆盖服务器上的 |
| | | * |
| | | * @param instream 文件流 |
| | | * @param fileName 文件名称 包括后缀名 |
| | | * @return 出错返回"" ,唯一MD5数字签名 |
| | | */ |
| | | public String uploadFile2OSS(InputStream instream, String fileName) { |
| | | |
| | | String ret = ""; |
| | | try { |
| | | |
| | | // 创建上传Object的Metadata |
| | | ObjectMetadata objectMetadata = new ObjectMetadata(); |
| | | objectMetadata.setContentLength(instream.available()); |
| | | objectMetadata.setCacheControl("no-cache"); |
| | | objectMetadata.setContentType(getContentType(fileName.substring(fileName.lastIndexOf(".")))); |
| | | objectMetadata.setHeader("Pragma", "no-cache"); |
| | | // objectMetadata.setContentDisposition("inline;filename=" + fileName); |
| | | // 上传文件 |
| | | PutObjectResult putResult = ossClient.putObject(bucketName, fileName, instream, objectMetadata); |
| | | ret = putResult.getETag(); |
| | | } catch (IOException e) { |
| | | System.err.println(e.getMessage()); |
| | | } finally { |
| | | try { |
| | | if (instream != null) { |
| | | instream.close(); |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return ret; |
| | | } |
| | | |
| | | /** |
| | | * 通过文件名判断并获取OSS服务文件上传时文件的contentType |
| | | * |
| | | * @param filenameExtension 文件名 |
| | | * @return 文件的contentType |
| | | */ |
| | | public static final String getContentType(String filenameExtension) { |
| | | |
| | | if (filenameExtension.equalsIgnoreCase(".bmp")) { |
| | | return "application/x-bmp"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".gif")) { |
| | | return "image/gif"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".jpeg") || |
| | | filenameExtension.equalsIgnoreCase(".jpg") || |
| | | filenameExtension.equalsIgnoreCase(".png")) { |
| | | return "image/jpg"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".html")) { |
| | | return "text/html"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".txt")) { |
| | | return "text/plain"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".vsd")) { |
| | | return "application/vnd.visio"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".pptx") || |
| | | filenameExtension.equalsIgnoreCase(".ppt")) { |
| | | return "application/vnd.ms-powerpoint"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".docx") || |
| | | filenameExtension.equalsIgnoreCase(".doc")) { |
| | | return "application/msword"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".xla") || |
| | | filenameExtension.equalsIgnoreCase(".xlc") || |
| | | filenameExtension.equalsIgnoreCase(".xlm") || |
| | | filenameExtension.equalsIgnoreCase(".xls") || |
| | | filenameExtension.equalsIgnoreCase(".xlt") || |
| | | filenameExtension.equalsIgnoreCase(".xlw")) { |
| | | return "application/vnd.ms-excel"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".xlsx")) { |
| | | return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".xml")) { |
| | | return "text/xml"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".pdf")) { |
| | | return "application/pdf"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".zip")) { |
| | | return "application/zip"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".tar")) { |
| | | return "application/x-tar"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".avi")) { |
| | | return "video/avi"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".mp4")) { |
| | | return "video/mpeg4"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".mp3")) { |
| | | return "audio/mp3"; |
| | | } |
| | | if (filenameExtension.equalsIgnoreCase(".mp2")) { |
| | | return "audio/mp2"; |
| | | } |
| | | // 默认下载 |
| | | // return "application/octet-stream"; |
| | | return "image/jpg"; |
| | | } |
| | | |
| | | /** |
| | | * 获得url链接 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public String getUrl(String key) { |
| | | // 设置URL过期时间为10年 3600l* 1000*24*365*10 |
| | | Date expiration = new Date(System.currentTimeMillis() + 3600L * 1000 * 24 * 365 * 10); |
| | | // 生成URL |
| | | URL url = ossClient.generatePresignedUrl(bucketName, key, expiration); |
| | | System.out.println("url: " + url); |
| | | if (url != null) { |
| | | String host = "https://" + url.getHost() + url.getPath(); |
| | | System.out.println("host: " + host); |
| | | // http://wxcall-xiaobanben.oss-cn-shenzhen.aliyuncs.com/image/20220129/1643469496754508.jpg |
| | | return host; |
| | | } |
| | | return ""; |
| | | } |
| | | /** |
| | | * 获得图片路径 |
| | | * |
| | | * @param fileUrl |
| | | * @return |
| | | */ |
| | | public String getImgUrl(String fileUrl) { |
| | | System.out.println(fileUrl); |
| | | if (!StringUtils.isEmpty(fileUrl)) { |
| | | // String[] split = fileUrl.split("/"); |
| | | return this.getUrl(fileUrl); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | /** |
| | | * 通用常量信息 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class Constants |
| | | { |
| | | /** |
| | | * UTF-8 字符集 |
| | | */ |
| | | public static final String UTF8 = "UTF-8"; |
| | | |
| | | /** |
| | | * GBK 字符集 |
| | | */ |
| | | public static final String GBK = "GBK"; |
| | | |
| | | /** |
| | | * www主域 |
| | | */ |
| | | public static final String WWW = "www."; |
| | | |
| | | /** |
| | | * RMI 远程方法调用 |
| | | */ |
| | | public static final String LOOKUP_RMI = "rmi:"; |
| | | |
| | | /** |
| | | * LDAP 远程方法调用 |
| | | */ |
| | | public static final String LOOKUP_LDAP = "ldap:"; |
| | | |
| | | /** |
| | | * LDAPS 远程方法调用 |
| | | */ |
| | | public static final String LOOKUP_LDAPS = "ldaps:"; |
| | | |
| | | /** |
| | | * http请求 |
| | | */ |
| | | public static final String HTTP = "http://"; |
| | | |
| | | /** |
| | | * https请求 |
| | | */ |
| | | public static final String HTTPS = "https://"; |
| | | |
| | | /** |
| | | * 成功标记 |
| | | */ |
| | | public static final Integer SUCCESS = 200; |
| | | |
| | | /** |
| | | * 失败标记 |
| | | */ |
| | | public static final Integer FAIL = 500; |
| | | |
| | | /** |
| | | * 登录成功状态 |
| | | */ |
| | | public static final String LOGIN_SUCCESS_STATUS = "0"; |
| | | |
| | | /** |
| | | * 登录失败状态 |
| | | */ |
| | | public static final String LOGIN_FAIL_STATUS = "1"; |
| | | |
| | | /** |
| | | * 登录成功 |
| | | */ |
| | | public static final String LOGIN_SUCCESS = "Success"; |
| | | |
| | | /** |
| | | * 注销 |
| | | */ |
| | | public static final String LOGOUT = "Logout"; |
| | | |
| | | /** |
| | | * 注册 |
| | | */ |
| | | public static final String REGISTER = "Register"; |
| | | |
| | | /** |
| | | * 登录失败 |
| | | */ |
| | | public static final String LOGIN_FAIL = "Error"; |
| | | |
| | | /** |
| | | * 当前记录起始索引 |
| | | */ |
| | | public static final String PAGE_NUM = "pageNum"; |
| | | |
| | | /** |
| | | * 每页显示记录数 |
| | | */ |
| | | public static final String PAGE_SIZE = "pageSize"; |
| | | |
| | | /** |
| | | * 排序列 |
| | | */ |
| | | public static final String ORDER_BY_COLUMN = "orderByColumn"; |
| | | |
| | | /** |
| | | * 排序的方向 "desc" 或者 "asc". |
| | | */ |
| | | public static final String IS_ASC = "isAsc"; |
| | | |
| | | /** |
| | | * 验证码有效期(分钟) |
| | | */ |
| | | public static final long CAPTCHA_EXPIRATION = 2; |
| | | |
| | | /** |
| | | * 资源映射路径 前缀 |
| | | */ |
| | | public static final String RESOURCE_PREFIX = "/profile"; |
| | | |
| | | /** |
| | | * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加) |
| | | */ |
| | | public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" }; |
| | | |
| | | /** |
| | | * 时间格式化 |
| | | */ |
| | | public static final String DATE_FORMATTER_TIME = "yyyy-MM-dd HH:mm:ss"; |
| | | public static final String DATE_FORMATTER_DATE = "yyyy-MM-dd"; |
| | | |
| | | /** |
| | | * 定时任务违规的字符 |
| | | */ |
| | | public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", |
| | | "org.springframework", "org.apache", "com.ruoyi.common.core.utils.file" }; |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | import com.aliyun.oss.ServiceException; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import javax.net.ssl.*; |
| | | import java.io.*; |
| | | import java.net.*; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.security.cert.X509Certificate; |
| | | |
| | | /** |
| | | * 通用http发送方法 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class HttpUtils |
| | | { |
| | | private static final Logger log = LoggerFactory.getLogger(HttpUtils.class); |
| | | |
| | | /** |
| | | * 向指定 URL 发送GET方法的请求 |
| | | * |
| | | * @param url 发送请求的 URL |
| | | * @return 所代表远程资源的响应结果 |
| | | */ |
| | | public static String sendGet(String url) |
| | | { |
| | | return sendGet(url, StringUtils.EMPTY); |
| | | } |
| | | |
| | | /** |
| | | * 向指定 URL 发送GET方法的请求 |
| | | * |
| | | * @param url 发送请求的 URL |
| | | * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 |
| | | * @return 所代表远程资源的响应结果 |
| | | */ |
| | | public static String sendGet(String url, String param) |
| | | { |
| | | return sendGet(url, param, Constants.UTF8); |
| | | } |
| | | |
| | | /** |
| | | * 向指定 URL 发送GET方法的请求 |
| | | * |
| | | * @param url 发送请求的 URL |
| | | * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 |
| | | * @param contentType 编码类型 |
| | | * @return 所代表远程资源的响应结果 |
| | | */ |
| | | public static String sendGet(String url, String param, String contentType) |
| | | { |
| | | StringBuilder result = new StringBuilder(); |
| | | BufferedReader in = null; |
| | | try |
| | | { |
| | | String urlNameString = StringUtils.isNotBlank(param) ? url + "?" + param : url; |
| | | log.info("sendGet - {}", urlNameString); |
| | | URL realUrl = new URL(urlNameString); |
| | | URLConnection connection = realUrl.openConnection(); |
| | | connection.setRequestProperty("accept", "*/*"); |
| | | connection.setRequestProperty("connection", "Keep-Alive"); |
| | | connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); |
| | | connection.connect(); |
| | | in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType)); |
| | | String line; |
| | | while ((line = in.readLine()) != null) |
| | | { |
| | | result.append(line); |
| | | } |
| | | log.info("recv - {}", result); |
| | | } |
| | | catch (ConnectException e) |
| | | { |
| | | log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e); |
| | | } |
| | | catch (SocketTimeoutException e) |
| | | { |
| | | log.error("调用HttpUtils.sendGet SocketTimeoutException, url=" + url + ",param=" + param, e); |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | log.error("调用HttpUtils.sendGet IOException, url=" + url + ",param=" + param, e); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | log.error("调用HttpsUtil.sendGet Exception, url=" + url + ",param=" + param, e); |
| | | } |
| | | finally |
| | | { |
| | | try |
| | | { |
| | | if (in != null) |
| | | { |
| | | in.close(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | log.error("调用in.close Exception, url=" + url + ",param=" + param, ex); |
| | | } |
| | | } |
| | | return result.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 向指定 URL 发送POST方法的请求 |
| | | * |
| | | * @param url 发送请求的 URL |
| | | * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 |
| | | * @return 所代表远程资源的响应结果 |
| | | */ |
| | | public static String sendPost(String url, String param) |
| | | { |
| | | PrintWriter out = null; |
| | | BufferedReader in = null; |
| | | StringBuilder result = new StringBuilder(); |
| | | try |
| | | { |
| | | log.info("sendPost - {}", url); |
| | | URL realUrl = new URL(url); |
| | | URLConnection conn = realUrl.openConnection(); |
| | | conn.setRequestProperty("accept", "*/*"); |
| | | conn.setRequestProperty("connection", "Keep-Alive"); |
| | | conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); |
| | | conn.setRequestProperty("Accept-Charset", "utf-8"); |
| | | conn.setRequestProperty("contentType", "utf-8"); |
| | | conn.setDoOutput(true); |
| | | conn.setDoInput(true); |
| | | out = new PrintWriter(conn.getOutputStream()); |
| | | out.print(param); |
| | | out.flush(); |
| | | in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8)); |
| | | String line; |
| | | while ((line = in.readLine()) != null) |
| | | { |
| | | result.append(line); |
| | | } |
| | | log.info("recv - {}", result); |
| | | } |
| | | catch (ConnectException e) |
| | | { |
| | | log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e); |
| | | } |
| | | catch (SocketTimeoutException e) |
| | | { |
| | | log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e); |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e); |
| | | } |
| | | finally |
| | | { |
| | | try |
| | | { |
| | | if (out != null) |
| | | { |
| | | out.close(); |
| | | } |
| | | if (in != null) |
| | | { |
| | | in.close(); |
| | | } |
| | | } |
| | | catch (IOException ex) |
| | | { |
| | | log.error("调用in.close Exception, url=" + url + ",param=" + param, ex); |
| | | } |
| | | } |
| | | return result.toString(); |
| | | } |
| | | |
| | | public static String sendSSLPost(String url, String param) |
| | | { |
| | | StringBuilder result = new StringBuilder(); |
| | | String urlNameString = url + "?" + param; |
| | | try |
| | | { |
| | | log.info("sendSSLPost - {}", urlNameString); |
| | | SSLContext sc = SSLContext.getInstance("SSL"); |
| | | sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, new java.security.SecureRandom()); |
| | | URL console = new URL(urlNameString); |
| | | HttpsURLConnection conn = (HttpsURLConnection) console.openConnection(); |
| | | conn.setRequestProperty("accept", "*/*"); |
| | | conn.setRequestProperty("connection", "Keep-Alive"); |
| | | conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); |
| | | conn.setRequestProperty("Accept-Charset", "utf-8"); |
| | | conn.setRequestProperty("contentType", "utf-8"); |
| | | conn.setDoOutput(true); |
| | | conn.setDoInput(true); |
| | | |
| | | conn.setSSLSocketFactory(sc.getSocketFactory()); |
| | | conn.setHostnameVerifier(new TrustAnyHostnameVerifier()); |
| | | conn.connect(); |
| | | InputStream is = conn.getInputStream(); |
| | | BufferedReader br = new BufferedReader(new InputStreamReader(is)); |
| | | String ret = ""; |
| | | while ((ret = br.readLine()) != null) |
| | | { |
| | | if (ret != null && !"".equals(ret.trim())) |
| | | { |
| | | result.append(new String(ret.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8)); |
| | | } |
| | | } |
| | | log.info("recv - {}", result); |
| | | conn.disconnect(); |
| | | br.close(); |
| | | } |
| | | catch (ConnectException e) |
| | | { |
| | | log.error("调用HttpUtils.sendSSLPost ConnectException, url=" + url + ",param=" + param, e); |
| | | } |
| | | catch (SocketTimeoutException e) |
| | | { |
| | | log.error("调用HttpUtils.sendSSLPost SocketTimeoutException, url=" + url + ",param=" + param, e); |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | log.error("调用HttpUtils.sendSSLPost IOException, url=" + url + ",param=" + param, e); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | log.error("调用HttpsUtil.sendSSLPost Exception, url=" + url + ",param=" + param, e); |
| | | } |
| | | return result.toString(); |
| | | } |
| | | |
| | | private static class TrustAnyTrustManager implements X509TrustManager |
| | | { |
| | | @Override |
| | | public void checkClientTrusted(X509Certificate[] chain, String authType) |
| | | { |
| | | } |
| | | |
| | | @Override |
| | | public void checkServerTrusted(X509Certificate[] chain, String authType) |
| | | { |
| | | } |
| | | |
| | | @Override |
| | | public X509Certificate[] getAcceptedIssuers() |
| | | { |
| | | return new X509Certificate[] {}; |
| | | } |
| | | } |
| | | |
| | | private static class TrustAnyHostnameVerifier implements HostnameVerifier |
| | | { |
| | | @Override |
| | | public boolean verify(String hostname, SSLSession session) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "编辑前获取用户信息", tags = {"后台-用户管理"}) |
| | | public Host preupdate(Integer id){ |
| | | AppUser appUser = appUserService.selectById(id); |
| | | if (appUser.getWatchApp1()!=null){ |
| | | appUser.setWatchApp(appUser.getWatchApp1()); |
| | | } |
| | | if (appUser.getWechatQrCode1()!=null){ |
| | | appUser.setWechatQRCode(appUser.getWechatQrCode1()); |
| | | } |
| | | Host host = new Host(); |
| | | BeanUtils.copyProperties(appUser,host); |
| | | return host; |
| | |
| | | @ApiOperation(value = "编辑用户信息", tags = {"后台-用户管理"}) |
| | | public ResultUtil update(@RequestBody Host host){ |
| | | AppUser appUser =new AppUser(); |
| | | |
| | | BeanUtils.copyProperties(host,appUser); |
| | | appUser.setWechatQrCode1(host.getWechatQRCode()); |
| | | appUser.setWatchApp1(host.getWatchApp()); |
| | | appUserService.updateById(appUser); |
| | | return ResultUtil.success("编辑成功"); |
| | | } |
| | |
| | | |
| | | List<Integer> data = new ArrayList<>(); |
| | | //总房源 |
| | | Integer one = houseResourceService.selectCount(new EntityWrapper<HouseResource>().eq("is_delete", 0)); |
| | | Integer one = houseResourceService.selectCount(new EntityWrapper<HouseResource>().eq("type",2).eq("auth_status",2)); |
| | | data.add(one); |
| | | //总出租房源 |
| | | Integer two = houseResourceService.selectCount(new EntityWrapper<HouseResource>().eq("is_delete", 0).eq("data_type",1)); |
| | | Integer two = houseResourceService.selectCount(new EntityWrapper<HouseResource>().eq("type",2).eq("data_type",1).eq("auth_status",2)); |
| | | data.add(two); |
| | | //总卖房源 |
| | | Integer three = houseResourceService.selectCount(new EntityWrapper<HouseResource>().eq("is_delete", 0).eq("data_type",2)); |
| | | Integer three = houseResourceService.selectCount(new EntityWrapper<HouseResource>().eq("type",2).eq("data_type",2).eq("auth_status",2)); |
| | | data.add(three); |
| | | //总求买房 |
| | | Integer four = demandService.selectCount(new EntityWrapper<HousingDemand>().eq("is_delete", 0).eq("data_type",2)); |
| | | Integer four = demandService.selectCount(new EntityWrapper<HousingDemand>().eq("data_type",2)); |
| | | data.add(four); |
| | | //总求租房 |
| | | Integer five = demandService.selectCount(new EntityWrapper<HousingDemand>().eq("is_delete", 0).eq("data_type",1)); |
| | | Integer five = demandService.selectCount(new EntityWrapper<HousingDemand>().eq("data_type",1)); |
| | | data.add(five); |
| | | //总中介 |
| | | Integer six = appUserService.selectCount(new EntityWrapper<AppUser>().eq("user_type",3).ne("status",3)); |
| | | Integer six = appUserService.selectCount(new EntityWrapper<AppUser>().eq("user_type",3).eq("auth",2).ne("status",3)); |
| | | data.add(six); |
| | | //总房东 |
| | | Integer seven = appUserService.selectCount(new EntityWrapper<AppUser>().eq("user_type",3).ne("status",2)); |
| | | Integer seven = appUserService.selectCount(new EntityWrapper<AppUser>().eq("user_type",2).ne("status",2)); |
| | | data.add(seven); |
| | | //总用户 |
| | | Integer eight = appUserService.selectCount(new EntityWrapper<AppUser>().ne("status",2)); |
| | | Integer eight = appUserService.selectCount(new EntityWrapper<AppUser>().ne("status",3)); |
| | | data.add(eight); |
| | | //今日新增中介 |
| | | Integer nine = appUserService.selectCount(new EntityWrapper<AppUser>() |
| | | .eq("user_type", 3) |
| | | .eq("user_type", 3).eq("auth",2) |
| | | .ne("status", 3) |
| | | .like("changeTime", formattedDate)); |
| | | data.add(nine); |
| | |
| | | Integer eleven = appUserService.selectCount(new EntityWrapper<AppUser>().ne("status",3).like("insert_time", formattedDate)); |
| | | data.add(eleven); |
| | | //今日新增房源出租 |
| | | Integer twelve = houseResourceService.selectCount(new EntityWrapper<HouseResource>().eq("is_delete", 0).ne("type",1).eq("data_type",1).like("auth_time", formattedDate)); |
| | | Integer twelve = houseResourceService.selectCount(new EntityWrapper<HouseResource>().ne("type",1).eq("data_type",1).like("auth_time", formattedDate)); |
| | | data.add(twelve); |
| | | //今日卖房源 |
| | | Integer thirteen = houseResourceService.selectCount(new EntityWrapper<HouseResource>().eq("is_delete", 0).ne("type",1).eq("data_type",2).like("auth_time", formattedDate)); |
| | | Integer thirteen = houseResourceService.selectCount(new EntityWrapper<HouseResource>().ne("type",1).eq("data_type",2).like("auth_time", formattedDate)); |
| | | data.add(thirteen); |
| | | //今日求租房 |
| | | Integer fourteen = demandService.selectCount(new EntityWrapper<HousingDemand>().eq("is_delete", 0).ne("type",1).eq("data_type",1).like("insert_time", formattedDate)); |
| | | Integer fourteen = demandService.selectCount(new EntityWrapper<HousingDemand>().ne("type",1).eq("data_type",1).like("insert_time", formattedDate)); |
| | | data.add(fourteen); |
| | | //今日求买房 |
| | | Integer fifteen = demandService.selectCount(new EntityWrapper<HousingDemand>().eq("is_delete", 0).ne("type",1).eq("data_type",2).like("insert_time", formattedDate)); |
| | | Integer fifteen = demandService.selectCount(new EntityWrapper<HousingDemand>().ne("type",1).eq("data_type",2).like("insert_time", formattedDate)); |
| | | data.add(fifteen); |
| | | |
| | | return data; |
| | |
| | | HouseResource houseResource = houseResourceService.selectById(id); |
| | | AddHouseReq addHouseReq = new AddHouseReq(); |
| | | BeanUtils.copyProperties(houseResource,addHouseReq); |
| | | addHouseReq.setTime(houseResource.getLeaseTime()); |
| | | // addHouseReq.setTime(houseResource.getLeaseTime()); |
| | | return addHouseReq; |
| | | } |
| | | |
| | |
| | | houseResource.setAuthTime(new Date()); |
| | | houseResource.setReason(reason); |
| | | houseResource.setAuthStatus(3); |
| | | houseResource.setStatus(1); |
| | | } |
| | | houseResourceService.updateById(houseResource); |
| | | |
| | |
| | | @ApiOperation(value = "编辑前获取中介信息", tags = {"后台-中介管理"},response = Medium.class) |
| | | public Medium preupdate(Integer id){ |
| | | AppUser appUser = appUserService.selectById(id); |
| | | |
| | | if (appUser.getWatchApp1()!=null){ |
| | | appUser.setWatchApp(appUser.getWatchApp1()); |
| | | } |
| | | if (appUser.getWechatQrCode1()!=null){ |
| | | appUser.setWechatQRCode(appUser.getWechatQrCode1()); |
| | | } |
| | | |
| | | |
| | | Medium host = new Medium(); |
| | | BeanUtils.copyProperties(appUser,host); |
| | | return host; |
| | |
| | | // Host host = new Host(); |
| | | AppUser appUser =new AppUser(); |
| | | BeanUtils.copyProperties(host,appUser); |
| | | |
| | | appUser.setWechatQrCode1(host.getWechatQRCode()); |
| | | appUser.setWatchApp1(host.getWatchApp()); |
| | | appUserService.updateById(appUser); |
| | | return ResultUtil.success("编辑成功"); |
| | | } |
| | |
| | | reportHouseResource.setBackDate(new Date()); |
| | | reportHouseResource.setBackReason(reason); |
| | | HouseResource houseResource = houseResourceService.selectById(reportHouseResource.getHouseResourceId()); |
| | | houseResource.setStatus(0); |
| | | houseResource.setStatus(1); |
| | | houseResourceService.updateById(houseResource); |
| | | }else if (status == 3){ |
| | | reportHouseResourceService.deleteById(Integer.valueOf(id)); |
| | |
| | | @ApiOperation(value = "添加", tags = {"后台-轮播图管理"}) |
| | | public ResultUtil add(@RequestBody BannerVo bannerVo){ |
| | | List<Banner> position = bannerService.selectList(new EntityWrapper<Banner>().eq("position", bannerVo.getPosition())); |
| | | if (!position.isEmpty()){ |
| | | if (!position.isEmpty()&&bannerVo.getId()==null){ |
| | | return ResultUtil.error("当前模块已经上传"); |
| | | } |
| | | Banner banner = new Banner(); |
| | |
| | | public ResultUtil delete(String ids) { |
| | | String[] split = ids.split(","); |
| | | for (String id : split) { |
| | | User user = userService.selectById(Integer.valueOf(id)); |
| | | if (user!=null){ |
| | | List<User> users = userService.selectList(new EntityWrapper<User>().eq("deptid",Integer.valueOf(id))); |
| | | if (!users.isEmpty()){ |
| | | return ResultUtil.error("当前部门已绑定用户,无法删除"); |
| | | } |
| | | deptService.deleteById(Integer.valueOf(id)); |
| | |
| | | package com.stylefeng.guns.modular.code.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.support.HttpKit; |
| | | import com.stylefeng.guns.core.util.HttpUtils; |
| | | import com.stylefeng.guns.core.util.JwtTokenUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.UserMapper; |
| | |
| | | // @ApiOperation(value = "拿token", tags = {"登录"}) |
| | | |
| | | |
| | | /** |
| | | *地图查询 |
| | | */ |
| | | @ResponseBody |
| | | @ApiOperation(value = "地图查询", tags = {"地图查询"}) |
| | | @GetMapping("/base/appUser/queryMap") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "位置", required = true) |
| | | }) |
| | | public ResultUtil queryMap(String name) |
| | | { |
| | | String url ="https://apis.map.qq.com/ws/place/v1/suggestion/?keyword="+name+"&key=AAIBZ-NO7AQ-RKQ5G-2YSBL-3MEJH-VTFH4"; |
| | | String result = HttpUtils.sendGet(url); |
| | | JSONArray data = JSONObject.parseObject(result).getJSONArray("data"); |
| | | return ResultUtil.success(data); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/base/region/getDistrict") |
| | | @ApiOperation(value = "获取区域数据", tags = {"区域下拉框"}) |
| | |
| | | @Param("status")Integer status, |
| | | @Param("phone")String phone); |
| | | |
| | | List<Medium> listMedium(String nickname, Integer userType, Integer status, String phone); |
| | | List<Medium> listAuMedium(String nickname, Integer userType, Integer status, String phone); |
| | | List<Medium> listMedium(@Param("nickname") String nickname,@Param("userType")Integer userType, @Param("status")Integer status, @Param("phone")String phone); |
| | | List<Medium> listAuMedium(@Param("nickname") String nickname, @Param("userType") Integer userType,@Param("status") Integer status,@Param("phone") String phone); |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.dto.BannerVo; |
| | | import com.stylefeng.guns.modular.system.model.Banner; |
| | | import com.stylefeng.guns.modular.system.warpper.res.BannerRes; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param position |
| | | * @return |
| | | */ |
| | | List<BannerRes> getBanners(Integer position); |
| | | List<BannerRes> getBanners(@Param("position") Integer position); |
| | | |
| | | List<BannerVo> list(Integer position,Integer sort); |
| | | List<BannerVo> list(@Param("position") Integer position, @Param("sort") Integer sort); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.dto.FeedBackVo; |
| | | import com.stylefeng.guns.modular.system.model.FeedBack; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface FeedBackMapper extends BaseMapper<FeedBack> { |
| | | |
| | | |
| | | List<FeedBackVo> list(String phone,String name); |
| | | List<FeedBackVo> list(@Param("phone") String phone, @Param("name")String name); |
| | | } |
| | |
| | | |
| | | List<CollectListRes> release(@Param("query") UserInfoQuery query,@Param("ids")List<Integer> collect); |
| | | |
| | | List<THouseResource> list(String cellName, Integer dataType, Integer isManage, String name, String min,String max, Integer status); |
| | | List<THouseResource> list(@Param("cellName") String cellName, |
| | | @Param("dataType")Integer dataType, |
| | | @Param("isManage")Integer isManage, |
| | | @Param("name")String name, |
| | | @Param("min")String min, |
| | | @Param("max")String max, |
| | | @Param("status")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); |
| | | List<THouseResource> aulist(@Param("id") Integer id, |
| | | @Param("cellName") String cellName, |
| | | @Param("dataType") Integer dataType, |
| | | @Param("isManage") Integer isManage, |
| | | @Param("name") String name, |
| | | @Param("min") String min, |
| | | @Param("max") String max, |
| | | @Param("size") String size); |
| | | List<THouseResource> reprotList(@Param("id")Integer id, |
| | | @Param("cellName")String cellName, |
| | | @Param("dataType")Integer dataType, |
| | | @Param("isManage")Integer isManage, |
| | | @Param("name")String name, |
| | | @Param("min")String min, |
| | | @Param("max")String max, |
| | | @Param("size")String size); |
| | | |
| | | } |
| | |
| | | order by houseCount desc |
| | | </select> |
| | | <select id="listHost" resultType="com.stylefeng.guns.modular.system.dto.Host"> |
| | | SELECT id,insert_time as insertTime,nickname,phone,profile_photo as profilePhoto,user_type as userType,wechat_qr_code as wechatQrCode,watch_app as watchApp,phone,status |
| | | SELECT id,insert_time as insertTime,nickname,profile_photo as profilePhoto,user_type as userType,ifnull(wechat_qr_code1,wechat_qr_code) as wechatQrCode,ifnull(watch_app1,watch_app) as watchApp,phone as phone,status |
| | | from t_app_user |
| | | <where> |
| | | status != 3 |
| | |
| | | |
| | | </select> |
| | | <select id="listMedium" 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 |
| | | SELECT id,insert_time as insertTime,nickname,company_name as companyName,agent_licence_code as agentLicenceCode,ifnull(wechat_qr_code1,wechat_qr_code) as wechatQrCode,ifnull(watch_app1,watch_app) as watchApp,phone as phone,status |
| | | from t_app_user |
| | | <where> |
| | | status != 3 and auth = 2 |
| | |
| | | |
| | | <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,auth as auditStatus,audit_note as auditNote |
| | | agent_licence_code as agentLicenceCode,ifnull(wechat_qr_code1,wechat_qr_code) as wechatQrCode,ifnull(watch_app1,watch_app) as watchApp,phone as phone,status,auth as auditStatus,audit_note as auditNote |
| | | ,refuse_date as refuseDate |
| | | from t_app_user |
| | | <where> |
| | |
| | | and user_type = #{userType} |
| | | </if> |
| | | <if test="null != status"> |
| | | and audit_status = #{status} |
| | | and auth = #{status} |
| | | </if> |
| | | <if test="null != phone and '' != phone"> |
| | | and phone like CONCAT('%', #{phone}, '%') |
| | |
| | | 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 and hs.type = 2 |
| | | |
| | | order by hs.insert_time desc |
| | | ) a |
| | | <where> |
| | | <if test="null != cellName and '' != cellName"> |
| | |
| | | |
| | | |
| | | <select id="aulist" 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(su.`name`,ap.nickname) 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,hs.auth_status AS authStatus |
| | | FROM t_house_resource hs |
| | | 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, |
| | | hs.house_model AS houseModel, |
| | | hs.building_orientation AS buildingOrientation, |
| | | hs.sale_amount AS saleAmount, |
| | | hs.house_area AS houseArea, |
| | | hs.STATUS, |
| | | hs.auth_status AS authStatus, |
| | | ap.user_type as isManage, |
| | | ap.nickname as name, |
| | | ifnull(ap.phone1,ap.phone) as phone |
| | | FROM |
| | | t_house_resource hs |
| | | 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.type = 2 |
| | | order by hs.insert_time desc |
| | | WHERE |
| | | hs.is_delete = 0 |
| | | AND hs.type = 2 and ISNULL(hs.is_manage) |
| | | ORDER BY |
| | | hs.insert_time DESC |
| | | ) a |
| | | <where> |
| | | |
| | | |
| | | <where> |
| | | <if test="null != id"> |
| | | and a.id = #{id} |
| | | </if> |
| | |
| | | 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 |
| | | where hs.auth_status = 2 |
| | | |
| | | ) a |
| | | <where> |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "注册时间", required = false) |
| | | private Date insertTime; |
| | | /** |
| | | * 拒绝理由 |
| | | */ |
| | | @TableField("wechat_qr_code1") |
| | | private String wechatQrCode1; |
| | | /** |
| | | * 拒绝理由 |
| | | */ |
| | | @TableField("watch_app1") |
| | | private String watchApp1; |
| | | /** |
| | | * 拒绝理由 |
| | | */ |
| | | @TableField("phone1") |
| | | private String phone1; |
| | | } |
| | |
| | | private Integer districtId; |
| | | @ApiModelProperty(value = "是否审核通过(1=待审核,2=审核通过,3=审核拒绝)", required = false) |
| | | private Integer auditStatus; |
| | | @ApiModelProperty(value = "是否审核通过(1=待审核,2=审核通过,3=审核拒绝)", required = false) |
| | | private Integer auth; |
| | | @ApiModelProperty(value = "审核备注", required = false) |
| | | private String auditNote; |
| | | @ApiModelProperty(value = "拒绝审核时间", required = false) |
| | |
| | | @TableField("auth") |
| | | private Integer auth; |
| | | |
| | | /** |
| | | * 拒绝理由 |
| | | */ |
| | | @TableField("wechat_qr_code1") |
| | | private String wechatQrCode1; |
| | | /** |
| | | * 拒绝理由 |
| | | */ |
| | | @TableField("watch_app1") |
| | | private String watchApp1; |
| | | /** |
| | | * 拒绝理由 |
| | | */ |
| | | @TableField("phone1") |
| | | private String phone1; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableLogic; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | |
| | | |
| | | @TableField("reason") |
| | | private String reason; |
| | | @TableField("time") |
| | | private String time; |
| | | |
| | | /** |
| | | * 是否有晾晒区 |
| | | */ |
| | | @TableField("air") |
| | | private Integer air; |
| | | /** |
| | | * 房源二维码 |
| | | */ |
| | | @TableField("air") |
| | | private String qrCode; |
| | | |
| | | } |
| | |
| | | /** |
| | | * 起租日期 |
| | | */ |
| | | @TableField("startTime") |
| | | private String startTime; |
| | | // @TableField("startTime") |
| | | // private String startTime; |
| | | |
| | | @TableField("wechat_qr_code") |
| | | private String wechatQrCode; |
| | | @TableField("watch_app") |
| | | private String watchApp; |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | 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.dto.Host; |
| | | import com.stylefeng.guns.modular.system.dto.Medium; |
| | | import com.stylefeng.guns.modular.system.model.AppUser; |
| | | import com.stylefeng.guns.modular.system.model.CollectionHouseResource; |
| | | import com.stylefeng.guns.modular.system.model.HouseResource; |
| | | import com.stylefeng.guns.modular.system.model.Region; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.IAppUserService; |
| | | import com.stylefeng.guns.modular.system.service.ICollectionHouseResourceService; |
| | | import com.stylefeng.guns.modular.system.service.IHousingDemandService; |
| | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | // @Autowired |
| | | // private HouseResourceService houseResourceService; |
| | | @Override |
| | | public List<Host> listHost(String nickname, Integer userType, Integer status, String phone) { |
| | | return this.baseMapper.listHost(nickname,userType,status,phone); |
| | | List<Host> hosts = this.baseMapper.listHost(nickname, userType, status, phone); |
| | | // for (Host h : hosts) { |
| | | // HouseResource houseResource = houseResourceService.selectOne(new EntityWrapper<HouseResource>().eq("insert_user_id", h.getId()).last("order by insert_time desc limit 1")); |
| | | // HousingDemand housingDemand = housingDemandService.selectOne(new EntityWrapper<HousingDemand>().eq("insert_user_id", h.getId()).last("order by insert_time desc limit 1")); |
| | | // if (houseResource==null&&housingDemand!=null){ |
| | | // h.setWechatQRCode(housingDemand.getWechatQrCode()); |
| | | // h.setWatchApp(housingDemand.getWatchApp()); |
| | | // continue; |
| | | // } |
| | | // if (houseResource!=null&&housingDemand==null){ |
| | | // h.setWechatQRCode(houseResource.getWechatQRCode()); |
| | | // h.setWatchApp(houseResource.getWatchApp()); |
| | | // continue; |
| | | // } |
| | | // if (houseResource==null&&housingDemand==null){ |
| | | // continue; |
| | | // } |
| | | // Date insertTime = houseResource.getInsertTime(); |
| | | // Date insertTime1 = housingDemand.getInsertTime(); |
| | | // if (insertTime.after(insertTime1)) { |
| | | // h.setWechatQRCode(houseResource.getWechatQRCode()); |
| | | // h.setWatchApp(houseResource.getWatchApp()); |
| | | // } else { |
| | | // h.setWechatQRCode(housingDemand.getWechatQrCode()); |
| | | // h.setWatchApp(housingDemand.getWatchApp()); |
| | | // } |
| | | // } |
| | | |
| | | return hosts; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.internal.util.codec.Base64; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.mongodb.client.result.UpdateResult; |
| | | import com.stylefeng.guns.config.OSSService; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.HouseResourceMapper; |
| | |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.WxAppletTools; |
| | | import com.stylefeng.guns.modular.system.warpper.PointLocation; |
| | | import com.stylefeng.guns.modular.system.warpper.req.AddHouseReq; |
| | | import com.stylefeng.guns.modular.system.warpper.req.HouseQuery; |
| | |
| | | import org.springframework.data.geo.Metrics; |
| | | import org.springframework.data.geo.Point; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.geo.GeoJsonPoint; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.data.mongodb.core.query.Update; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.LinkedMultiValueMap; |
| | | import org.springframework.util.MultiValueMap; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.security.SecureRandom; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | private MongoTemplate mongoTemplate; |
| | | @Autowired |
| | | private IHousingDemandService housingDemandService; |
| | | @Autowired |
| | | private OSSService ossService; |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | @Autowired |
| | | private WxAppletTools wxAppletTools; |
| | | |
| | | |
| | | |
| | |
| | | houseResource.setInsertUserId(null); |
| | | houseResource.setViewsNumber(0); |
| | | houseResource.setStatus(1); |
| | | houseResource.setLeaseTime(req.getTime()); |
| | | houseResource.setLeaseTime(req.getLeaseTime()); |
| | | houseResource.setFirmHouse(req.getFirmHouse()); |
| | | houseResource.setAuthTime(new Date()); |
| | | if (req.getDataType()==1) { |
| | | if (req.getTime().contains("年")) { |
| | | if (req.getLeaseTime().contains("年")) { |
| | | houseResource.setRentalDuration(2); |
| | | } else { |
| | | houseResource.setRentalDuration(1); |
| | | } |
| | | } |
| | | houseResource.setIsManage(1); |
| | | houseResource.setType(2); |
| | | houseResource.setAppUserId(Objects.requireNonNull(ShiroKit.getUser()).id); |
| | | houseResource.setInsertUserId(Objects.requireNonNull(ShiroKit.getUser()).id); |
| | | |
| | | |
| | | |
| | | PointLocation pointLocation = new PointLocation(); |
| | | GeoJsonPoint geoJsonPoint = new GeoJsonPoint(Double.valueOf(req.getLongitude()),Double.valueOf(req.getLatitude())); |
| | | pointLocation.setGeoJsonPoint(geoJsonPoint); |
| | | pointLocation.setHouseId(houseResource.getId()); |
| | | mongoTemplate.insert(pointLocation); |
| | | |
| | | houseResource.setCode(pointLocation.getId()); |
| | | this.baseMapper.updateById(houseResource); |
| | | |
| | | InputStream inputStream = null; |
| | | OutputStream outputStream = null; |
| | | String accessToken = wxAppletTools.getAccessToken(); |
| | | try { |
| | | String url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=" + accessToken; |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("path", "pages/home/home"); |
| | | // param.put("page", "pages/index/index"); // 路径 如果没有默认跳转到首页面微信小程序发布后才可以使用不能添加参数 |
| | | param.put("width", 200); //二维码尺寸 |
| | | param.put("is_hyaline", true); // 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 参数仅对小程序码生效 |
| | | param.put("auto_color", true); // 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 参数仅对小程序码生效 |
| | | Map<String, Object> line_color = new HashMap<>(); |
| | | line_color.put("r", 0); |
| | | line_color.put("g", 0); |
| | | line_color.put("b", 0); |
| | | param.put("line_color", line_color); |
| | | System.err.println("调用生成微信URL接口传参:" + param); |
| | | MultiValueMap<String, String> headers = new LinkedMultiValueMap<>(); |
| | | HttpEntity requestEntity = new HttpEntity(param, headers); |
| | | ResponseEntity<byte[]> entity = restTemplate.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]); |
| | | System.err.println("调用小程序生成微信永久小程序码URL接口返回结果:" + entity.getBody()); |
| | | byte[] result = entity.getBody(); |
| | | System.err.println(Base64.encodeBase64String(result)); |
| | | inputStream = new ByteArrayInputStream(result); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); |
| | | // 最后上传生成的文件名 |
| | | String finalFileName = System.currentTimeMillis() + "" + new SecureRandom().nextInt(0x0400) + ".jpg"; |
| | | // oss中的文件夹名 |
| | | String objectName = sdf.format(new Date()) + "/" + finalFileName; |
| | | // 上传oss |
| | | ossService.uploadFile2OSS(inputStream, objectName); |
| | | //获取文件的URl地址 |
| | | String imgUrl = ossService.getImgUrl(objectName); |
| | | houseResource.setQrCode(imgUrl); |
| | | this.baseMapper.insert(houseResource); |
| | | System.err.println("看看文件路径" + imgUrl); |
| | | } catch (Exception e) { |
| | | System.err.println("调用小程序生成微信永久小程序码URL接口异常" + e); |
| | | } finally { |
| | | if (inputStream != null) { |
| | | try { |
| | | inputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | if (outputStream != null) { |
| | | try { |
| | | outputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | return ResultUtil.success("添加成功"); |
| | | |
| | | } |
| | |
| | | BeanUtils.copyProperties(req,houseResource); |
| | | if (req.getDataType()==1) { |
| | | |
| | | if (req.getTime().contains("年")) { |
| | | if (req.getLeaseTime().contains("年")) { |
| | | houseResource.setRentalDuration(2); |
| | | } else { |
| | | houseResource.setRentalDuration(1); |
| | | } |
| | | } |
| | | houseResource.setUpdateTime(new Date()); |
| | | this.baseMapper.updateById(houseResource); |
| | | |
| | | HouseResource houseResource1 = this.baseMapper.selectById(req.getId()); |
| | | Query query = Query.query(Criteria.where("_id").is(houseResource1.getCode())); |
| | | PointLocation pointLocation = new PointLocation(); |
| | | pointLocation.setId(houseResource1.getCode()); |
| | | pointLocation.setHouseId(houseResource.getId()); |
| | | GeoJsonPoint geoJsonPoint = new GeoJsonPoint(Double.valueOf(req.getLongitude()),Double.valueOf(req.getLatitude())); |
| | | pointLocation.setGeoJsonPoint(geoJsonPoint); |
| | | org.bson.Document document = (org.bson.Document)mongoTemplate.getConverter() .convertToMongoType(pointLocation); |
| | | Update update = Update.fromDocument (document); |
| | | UpdateResult updateResult = mongoTemplate.updateFirst(query, update, PointLocation.class); |
| | | |
| | | return ResultUtil.success("编辑成功"); |
| | | |
| | | } |
| | |
| | | import java.time.ZoneId; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | |
| | | LocalDateTime currentTime = LocalDateTime.now(); |
| | | String min = redisUtil.getValue("HouseAuthSetting"); |
| | | if (!min.equals("null")) { |
| | | |
| | | List<HouseResource> toUpdate = new ArrayList<>(); |
| | | for (HouseResource resource : authStatus) { |
| | | // LocalDateTime insertTime = resource.getInsertTime(); |
| | |
| | | LocalDateTime oneMinuteAfter = insertTime.plus(Integer.parseInt(min), ChronoUnit.MINUTES); |
| | | if (currentTime.isAfter(oneMinuteAfter)) { |
| | | resource.setAuthStatus(2); |
| | | resource.setAppUserId(1); |
| | | // resource.setAppUserId(1); |
| | | resource.setAuthTime(new Date()); |
| | | toUpdate.add(resource); |
| | | // 当前时间超过insertTime之后的一分钟 |
| | | System.out.println("当前时间超过了插入时间之后的一分钟"); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.text.MessageFormat; |
| | | |
| | | /** |
| | | * @author liheng |
| | | * @ClassName WxAppletTools |
| | | * @Description |
| | | * @date 2020-12-04 13:55 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class WxAppletTools { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | @Value("${wx.appletsAppid}") |
| | | private String wxAppletsAppid; |
| | | |
| | | @Value("${wx.appletsAppSecret}") |
| | | private String wxAppletsAppSecret; |
| | | private final static String ACCESSTOKEN_CACHE_KEY = "accessToken"; |
| | | /** |
| | | * 请求参数 |
| | | * 属性 类型 默认值 必填 说明 |
| | | * appid string 是 小程序 appId |
| | | * secret string 是 小程序 appSecret |
| | | * js_code string 是 登录时获取的 code |
| | | * grant_type string 是 授权类型,此处只需填写 authorization_cod |
| | | * <p> |
| | | * 返回值: |
| | | * <p> |
| | | * 属性 类型 说明 |
| | | * openid string 用户唯一标识 |
| | | * session_key string 会话密钥 |
| | | * unionid string 用户在开放平台的唯一标识符,若当前小程序已绑定到微信开放平台帐号下会返回,详见 UnionID 机制说明。 |
| | | * errcode number 错误码 |
| | | * errmsg string 错误信息 |
| | | */ |
| | | private static final String JSCODE_2_SESSION_URL = "https://api.weixin.qq.com/sns/jscode2session?appid={0}&secret={1}&js_code={2}&grant_type=authorization_code"; |
| | | |
| | | |
| | | /** |
| | | * 请求参数 |
| | | * 属性 类型 默认值 必填 说明 |
| | | * grant_type string 是 填写 client_credential |
| | | * appid string 是 小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态) |
| | | * secret string 是 小程序唯一凭证密钥,即 AppSecret,获取方式同 appid |
| | | * 返回值 |
| | | * Object |
| | | * 返回的 JSON 数据包 |
| | | * <p> |
| | | * 属性 类型 说明 |
| | | * access_token string 获取到的凭证 |
| | | * expires_in number 凭证有效时间,单位:秒。目前是7200秒之内的值。 |
| | | * errcode number 错误码 |
| | | * errmsg string 错误信息 |
| | | */ |
| | | private static String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}"; |
| | | |
| | | /** |
| | | * @return |
| | | */ |
| | | public String getAccessToken() { |
| | | String requestUrl = MessageFormat.format(ACCESS_TOKEN_URL, wxAppletsAppid, wxAppletsAppSecret); |
| | | String respBody = restTemplate.getForEntity(requestUrl, String.class).getBody(); |
| | | JSONObject jsonObject = JSONObject.parseObject(respBody); |
| | | return jsonObject.getString("access_token"); |
| | | } |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 找中介-个人详情-我的房源 |
| | |
| | | @ApiModelProperty(value = "户型", required = true) |
| | | private String houseModel; |
| | | @ApiModelProperty(value = "出租时长(买卖房不填该字段) 例:1 = 不限 /1年1月 ", required = true) |
| | | private String time; |
| | | private String leaseTime; |
| | | @ApiModelProperty(value = "出租(售卖)日期 例:随时/九月上旬", required = true) |
| | | private String startTime; |
| | | @ApiModelProperty(value = "售卖金额(月租金额)", required = true) |
| | |
| | | private String cellName; |
| | | @ApiModelProperty(value = "房源照片", required = true) |
| | | private String housePhoto; |
| | | @ApiModelProperty(value = "房源视频", required = true) |
| | | @ApiModelProperty(value = "房源视频", required = false) |
| | | private String houseVideo; |
| | | @ApiModelProperty(value = "标题", required = true) |
| | | private String title; |
| | |
| | | private Integer type; |
| | | @ApiModelProperty(value ="必看好房(0=否,1=是)',",required = true) |
| | | private Integer goodHouse; |
| | | @ApiModelProperty(value ="必看好房(0=否,1=是)',",required = false) |
| | | private Integer air; |
| | | |
| | | private Integer id; |
| | | private String reason; |
| | | private Date authTime; |
| | | |
| | | } |
| | |
| | | order by houseCount desc |
| | | </select> |
| | | <select id="listHost" resultType="com.stylefeng.guns.modular.system.dto.Host"> |
| | | SELECT id,insert_time as insertTime,nickname,phone,profile_photo as profilePhoto,user_type as userType,wechat_qr_code as wechatQrCode,watch_app as watchApp,phone,status |
| | | SELECT id,insert_time as insertTime,nickname,profile_photo as profilePhoto,user_type as userType,ifnull(wechat_qr_code1,wechat_qr_code) as wechatQrCode,ifnull(watch_app1,watch_app) as watchApp,phone as phone,status |
| | | from t_app_user |
| | | <where> |
| | | status != 3 |
| | |
| | | |
| | | </select> |
| | | <select id="listMedium" 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 |
| | | SELECT id,insert_time as insertTime,nickname,company_name as companyName,agent_licence_code as agentLicenceCode,ifnull(wechat_qr_code1,wechat_qr_code) as wechatQrCode,ifnull(watch_app1,watch_app) as watchApp,phone as phone,status |
| | | from t_app_user |
| | | <where> |
| | | status != 3 and auth = 2 |
| | |
| | | |
| | | <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,auth as auditStatus,audit_note as auditNote |
| | | agent_licence_code as agentLicenceCode,ifnull(wechat_qr_code1,wechat_qr_code) as wechatQrCode,ifnull(watch_app1,watch_app) as watchApp,phone as phone,status,auth as auditStatus,audit_note as auditNote |
| | | ,refuse_date as refuseDate |
| | | from t_app_user |
| | | <where> |
| | |
| | | and user_type = #{userType} |
| | | </if> |
| | | <if test="null != status"> |
| | | and audit_status = #{status} |
| | | and auth = #{status} |
| | | </if> |
| | | <if test="null != phone and '' != phone"> |
| | | and phone like CONCAT('%', #{phone}, '%') |
| | |
| | | left join t_app_user au on (hr.app_user_id = au.id) |
| | | left join t_region rc on (hr.district_id = rc.id) |
| | | left join t_region rp on (rp.id = rc.parent_id) |
| | | where hr.is_delete = 0 and hr.`status` = 1 and hr.auth_status = 2 |
| | | and hr.type=2 |
| | | where hr.is_delete = 0 and hr.`status` = 1 and hr.auth_status = 2 and hr.type=2 |
| | | <if test="null != req.type"> |
| | | and hr.data_type = #{req.type} |
| | | </if> |
| | |
| | | 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 and hs.type = 2 |
| | | |
| | | order by hs.insert_time desc |
| | | ) a |
| | | <where> |
| | | <if test="null != cellName and '' != cellName"> |
| | |
| | | |
| | | |
| | | <select id="aulist" 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(su.`name`,ap.nickname) 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,hs.auth_status AS authStatus |
| | | FROM t_house_resource hs |
| | | 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, |
| | | hs.house_model AS houseModel, |
| | | hs.building_orientation AS buildingOrientation, |
| | | hs.sale_amount AS saleAmount, |
| | | hs.house_area AS houseArea, |
| | | hs.STATUS, |
| | | hs.auth_status AS authStatus, |
| | | ap.user_type as isManage, |
| | | ap.nickname as name, |
| | | ifnull(ap.phone1,ap.phone) as phone |
| | | FROM |
| | | t_house_resource hs |
| | | 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.type = 2 |
| | | order by hs.insert_time desc |
| | | WHERE |
| | | hs.is_delete = 0 |
| | | AND hs.type = 2 and ISNULL(hs.is_manage) |
| | | ORDER BY |
| | | hs.insert_time DESC |
| | | ) a |
| | | <where> |
| | | |
| | | |
| | | <where> |
| | | <if test="null != id"> |
| | | and a.id = #{id} |
| | | </if> |
| | |
| | | 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 |
| | | where hs.auth_status = 2 |
| | | |
| | | ) a |
| | | <where> |