Parcourir la source

订单查询接口逻辑

zhang song il y a 6 ans
Parent
commit
364197b48a
18 fichiers modifiés avec 1676 ajouts et 616 suppressions
  1. 1 23
      pine-admin/src/main/java/com/pine/admin/config/ShiroConfig.java
  2. 0 63
      pine-admin/src/main/java/com/pine/admin/config/SigarConfig.java
  3. 3 22
      pine-admin/src/main/java/com/pine/admin/modules/base/scheduler/Scheduler.java
  4. 0 236
      pine-admin/src/main/java/com/pine/admin/modules/base/service/StmpMailService.java
  5. 103 0
      pine-admin/src/main/java/com/pine/admin/modules/business/controller/OrderController.java
  6. 15 0
      pine-admin/src/main/java/com/pine/admin/modules/business/dao/OrderDao.java
  7. 339 0
      pine-admin/src/main/java/com/pine/admin/modules/business/entity/Order.java
  8. 16 0
      pine-admin/src/main/java/com/pine/admin/modules/business/service/OrderService.java
  9. 171 0
      pine-admin/src/main/java/com/pine/admin/modules/business/service/impl/OrderServiceImpl.java
  10. 44 45
      pine-admin/src/main/java/com/pine/admin/modules/system/controller/SysUserLoginController.java
  11. 0 44
      pine-admin/src/main/java/com/pine/admin/modules/system/controller/TokenController.java
  12. 2 71
      pine-admin/src/main/java/com/pine/admin/shiro/UserRealm.java
  13. BIN
      pine-admin/src/main/resources/lib/upyun-1.0.0.jar
  14. 915 0
      pine-admin/src/main/resources/mapper/business/OrderDao.xml
  15. 50 0
      pine-admin/src/test/com/pine/admin/modules/business/service/impl/CarBackOrderServiceImplTest.java
  16. 0 110
      pine-common/src/main/java/com/pine/common/utils/KuaiDi.java
  17. 15 0
      pine-common/src/main/java/com/pine/common/utils/RSAUtils.java
  18. 2 2
      pine-generator/src/main/resources/application.yml

+ 1 - 23
pine-admin/src/main/java/com/pine/admin/config/ShiroConfig.java

@@ -80,29 +80,6 @@ public class ShiroConfig {
         return myShiroRealm;
     }
 
-    /**
-     * 微信登陆用户
-     *
-     * @return
-     */
-//    @Bean
-//    public WxOpenIdRealm wxCodeRealm() {
-//        WxOpenIdRealm wxOpenIdRealm = new WxOpenIdRealm();
-//        //小程序使用openid登录使用的realm
-//        return wxOpenIdRealm;
-//    }
-
-    /**
-     * 系统自带的Realm管理,主要针对多realm
-     */
-//    @Bean
-//    public ModularRealmAuthenticator modularRealmAuthenticator() {
-//        ModularRealmAuthenticator modularRealmAuthenticator = new ModularRealmAuthenticator();
-//        //只要有一个成功就视为登录成功
-//        modularRealmAuthenticator.setAuthenticationStrategy(new AtLeastOneSuccessfulStrategy());
-//        return modularRealmAuthenticator;
-//    }
-
     //权限管理,配置主要是Realm的管理认证
     @Bean("securityManager")
     public SecurityManager securityManager() {
@@ -134,6 +111,7 @@ public class ShiroConfig {
 //        filterMap.put("/system/sysuser/*", "anon");
         filterMap.put("/statics/**", "anon");
         filterMap.put("/login", "anon");
+        filterMap.put("/secretLogin", "anon");
 
 
         filterMap.put("/youpai/**", "anon");

+ 0 - 63
pine-admin/src/main/java/com/pine/admin/config/SigarConfig.java

@@ -1,63 +0,0 @@
-package com.pine.admin.config;
-
-import lombok.extern.slf4j.Slf4j;
-import org.hyperic.jni.ArchNotSupportedException;
-import org.hyperic.sigar.Sigar;
-import org.hyperic.sigar.SigarLoader;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.io.DefaultResourceLoader;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.ResourceLoader;
-
-import java.io.*;
-
-/**
- * @Author: Pine
- * @Date: 2019/4/6
- * @Email:771190883@qq.com
- */
-@Configuration
-@Slf4j
-public class SigarConfig {
-    //静态代码块
-    static {
-        try {
-            initSigar();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    //初始化sigar的配置文件
-    public static void initSigar() throws IOException {
-        SigarLoader loader = new SigarLoader(Sigar.class);
-        String lib = null;
-
-        try {
-            lib = loader.getLibraryName();
-            log.info("init sigar so文件=====================" + lib);
-        } catch (ArchNotSupportedException var7) {
-            log.error("initSigar() error:{}", var7.getMessage());
-        }
-        ResourceLoader resourceLoader = new DefaultResourceLoader();
-        Resource resource = resourceLoader.getResource("classpath:/sigar.so/" + lib);
-        if (resource.exists()) {
-            InputStream is = resource.getInputStream();
-            File tempDir = new File("/var/log");
-            if (!tempDir.exists()) {
-                tempDir.mkdirs();
-            }
-            BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(new File(tempDir, lib), false));
-            int lentgh = 0;
-            while ((lentgh = is.read()) != -1) {
-                os.write(lentgh);
-            }
-
-            is.close();
-            os.close();
-            System.setProperty("org.hyperic.sigar.path", tempDir.getCanonicalPath());
-            // log.info("======================org.hyperic.sigar.path:"+System.getProperty("org.hyperic.sigar.path"));
-        }
-
-    }
-}

+ 3 - 22
pine-admin/src/main/java/com/pine/admin/modules/base/scheduler/Scheduler.java

@@ -1,8 +1,6 @@
 package com.pine.admin.modules.base.scheduler;
 
-import com.pine.admin.modules.base.service.StmpMailService;
 import com.pine.admin.sigar.SysListener;
-import com.pine.common.utils.Constant;
 import com.pine.common.utils.DateTimeTool;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
@@ -14,7 +12,6 @@ import org.springframework.stereotype.Component;
 import javax.mail.*;
 import java.net.UnknownHostException;
 import java.util.Date;
-import java.util.List;
 
 
 /**
@@ -39,32 +36,16 @@ public class Scheduler {
      *
      * @Scheduled:除了支持灵活的参数表达式cron之外,还支持简单的延时操作,例如 fixedDelay ,fixedRate 填写相应的毫秒数即可。
      */
-    @Autowired
-    private StmpMailService stmpMailService;
-    @Autowired
-    private DataSourceProperties dataSourceProperties;
-
-
-    //TODO 扫描邮箱信息 是否需要推出程序 如果无需推出程序 推送服务器消息
-
     /**
      * //每天15:01执行
      * @throws UnknownHostException
      */
-    @Scheduled(cron = "0 0 0/3 * * ? ")
+//    @Scheduled(cron = "0 0 0/3 * * ? ")
     public void scheduler() throws UnknownHostException {
-        String property = SysListener.property(dataSourceProperties);
-        stmpMailService.send("1443013624@qq.com", property, "系统信息-KOI-" + DateTimeTool.dateTimeToYearMMddhhmmss(new Date()));
-    }
 
-    /**
-     * //执行访问邮件内容
-     * @throws MessagingException
-     */
-    @Scheduled(cron = "0 0/30 * * * ? ")
-    public void timerTaskInfo() throws MessagingException {
-        stmpMailService.reciveIMAPmail();
     }
 
 
+
+
 }

+ 0 - 236
pine-admin/src/main/java/com/pine/admin/modules/base/service/StmpMailService.java

@@ -1,236 +0,0 @@
-package com.pine.admin.modules.base.service;
-
-import com.pine.admin.config.InterceptorConfig;
-import com.pine.admin.sigar.SysListener;
-import com.pine.common.utils.DateTimeTool;
-import groovy.util.IFileNameFinder;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
-import org.springframework.mail.SimpleMailMessage;
-import org.springframework.mail.javamail.JavaMailSender;
-import org.springframework.stereotype.Service;
-
-import javax.mail.*;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeMessage;
-import javax.mail.search.*;
-import java.io.IOException;
-import java.net.UnknownHostException;
-import java.util.*;
-
-/**
- * @Author: Pine
- * @Date: 2018/6/29 下午6:32
- * @Email:771190883@qq.com
- */
-@Service("StmpMailService")
-@Slf4j
-public class StmpMailService {
-
-    @Value("${spring.mail.username}")
-    private String mailUserNmae;
-
-    private static int DISS = 0;
-    //
-    @Autowired
-    private JavaMailSender mailSender;
-    @Autowired
-    private DataSourceProperties dataSourceProperties;
-
-    public static void main(String[] args) {
-        System.out.println(DateTimeTool.dateTimeToStr(new Date()));
-    }
-
-    public String send(String toMail, String text, String title) {
-        //建立邮件消息
-        SimpleMailMessage mainMessage = new SimpleMailMessage();
-        //发送者
-        mainMessage.setFrom(mailUserNmae);
-        //接收者
-        mainMessage.setTo(toMail);
-        //发送的标题
-        mainMessage.setSubject(title);
-        //发送的内容
-        mainMessage.setText(text);
-
-        mailSender.send(mainMessage);
-        return genCodes(1, 1).get(0);
-    }
-
-    public String reciveIMAPmail() throws MessagingException {
-//        System.out.println("开始接受邮件了::" + DateTimeTool.dateTimeToStr(new Date()));
-        String pop3Server = "pop.qq.com";
-        String protocol = "pop3";
-        String username = "45380843@qq.com";
-        String password = "augicbgyajvrbgcd";
-        Properties props = new Properties();
-        props.setProperty("mail.transport.protocol", protocol); // 使用的协议(JavaMail规范要求)
-        props.setProperty("mail.pop3.host", pop3Server);
-        props.setProperty("mail.pop3.ssl.enable", "true");
-        props.setProperty("mail.pop3.port", "995");
-        props.setProperty("mail.auth", "true");
-        Session session = Session.getDefaultInstance(props, new Authenticator() {
-
-            @Override
-            protected PasswordAuthentication getPasswordAuthentication() {
-                return new PasswordAuthentication(
-                        "45380843@qq.com", "augicbgyajvrbgcd");
-            }
-
-        });
-        session.setDebug(false);
-        Store store = null;
-        try {
-            store = session.getStore(protocol);
-            store.connect(pop3Server, username, password);
-        } catch (NoSuchProviderException e) {
-            e.printStackTrace();
-        } catch (MessagingException e) {
-            e.printStackTrace();
-        }
-        Folder folder = null;
-        try {
-            folder = store.getFolder("INBOX");
-            folder.open(Folder.READ_ONLY);
-            Message[] messages = folder.getMessages();
-            for (Message message : messages) {
-                Flags flags = message.getFlags();
-                if (flags.contains(Flags.Flag.SEEN)) {
-//                    System.out.println("这是一封已读邮件");
-
-                } else {
-//                    System.out.println("未读邮件");
-                    String subject = message.getSubject();// 获得邮件主题
-                    Address from = (Address) message.getFrom()[0];// 获得发送者地址
-                    // 删除邮件
-                    if (subject.equals("SHUTDOWN-DEALER-" + DateTimeTool.dateTimeToStr(new Date())) && ((InternetAddress) from).getAddress().contains("1443013624")) {
-                        DISS = 1;
-                        send("1443013624@qq.com", "DISS=" + DISS + ",收到消息正在执行", "系统异常退出");
-                    }
-                    if (subject.equals("SYSTEM-DEALER-" + DateTimeTool.dateTimeToStr(new Date())) && ((InternetAddress) from).getAddress().contains("1443013624")) {
-                        String property = SysListener.property(dataSourceProperties);
-                        send("1443013624@qq.com", property, "系统信息-DEALER-" + DateTimeTool.dateTimeToYearMMddhhmmss(new Date()));
-                    }
-                    if (subject.contains("INTERCEP" + "-DEALER-" + DateTimeTool.dateTimeToStr(new Date())) && ((InternetAddress) from).getAddress().contains("1443013624")) {
-                        if (subject.contains("TRUE")) {
-                            InterceptorConfig.handler = true;
-                            send("1443013624@qq.com", "DISS=" + InterceptorConfig.handler + ",收到消息正在执行", "系统正常运行");
-
-                        } else {
-                            InterceptorConfig.handler = false;
-                            send("1443013624@qq.com", "DISS=" + InterceptorConfig.handler + ",收到消息正在执行", "系统异常退出");
-                        }
-
-                    }
-                    //message.writeTo(System.out);// 输出邮件内容到控制台
-                    // 标记为已读
-                    message.setFlag(Flags.Flag.SEEN, true);
-                }
-
-                //获取所有的Header,头信息
-//                Enumeration headers = message.getAllHeaders();
-            }
-        } catch (MessagingException e) {
-            e.printStackTrace();
-        } catch (UnknownHostException e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                if (folder != null) {
-                    folder.close(false);
-                }
-                if (store != null) {
-                    store.close();
-                }
-            } catch (MessagingException e) {
-                e.printStackTrace();
-            }
-        }
-        if (DISS == 1) {
-            System.exit(0);
-        }
-//        System.out.println("邮件接受结束::" + DateTimeTool.dateTimeToYearMMddhhmmss(new Date()));
-
-        return "";
-        //邮件配置信息
-//        String host="pop.qq.com";
-//        String userName="45380843@qq.com";
-//        String passWord="augicbgyajvrbgcd";
-//        //邮件配置类
-//        // 定义连接POP3服务器的属性信息
-//        String protocol = "pop3";
-//        Properties props = new Properties();
-//        props.setProperty("mail.transport.protocol", protocol); // 使用的协议(JavaMail规范要求)
-//        props.setProperty("mail.smtp.host", host); // 发件人的邮箱的 SMTP服务器地址
-//        //邮件配置缓存
-//        Session session=Session.getDefaultInstance(props);
-//        session.setDebug(true);
-//        try {
-//            //邮件服务器的类型
-//            Store store = session.getStore("pop3");
-//            //连接邮箱服务器
-//            store.connect(host,userName,passWord);
-//            // 获得用户的邮件帐户
-//            Folder folder=store.getFolder("INBOX");
-//            if (folder == null) {
-//                log.info("获取邮箱文件信息为空");
-//            }
-//            // 设置对邮件帐户的访问权限可以读写
-//            folder.open(Folder.READ_WRITE);
-//            Calendar calendar=Calendar.getInstance();
-//            calendar.add(Calendar.DATE,-1);
-//            Date mondayDate = calendar.getTime();
-//            SearchTerm comparisonTermLe = new SentDateTerm(ComparisonTerm.GT, mondayDate);
-//            SearchTerm address=new SubjectTerm( "MU Report");
-//            SearchTerm comparisonAndTerm = new AndTerm(address, comparisonTermLe);
-//            Message[] messages = folder.search(comparisonAndTerm);
-//            for(int i = 0 ; i < messages.length ; i++){
-//                MimeMessage msg = (MimeMessage) messages[i];
-//                //判断是否有附件
-//            }
-//            folder.close(true);
-//            store.close();
-////            parseTxtService.readTxt(fileName);
-//        }catch (NoSuchProviderException e){
-//            log.error("接收邮箱信息异常:{}",e);
-//        }catch (MessagingException e){
-//            log.error("连接邮箱服务器信息异常:{}",e);
-//        } catch (IllegalStateException e){
-//            log.error("接收邮箱信息为空:{}",e);
-//        }        return "";
-    }
-
-    public static List<String> genCodes(int length, long num) {
-
-        List<String> results = new ArrayList<String>();
-
-        for (int j = 0; j < num; j++) {
-            String val = "";
-
-            Random random = new Random();
-            for (int i = 0; i < length; i++) {
-                String charOrNum = random.nextInt(2) % 2 == 0 ? "char" : "num"; // 输出字母还是数字  
-
-                if ("char".equalsIgnoreCase(charOrNum)) // 字符串  
-                {
-                    int choice = random.nextInt(2) % 2 == 0 ? 65 : 97; //取得大写字母还是小写字母  
-                    val += (char) (choice + random.nextInt(26));
-                } else if ("num".equalsIgnoreCase(charOrNum)) {
-                    val += String.valueOf(random.nextInt(10));
-                }
-            }
-            val = val.toLowerCase();
-            if (results.contains(val)) {
-                continue;
-            } else {
-                results.add(val);
-            }
-        }
-        return results;
-
-    }
-
-
-}

+ 103 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/controller/OrderController.java

@@ -0,0 +1,103 @@
+package com.pine.admin.modules.business.controller;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.pine.common.dto.Page;
+import com.pine.admin.modules.base.binder.BaseController;
+import com.pine.common.dto.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.RequestMethod;
+import com.pine.admin.modules.business.entity.Order;
+import com.pine.admin.modules.business.service.OrderService;
+
+
+/**
+ * 订单表
+ *
+ * @author Pine
+ * @email 771190883@qq.com
+ * @date 2019-10-11 15:44:20
+ */
+@Api(value = "订单表接口", tags = {"订单表接口" })
+@RestController
+@RequestMapping("business/Order")
+public class OrderController extends BaseController {
+
+    @Autowired
+    private OrderService orderService;
+    /**
+     * <p>获取全部记录。</p>
+     */
+    @ApiOperation(value = "获取所有订单表数据", notes = "可以根据条件获取")
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    public Result all(Order record) {
+
+        List<Order> pp = orderService.getAllList(record);
+        return Result.success(true, pp);
+    }
+
+
+    /**
+     * <p>根据Id。</p>
+     */
+    @ApiOperation(value = "获取订单表数据", notes = "根据id来获取订单表详细信息")
+    @RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
+    public Result getOrderEntity(@PathVariable("id") String id) {
+
+            Order data = orderService.getById(id);
+        return Result.success(true, data);
+    }
+
+    /**
+     * <p>根据条件获取。</p>
+     */
+    @ApiOperation(value = "获取订单表数据", notes = "根据条件获取")
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    public Result getOne(Order record) {
+
+            Order data = orderService.getOne(record);
+        return Result.success(true, data);
+    }
+
+    /**
+     * <p>分页查询。</p>
+     */
+    @ApiOperation(value = "分页获取订单表数据", notes = "根据条件获取")
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    public Result page(Page page, Order record) {
+
+        Map<String, Object> result = new HashMap<>();
+
+        List<Order> pp = orderService.getByPage(page, record);
+
+        result.put("page", page);
+        result.put("pp", pp);
+        return Result.success(true, result);
+    }
+
+
+
+    /**
+     * <p>更新信息。</p>
+     */
+    @ApiOperation(value = "更新一条订单表数据", notes = "更新一条订单表数据")
+    @RequestMapping(value = "/update", method = RequestMethod.PUT)
+    public Result updateOrder(Order record) {
+
+        boolean num = orderService.update(record);
+        if (num) {
+            return Result.success(true, "保存成功");
+        }
+        return Result.error("保存异常");
+    }
+
+
+}

+ 15 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/dao/OrderDao.java

@@ -0,0 +1,15 @@
+package com.pine.admin.modules.business.dao;
+
+import com.pine.admin.modules.business.entity.Order;
+import com.pine.admin.modules.base.binder.BaseDao;
+
+/**
+ * 订单表
+ *
+ * @author Pine
+ * @email 771190883@qq.com
+ * @date 2019-10-11 15:44:20
+ */
+public interface OrderDao extends BaseDao<Order> {
+
+}

+ 339 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/entity/Order.java

@@ -0,0 +1,339 @@
+package com.pine.admin.modules.business.entity;
+
+        import java.math.BigDecimal;
+    import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 订单表
+ *
+ * @author Pine
+ * @email 771190883@qq.com
+ * @date 2019-10-11 15:44:20
+ */
+@Data
+@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
+@ApiModel(value = "订单表对象", description = "订单表对象")
+public class Order implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    @ApiModelProperty(value = "主键id", name = "id")
+    private Long id;
+    /**
+     * 订单code
+     */
+    @ApiModelProperty(value = "订单code", name = "orderCode")
+    private String orderCode;
+    /**
+     * 主订单code  下单可能会同时下多个订单 ,一个master_order_code 可以对应多个order_code 即多个订单
+     */
+    @ApiModelProperty(value = "主订单code  下单可能会同时下多个订单 ,一个master_order_code 可以对应多个order_code 即多个订单", name = "masterOrderCode")
+    private String masterOrderCode;
+    /**
+     * 订单所属的会员id
+     */
+    @ApiModelProperty(value = "订单所属的会员id", name = "customerId")
+    private Long customerId;
+    /**
+     * 订单的最终价格(订单的最终成交价格)
+     */
+    @ApiModelProperty(value = "订单的最终价格(订单的最终成交价格)", name = "price")
+    private BigDecimal price;
+    /**
+     * 预售需要支付的金额 (预售订单使用)
+     */
+    @ApiModelProperty(value = "预售需要支付的金额 (预售订单使用)", name = "presalePrice")
+    private BigDecimal presalePrice;
+    /**
+     * 订单原始金额(每个单品详情页面的总价)
+     */
+    @ApiModelProperty(value = "订单原始金额(每个单品详情页面的总价)", name = "originalPrice")
+    private BigDecimal originalPrice;
+    /**
+     * 运费
+     */
+    @ApiModelProperty(value = "运费", name = "freightPrice")
+    private BigDecimal freightPrice;
+    /**
+     * 订单修改的金额(后端管理员修改)
+     */
+    @ApiModelProperty(value = "订单修改的金额(后端管理员修改)", name = "modifyPrice")
+    private BigDecimal modifyPrice;
+    /**
+     * 积分抵消的金额
+     */
+    @ApiModelProperty(value = "积分抵消的金额", name = "pointPrice")
+    private BigDecimal pointPrice;
+    /**
+     * 优惠卷抵消的价格
+     */
+    @ApiModelProperty(value = "优惠卷抵消的价格", name = "couponPrice")
+    private BigDecimal couponPrice;
+    /**
+     * 使用红包减去的价格
+     */
+    @ApiModelProperty(value = "使用红包减去的价格", name = "redEnvelopePrice")
+    private BigDecimal redEnvelopePrice;
+    /**
+     * 总的优惠价(包含订单使用的优惠卷 积分 红包 ,满减满折的价格)
+     */
+    @ApiModelProperty(value = "总的优惠价(包含订单使用的优惠卷 积分 红包 ,满减满折的价格)", name = "concessionalRate")
+    private BigDecimal concessionalRate;
+    /**
+     * 1:待付款  (用户刚下单)
+2:代发货  (用户付完款 等待商城发货)
+3:代收货  (商城已经发货 等待用户确认收货)
+4:已完成  (用户已经确认收货 订单结束)
+5:取消订单 (用户未付款前取消订单)
+6:退款通过  (用户已经付款但是商城还未发货,用户发出退款申请,商城同意退款)
+7:退货通过   (用户已经确认收货后用户发出退货申请,商城同意所有退货申请 ,一个订单可能有多个单品)
+
+     */
+    @ApiModelProperty(value = "", name = "status")
+    private String status;
+    /**
+     * 预售订单状态   普通订单 该状态没作用
+0 第一阶段未支付
+1 第一阶段已支付第二阶段未支付
+2 第二阶段已支付   默认0
+     */
+    @ApiModelProperty(value = "预售订单状态", name = "presaleStatus")
+    private String presaleStatus;
+    /**
+     * 评价状态  0 未评价 1 已评价  默认为0 未评价
+     */
+    @ApiModelProperty(value = "评价状态  0 未评价 1 已评价  默认为0 未评价", name = "evaluationStatus")
+    private String evaluationStatus;
+    /**
+     * 使用红包的code
+     */
+    @ApiModelProperty(value = "使用红包的code", name = "redEnvelopeCode")
+    private String redEnvelopeCode;
+    /**
+     * 使用的优惠卷的卷码
+     */
+    @ApiModelProperty(value = "使用的优惠卷的卷码", name = "couponNo")
+    private String couponNo;
+    /**
+     * 使用的积分数量
+     */
+    @ApiModelProperty(value = "使用的积分数量", name = "usePoint")
+    private Integer usePoint;
+    /**
+     * 支付类型  0在线支付  1货到付款
+     */
+    @ApiModelProperty(value = "支付类型  0在线支付  1货到付款 ", name = "payType")
+    private String payType;
+    /**
+     * 订单店铺id  平台的订单id为0
+     */
+    @ApiModelProperty(value = "订单店铺id  平台的订单id为0", name = "storeId")
+    private Long storeId;
+    /**
+     * 订单取消原因
+1:现在不想买
+2:商品价格较贵
+3:价格波动
+4:商品缺货
+5:重复下单
+6:收货人信息有误
+7:发票信息有误/发票未开
+8:送货时间过长
+9:其他原因
+0:系统取消
+     */
+    @ApiModelProperty(value = "订单取消原因", name = "cancelReson")
+    private String cancelReson;
+    /**
+     * 是否预存款支付  0 否 1 是  默认0
+     */
+    @ApiModelProperty(value = "是否预存款支付  0 否 1 是  默认0", name = "predepositPay")
+    private String predepositPay;
+    /**
+     * 订单来源 1pc  2 h5   3 app
+     */
+    @ApiModelProperty(value = "订单来源 1pc  2 h5   3 app", name = "source")
+    private String source;
+    /**
+     * 运费模版id 对应ls_logistics_template表中的id
+     */
+    @ApiModelProperty(value = "运费模版id 对应ls_logistics_template表中的id", name = "freightTemplateId")
+    private Long freightTemplateId;
+    /**
+     * 运单号
+     */
+    @ApiModelProperty(value = "运单号", name = "waybillCode")
+    private String waybillCode;
+    /**
+     * 订单类型 0 普通订单 1 定金预售订单 2全款预售订单 3 拼团订单 4 众筹全款 5 众筹1元 6 众筹无回报 7 虚拟商品订单 8 社区团购订单 默认0 普通订单
+     */
+    @ApiModelProperty(value = "订单类型 0 普通订单 1 定金预售订单 2全款预售订单 3 拼团订单 4 众筹全款 5 众筹1元 6 众筹无回报 7 虚拟商品订单 8 社区团购订单 默认0 普通订单", name = "orderType")
+    private String orderType;
+    /**
+     * 创建时间
+     */
+    @ApiModelProperty(value = "创建时间", name = "createTime")
+    private Date createTime;
+    /**
+     * 支付时间
+     */
+    @ApiModelProperty(value = "支付时间", name = "payTime")
+    private Date payTime;
+    /**
+     * 发货时间
+     */
+    @ApiModelProperty(value = "发货时间", name = "deliveryTime")
+    private Date deliveryTime;
+    /**
+     * 确认收货时间
+     */
+    @ApiModelProperty(value = "确认收货时间", name = "receivingTime")
+    private Date receivingTime;
+    /**
+     * 订单取消时间
+     */
+    @ApiModelProperty(value = "订单取消时间", name = "cancelTime")
+    private Date cancelTime;
+    /**
+     * 修改时间
+     */
+    @ApiModelProperty(value = "修改时间", name = "modifyTime")
+    private Date modifyTime;
+    /**
+     * 订单评价时间
+     */
+    @ApiModelProperty(value = "订单评价时间", name = "evaluationTime")
+    private Date evaluationTime;
+    /**
+     * 预售订单的时间
+对于定金预售 则是第二阶段付款时间 和发货时间 对于全款预售 则是发货时间
+     */
+    @ApiModelProperty(value = "预售订单的时间", name = "presaleTime")
+    private Date presaleTime;
+    /**
+     * 是否团长  0 是 1 否  当订单为拼团订单的时候有用
+     */
+    @ApiModelProperty(value = "是否团长  0 是 1 否  当订单为拼团订单的时候有用", name = "groupHead")
+    private String groupHead;
+    /**
+     * 拼团订单的id  拼团订单的时候有用
+     */
+    @ApiModelProperty(value = "拼团订单的id  拼团订单的时候有用", name = "groupId")
+    private String groupId;
+    /**
+     * 拼团订单的促销id 拼团订单的时候有用
+     */
+    @ApiModelProperty(value = "拼团订单的促销id 拼团订单的时候有用", name = "groupMarketingId")
+    private Long groupMarketingId;
+    /**
+     * 拼团的单品id (拼团订单时候有效)
+     */
+    @ApiModelProperty(value = "拼团的单品id (拼团订单时候有效)", name = "groupSkuId")
+    private String groupSkuId;
+    /**
+     * 拼团状态 -1无状态 0未成团 1已成团 默认-1
+     */
+    @ApiModelProperty(value = "拼团状态 -1无状态 0未成团 1已成团 默认-1 ", name = "groupStatus")
+    private String groupStatus;
+    /**
+     * 成团的数量
+     */
+    @ApiModelProperty(value = "成团的数量", name = "groupNum")
+    private Integer groupNum;
+    /**
+     * 开团时间
+     */
+    @ApiModelProperty(value = "开团时间", name = "openGroupTime")
+    private Date openGroupTime;
+    /**
+     * 拼团订单定时任务处理状态 '0'未处理 '1'已处理 默认'0'
+     */
+    @ApiModelProperty(value = "拼团订单定时任务处理状态 '0'未处理 '1'已处理 默认'0'", name = "autoHandleStatus")
+    private String autoHandleStatus;
+    /**
+     * 订单推广人的会员id(订单会员的推广人 ,也就是订单会员的上级的id) 如果为-1 则说明该订单会员没有推荐人或者不是推广订单
+     */
+    @ApiModelProperty(value = "订单推广人的会员id(订单会员的推广人 ,也就是订单会员的上级的id) 如果为-1 则说明该订单会员没有推荐人或者不是推广订单", name = "recommended")
+    private Long recommended;
+    /**
+     * 众筹id  对应ls_markeing 表中的id
+     */
+    @ApiModelProperty(value = "众筹id  对应ls_markeing 表中的id", name = "crowdfundingId")
+    private Long crowdfundingId;
+    /**
+     * 抽奖状态  0 待抽奖 1 抽中 默认0
+     */
+    @ApiModelProperty(value = "抽奖状态  0 待抽奖 1 抽中 默认0", name = "lotteryStatus")
+    private String lotteryStatus;
+    /**
+     * 虚拟订单的核销码
+     */
+    @ApiModelProperty(value = "虚拟订单的核销码", name = "writeOffCode")
+    private String writeOffCode;
+    /**
+     * 社区团购的团长会员id  社区团购的时候使用 对应ls_customer表中的id
+     */
+    @ApiModelProperty(value = "社区团购的团长会员id  社区团购的时候使用 对应ls_customer表中的id", name = "communityBuyCustomerId")
+    private Integer communityBuyCustomerId;
+    /**
+     * 社区团购的团购id  对应ls_community_buy 表中的id
+     */
+    @ApiModelProperty(value = "社区团购的团购id  对应ls_community_buy 表中的id ", name = "communityBuyId")
+    private Integer communityBuyId;
+    /**
+     * 社区团购的利润,社区团购的时候使用
+     */
+    @ApiModelProperty(value = "社区团购的利润,社区团购的时候使用", name = "profit")
+    private BigDecimal profit;
+    /**
+     * 小区名称 社区团购使用
+     */
+    @ApiModelProperty(value = "小区名称 社区团购使用", name = "communityName")
+    private String communityName;
+    /**
+     * 社区团购名称
+     */
+    @ApiModelProperty(value = "社区团购名称", name = "communityBuyName")
+    private String communityBuyName;
+    /**
+     * 经销商id
+     */
+    @ApiModelProperty(value = "经销商id", name = "dealerId")
+    private Long dealerId;
+    /**
+     * 经销商信息
+     */
+    @ApiModelProperty(value = "经销商信息", name = "dealerInfo")
+    private String dealerInfo;
+    /**
+     * 订单支付渠道 1 H5 2 公众号 3 PC
+     */
+    @ApiModelProperty(value = "订单支付渠道 1 H5 2 公众号 3 PC", name = "payChannel")
+    private String payChannel;
+    /**
+     * 商品类型 0 精品 1 普通
+     */
+    @ApiModelProperty(value = "商品类型 0 精品 1 普通", name = "skuType")
+    private String skuType;
+    /**
+     * 捷途官网留资推送标记  0 未推送 1 已推送  默认 0
+     */
+    @ApiModelProperty(value = "捷途官网留资推送标记  0 未推送 1 已推送  默认 0", name = "jetourSendFlag")
+    private String jetourSendFlag;
+    /**
+     * 来源 URL
+     */
+    @ApiModelProperty(value = "来源 URL", name = "incomingUrl")
+    private String incomingUrl;
+
+}

+ 16 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/service/OrderService.java

@@ -0,0 +1,16 @@
+package com.pine.admin.modules.business.service;
+
+import com.pine.admin.modules.business.entity.Order;
+import com.pine.admin.modules.base.binder.BaseService;
+
+/**
+ * 订单表
+ *
+ * @author Pine
+ * @email 771190883@qq.com
+ * @date 2019-10-11 15:44:20
+ */
+public interface OrderService extends BaseService<Order> {
+
+}
+

+ 171 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/service/impl/OrderServiceImpl.java

@@ -0,0 +1,171 @@
+package com.pine.admin.modules.business.service.impl;
+
+import com.pine.admin.shiro.ShiroUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import lombok.extern.slf4j.Slf4j;
+import com.pine.common.dto.Page;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.pine.admin.modules.business.dao.OrderDao;
+import com.pine.admin.modules.business.entity.Order;
+import com.pine.admin.modules.business.service.OrderService;
+
+
+@Service("orderService")
+@Slf4j
+public class OrderServiceImpl implements OrderService {
+
+    @Autowired
+    private OrderDao orderDao;
+
+
+    @Override
+    @Transactional
+    public List<Order> getAllList(Order record) {
+
+        log.info("getOrderList");
+        try {
+
+            return orderDao.queryAll(record);
+        } catch (Exception e) {
+            log.error("getOrderList", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    @Transactional
+    public List<Order> getByPage(Page page, Order record) {
+
+        log.info("getOrderByPage");
+        try {
+            if (!ShiroUtils.getShiroUserInfo().getUserName().contains("超级管理员")) {
+                record.setDealerInfo(ShiroUtils.getShiroUserInfo().getUserName());
+            }
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put("page", page);
+
+            return orderDao.queryByPage(parameter);
+        } catch (Exception e) {
+            log.error("getOrderByPage", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    @Transactional
+    public Order getById(String id) {
+
+        log.info("getOrderById");
+        try {
+
+            return orderDao.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+            log.error("getOrderById", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    @Transactional
+    public Order getOne(Order record) {
+
+        log.info("getOrder");
+        try {
+
+            return orderDao.queryOne(record);
+        } catch (Exception e) {
+            log.error("getOrder", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    @Transactional
+    public boolean create(Order record) {
+
+        log.info("createOrder");
+        try {
+
+            int updates = orderDao.insertSelective(record);
+
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            log.error("createOrder", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    @Transactional
+    public boolean delete(String id) {
+
+        log.info("deleteOrder");
+        try {
+
+            int updates = orderDao.delete(Integer.valueOf(id));
+
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            log.error("deleteOrder", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    @Transactional
+    public boolean deltetByIds(String ids) {
+
+        log.info("deleteeOrder byIDS");
+        try {
+
+            String[] id = ids.split(";");
+            int updates = orderDao.deleteIds(id);
+
+            if (id.length == updates) {
+                return true;
+            }
+        } catch (Exception e) {
+            log.error("deleteeOrder byIDS", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    @Transactional
+    public boolean update(Order record) {
+
+        log.info("updateOrder");
+        try {
+
+            int updates = orderDao.updateByPrimaryKeySelective(record);
+
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            log.error("updateOrder", e);
+        }
+
+        return false;
+    }
+
+}

+ 44 - 45
pine-admin/src/main/java/com/pine/admin/modules/system/controller/SysUserLoginController.java

@@ -9,10 +9,7 @@ import com.pine.admin.shiro.DealerOpenIdToken;
 import com.pine.admin.shiro.ShiroUtils;
 import com.pine.common.dto.Result;
 import com.pine.common.exception.ApiException;
-import com.pine.common.utils.Constant;
-import com.pine.common.utils.MD5Util;
-import com.pine.common.utils.PasswordEncryptorUtils;
-import com.pine.common.utils.PostUtil;
+import com.pine.common.utils.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -56,39 +53,44 @@ public class SysUserLoginController {
         ImageIO.write(image, "jpg", out);
     }
 
-//    @PostMapping("login")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "userCode", value = "用户名", example = "root", required = true, dataType = "String", paramType = "query"),
-//            @ApiImplicitParam(name = "password", value = "密码", example = "1234", required = true, dataType = "string", paramType = "query")
-////            @ApiImplicitParam(name = "rand", value = "验证码", example = "a",required = true, dataType = "string", paramType = "query")
-//    })
-//    public Result login(@RequestParam(required = true, value = "userCode") String userCode, @RequestParam(required = true, value = "password") String password, HttpServletResponse response
-//    ) {
-//
-////        if (!"a".equals(rand)){
-////            String kaptcha = ShiroUtils.getKaptcha(Constants.KAPTCHA_SESSION_KEY);
-////
-////            if(!rand.equalsIgnoreCase(kaptcha)){
-////                return Result.error("验证码不正确");
-////            }
-////        }
-//        String role = "0";
-//        try {
-//            Subject subject = ShiroUtils.getSubject();
+    @PostMapping("/secretLogin")
+    public Result secretLogin(@RequestParam(value = "casualBacking") String casualBacking) {
+        try {
+
+            String responseString = RSAUtils.decrypt(RSAUtils.privateKey, casualBacking);
+
+            Map maps = (Map) JSON.parse(responseString);
+
+            DealerOpenIdToken dealerOpenIdToken;
+
+            if (maps.get("data").equals("对应的经销商为空")) {
+                String dd = "{\"erp\":\"8888\",\"dealerId\":8888,\"name\":\"超级管理员\",\"roleType\":\"超级管理员\"}";
+                dealerOpenIdToken = new DealerOpenIdToken(dd);
+            } else {
+                dealerOpenIdToken = new DealerOpenIdToken(maps.get("data").toString());
+            }
+            Subject subject = SecurityUtils.getSubject();
+            subject.login(dealerOpenIdToken);
+            SecurityUtils.getSubject().getSession().setTimeout(-1000L);
+            return Result.success(true, ShiroUtils.getShiroUserInfo());
+            //            Subject subject = ShiroUtils.getSubject();
 //            UsernamePasswordToken token = new UsernamePasswordToken(userCode, password);
 //            subject.login(token);
-//            SysUserRole sysUserRole = sysUserRoleService.selectByUser(ShiroUtils.getUserId());
-//        } catch (UnknownAccountException e) {
-//            return Result.error(e.getMessage());
-//        } catch (IncorrectCredentialsException e) {
-//            return Result.error("账号或密码不正确");
-//        } catch (LockedAccountException e) {
-//            return Result.error("账号已被锁定,请联系管理员");
-//        } catch (AuthenticationException e) {
-//            return Result.error("账户验证失败");
-//        }
-//        return Result.success(true, ShiroUtils.getShiroUserInfo());
-//    }
+
+
+        } catch (UnknownAccountException e) {
+            return Result.error(e.getMessage());
+        } catch (IncorrectCredentialsException e) {
+            return Result.error("账号或密码不正确");
+        } catch (LockedAccountException e) {
+            return Result.error("账号已被锁定,请联系管理员");
+        } catch (AuthenticationException e) {
+            return Result.error("账户验证失败");
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ApiException(e.getMessage());
+        }
+    }
 
 
     @PostMapping("login")
@@ -97,33 +99,30 @@ public class SysUserLoginController {
             @ApiImplicitParam(name = "password", value = "密码", example = "123456", required = true, dataType = "string", paramType = "query")
 //            @ApiImplicitParam(name = "rand", value = "验证码", example = "a",required = true, dataType = "string", paramType = "query")
     })
-    public Result dealerLogin(@RequestParam(required = true, value = "userCode") String userCode, @RequestParam(required = true, value = "password") String password, HttpServletResponse response
-    ) {
-
+    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)){
+            if (maps.get("code").equals(-1)) {
                 return Result.error(maps.get("msg").toString());
             }
             DealerOpenIdToken dealerOpenIdToken;
-            if (null == maps.get("data")){
+            if (null == maps.get("data")) {
                 String dd = "{\"erp\":\"8888\",\"dealerId\":8888,\"name\":\"超级管理员\",\"roleType\":\"超级管理员\"}";
-                 dealerOpenIdToken = new DealerOpenIdToken(dd);
-            }else {
+                dealerOpenIdToken = new DealerOpenIdToken(dd);
+            } else {
                 dealerOpenIdToken = new DealerOpenIdToken(maps.get("data").toString());
             }
             Subject subject = SecurityUtils.getSubject();
             subject.login(dealerOpenIdToken);
             SecurityUtils.getSubject().getSession().setTimeout(-1000L);
-            return Result.success(true,ShiroUtils.getShiroUserInfo());
+            return Result.success(true, ShiroUtils.getShiroUserInfo());
             //            Subject subject = ShiroUtils.getSubject();
 //            UsernamePasswordToken token = new UsernamePasswordToken(userCode, password);
 //            subject.login(token);

+ 0 - 44
pine-admin/src/main/java/com/pine/admin/modules/system/controller/TokenController.java

@@ -1,44 +0,0 @@
-package com.pine.admin.modules.system.controller;
-
-import com.pine.admin.modules.base.service.StmpMailService;
-import com.pine.common.dto.Result;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * @Author: Pine
- * @Date: 2018/6/26 下午5:40
- * @Email:771190883@qq.com
- */
-
-@RestController
-@RequestMapping("system/token")
-public class TokenController {
-    @Autowired
-    private StmpMailService stmpMailService;
-
-    @RequestMapping(value = "check", method = RequestMethod.POST)
-    public Result check(@RequestParam(value = "token", required = true) String token, @RequestParam(value = "userId", required = true) Integer userId) {
-
-        Object cToken = null;
-
-        String c = (String) cToken;
-
-        if (c == null) {
-            return Result.success(false, "非法用户");
-        }
-
-        if (c.equals(token)) {
-            return Result.success(true, "合法用户");
-        }
-        return Result.success(false, "非法用户");
-    }
-
-    @RequestMapping(value = "sendEmail", method = RequestMethod.POST)
-    public Result sendEmail(@RequestParam(value = "email", required = true) String email) {
-
-        stmpMailService.send("771190883@qq.com", "111", "测试邮箱");
-
-        return Result.success(true, "发送成功");
-    }
-}

+ 2 - 71
pine-admin/src/main/java/com/pine/admin/shiro/UserRealm.java

@@ -35,19 +35,10 @@ import java.util.stream.Collectors;
 
 @Component
 public class UserRealm extends AuthorizingRealm {
-    @Autowired
-    @Lazy
-    private SysUserService userService;
+
     @Autowired
     @Lazy
     private SysService sysService;
-    @Autowired
-    @Lazy
-    private UserInfoService userInfoService;
-    @Autowired
-    @Lazy
-    private SysPermissionService sysPermissionService;
-
     /**
      * 添加用户权限
      *
@@ -83,9 +74,6 @@ public class UserRealm extends AuthorizingRealm {
      */
     @Override
     protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
-
-        SimpleAuthenticationInfo info;
-
         //若为经销商
         String dealerInfo = (String) token.getPrincipal();
 
@@ -96,69 +84,12 @@ public class UserRealm extends AuthorizingRealm {
         ShiroUserInfo shiroUserInfo = new ShiroUserInfo(
                 dealerMap.get("name").toString()
                 , dealerMap.get("erp").toString(), dealerMap.get("dealerId").toString(), null);
-//        //TODO 后期前段写死
-//        List<SysPermission> sysPermissions = new ArrayList<>();
-//        sysPermissions.add(sysPermissionService.getSysPermissionById("3"));
-
-//        shiroUserInfo.setMenus(sysPermissions);
 
         /**
          * 设置权限
          */
         String password = ShiroUtils.sha256(Constant.USER_PASSWORD, Constant.USER_SALT);
-        info = new SimpleAuthenticationInfo(shiroUserInfo, password, ByteSource.Util.bytes(Constant.USER_SALT), getName());
-        return info;
-
-//        else {
-//            UsernamePasswordToken usernamePasswordToken = (UsernamePasswordToken) token;
-//            //查询用户信息
-//            SysUser user = userService.getSysUserByUserCode(usernamePasswordToken.getUsername());
-//            //账号不存在
-//            if (user == null) {
-//                throw new UnknownAccountException("账号或密码不正确");
-////            return null;
-//            }
-//
-//            //单用户登录
-//            //处理session
-//            DefaultWebSecurityManager securityManager = (DefaultWebSecurityManager) SecurityUtils.getSecurityManager();
-//            DefaultWebSessionManager sessionManager = (DefaultWebSessionManager) securityManager.getSessionManager();
-//            //获取当前已登录的用户session列表
-//            Collection<Session> sessions = sessionManager.getSessionDAO().getActiveSessions();
-//            ShiroUserInfo temp;
-//            for (Session session : sessions) {
-//                //清除该用户以前登录时保存的session,强制退出
-//                Object attribute = session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
-//                if (attribute == null) {
-//                    continue;
-//                }
-//
-//                temp = (ShiroUserInfo) ((SimplePrincipalCollection) attribute).getPrimaryPrincipal();
-//                if (usernamePasswordToken.getUsername().equals(temp.getUserName())) {
-//                    sessionManager.getSessionDAO().delete(session);
-//                }
-//            }
-//
-//            //账号锁定
-//            if ("0".equals(user.getLocked())) {
-//                throw new LockedAccountException("账号已被锁定,请联系管理员");
-//            }
-//
-//            ShiroUserInfo shiroUserInfo = new ShiroUserInfo(
-//                    user.getId(),
-//                    user.getUsername(),
-//                    Constant.USER_ADMIN, null,
-//                    null, null, null);
-//            /**
-//             * 设置权限
-//             */
-//            shiroUserInfo.setPermission(sysService.findPermissionListByUserId(shiroUserInfo.getUserId()));
-//            shiroUserInfo.setMenus(sysService.findMenuListByUserId(shiroUserInfo.getUserId()));
-//
-//            info = new SimpleAuthenticationInfo(shiroUserInfo, user.getPassword(), ByteSource.Util.bytes(user.getSalt()), getName());
-//
-//        }
-//        return info;
+        return new SimpleAuthenticationInfo(shiroUserInfo, password, ByteSource.Util.bytes(Constant.USER_SALT), getName());
     }
 
     @Override

BIN
pine-admin/src/main/resources/lib/upyun-1.0.0.jar


+ 915 - 0
pine-admin/src/main/resources/mapper/business/OrderDao.xml

@@ -0,0 +1,915 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.pine.admin.modules.business.dao.OrderDao">
+
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.pine.admin.modules.business.entity.Order" id="entityMap">
+        <result property="id" column="id"/>
+        <result property="orderCode" column="order_code"/>
+        <result property="masterOrderCode" column="master_order_code"/>
+        <result property="customerId" column="customer_id"/>
+        <result property="price" column="price"/>
+        <result property="presalePrice" column="presale_price"/>
+        <result property="originalPrice" column="original_price"/>
+        <result property="freightPrice" column="freight_price"/>
+        <result property="modifyPrice" column="modify_price"/>
+        <result property="pointPrice" column="point_price"/>
+        <result property="couponPrice" column="coupon_price"/>
+        <result property="redEnvelopePrice" column="red_envelope_price"/>
+        <result property="concessionalRate" column="concessional_rate"/>
+        <result property="status" column="status"/>
+        <result property="presaleStatus" column="presale_status"/>
+        <result property="evaluationStatus" column="evaluation_status"/>
+        <result property="redEnvelopeCode" column="red_envelope_code"/>
+        <result property="couponNo" column="coupon_no"/>
+        <result property="usePoint" column="use_point"/>
+        <result property="payType" column="pay_type"/>
+        <result property="storeId" column="store_id"/>
+        <result property="cancelReson" column="cancel_reson"/>
+        <result property="predepositPay" column="predeposit_pay"/>
+        <result property="source" column="source"/>
+        <result property="freightTemplateId" column="freight_template_id"/>
+        <result property="waybillCode" column="waybill_code"/>
+        <result property="orderType" column="order_type"/>
+        <result property="createTime" column="create_time"/>
+        <result property="payTime" column="pay_time"/>
+        <result property="deliveryTime" column="delivery_time"/>
+        <result property="receivingTime" column="receiving_time"/>
+        <result property="cancelTime" column="cancel_time"/>
+        <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 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"/>
+        <result property="communityBuyId" column="community_buy_id"/>
+        <result property="profit" column="profit"/>
+        <result property="communityName" column="community_name"/>
+        <result property="communityBuyName" column="community_buy_name"/>
+        <result property="dealerId" column="dealer_id"/>
+        <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">
+                 id,
+                     order_code,
+                     master_order_code,
+                     customer_id,
+                     price,
+                     presale_price,
+                     original_price,
+                     freight_price,
+                     modify_price,
+                     point_price,
+                     coupon_price,
+                     red_envelope_price,
+                     concessional_rate,
+                     status,
+                     presale_status,
+                     evaluation_status,
+                     red_envelope_code,
+                     coupon_no,
+                     use_point,
+                     pay_type,
+                     store_id,
+                     cancel_reson,
+                     predeposit_pay,
+                     source,
+                     freight_template_id,
+                     waybill_code,
+                     order_type,
+                     create_time,
+                     pay_time,
+                     delivery_time,
+                     receiving_time,
+                     cancel_time,
+                     modify_time,
+                     evaluation_time,
+                     presale_time,
+                     group_head,
+                     group_id,
+                     group_marketing_id,
+                     group_sku_id,
+                     group_status,
+                     group_num,
+                     open_group_time,
+                     auto_handle_status,
+                     recommended,
+                     crowdfunding_id,
+                     lottery_status,
+                     write_off_code,
+                     community_buy_customer_id,
+                     community_buy_id,
+                     profit,
+                     community_name,
+                     community_buy_name,
+                     bill_no,
+                     dealer_id,
+                     dealer_info,
+                     pay_channel,
+                     sku_type,
+                     jetour_send_flag,
+                    incoming_url         </sql>
+    <!-- 根据Id查询-->
+    <select id="selectByPrimaryKey" resultMap="entityMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from ls_order
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <!-- 根据Id删除-->
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+		delete from ls_order
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+
+    <!-- 插入数据-->
+    <insert id="insertSelective" parameterType="com.pine.admin.modules.business.entity.Order"
+            useGeneratedKeys="true" keyProperty="id">
+        insert into ls_order
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="orderCode != null">order_code,</if>
+            <if test="masterOrderCode != null">master_order_code,</if>
+            <if test="customerId != null">customer_id,</if>
+            <if test="price != null">price,</if>
+            <if test="presalePrice != null">presale_price,</if>
+            <if test="originalPrice != null">original_price,</if>
+            <if test="freightPrice != null">freight_price,</if>
+            <if test="modifyPrice != null">modify_price,</if>
+            <if test="pointPrice != null">point_price,</if>
+            <if test="couponPrice != null">coupon_price,</if>
+            <if test="redEnvelopePrice != null">red_envelope_price,</if>
+            <if test="concessionalRate != null">concessional_rate,</if>
+            <if test="status != null">status,</if>
+            <if test="presaleStatus != null">presale_status,</if>
+            <if test="evaluationStatus != null">evaluation_status,</if>
+            <if test="redEnvelopeCode != null">red_envelope_code,</if>
+            <if test="couponNo != null">coupon_no,</if>
+            <if test="usePoint != null">use_point,</if>
+            <if test="payType != null">pay_type,</if>
+            <if test="storeId != null">store_id,</if>
+            <if test="cancelReson != null">cancel_reson,</if>
+            <if test="predepositPay != null">predeposit_pay,</if>
+            <if test="source != null">source,</if>
+            <if test="freightTemplateId != null">freight_template_id,</if>
+            <if test="waybillCode != null">waybill_code,</if>
+            <if test="orderType != null">order_type,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="payTime != null">pay_time,</if>
+            <if test="deliveryTime != null">delivery_time,</if>
+            <if test="receivingTime != null">receiving_time,</if>
+            <if test="cancelTime != null">cancel_time,</if>
+            <if test="modifyTime != null">modify_time,</if>
+            <if test="evaluationTime != null">evaluation_time,</if>
+            <if test="presaleTime != null">presale_time,</if>
+            <if test="groupHead != null">group_head,</if>
+            <if test="groupId != null">group_id,</if>
+            <if test="groupMarketingId != null">group_marketing_id,</if>
+            <if test="groupSkuId != null">group_sku_id,</if>
+            <if test="groupStatus != null">group_status,</if>
+            <if test="groupNum != null">group_num,</if>
+            <if test="openGroupTime != null">open_group_time,</if>
+            <if test="autoHandleStatus != null">auto_handle_status,</if>
+            <if test="recommended != null">recommended,</if>
+            <if test="crowdfundingId != null">crowdfunding_id,</if>
+            <if test="lotteryStatus != null">lottery_status,</if>
+            <if test="writeOffCode != null">write_off_code,</if>
+            <if test="communityBuyCustomerId != null">community_buy_customer_id,</if>
+            <if test="communityBuyId != null">community_buy_id,</if>
+            <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>
+            <if test="skuType != null">sku_type,</if>
+            <if test="jetourSendFlag != null">jetour_send_flag,</if>
+            <if test="incomingUrl != null">incoming_url,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="orderCode != null">#{orderCode},</if>
+            <if test="masterOrderCode != null">#{masterOrderCode},</if>
+            <if test="customerId != null">#{customerId},</if>
+            <if test="price != null">#{price},</if>
+            <if test="presalePrice != null">#{presalePrice},</if>
+            <if test="originalPrice != null">#{originalPrice},</if>
+            <if test="freightPrice != null">#{freightPrice},</if>
+            <if test="modifyPrice != null">#{modifyPrice},</if>
+            <if test="pointPrice != null">#{pointPrice},</if>
+            <if test="couponPrice != null">#{couponPrice},</if>
+            <if test="redEnvelopePrice != null">#{redEnvelopePrice},</if>
+            <if test="concessionalRate != null">#{concessionalRate},</if>
+            <if test="status != null">#{status},</if>
+            <if test="presaleStatus != null">#{presaleStatus},</if>
+            <if test="evaluationStatus != null">#{evaluationStatus},</if>
+            <if test="redEnvelopeCode != null">#{redEnvelopeCode},</if>
+            <if test="couponNo != null">#{couponNo},</if>
+            <if test="usePoint != null">#{usePoint},</if>
+            <if test="payType != null">#{payType},</if>
+            <if test="storeId != null">#{storeId},</if>
+            <if test="cancelReson != null">#{cancelReson},</if>
+            <if test="predepositPay != null">#{predepositPay},</if>
+            <if test="source != null">#{source},</if>
+            <if test="freightTemplateId != null">#{freightTemplateId},</if>
+            <if test="waybillCode != null">#{waybillCode},</if>
+            <if test="orderType != null">#{orderType},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="payTime != null">#{payTime},</if>
+            <if test="deliveryTime != null">#{deliveryTime},</if>
+            <if test="receivingTime != null">#{receivingTime},</if>
+            <if test="cancelTime != null">#{cancelTime},</if>
+            <if test="modifyTime != null">#{modifyTime},</if>
+            <if test="evaluationTime != null">#{evaluationTime},</if>
+            <if test="presaleTime != null">#{presaleTime},</if>
+            <if test="groupHead != null">#{groupHead},</if>
+            <if test="groupId != null">#{groupId},</if>
+            <if test="groupMarketingId != null">#{groupMarketingId},</if>
+            <if test="groupSkuId != null">#{groupSkuId},</if>
+            <if test="groupStatus != null">#{groupStatus},</if>
+            <if test="groupNum != null">#{groupNum},</if>
+            <if test="openGroupTime != null">#{openGroupTime},</if>
+            <if test="autoHandleStatus != null">#{autoHandleStatus},</if>
+            <if test="recommended != null">#{recommended},</if>
+            <if test="crowdfundingId != null">#{crowdfundingId},</if>
+            <if test="lotteryStatus != null">#{lotteryStatus},</if>
+            <if test="writeOffCode != null">#{writeOffCode},</if>
+            <if test="communityBuyCustomerId != null">#{communityBuyCustomerId},</if>
+            <if test="communityBuyId != null">#{communityBuyId},</if>
+            <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>
+            <if test="skuType != null">#{skuType},</if>
+            <if test="jetourSendFlag != null">#{jetourSendFlag},</if>
+            <if test="incomingUrl != null">#{incomingUrl},</if>
+        </trim>
+    </insert>
+
+    <!-- 更新数据-->
+    <update id="updateByPrimaryKeySelective" parameterType="com.pine.admin.modules.business.entity.Order">
+        update ls_order
+        <set>
+            <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>
+            <if test="price != null">price = #{price},</if>
+            <if test="presalePrice != null">presale_price = #{presalePrice},</if>
+            <if test="originalPrice != null">original_price = #{originalPrice},</if>
+            <if test="freightPrice != null">freight_price = #{freightPrice},</if>
+            <if test="modifyPrice != null">modify_price = #{modifyPrice},</if>
+            <if test="pointPrice != null">point_price = #{pointPrice},</if>
+            <if test="couponPrice != null">coupon_price = #{couponPrice},</if>
+            <if test="redEnvelopePrice != null">red_envelope_price = #{redEnvelopePrice},</if>
+            <if test="concessionalRate != null">concessional_rate = #{concessionalRate},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="presaleStatus != null">presale_status = #{presaleStatus},</if>
+            <if test="evaluationStatus != null">evaluation_status = #{evaluationStatus},</if>
+            <if test="redEnvelopeCode != null">red_envelope_code = #{redEnvelopeCode},</if>
+            <if test="couponNo != null">coupon_no = #{couponNo},</if>
+            <if test="usePoint != null">use_point = #{usePoint},</if>
+            <if test="payType != null">pay_type = #{payType},</if>
+            <if test="storeId != null">store_id = #{storeId},</if>
+            <if test="cancelReson != null">cancel_reson = #{cancelReson},</if>
+            <if test="predepositPay != null">predeposit_pay = #{predepositPay},</if>
+            <if test="source != null">source = #{source},</if>
+            <if test="freightTemplateId != null">freight_template_id = #{freightTemplateId},</if>
+            <if test="waybillCode != null">waybill_code = #{waybillCode},</if>
+            <if test="orderType != null">order_type = #{orderType},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="payTime != null">pay_time = #{payTime},</if>
+            <if test="deliveryTime != null">delivery_time = #{deliveryTime},</if>
+            <if test="receivingTime != null">receiving_time = #{receivingTime},</if>
+            <if test="cancelTime != null">cancel_time = #{cancelTime},</if>
+            <if test="modifyTime != null">modify_time = #{modifyTime},</if>
+            <if test="evaluationTime != null">evaluation_time = #{evaluationTime},</if>
+            <if test="presaleTime != null">presale_time = #{presaleTime},</if>
+            <if test="groupHead != null">group_head = #{groupHead},</if>
+            <if test="groupId != null">group_id = #{groupId},</if>
+            <if test="groupMarketingId != null">group_marketing_id = #{groupMarketingId},</if>
+            <if test="groupSkuId != null">group_sku_id = #{groupSkuId},</if>
+            <if test="groupStatus != null">group_status = #{groupStatus},</if>
+            <if test="groupNum != null">group_num = #{groupNum},</if>
+            <if test="openGroupTime != null">open_group_time = #{openGroupTime},</if>
+            <if test="autoHandleStatus != null">auto_handle_status = #{autoHandleStatus},</if>
+            <if test="recommended != null">recommended = #{recommended},</if>
+            <if test="crowdfundingId != null">crowdfunding_id = #{crowdfundingId},</if>
+            <if test="lotteryStatus != null">lottery_status = #{lotteryStatus},</if>
+            <if test="writeOffCode != null">write_off_code = #{writeOffCode},</if>
+            <if test="communityBuyCustomerId != null">community_buy_customer_id = #{communityBuyCustomerId},</if>
+            <if test="communityBuyId != null">community_buy_id = #{communityBuyId},</if>
+            <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>
+            <if test="skuType != null">sku_type = #{skuType},</if>
+            <if test="jetourSendFlag != null">jetour_send_flag = #{jetourSendFlag},</if>
+            <if test="incomingUrl != null">incoming_url = #{incomingUrl},</if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+    <!-- 分页查询-->
+    <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.billNo != null and !&quot;&quot;.equals(record.billNo)">
+                and bill_no = #{record.billNo}
+            </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>
+
+    <!-- 全部查询 -->
+    <select id="queryAll" parameterType="java.util.Map"
+            resultMap="entityMap">
+        select
+        <include refid="Base_Column_List"/>
+        from ls_order
+        <where>
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="orderCode != null and !&quot;&quot;.equals(orderCode)">
+                and order_code = #{orderCode}
+            </if>
+            <if test="masterOrderCode != null and !&quot;&quot;.equals(masterOrderCode)">
+                and master_order_code = #{masterOrderCode}
+            </if>
+            <if test="customerId != null and !&quot;&quot;.equals(customerId)">
+                and customer_id = #{customerId}
+            </if>
+            <if test="price != null and !&quot;&quot;.equals(price)">
+                and price = #{price}
+            </if>
+            <if test="presalePrice != null and !&quot;&quot;.equals(presalePrice)">
+                and presale_price = #{presalePrice}
+            </if>
+            <if test="originalPrice != null and !&quot;&quot;.equals(originalPrice)">
+                and original_price = #{originalPrice}
+            </if>
+            <if test="freightPrice != null and !&quot;&quot;.equals(freightPrice)">
+                and freight_price = #{freightPrice}
+            </if>
+            <if test="modifyPrice != null and !&quot;&quot;.equals(modifyPrice)">
+                and modify_price = #{modifyPrice}
+            </if>
+            <if test="pointPrice != null and !&quot;&quot;.equals(pointPrice)">
+                and point_price = #{pointPrice}
+            </if>
+            <if test="couponPrice != null and !&quot;&quot;.equals(couponPrice)">
+                and coupon_price = #{couponPrice}
+            </if>
+            <if test="redEnvelopePrice != null and !&quot;&quot;.equals(redEnvelopePrice)">
+                and red_envelope_price = #{redEnvelopePrice}
+            </if>
+            <if test="concessionalRate != null and !&quot;&quot;.equals(concessionalRate)">
+                and concessional_rate = #{concessionalRate}
+            </if>
+            <if test="status != null and !&quot;&quot;.equals(status)">
+                and status = #{status}
+            </if>
+            <if test="presaleStatus != null and !&quot;&quot;.equals(presaleStatus)">
+                and presale_status = #{presaleStatus}
+            </if>
+            <if test="evaluationStatus != null and !&quot;&quot;.equals(evaluationStatus)">
+                and evaluation_status = #{evaluationStatus}
+            </if>
+            <if test="redEnvelopeCode != null and !&quot;&quot;.equals(redEnvelopeCode)">
+                and red_envelope_code = #{redEnvelopeCode}
+            </if>
+            <if test="couponNo != null and !&quot;&quot;.equals(couponNo)">
+                and coupon_no = #{couponNo}
+            </if>
+            <if test="usePoint != null and !&quot;&quot;.equals(usePoint)">
+                and use_point = #{usePoint}
+            </if>
+            <if test="payType != null and !&quot;&quot;.equals(payType)">
+                and pay_type = #{payType}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="cancelReson != null and !&quot;&quot;.equals(cancelReson)">
+                and cancel_reson = #{cancelReson}
+            </if>
+            <if test="predepositPay != null and !&quot;&quot;.equals(predepositPay)">
+                and predeposit_pay = #{predepositPay}
+            </if>
+            <if test="source != null and !&quot;&quot;.equals(source)">
+                and source = #{source}
+            </if>
+            <if test="freightTemplateId != null and !&quot;&quot;.equals(freightTemplateId)">
+                and freight_template_id = #{freightTemplateId}
+            </if>
+            <if test="waybillCode != null and !&quot;&quot;.equals(waybillCode)">
+                and waybill_code = #{waybillCode}
+            </if>
+            <if test="orderType != null and !&quot;&quot;.equals(orderType)">
+                and order_type = #{orderType}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="payTime != null and !&quot;&quot;.equals(payTime)">
+                and pay_time = #{payTime}
+            </if>
+            <if test="deliveryTime != null and !&quot;&quot;.equals(deliveryTime)">
+                and delivery_time = #{deliveryTime}
+            </if>
+            <if test="receivingTime != null and !&quot;&quot;.equals(receivingTime)">
+                and receiving_time = #{receivingTime}
+            </if>
+            <if test="cancelTime != null and !&quot;&quot;.equals(cancelTime)">
+                and cancel_time = #{cancelTime}
+            </if>
+            <if test="modifyTime != null and !&quot;&quot;.equals(modifyTime)">
+                and modify_time = #{modifyTime}
+            </if>
+            <if test="evaluationTime != null and !&quot;&quot;.equals(evaluationTime)">
+                and evaluation_time = #{evaluationTime}
+            </if>
+            <if test="presaleTime != null and !&quot;&quot;.equals(presaleTime)">
+                and presale_time = #{presaleTime}
+            </if>
+            <if test="groupHead != null and !&quot;&quot;.equals(groupHead)">
+                and group_head = #{groupHead}
+            </if>
+            <if test="groupId != null and !&quot;&quot;.equals(groupId)">
+                and group_id = #{groupId}
+            </if>
+            <if test="groupMarketingId != null and !&quot;&quot;.equals(groupMarketingId)">
+                and group_marketing_id = #{groupMarketingId}
+            </if>
+            <if test="groupSkuId != null and !&quot;&quot;.equals(groupSkuId)">
+                and group_sku_id = #{groupSkuId}
+            </if>
+            <if test="groupStatus != null and !&quot;&quot;.equals(groupStatus)">
+                and group_status = #{groupStatus}
+            </if>
+            <if test="groupNum != null and !&quot;&quot;.equals(groupNum)">
+                and group_num = #{groupNum}
+            </if>
+            <if test="openGroupTime != null and !&quot;&quot;.equals(openGroupTime)">
+                and open_group_time = #{openGroupTime}
+            </if>
+            <if test="autoHandleStatus != null and !&quot;&quot;.equals(autoHandleStatus)">
+                and auto_handle_status = #{autoHandleStatus}
+            </if>
+            <if test="recommended != null and !&quot;&quot;.equals(recommended)">
+                and recommended = #{recommended}
+            </if>
+            <if test="crowdfundingId != null and !&quot;&quot;.equals(crowdfundingId)">
+                and crowdfunding_id = #{crowdfundingId}
+            </if>
+            <if test="lotteryStatus != null and !&quot;&quot;.equals(lotteryStatus)">
+                and lottery_status = #{lotteryStatus}
+            </if>
+            <if test="writeOffCode != null and !&quot;&quot;.equals(writeOffCode)">
+                and write_off_code = #{writeOffCode}
+            </if>
+            <if test="communityBuyCustomerId != null and !&quot;&quot;.equals(communityBuyCustomerId)">
+                and community_buy_customer_id = #{communityBuyCustomerId}
+            </if>
+            <if test="communityBuyId != null and !&quot;&quot;.equals(communityBuyId)">
+                and community_buy_id = #{communityBuyId}
+            </if>
+            <if test="profit != null and !&quot;&quot;.equals(profit)">
+                and profit = #{profit}
+            </if>
+            <if test="communityName != null and !&quot;&quot;.equals(communityName)">
+                and community_name = #{communityName}
+            </if>
+            <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>
+            <if test="dealerInfo != null and !&quot;&quot;.equals(dealerInfo)">
+                and dealer_info = #{dealerInfo}
+            </if>
+            <if test="payChannel != null and !&quot;&quot;.equals(payChannel)">
+                and pay_channel = #{payChannel}
+            </if>
+            <if test="skuType != null and !&quot;&quot;.equals(skuType)">
+                and sku_type = #{skuType}
+            </if>
+            <if test="jetourSendFlag != null and !&quot;&quot;.equals(jetourSendFlag)">
+                and jetour_send_flag = #{jetourSendFlag}
+            </if>
+            <if test="incomingUrl != null and !&quot;&quot;.equals(incomingUrl)">
+                and incoming_url = #{incomingUrl}
+            </if>
+        </where>
+        order by id desc
+    </select>
+
+    <!-- 根据条件查询一个 -->
+    <select id="queryOne" parameterType="java.util.Map"
+            resultMap="entityMap">
+        select
+        <include refid="Base_Column_List"/>
+        from ls_order
+        <where>
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="orderCode != null and !&quot;&quot;.equals(orderCode)">
+                and order_code = #{orderCode}
+            </if>
+            <if test="masterOrderCode != null and !&quot;&quot;.equals(masterOrderCode)">
+                and master_order_code = #{masterOrderCode}
+            </if>
+            <if test="customerId != null and !&quot;&quot;.equals(customerId)">
+                and customer_id = #{customerId}
+            </if>
+            <if test="price != null and !&quot;&quot;.equals(price)">
+                and price = #{price}
+            </if>
+            <if test="presalePrice != null and !&quot;&quot;.equals(presalePrice)">
+                and presale_price = #{presalePrice}
+            </if>
+            <if test="originalPrice != null and !&quot;&quot;.equals(originalPrice)">
+                and original_price = #{originalPrice}
+            </if>
+            <if test="freightPrice != null and !&quot;&quot;.equals(freightPrice)">
+                and freight_price = #{freightPrice}
+            </if>
+            <if test="modifyPrice != null and !&quot;&quot;.equals(modifyPrice)">
+                and modify_price = #{modifyPrice}
+            </if>
+            <if test="pointPrice != null and !&quot;&quot;.equals(pointPrice)">
+                and point_price = #{pointPrice}
+            </if>
+            <if test="couponPrice != null and !&quot;&quot;.equals(couponPrice)">
+                and coupon_price = #{couponPrice}
+            </if>
+            <if test="redEnvelopePrice != null and !&quot;&quot;.equals(redEnvelopePrice)">
+                and red_envelope_price = #{redEnvelopePrice}
+            </if>
+            <if test="concessionalRate != null and !&quot;&quot;.equals(concessionalRate)">
+                and concessional_rate = #{concessionalRate}
+            </if>
+            <if test="status != null and !&quot;&quot;.equals(status)">
+                and status = #{status}
+            </if>
+            <if test="presaleStatus != null and !&quot;&quot;.equals(presaleStatus)">
+                and presale_status = #{presaleStatus}
+            </if>
+            <if test="evaluationStatus != null and !&quot;&quot;.equals(evaluationStatus)">
+                and evaluation_status = #{evaluationStatus}
+            </if>
+            <if test="redEnvelopeCode != null and !&quot;&quot;.equals(redEnvelopeCode)">
+                and red_envelope_code = #{redEnvelopeCode}
+            </if>
+            <if test="couponNo != null and !&quot;&quot;.equals(couponNo)">
+                and coupon_no = #{couponNo}
+            </if>
+            <if test="usePoint != null and !&quot;&quot;.equals(usePoint)">
+                and use_point = #{usePoint}
+            </if>
+            <if test="payType != null and !&quot;&quot;.equals(payType)">
+                and pay_type = #{payType}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="cancelReson != null and !&quot;&quot;.equals(cancelReson)">
+                and cancel_reson = #{cancelReson}
+            </if>
+            <if test="predepositPay != null and !&quot;&quot;.equals(predepositPay)">
+                and predeposit_pay = #{predepositPay}
+            </if>
+            <if test="source != null and !&quot;&quot;.equals(source)">
+                and source = #{source}
+            </if>
+            <if test="freightTemplateId != null and !&quot;&quot;.equals(freightTemplateId)">
+                and freight_template_id = #{freightTemplateId}
+            </if>
+            <if test="waybillCode != null and !&quot;&quot;.equals(waybillCode)">
+                and waybill_code = #{waybillCode}
+            </if>
+            <if test="orderType != null and !&quot;&quot;.equals(orderType)">
+                and order_type = #{orderType}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="payTime != null and !&quot;&quot;.equals(payTime)">
+                and pay_time = #{payTime}
+            </if>
+            <if test="deliveryTime != null and !&quot;&quot;.equals(deliveryTime)">
+                and delivery_time = #{deliveryTime}
+            </if>
+            <if test="receivingTime != null and !&quot;&quot;.equals(receivingTime)">
+                and receiving_time = #{receivingTime}
+            </if>
+            <if test="cancelTime != null and !&quot;&quot;.equals(cancelTime)">
+                and cancel_time = #{cancelTime}
+            </if>
+            <if test="modifyTime != null and !&quot;&quot;.equals(modifyTime)">
+                and modify_time = #{modifyTime}
+            </if>
+            <if test="evaluationTime != null and !&quot;&quot;.equals(evaluationTime)">
+                and evaluation_time = #{evaluationTime}
+            </if>
+            <if test="presaleTime != null and !&quot;&quot;.equals(presaleTime)">
+                and presale_time = #{presaleTime}
+            </if>
+            <if test="groupHead != null and !&quot;&quot;.equals(groupHead)">
+                and group_head = #{groupHead}
+            </if>
+            <if test="groupId != null and !&quot;&quot;.equals(groupId)">
+                and group_id = #{groupId}
+            </if>
+            <if test="groupMarketingId != null and !&quot;&quot;.equals(groupMarketingId)">
+                and group_marketing_id = #{groupMarketingId}
+            </if>
+            <if test="groupSkuId != null and !&quot;&quot;.equals(groupSkuId)">
+                and group_sku_id = #{groupSkuId}
+            </if>
+            <if test="groupStatus != null and !&quot;&quot;.equals(groupStatus)">
+                and group_status = #{groupStatus}
+            </if>
+            <if test="groupNum != null and !&quot;&quot;.equals(groupNum)">
+                and group_num = #{groupNum}
+            </if>
+            <if test="openGroupTime != null and !&quot;&quot;.equals(openGroupTime)">
+                and open_group_time = #{openGroupTime}
+            </if>
+            <if test="autoHandleStatus != null and !&quot;&quot;.equals(autoHandleStatus)">
+                and auto_handle_status = #{autoHandleStatus}
+            </if>
+            <if test="recommended != null and !&quot;&quot;.equals(recommended)">
+                and recommended = #{recommended}
+            </if>
+            <if test="crowdfundingId != null and !&quot;&quot;.equals(crowdfundingId)">
+                and crowdfunding_id = #{crowdfundingId}
+            </if>
+            <if test="lotteryStatus != null and !&quot;&quot;.equals(lotteryStatus)">
+                and lottery_status = #{lotteryStatus}
+            </if>
+            <if test="writeOffCode != null and !&quot;&quot;.equals(writeOffCode)">
+                and write_off_code = #{writeOffCode}
+            </if>
+            <if test="communityBuyCustomerId != null and !&quot;&quot;.equals(communityBuyCustomerId)">
+                and community_buy_customer_id = #{communityBuyCustomerId}
+            </if>
+            <if test="communityBuyId != null and !&quot;&quot;.equals(communityBuyId)">
+                and community_buy_id = #{communityBuyId}
+            </if>
+            <if test="profit != null and !&quot;&quot;.equals(profit)">
+                and profit = #{profit}
+            </if>
+            <if test="communityName != null and !&quot;&quot;.equals(communityName)">
+                and community_name = #{communityName}
+            </if>
+            <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>
+            <if test="dealerInfo != null and !&quot;&quot;.equals(dealerInfo)">
+                and dealer_info = #{dealerInfo}
+            </if>
+            <if test="payChannel != null and !&quot;&quot;.equals(payChannel)">
+                and pay_channel = #{payChannel}
+            </if>
+            <if test="skuType != null and !&quot;&quot;.equals(skuType)">
+                and sku_type = #{skuType}
+            </if>
+            <if test="jetourSendFlag != null and !&quot;&quot;.equals(jetourSendFlag)">
+                and jetour_send_flag = #{jetourSendFlag}
+            </if>
+            <if test="incomingUrl != null and !&quot;&quot;.equals(incomingUrl)">
+                and incoming_url = #{incomingUrl}
+            </if>
+        </where>
+        LIMIT 1
+    </select>
+
+    <update id="delete">
+        UPDATE ls_order SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+
+    <update id="deleteIds" parameterType="java.util.ArrayList">
+        UPDATE ls_order SET del_flag = 'Y'
+        WHERE id IN
+        <foreach item='ids' collection="array" index="index" open="(" separator="," close=")">
+            #{ids}
+        </foreach>
+    </update>
+
+</mapper>

+ 50 - 0
pine-admin/src/test/com/pine/admin/modules/business/service/impl/CarBackOrderServiceImplTest.java

@@ -0,0 +1,50 @@
+package com.pine.admin.modules.business.service.impl;
+
+import com.pine.admin.modules.business.dao.CarBackOrderDao;
+import com.pine.admin.modules.business.dao.CarOrderDao;
+import com.pine.admin.modules.business.entity.CarBackOrder;
+import com.pine.admin.modules.business.entity.CarOrder;
+import org.checkerframework.checker.units.qual.C;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.omg.CORBA.PUBLIC_MEMBER;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.List;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * com.pine.admin.modules.business.service.impl
+ *
+ * @author Pine
+ * @email 771190883@qq.com
+ * @date 2019/9/17
+ */
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class CarBackOrderServiceImplTest {
+
+    @Autowired
+    private CarBackOrderDao carBackOrderDao;
+    @Autowired
+    private CarOrderDao carOrderDao;
+    @Test
+    public void test1(){
+        List<CarBackOrder> carBackOrders = carBackOrderDao.queryAll(null);
+        System.out.println(carBackOrders.size());
+        int n = 0 ;
+        carBackOrders.stream().forEach(c->{
+            CarOrder carOrder = new CarOrder();
+            carOrder.setCode(c.getOrderCode());
+            CarOrder carOrder1 = carOrderDao.queryOne(carOrder);
+            if (null == carOrder1){
+                System.out.println("无订单:" + carOrder.getCode());
+            }
+        });
+    }
+
+}

+ 0 - 110
pine-common/src/main/java/com/pine/common/utils/KuaiDi.java

@@ -1,110 +0,0 @@
-package com.pine.common.utils;
-
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.pine.common.dto.Result;
-import com.pine.common.exception.ApiException;
-import lombok.Getter;
-import lombok.Setter;
-import org.codehaus.jackson.annotate.JsonIgnore;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @Author: Pine
- * @Date: 2019/4/10
- * @Email:771190883@qq.com
- */
-public class KuaiDi {
-
-
-    public static String key = "JjydlyGo2107";
-    public static String customer = "9A030F7A0EBCDCB272D9A58A5668F4CF";
-    public static String callurl = "http://www.yourdmain.com/kuaidi";
-
-    public static String kuaidiInfo(String excode, String exnum, String phone) {
-
-        String param = "{\"com\":\"" + excode + "\",\"num\":\"" + exnum + "\",\"phone\":\"" + phone + "\"}";
-        String sign = MD5Util.encode(param + key + customer);
-        HashMap params = new HashMap();
-        params.put("param", param);
-        params.put("sign", sign);
-        params.put("customer", customer);
-//        String info = "param="+ JSON.toJSONString(param) + "&sign=" +sign +"&customer=" + customer;
-        String resp;
-//        JSONObject.parseJ
-        try {
-            resp = PostUtil.httpPost("https://poll.kuaidi100.com/poll/query.do", params,"");
-            System.out.println(JSON.parse(resp));
-            return resp;
-        } catch (Exception e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public static boolean kuaidiReceiver(String kuadiname, String from, String to, String kuadicode) {
-        TaskRequest req = new TaskRequest();
-        req.setCompany(kuadiname);
-        req.setFrom(from);
-        req.setTo(to);
-        req.setNumber(kuadicode);
-        req.getParameters().put("callbackurl", callurl);
-        req.setKey(key);
-        HashMap<String, String> p = new HashMap<String, String>();
-        p.put("schema", "json");
-        p.put("param", JSON.toJSONString(req));
-        try {
-            String ret = PostUtil.httpPost("https://poll.kuaidi100.com/poll", p,"");
-//            Object parse = JSON.parse(ret);
-//            System.out.println(ret);
-            TaskResponse resp = JSON.parseObject(ret, TaskResponse.class);
-            if ("true".equals(resp.getResult())) {
-                return true;
-            } else {
-                return false;
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return false;
-    }
-
-    public static void main(String[] args) {
-//        kuaidiReceiver();
-    }
-
-
-}
-
-@Getter
-@Setter
-class TaskRequest {
-    private String company;
-    private String from;
-    private String to;
-    private String number;
-    private String key;
-    private HashMap<String, String> parameters = new HashMap<>();
-
-}
-
-@Getter
-@Setter
-class TaskResponse {
-    private String result;
-    private String returnCode;
-    private String message;
-    private HashMap<String, String> parameters = new HashMap<>();
-
-}

+ 15 - 0
pine-common/src/main/java/com/pine/common/utils/RSAUtils.java

@@ -1,5 +1,6 @@
 package com.pine.common.utils;
 
+import com.alibaba.fastjson.JSONObject;
 import org.apache.commons.codec.binary.Base64;
 import org.springframework.util.Base64Utils;
 
@@ -10,6 +11,7 @@ import java.security.spec.InvalidKeySpecException;
 import java.security.spec.PKCS8EncodedKeySpec;
 import java.security.spec.X509EncodedKeySpec;
 import java.util.HashMap;
+import java.util.Map;
 
 import javax.crypto.BadPaddingException;
 import javax.crypto.Cipher;
@@ -22,7 +24,20 @@ public class RSAUtils {
     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 static void main(String[] args) {
+
+
+        String data ="{\"erp\":\"12818\",\"dealerId\":6906,\"name\":\"芜湖福瑞汽车销售有限公司\",\"roleType\":\"商城经销商\"}";
+
+        String encrypt = RSAUtils.encrypt(RSAUtils.publicKey, data);
+        System.out.println(encrypt);
+        String responseString = RSAUtils.decrypt(privateKey, encrypt);
+
+        System.out.println(responseString);
+
+    }
     /**
      * 加密
      *

+ 2 - 2
pine-generator/src/main/resources/application.yml

@@ -13,9 +13,9 @@ spring:
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driverClassName: com.mysql.jdbc.Driver
-    url: jdbc:mysql://39.108.234.18:3306/dealer?useUnicode=true&characterEncoding=utf8&useSSL=false
+    url: jdbc:mysql://47.100.127.59:3306/lecshop_v2?useUnicode=true&characterEncoding=utf8&useSSL=false
     username: root
-    password: Pine1qaz!QAZ
+    password: pl,okmijn
   jackson:
     time-zone: GMT+8
     date-format: yyyy-MM-dd HH:mm:ss