소스 검색

合并线上代码

java110 4 년 전
부모
커밋
ddf19685be

+ 3 - 4
Readme.md

@@ -1,5 +1,5 @@
 [english](Readme_en.md)
-# HC小区管理系统是前后端完全开源并免费商用的小区物业管理系统,包含小区后端项目,小区前段项目,物业版uni-app和业主版uni-app,最新SQL文件加群获取827669685(已满),799748606(已满)1038870655(群三
+# HC小区管理系统是前后端完全开源并免费商用的小区物业管理系统,包含小区后端项目,小区前段项目,物业版uni-app和业主版uni-app,最新SQL文件加群获取827669685(已满),799748606(已满)274026637(群六
 
 ## 开源代码说明
 
@@ -64,8 +64,6 @@
 
 物业 账号/密码:wuxw/admin
 
-代理商 账号/密码:dails/admin
-
 运维团队 账号/密码:admin/admin
 
 开发团队 账号/密码:dev/(由于开发者权限较大,删除数据会影响稳定性,查看具体功能,可以单独部署在u_user 表中修改)
@@ -88,7 +86,8 @@
 
 ### 加入我们(join)
 
-加入微小区交流群随时了解项目进度,和java110开发者零距离沟通 qq群号 827669685(已满),799748606(已满),770542020(未满)邮箱:928255095@qq.com
+
+加入微小区交流群随时了解项目进度,和java110开发者零距离沟通 qq群号 827669685(已满),799748606(已满),274026637(未满)邮箱:928255095@qq.com
 
 ![image](docs/img/qq.png)
 

+ 5 - 3
java110-core/src/main/java/com/java110/core/factory/ValidateCodeFactory.java

@@ -1,6 +1,5 @@
 package com.java110.core.factory;
 
-import sun.misc.BASE64Encoder;
 
 import java.awt.Color;
 import java.awt.Font;
@@ -14,6 +13,8 @@ import java.util.Arrays;
 import java.util.Random;
 
 import javax.imageio.ImageIO;
+
+import org.apache.commons.codec.binary.Base64;
 /**
  * <p><b>ValidateCodeFactory Description:</b> (验证码生成)</p>
  * <b>DATE:</b> 2016年6月2日 下午3:53:34
@@ -23,7 +24,8 @@ public class ValidateCodeFactory{
     //使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符
     public static final String VERIFY_CODES = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ";
     private static Random random = new Random();
-    static BASE64Encoder encoder = new sun.misc.BASE64Encoder();
+    
+    private static Base64 base64 = new Base64();
 
 
     /**
@@ -180,7 +182,7 @@ public class ValidateCodeFactory{
         ImageIO.write(image, "jpg", baos);
         byte[] bytes = baos.toByteArray();
 
-        return "data:image/jpeg;base64,"+encoder.encodeBuffer(bytes).trim();
+        return "data:image/jpeg;base64,"+base64.encodeToString(bytes).trim();
     }
 
     private static Color getRandColor(int fc, int bc) {

+ 6 - 6
java110-core/src/main/java/com/java110/core/factory/WechatFactory.java

@@ -7,11 +7,11 @@ import com.java110.utils.cache.MappingCache;
 import com.java110.utils.constant.WechatConstant;
 import com.java110.utils.factory.ApplicationContextFactory;
 import com.java110.utils.util.StringUtil;
+
+import org.apache.commons.codec.binary.Base64;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.web.client.RestTemplate;
-import sun.misc.BASE64Decoder;
-
 import javax.crypto.Cipher;
 import javax.crypto.spec.IvParameterSpec;
 import javax.crypto.spec.SecretKeySpec;
@@ -122,13 +122,13 @@ public class WechatFactory {
 
     public static String decryptS5(String sSrc, String encodingFormat, String sKey, String ivParameter) {
         try {
-            BASE64Decoder decoder = new BASE64Decoder();
-            byte[] raw = decoder.decodeBuffer(sKey);
+        	Base64 base64 = new Base64();
+            byte[] raw = base64.decode(sKey);
             SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
-            IvParameterSpec iv = new IvParameterSpec(decoder.decodeBuffer(ivParameter));
+            IvParameterSpec iv = new IvParameterSpec(base64.decode(ivParameter));
             Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
             cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
-            byte[] myendicod = decoder.decodeBuffer(sSrc);
+            byte[] myendicod = base64.decode(sSrc);
             byte[] original = cipher.doFinal(myendicod);
             String originalString = new String(original, encodingFormat);
             return originalString;

+ 0 - 22
java110-core/src/test/java/com/java110/core/proxy/ITestService.java

@@ -1,22 +0,0 @@
-package com.java110.core.proxy;
-
-/**
- * @ClassName ITestService
- * @Description TODO
- * @Author wuxw
- * @Date 2019/5/15 15:53
- * @Version 1.0
- * add by wuxw 2019/5/15
- **/
-public interface ITestService {
-
-    /**
-     * 获取
-     *
-     * @param param 参数
-     * @return 返回
-     */
-    String get(String param);
-
-    void set(String param);
-}

+ 0 - 34
java110-core/src/test/java/com/java110/core/proxy/ServiceInvocationHandler.java

@@ -1,34 +0,0 @@
-package com.java110.core.proxy;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-/**
- * @ClassName ServiceInvocationHandler
- * @Description TODO
- * @Author wuxw
- * @Date 2019/5/15 15:54
- * @Version 1.0
- * add by wuxw 2019/5/15
- **/
-public class ServiceInvocationHandler implements InvocationHandler {
-    private Class<?> interfaceType;
-
-    public ServiceInvocationHandler(Class<?> intefaceType) {
-        this.interfaceType = interfaceType;
-    }
-
-    @Override
-    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-        if (Object.class.equals(method.getDeclaringClass())) {
-            System.out.println("if调用前");
-            return method.invoke(this, args);
-        }
-        System.out.println("调用前,参数:{}" + args);
-        Object result = Arrays.asList(args);
-        System.out.println("调用后,结果:{}" + result);
-        return result;
-    }
-
-}

+ 0 - 39
java110-core/src/test/java/com/java110/core/proxy/ServiceProxyFactory.java

@@ -1,39 +0,0 @@
-package com.java110.core.proxy;
-
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.stereotype.Component;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Proxy;
-
-
-/**
- * @ClassName ServiceProxyFactory
- * @Description TODO
- * @Author wuxw
- * @Date 2019/5/15 15:56
- * @Version 1.0
- * add by wuxw 2019/5/15
- **/
-@Component
-public class ServiceProxyFactory implements FactoryBean<ITestService> {
-
-    @Override
-    public ITestService getObject() throws Exception {
-        Class<?> interfaceType = ITestService.class;
-        InvocationHandler handler = new ServiceInvocationHandler(interfaceType);
-        return (ITestService) Proxy.newProxyInstance(interfaceType.getClassLoader(),
-                new Class[]{interfaceType}, handler);
-    }
-
-    @Override
-    public Class<?> getObjectType() {
-        return ITestService.class;
-    }
-
-    @Override
-    public boolean isSingleton() {
-        return true;
-    }
-
-}

+ 1 - 1
java110-utils/src/main/java/com/java110/utils/App.java

@@ -1,4 +1,4 @@
-package com.java110.entity;
+package com.java110.utils;
 
 /**
  * Hello world!

+ 7 - 6
java110-utils/src/main/java/com/java110/utils/util/Base64Convert.java

@@ -1,12 +1,13 @@
 package com.java110.utils.util;
 
-import sun.misc.BASE64Decoder;
-import sun.misc.BASE64Encoder;
-
 import java.io.*;
 
+import org.apache.commons.codec.binary.Base64;
+
 public class Base64Convert {
 
+	private static final Base64 base64 = new Base64();
+	
     private void Base64Convert() {
 
     }
@@ -25,7 +26,7 @@ public class Base64Convert {
             byte[] bytes = new byte[in.available()];
             // 将文件中的内容读入到数组中
             in.read(bytes);
-            strBase64 = new BASE64Encoder().encode(bytes);      //将字节流数组转换为字符串
+            strBase64 = base64.encodeToString(bytes);      //将字节流数组转换为字符串
         } finally {
             if (in != null) {
                 in.close();
@@ -45,7 +46,7 @@ public class Base64Convert {
     public static String byteToBase64(byte[] bytes)  {
         String strBase64 = null;
             // in.available()返回文件的字节长度
-            strBase64 = new BASE64Encoder().encode(bytes);      //将字节流数组转换为字符串
+            strBase64 = base64.encodeToString(bytes);      //将字节流数组转换为字符串
         return strBase64;
     }
 
@@ -61,7 +62,7 @@ public class Base64Convert {
      */
     public static byte[] base64ToByte(String strBase64) throws IOException {
         // 解码,然后将字节转换为文件
-        byte[] bytes = new BASE64Decoder().decodeBuffer(strBase64);   //将字符串转换为byte数组
+        byte[] bytes = base64.decode(strBase64);   //将字符串转换为byte数组
         return bytes;
     }
 }

+ 0 - 3
pom.xml

@@ -499,7 +499,6 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>3.8.1</version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -530,7 +529,6 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.10.4</version>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -541,7 +539,6 @@
             </plugin>
             <plugin>
                 <artifactId>maven-source-plugin</artifactId>
-                <version>3.0.1</version>
                 <configuration>
                     <attach>true</attach>
                 </configuration>

+ 1 - 0
service-api/src/main/java/com/java110/api/listener/room/BindingAddRoomBindingListener.java

@@ -85,6 +85,7 @@ public class BindingAddRoomBindingListener extends AbstractServiceApiPlusListene
             addRoomView.put("userId", context.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID));
             addRoomView.put("unitId", viewUnitInfo.getString("unitId"));
             addRoomView.put("roomType", RoomDto.ROOM_TYPE_ROOM);
+
             roomBMOImpl.addBusinessRoom(addRoomView, context);
             //处理房屋属性
             dealRoomAttr(addRoomView, context);