zhang song 6 лет назад
Родитель
Сommit
9285fc38f9

+ 16 - 1
pine-admin/src/main/java/com/pine/admin/modules/business/entity/Order.java

@@ -139,7 +139,7 @@ public class Order implements Serializable {
      * 订单店铺id  平台的订单id为0
      */
     @ApiModelProperty(value = "订单店铺id  平台的订单id为0", name = "storeId")
-    private Long storeId;
+    private Long storeId = 0L;
     /**
      * 订单取消原因
      * 1:现在不想买
@@ -336,5 +336,20 @@ public class Order implements Serializable {
      */
     @ApiModelProperty(value = "来源 URL", name = "incomingUrl")
     private String incomingUrl;
+    /**
+     * 收货人
+     */
+    @ApiModelProperty(value = "收货人", name = "customerName")
+    private String customerName;
+    /**
+     * 开始时间
+     */
+    @ApiModelProperty(value = "开始时间", name = "startTime")
+    private String startTime;
+    /**
+     * 结束时间
+     */
+    @ApiModelProperty(value = "结束时间", name = "endTime")
+    private String endTime;
 
 }

+ 1 - 32
pine-admin/src/main/java/com/pine/admin/modules/system/controller/SysUserLoginController.java

@@ -45,20 +45,6 @@ public class SysUserLoginController {
     @Autowired
     private SysService sysService;
 
-    public static void main(String[] args) throws ParseException {
-        SimpleDateFormat ft = new SimpleDateFormat ("yyyy-MM-dd hh:mm:ss");
-
-        String formdata = "2019-10-12 13:00:01";
-        System.out.println(ft.parse(formdata).getTime());
-        String data = "{\"erp\":\"12818\",\"dealerId\":6906,\"name\":\"芜湖福瑞汽车销售有限公司\",\"roleType\":\"商城经销商\",\"createTime\":\"1570856401000\"}";
-        String encrypt = RSAUtils.encrypt(RSAUtils.publicKey, data);
-        //        //防止URL 传参 + 号丢失
-        System.out.println(encrypt.replace("+", "%2B"));
-        String responseString = RSAUtils.decrypt(RSAUtils.privateKey, encrypt);
-        System.out.println(responseString);
-        ShiroUserInfo parse = JSONObject.parseObject(responseString, ShiroUserInfo.class);
-
-    }
 
     @PostMapping("/secretLogin")
     public Result secretLogin(@RequestParam(value = "casualBacking") String casualBacking) {
@@ -99,24 +85,7 @@ public class SysUserLoginController {
     })
     public Result dealerLogin(@RequestParam(value = "userCode") String userCode, @RequestParam(value = "password") String password) {
         try {
-            Map<String, String> map = new HashMap<>();
-            map.put("account", userCode);
-            map.put("password", PasswordEncryptorUtils.md5AndBase64Encryptor(password));
-
-            String s2 = PostUtil.formUpload(Constant.LOGIN_URL, map, null, "");
-            log.info("经销商登录:" + s2);
-            Map maps = (Map) JSON.parse(s2);
-
-            if (maps.get("code").equals(-1)) {
-                return Result.error(maps.get("msg").toString());
-            }
-            DealerOpenIdToken dealerOpenIdToken;
-            if (null == maps.get("data")) {
-                String dd = "{\"erp\":\"8888\",\"dealerId\":8888,\"name\":\"超级管理员\",\"roleType\":\"超级管理员\"}";
-                dealerOpenIdToken = new DealerOpenIdToken(dd);
-            } else {
-                dealerOpenIdToken = new DealerOpenIdToken(maps.get("data").toString());
-            }
+            DealerOpenIdToken dealerOpenIdToken = sysService.dealerLogin(userCode, password);
             Subject subject = SecurityUtils.getSubject();
             subject.login(dealerOpenIdToken);
             SecurityUtils.getSubject().getSession().setTimeout(-1000L);

+ 5 - 0
pine-admin/src/main/java/com/pine/admin/modules/system/service/SysService.java

@@ -3,6 +3,8 @@ package com.pine.admin.modules.system.service;
 
 import com.pine.admin.modules.system.entity.ActiveUser;
 import com.pine.admin.modules.system.entity.SysPermission;
+import com.pine.admin.shiro.DealerOpenIdToken;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 
@@ -26,4 +28,7 @@ public interface SysService {
 
     //RAS解析用户信息
     String decryptUser(String casualBacking);
+
+    //经销商登录(亿客接口)
+    DealerOpenIdToken dealerLogin(String userCode, String password) throws Exception;
 }

+ 33 - 5
pine-admin/src/main/java/com/pine/admin/modules/system/service/impl/SysServiceImpl.java

@@ -1,5 +1,6 @@
 package com.pine.admin.modules.system.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.pine.admin.modules.system.dao.SysPermissionDao;
 import com.pine.admin.modules.system.dao.SysUserDao;
@@ -7,19 +8,20 @@ import com.pine.admin.modules.system.entity.ActiveUser;
 import com.pine.admin.modules.system.entity.SysPermission;
 import com.pine.admin.modules.system.entity.SysUser;
 import com.pine.admin.modules.system.service.SysService;
+import com.pine.admin.shiro.DealerOpenIdToken;
 import com.pine.admin.shiro.ShiroUserInfo;
 import com.pine.common.dto.Result;
 import com.pine.common.exception.ApiException;
-import com.pine.common.utils.DateTimeTool;
-import com.pine.common.utils.MD5Util;
-import com.pine.common.utils.RSAUtils;
+import com.pine.common.utils.*;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author Create By Pine
@@ -111,9 +113,35 @@ public class SysServiceImpl implements SysService {
         if (effectiveDate == false) {
             throw new ApiException("秘钥已失效");
         }
-
         return responseString;
     }
 
-
+    @Override
+    public DealerOpenIdToken dealerLogin(String userCode, String password) {
+        DealerOpenIdToken dealerOpenIdToken;
+        try {
+            Map<String, String> map = new HashMap<>();
+            map.put("account", userCode);
+            map.put("password", PasswordEncryptorUtils.md5AndBase64Encryptor(password));
+
+            String s2 = PostUtil.formUpload(Constant.LOGIN_URL, map, null, "");
+            log.info("经销商登录:" + s2);
+            Map maps = (Map) JSON.parse(s2);
+
+            if (maps.get("code").equals(-1)) {
+                throw new ApiException(maps.get("msg").toString());
+            }
+
+            if (null == maps.get("data")) {
+                String dd = "{\"erp\":\"8888\",\"dealerId\":8888,\"name\":\"超级管理员\",\"roleType\":\"超级管理员\"}";
+                dealerOpenIdToken = new DealerOpenIdToken(dd);
+            } else {
+                dealerOpenIdToken = new DealerOpenIdToken(maps.get("data").toString());
+            }
+            return dealerOpenIdToken;
+
+        }catch (Exception e){
+            throw new ApiException(e.getMessage());
+        }
+    }
 }

+ 3 - 0
pine-admin/src/main/java/com/pine/admin/shiro/ShiroUserInfo.java

@@ -41,4 +41,7 @@ public class ShiroUserInfo implements Serializable {
     private Long dealerID;
 
     private Date createTime;
+
+    private String password;
 }
+

+ 67 - 190
pine-admin/src/main/resources/mapper/business/OrderDao.xml

@@ -40,16 +40,11 @@
         <result property="modifyTime" column="modify_time"/>
         <result property="evaluationTime" column="evaluation_time"/>
         <result property="presaleTime" column="presale_time"/>
-        <result property="groupHead" column="group_head"/>
-        <result property="groupId" column="group_id"/>
-        <result property="groupMarketingId" column="group_marketing_id"/>
-        <result property="groupSkuId" column="group_sku_id"/>
-        <result property="groupStatus" column="group_status"/>
-        <result property="groupNum" column="group_num"/>
+
         <result property="openGroupTime" column="open_group_time"/>
-        <result property="autoHandleStatus" column="auto_handle_status"/>
+        <result column="customer_name" property="customerName"/>
+
         <result property="recommended" column="recommended"/>
-        <result property="crowdfundingId" column="crowdfunding_id"/>
         <result property="lotteryStatus" column="lottery_status"/>
         <result property="writeOffCode" column="write_off_code"/>
         <result property="communityBuyCustomerId" column="community_buy_customer_id"/>
@@ -61,8 +56,6 @@
         <result property="dealerInfo" column="dealer_info"/>
         <result property="payChannel" column="pay_channel"/>
         <result property="skuType" column="sku_type"/>
-        <result property="jetourSendFlag" column="jetour_send_flag"/>
-        <result property="incomingUrl" column="incoming_url"/>
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -118,6 +111,7 @@
                      profit,
                      community_name,
                      community_buy_name,
+                     bill_no,
                      dealer_id,
                      dealer_info,
                      pay_channel,
@@ -195,6 +189,7 @@
             <if test="profit != null">profit,</if>
             <if test="communityName != null">community_name,</if>
             <if test="communityBuyName != null">community_buy_name,</if>
+            <if test="billNo != null">bill_no,</if>
             <if test="dealerId != null">dealer_id,</if>
             <if test="dealerInfo != null">dealer_info,</if>
             <if test="payChannel != null">pay_channel,</if>
@@ -255,6 +250,7 @@
             <if test="profit != null">#{profit},</if>
             <if test="communityName != null">#{communityName},</if>
             <if test="communityBuyName != null">#{communityBuyName},</if>
+            <if test="billNo != null">#{billNo},</if>
             <if test="dealerId != null">#{dealerId},</if>
             <if test="dealerInfo != null">#{dealerInfo},</if>
             <if test="payChannel != null">#{payChannel},</if>
@@ -268,6 +264,7 @@
     <update id="updateByPrimaryKeySelective" parameterType="com.pine.admin.modules.business.entity.Order">
         update ls_order
         <set>
+            <if test="id != null">id = #{id},</if>
             <if test="orderCode != null">order_code = #{orderCode},</if>
             <if test="masterOrderCode != null">master_order_code = #{masterOrderCode},</if>
             <if test="customerId != null">customer_id = #{customerId},</if>
@@ -319,6 +316,7 @@
             <if test="profit != null">profit = #{profit},</if>
             <if test="communityName != null">community_name = #{communityName},</if>
             <if test="communityBuyName != null">community_buy_name = #{communityBuyName},</if>
+            <if test="billNo != null">bill_no = #{billNo},</if>
             <if test="dealerId != null">dealer_id = #{dealerId},</if>
             <if test="dealerInfo != null">dealer_info = #{dealerInfo},</if>
             <if test="payChannel != null">pay_channel = #{payChannel},</if>
@@ -332,186 +330,57 @@
     <!-- 分页查询-->
     <select id="queryByPage" parameterType="java.util.Map"
             resultMap="entityMap">
-        select
-        <include refid="Base_Column_List"/>
-        from ls_order
-        <where>
-            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
-                and id = #{record.id}
-            </if>
-            <if test="record.orderCode != null and !&quot;&quot;.equals(record.orderCode)">
-                and order_code = #{record.orderCode}
-            </if>
-            <if test="record.masterOrderCode != null and !&quot;&quot;.equals(record.masterOrderCode)">
-                and master_order_code = #{record.masterOrderCode}
-            </if>
-            <if test="record.customerId != null and !&quot;&quot;.equals(record.customerId)">
-                and customer_id = #{record.customerId}
-            </if>
-            <if test="record.price != null and !&quot;&quot;.equals(record.price)">
-                and price = #{record.price}
-            </if>
-            <if test="record.presalePrice != null and !&quot;&quot;.equals(record.presalePrice)">
-                and presale_price = #{record.presalePrice}
-            </if>
-            <if test="record.originalPrice != null and !&quot;&quot;.equals(record.originalPrice)">
-                and original_price = #{record.originalPrice}
-            </if>
-            <if test="record.freightPrice != null and !&quot;&quot;.equals(record.freightPrice)">
-                and freight_price = #{record.freightPrice}
-            </if>
-            <if test="record.modifyPrice != null and !&quot;&quot;.equals(record.modifyPrice)">
-                and modify_price = #{record.modifyPrice}
-            </if>
-            <if test="record.pointPrice != null and !&quot;&quot;.equals(record.pointPrice)">
-                and point_price = #{record.pointPrice}
-            </if>
-            <if test="record.couponPrice != null and !&quot;&quot;.equals(record.couponPrice)">
-                and coupon_price = #{record.couponPrice}
-            </if>
-            <if test="record.redEnvelopePrice != null and !&quot;&quot;.equals(record.redEnvelopePrice)">
-                and red_envelope_price = #{record.redEnvelopePrice}
-            </if>
-            <if test="record.concessionalRate != null and !&quot;&quot;.equals(record.concessionalRate)">
-                and concessional_rate = #{record.concessionalRate}
-            </if>
-            <if test="record.status != null and !&quot;&quot;.equals(record.status)">
-                and status = #{record.status}
-            </if>
-            <if test="record.presaleStatus != null and !&quot;&quot;.equals(record.presaleStatus)">
-                and presale_status = #{record.presaleStatus}
-            </if>
-            <if test="record.evaluationStatus != null and !&quot;&quot;.equals(record.evaluationStatus)">
-                and evaluation_status = #{record.evaluationStatus}
-            </if>
-            <if test="record.redEnvelopeCode != null and !&quot;&quot;.equals(record.redEnvelopeCode)">
-                and red_envelope_code = #{record.redEnvelopeCode}
-            </if>
-            <if test="record.couponNo != null and !&quot;&quot;.equals(record.couponNo)">
-                and coupon_no = #{record.couponNo}
-            </if>
-            <if test="record.usePoint != null and !&quot;&quot;.equals(record.usePoint)">
-                and use_point = #{record.usePoint}
-            </if>
-            <if test="record.payType != null and !&quot;&quot;.equals(record.payType)">
-                and pay_type = #{record.payType}
-            </if>
-            <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
-                and store_id = #{record.storeId}
-            </if>
-            <if test="record.cancelReson != null and !&quot;&quot;.equals(record.cancelReson)">
-                and cancel_reson = #{record.cancelReson}
-            </if>
-            <if test="record.predepositPay != null and !&quot;&quot;.equals(record.predepositPay)">
-                and predeposit_pay = #{record.predepositPay}
-            </if>
-            <if test="record.source != null and !&quot;&quot;.equals(record.source)">
-                and source = #{record.source}
-            </if>
-            <if test="record.freightTemplateId != null and !&quot;&quot;.equals(record.freightTemplateId)">
-                and freight_template_id = #{record.freightTemplateId}
-            </if>
-            <if test="record.waybillCode != null and !&quot;&quot;.equals(record.waybillCode)">
-                and waybill_code = #{record.waybillCode}
-            </if>
-            <if test="record.orderType != null and !&quot;&quot;.equals(record.orderType)">
-                and order_type = #{record.orderType}
-            </if>
-            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
-                and create_time = #{record.createTime}
-            </if>
-            <if test="record.payTime != null and !&quot;&quot;.equals(record.payTime)">
-                and pay_time = #{record.payTime}
-            </if>
-            <if test="record.deliveryTime != null and !&quot;&quot;.equals(record.deliveryTime)">
-                and delivery_time = #{record.deliveryTime}
-            </if>
-            <if test="record.receivingTime != null and !&quot;&quot;.equals(record.receivingTime)">
-                and receiving_time = #{record.receivingTime}
-            </if>
-            <if test="record.cancelTime != null and !&quot;&quot;.equals(record.cancelTime)">
-                and cancel_time = #{record.cancelTime}
-            </if>
-            <if test="record.modifyTime != null and !&quot;&quot;.equals(record.modifyTime)">
-                and modify_time = #{record.modifyTime}
-            </if>
-            <if test="record.evaluationTime != null and !&quot;&quot;.equals(record.evaluationTime)">
-                and evaluation_time = #{record.evaluationTime}
-            </if>
-            <if test="record.presaleTime != null and !&quot;&quot;.equals(record.presaleTime)">
-                and presale_time = #{record.presaleTime}
-            </if>
-            <if test="record.groupHead != null and !&quot;&quot;.equals(record.groupHead)">
-                and group_head = #{record.groupHead}
-            </if>
-            <if test="record.groupId != null and !&quot;&quot;.equals(record.groupId)">
-                and group_id = #{record.groupId}
-            </if>
-            <if test="record.groupMarketingId != null and !&quot;&quot;.equals(record.groupMarketingId)">
-                and group_marketing_id = #{record.groupMarketingId}
-            </if>
-            <if test="record.groupSkuId != null and !&quot;&quot;.equals(record.groupSkuId)">
-                and group_sku_id = #{record.groupSkuId}
-            </if>
-            <if test="record.groupStatus != null and !&quot;&quot;.equals(record.groupStatus)">
-                and group_status = #{record.groupStatus}
-            </if>
-            <if test="record.groupNum != null and !&quot;&quot;.equals(record.groupNum)">
-                and group_num = #{record.groupNum}
-            </if>
-            <if test="record.openGroupTime != null and !&quot;&quot;.equals(record.openGroupTime)">
-                and open_group_time = #{record.openGroupTime}
-            </if>
-            <if test="record.autoHandleStatus != null and !&quot;&quot;.equals(record.autoHandleStatus)">
-                and auto_handle_status = #{record.autoHandleStatus}
-            </if>
-            <if test="record.recommended != null and !&quot;&quot;.equals(record.recommended)">
-                and recommended = #{record.recommended}
-            </if>
-            <if test="record.crowdfundingId != null and !&quot;&quot;.equals(record.crowdfundingId)">
-                and crowdfunding_id = #{record.crowdfundingId}
-            </if>
-            <if test="record.lotteryStatus != null and !&quot;&quot;.equals(record.lotteryStatus)">
-                and lottery_status = #{record.lotteryStatus}
-            </if>
-            <if test="record.writeOffCode != null and !&quot;&quot;.equals(record.writeOffCode)">
-                and write_off_code = #{record.writeOffCode}
-            </if>
-            <if test="record.communityBuyCustomerId != null and !&quot;&quot;.equals(record.communityBuyCustomerId)">
-                and community_buy_customer_id = #{record.communityBuyCustomerId}
-            </if>
-            <if test="record.communityBuyId != null and !&quot;&quot;.equals(record.communityBuyId)">
-                and community_buy_id = #{record.communityBuyId}
-            </if>
-            <if test="record.profit != null and !&quot;&quot;.equals(record.profit)">
-                and profit = #{record.profit}
-            </if>
-            <if test="record.communityName != null and !&quot;&quot;.equals(record.communityName)">
-                and community_name = #{record.communityName}
-            </if>
-            <if test="record.communityBuyName != null and !&quot;&quot;.equals(record.communityBuyName)">
-                and community_buy_name = #{record.communityBuyName}
-            </if>
-            <if test="record.dealerId != null and !&quot;&quot;.equals(record.dealerId)">
-                and dealer_id = #{record.dealerId}
-            </if>
-            <if test="record.dealerInfo != null and !&quot;&quot;.equals(record.dealerInfo)">
-                and dealer_info = #{record.dealerInfo}
-            </if>
-            <if test="record.payChannel != null and !&quot;&quot;.equals(record.payChannel)">
-                and pay_channel = #{record.payChannel}
-            </if>
-            <if test="record.skuType != null and !&quot;&quot;.equals(record.skuType)">
-                and sku_type = #{record.skuType}
-            </if>
-            <if test="record.jetourSendFlag != null and !&quot;&quot;.equals(record.jetourSendFlag)">
-                and jetour_send_flag = #{record.jetourSendFlag}
-            </if>
-            <if test="record.incomingUrl != null and !&quot;&quot;.equals(record.incomingUrl)">
-                and incoming_url = #{record.incomingUrl}
-            </if>
-        </where>
-        order by id desc
+        select ls_order.*,ls_customer.username as customer_name from ls_order join ls_customer on ls_order.customer_id =
+        ls_customer.id where ls_customer.del_flag = '0'
+        and ls_order.store_id = 0
+        <if test="record.orderCode != null and record.orderCode != '' ">
+            AND ls_order.order_code = #{record.orderCode}
+        </if>
+
+        <if test="record.customerName != null and record.customerName != ''">
+            AND ls_customer.username like CONCAT(CONCAT('%', #{record.customerName}),'%')
+        </if>
+
+
+        <if test="record.customerId != null and record.customerId != ''">
+            AND ls_order.id=#{record.customerId}
+        </if>
+           <if test="record.dealerId != null and record.dealerId != ''">
+            AND ls_order.dealer_id=#{record.dealerId}
+        </if>
+
+        <if test="record.payType != null and record.payType != '' ">
+            AND ls_order.pay_type = #{record.payType}
+        </if>
+
+        <if test='record.status != null and record.status != "" and  record.status!= "5"'>
+            AND ls_order.status = #record.{status}
+        </if>
+        <if test='record.status=="5"'>
+            AND ls_order.status in ('5','6','7')
+            AND ls_order.order_type in ('0','1','2','3','7')
+        </if>
+        <if test="record.startTime!=''and record.startTime!=null">
+            AND ls_order.create_time &gt;=#{record.startTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="record.endTime!=''and record.endTime!=null">
+            AND ls_order.create_time &lt;=#{record.endTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="record.orderType!=null and record.orderType !=''">
+            AND ls_order.order_type=#{record.orderType}
+        </if>
+        <if test='record.status !="5"'>
+            AND ls_order.order_type in ('0','1','2','7')
+        </if>
+        <choose>
+            <when test="record.orderType ==1 ||record.orderType==2">
+                order by ls_order.pay_time desc
+            </when>
+            <otherwise>
+                order by ls_order.create_time desc
+            </otherwise>
+        </choose>
+
     </select>
 
     <!-- 全部查询 -->
@@ -521,6 +390,7 @@
         <include refid="Base_Column_List"/>
         from ls_order
         <where>
+            and del_flag = 'N'
             <if test="id != null and !&quot;&quot;.equals(id)">
                 and id = #{id}
             </if>
@@ -677,6 +547,9 @@
             <if test="communityBuyName != null and !&quot;&quot;.equals(communityBuyName)">
                 and community_buy_name = #{communityBuyName}
             </if>
+            <if test="billNo != null and !&quot;&quot;.equals(billNo)">
+                and bill_no = #{billNo}
+            </if>
             <if test="dealerId != null and !&quot;&quot;.equals(dealerId)">
                 and dealer_id = #{dealerId}
             </if>
@@ -706,6 +579,7 @@
         <include refid="Base_Column_List"/>
         from ls_order
         <where>
+            and del_flag = 'N'
             <if test="id != null and !&quot;&quot;.equals(id)">
                 and id = #{id}
             </if>
@@ -862,6 +736,9 @@
             <if test="communityBuyName != null and !&quot;&quot;.equals(communityBuyName)">
                 and community_buy_name = #{communityBuyName}
             </if>
+            <if test="billNo != null and !&quot;&quot;.equals(billNo)">
+                and bill_no = #{billNo}
+            </if>
             <if test="dealerId != null and !&quot;&quot;.equals(dealerId)">
                 and dealer_id = #{dealerId}
             </if>

+ 14 - 2
pine-common/src/main/java/com/pine/common/utils/RSAUtils.java

@@ -11,6 +11,7 @@ import java.security.interfaces.RSAPublicKey;
 import java.security.spec.InvalidKeySpecException;
 import java.security.spec.PKCS8EncodedKeySpec;
 import java.security.spec.X509EncodedKeySpec;
+import java.text.ParseException;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -24,9 +25,20 @@ public class RSAUtils {
     private final static int MAX_DECRYPT_BLOCK = 128;           //RSA最大解密密文大小
     private final static String KEY_ALGORITHM = "RSA";          //加密算法RSA
     private final static int MAX_ENCRYPT_BLOCK = 117;           //RSA最大加密明文大小
-    public final static String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCHhQ6Px0l+cMR1tRsky0HDlvJD94AbE9Z0UhIZFgtdJ20GRQoV2DO3jQbGMBrM6giEcUCbYcDsnTVUovBrDQit1QtZZ3eKtoqrW7bMT2eX5qQOrZtO2kRkrnWwsxkKHKhn41atEMvSqrVqLgOUDgBhmxREWN93KUYE2adAg62/jQIDAQAB";
-    public final static String privateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIeFDo/HSX5wxHW1GyTLQcOW8kP3gBsT1nRSEhkWC10nbQZFChXYM7eNBsYwGszqCIRxQJthwOydNVSi8GsNCK3VC1lnd4q2iqtbtsxPZ5fmpA6tm07aRGSudbCzGQocqGfjVq0Qy9KqtWouA5QOAGGbFERY33cpRgTZp0CDrb+NAgMBAAECgYBJtT/nSZAamkDweHFsALUjKW1ZNDtT/uUsXRsE0+2YXAI7X7+NhAsU8TpW/wEEpOG/D04BdRiWWScRgpHa17r47joc3U+d40PRsqa34E0uJzqXJTzKZxTakDmI+KReIj+vMbvFo3cV3G5XNHElJEtWNNh4E/O99efd6scReQRKzQJBAMRh5UVwYrRh1FkvZIb+MtRW3ofMexfK/8LWF8xhPfi79NNl64O3HC+x4WPRGQnmdqx/iZFGf87iMvQlRtrQWYcCQQCwqSTn7gollTrZiA4fm22WGVigVQgH22TtUVHp6y23gah6feoONPUU69J8NpdyNhE5htrLMJWqvhzI+y7TrZNLAkAlZX8DeiNRtk95rEy4aC/Fv8Uglw/ZuA58S8i8YsgqVaCJoR74NiZn7re9ClR6TijLMH5B6+rquqh5VZ/oi0SBAkAGSp/T2rhlykDESoImQgTPGav8WcrlbLzVbtX5/LQuGuIDKsTRKLWpvxRJ9C/Ek4Rdhh34qoxJ/mdMCRYL19ytAkA6nDuDvgokt9nx8ldh+mqUCfS0Mn89aTC/C0vzUYUSq/RcAL2EOu1UBMxD6Pzmz6y+HJXEN4AayOgFXyLZw6Rb";
+    public final static String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCAayOirLNs1AGo23bWAbDVoTQke9Kw+z+GhB/FKHtcvKUxAoxk72FZfUXLTab4IyzJno2HPZqpyz75H7rCWSxjDQ3jjIdXaNl62CZdNn6yuU7LNQtaPdluIRZxg5/HNR1jyyBQr5PljT0PRDH0RSVAyO3o/F5RfWx7beDqt+n3TQIDAQAB";
+    public final static String privateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIBrI6Kss2zUAajbdtYBsNWhNCR70rD7P4aEH8Uoe1y8pTECjGTvYVl9RctNpvgjLMmejYc9mqnLPvkfusJZLGMNDeOMh1do2XrYJl02frK5Tss1C1o92W4hFnGDn8c1HWPLIFCvk+WNPQ9EMfRFJUDI7ej8XlF9bHtt4Oq36fdNAgMBAAECgYAqxANFDGBgUKYQ1q1XjY6XRiz4LWg32iQIpv1xig6zDnuwu5mHj5SK2cYhc0W0gvpKVovpSuGzw+S/0ApA6LN391dYWtB/ndRMHH9EzQBqQYeaEibt6/i2KeTS7fY2a1rgK/kFNvFihh6JRPUd4iltQQbFIZqHWXDaQYEkGFZjPQJBAPDp/1f9L93V8gItFlhVb9LehboPNYDg2VlrALoe15/umu+AYuG4bmOSyKV39RiTDsVp3BzH/Az4Gsb92w+ac4cCQQCIdcSgiVQNour9+qtOSFSHziYMO8CsbL0NcxrkrfwsevNtOQu6GPVqPHtKy9bnI7hxMBxmKmvd49kfhZ2XshuLAkB7soorMZMMQjfaqi/Y9zVNfngHSpvcKpcu9GQRLJjmQ2tGIhOjdkEn20wuueMc1RU2g95C4OQn/JQzLFD4OAOtAkBTO7IRUXJJVwQKomj2uLuGkkE22QNuqGyv1XOj5FOaNexgxJjYi/y1Lert9mNAXNNVhsjrsBhXIXD//xneuy59AkEAwhX9aQIuUnaRKOrc7RvcCZhjp0DFfrUz70n9PEAbTKFx7jDsPcRx2Lj6tok3eCw1uRCE99JsxR/fiiMaYcnqLg==";
 
+    public static void main(String[] args) throws ParseException {
+        //     createTime为当前时间 秘钥半小时失效
+        String data = "{\"account\":\"hh\",\"password\":6906,\"erp\":\"12818\",\"dealerId\":6906,\"name\":\"芜湖福瑞汽车销售有限公司\",\"roleType\":\"商城经销商\",\"createTime\":\"1570856401000\"}";
+        String encrypt = RSAUtils.encrypt(RSAUtils.publicKey, data);
+        //   防止URL 传参 + 号丢失
+        System.out.println(encrypt.replace("+", "%2B"));
+
+        String responseString = RSAUtils.decrypt(RSAUtils.privateKey, encrypt);
+
+        System.out.println(responseString);
+    }
 
     /**
      * 加密