ccjgmwz 2 lat temu
rodzic
commit
9a04d5747e

+ 14 - 8
sendGoodNotPlat.xml

@@ -1,20 +1,26 @@
 <?xml version="1.0" encoding="GBK"?>
 <request>
     <functionID>dangdang.order.goods.send</functionID>
-    <time>2022-06-17 16:00:45</time>
+    <time>2022-07-04 14:33:53</time>
     <OrdersList>
         <OrderInfo>
-            <orderID>44885548604</orderID>
-            <logisticsName>źŤÍĂËŮľÝ</logisticsName>
-            <logisticsNameAb>JT</logisticsNameAb>
-            <logisticsTel>400-820-1666</logisticsTel>
-            <logisticsOrderID>JT3005412176967</logisticsOrderID>
+            <orderID>44983811895</orderID>
+            <logisticsName>ÓĘŐţ</logisticsName>
+            <logisticsNameAb>YZ</logisticsNameAb>
+            <logisticsTel>11183</logisticsTel>
+            <logisticsOrderID>SB05145705536</logisticsOrderID>
             <SendGoodsList>
                 <ItemInfo>
-                    <itemID>11070579096</itemID>
+                    <itemID>1621852514</itemID>
                     <sendGoodsCount>1</sendGoodsCount>
                     <belongProductsPromoID></belongProductsPromoID>
-                    <productItemId>44885548604001</productItemId>
+                    <productItemId>44983811895001</productItemId>
+                </ItemInfo>
+                <ItemInfo>
+                    <itemID>1840443798</itemID>
+                    <sendGoodsCount>1</sendGoodsCount>
+                    <belongProductsPromoID></belongProductsPromoID>
+                    <productItemId>44983811895002</productItemId>
                 </ItemInfo>
             </SendGoodsList>
         </OrderInfo>

+ 2 - 2
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/AdminCheckQuartz.java

@@ -121,7 +121,7 @@ public class AdminCheckQuartz {
     /**
      * 订单数据定时轮训处理 每30分钟执行一次
      */
-    @Scheduled(cron = "0 0/30 * * * ? ")
+//    @Scheduled(cron = "0 0/30 * * * ? ")
     public void task2(){
         new Thread(new Runnable() {
             @Override
@@ -686,7 +686,7 @@ public class AdminCheckQuartz {
     }
     private void doSomething2() {
         try{
-            List<ShopAccount> list = shopAccountMapper.selectList(new EntityWrapper<>());
+            List<ShopAccount> list = shopAccountMapper.selectList(new EntityWrapper<ShopAccount>().orderBy("id",false));
             for (ShopAccount shopAccount:list
             ) {
                 flushCookie(shopAccount);

+ 2 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/shop/IShopOrderService.java

@@ -94,6 +94,7 @@ public interface IShopOrderService {
             @NotNull @HttpParam(name = "dangId", type = HttpParamType.COMMON, description = "当当店铺id") String dangId,
             @NotNull @HttpParam(name = "dangOrder", type = HttpParamType.COMMON, description = "当当订单编号") String dangOrder) throws Exception;
     @HttpMethod(description = "百度智能外呼调用")
-    public ShopOrder callPhone(@NotNull @HttpParam(name = "mobile", type = HttpParamType.COMMON, description = "电话") String mobile) throws Exception;
+    public ShopOrder callPhone(@NotNull @HttpParam(name = "mobile", type = HttpParamType.COMMON, description = "电话") String mobile,
+                               @NotNull @HttpParam(name = "bookName", type = HttpParamType.COMMON, description = "书名") String bookName) throws Exception;
 
 }

+ 18 - 23
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/shop/impl/ShopOrderServiceImpl.java

@@ -1,6 +1,7 @@
 package com.iotechn.unimall.admin.api.shop.impl;
 
 import java.io.*;
+import java.nio.charset.StandardCharsets;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -33,6 +34,7 @@ import org.apache.http.client.entity.UrlEncodedFormEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.BasicCookieStore;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
@@ -335,8 +337,7 @@ public class ShopOrderServiceImpl implements IShopOrderService {
     }
 
     @Override
-    public ShopOrder callPhone(String mobile) throws Exception {
-
+    public ShopOrder callPhone(String mobile,String bookName) throws Exception {
         ApiTokenV1.ApiAuthTokenV1Builder builder = new ApiTokenV1.ApiAuthTokenV1Builder();
         // 必填参数 ak,sk,uri,host,http method, 过期时间
         builder.ak("346da55bb3c248ea84e39b5913939f05");   // ak
@@ -345,18 +346,15 @@ public class ShopOrderServiceImpl implements IShopOrderService {
         builder.host("aicc.bce.baidu.com");               // host
         builder.httpMethod("POST");                        // http method
         builder.expireInSeconds(1800);                    // 过期时间
-
         // 以下是非必须参数
         // 参与生成token的请求头, 此处若使用了x-bce-date,则调用外呼api接口时,请求头内必需带上x-bce-date
-//        HashMap<String, String> headerMap = new HashMap<String, String>();
-//        headerMap.put("x-bce-date", "2022-06-17T08:40:14Z");
-//        builder.httpHeaderMap(headerMap);
-        builder.httpHeader("Content-Type", "application/json");
-        builder.httpHeader("Authorization", builder.build().getToken());
-        // url里?带的参数,如/api/v1/robot/list?robotName=test, 没有?参数可以不调用此方法
-        builder.queryStr("robotId=b304c245-ec71-40ef-b7b8-c94e6874e8ed&mobile="+mobile+"&secretType=2");
+        HashMap<String, String> headerMap = new HashMap<String, String>();
+        headerMap.put("x-bce-date", "2022-06-23T16:52:14Z");
+        builder.httpHeaderMap(headerMap);
+        // builder.httpHeader("Content-Type", "application/json");
 
-        System.out.println(builder.build().getToken());
+        // url里?带的参数,如/api/v1/robot/list?robotName=test, 没有?参数可以不调用此方法
+        //        builder.queryStr("robotName=test&pn=1");
         String token = builder.build().getToken();
         System.out.println("token=" + token);
         // 登陆 Url
@@ -364,25 +362,22 @@ public class ShopOrderServiceImpl implements IShopOrderService {
         CloseableHttpClient httpClient = HttpClients.createDefault();
         // 模拟登陆,按实际服务器端要求选用 Post 或 Get 请求方式
         HttpPost httpPost = new HttpPost(loginUrl);
-        // 装填参数
-        List<BasicNameValuePair> nvps = new ArrayList<BasicNameValuePair>();
-        nvps.add(new BasicNameValuePair("robotId", "b304c245-ec71-40ef-b7b8-c94e6874e8ed"));
-        nvps.add(new BasicNameValuePair("mobile", mobile));
-        nvps.add(new BasicNameValuePair("secretType", "2"));
-        // 设置参数到请求对象中
-        httpPost.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8"));
-
+        JSONObject params = new JSONObject();
+        JSONObject param1 = new JSONObject();
+        param1.put("bookname", bookName);
+        params.put("robotId", "73ec968b-b587-4249-a391-a475439df725");
+        params.put("mobile", mobile);
+        params.put("secretType", "2");
+        params.put("dialogVar", param1);
+        httpPost.setEntity(new StringEntity(params.toString(), StandardCharsets.UTF_8));
         // 设置header信息
         // 指定报文头【Content-type】、【User-Agent】
         httpPost.setHeader("Content-type", "application/json");
         httpPost.setHeader("Authorization", token);
-        httpPost.setHeader("x-bce-date", "2022-06-17T08:40:14Z");
-
+        httpPost.setHeader("x-bce-date", "2022-06-23T16:52:14Z");
         // 执行请求操作,并拿到结果(同步阻塞)
         CloseableHttpResponse response = httpClient.execute(httpPost);
         try {
-            if (response.getStatusLine().getStatusCode() == 302) {
-            }
             System.out.println(EntityUtils.toString(response.getEntity(), "UTF-8"));
         } catch (Exception e) {
             e.printStackTrace();

+ 1 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/user/AdminUserServiceImpl.java

@@ -577,7 +577,7 @@ public class AdminUserServiceImpl implements AdminUserService {
 
 
                     } catch (IOException e) {
-                        throw e;
+                        e.printStackTrace();
                     }
                     finally {
                         response.close();

+ 2 - 2
unimall-admin/config/dev.env.js

@@ -1,6 +1,6 @@
 module.exports = {
 	NODE_ENV: '"development"',
   ENV_CONFIG: '"dev"',
-    HOST: '"http://localhost:8081"',
-    BASE_API: '"http://localhost:8081/m.api"'
+    HOST: '"http://localhost:8181"',
+    BASE_API: '"http://localhost:8181/m.api"'
 }

+ 2 - 2
unimall-admin/config/prod.env.js

@@ -1,6 +1,6 @@
 module.exports = {
 	NODE_ENV: '"production"',
   	ENV_CONFIG: '"prod"',
-    HOST: '"http://101.227.51.94:8081"',
-    BASE_API: '"http://101.227.51.94:8081/m.api"'
+    HOST: '"http://106.14.75.12:8181"',
+    BASE_API: '"http://106.14.75.12:8181/m.api"'
 }

+ 1 - 1
unimall-admin/src/views/layout/components/Navbar.vue

@@ -79,7 +79,7 @@ export default {
     },
     logout() {
       this.$store.dispatch('LogOut').then(() => {
-        window.location.href = 'http://waihu.ftushu.com:9527/'
+        window.location.href = 'http://106.14.75.12:9999/'
         // location.reload() // In order to re-instantiate the vue-router object to avoid bugs
       })
     }

+ 82 - 35
unimall-admin/src/views/shop/log/index.vue

@@ -1,6 +1,11 @@
 <template>
   <div class="app-container">
-    <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
+    <el-form
+      ref="queryForm"
+      :model="queryParams"
+      :inline="true"
+      label-width="68px"
+    >
       <el-form-item label="标题" prop="title">
         <el-input
           v-model="queryParams.title"
@@ -20,15 +25,35 @@
         />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+        >搜索</el-button
+        >
+        <el-button
+          icon="el-icon-refresh"
+          size="mini"
+          @click="resetQuery"
+        >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
-    <el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="logList"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column label="标题" width="200" align="center" prop="title" />
       <el-table-column label="内容" align="center" prop="content" />
-      <el-table-column label="创建时间" align="center" prop="gmtCreate" width="180">
+      <el-table-column
+        label="创建时间"
+        align="center"
+        prop="gmtCreate"
+        width="180"
+      >
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.gmtCreate) }}</span>
         </template>
@@ -36,7 +61,7 @@
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -53,7 +78,11 @@
           <el-input v-model="form.content" placeholder="请输入内容" />
         </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          />
         </el-form-item>
         <el-form-item label="删除标识" prop="deleteFlag">
           <el-input v-model="form.deleteFlag" placeholder="请输入删除标识" />
@@ -66,7 +95,8 @@
             style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择"/>
+            placeholder="选择"
+          />
         </el-form-item>
         <el-form-item label="" prop="gmtUpdate">
           <el-date-picker
@@ -76,7 +106,8 @@
             style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择"/>
+            placeholder="选择"
+          />
         </el-form-item>
         <el-form-item label="" prop="userId">
           <el-input v-model="form.userId" placeholder="请输入" />
@@ -94,7 +125,14 @@
 </template>
 
 <script>
-import { listLog, getLog, delLog, addLog, updateLog, exportLog } from '@/api/shop/log'
+import {
+  listLog,
+  getLog,
+  delLog,
+  addLog,
+  updateLog,
+  exportLog
+} from '@/api/shop/log'
 
 export default {
   data() {
@@ -130,8 +168,7 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {}
     }
   },
   created() {
@@ -141,7 +178,7 @@ export default {
     /** 查询同步日志列表 */
     getList() {
       this.loading = true
-      listLog(this.queryParams).then(response => {
+      listLog(this.queryParams).then((response) => {
         this.logList = response.data.data.items
         this.total = response.data.data.count
         this.loading = false
@@ -179,8 +216,8 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!=1
+      this.ids = selection.map((item) => item.id)
+      this.single = selection.length != 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -193,18 +230,18 @@ export default {
     handleUpdate(row) {
       this.reset()
       const id = row.id || this.ids.join(',')
-      getLog(id).then(response => {
+      getLog(id).then((response) => {
         this.form = response.data.data
         this.open = true
         this.title = '修改同步日志'
       })
     },
     /** 提交按钮 */
-    submitForm: function() {
-      this.$refs['form'].validate(valid => {
+    submitForm: function () {
+      this.$refs['form'].validate((valid) => {
         if (valid) {
           if (this.form.id != undefined) {
-            updateLog(this.form).then(response => {
+            updateLog(this.form).then((response) => {
               if (response.data) {
                 this.msgSuccess('修改成功')
                 this.open = false
@@ -214,7 +251,7 @@ export default {
               }
             })
           } else {
-            addLog(this.form).then(response => {
+            addLog(this.form).then((response) => {
               if (response.data) {
                 this.msgSuccess('新增成功')
                 this.open = false
@@ -230,16 +267,23 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids.join(',')
-      this.$confirm('是否确认删除同步日志编号为"' + ids + '"的数据项?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return delLog(ids)
-      }).then(() => {
-        this.getList()
-        this.msgSuccess('删除成功')
-      }).catch(function() {})
+      this.$confirm(
+        '是否确认删除同步日志编号为"' + ids + '"的数据项?',
+        '警告',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }
+      )
+        .then(function () {
+          return delLog(ids)
+        })
+        .then(() => {
+          this.getList()
+          this.msgSuccess('删除成功')
+        })
+        .catch(function () {})
     },
     /** 导出按钮操作 */
     handleExport() {
@@ -248,11 +292,14 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(function() {
-        return exportLog(queryParams)
-      }).then(response => {
-        this.download(response.data.data)
-      }).catch(function() {})
+      })
+        .then(function () {
+          return exportLog(queryParams)
+        })
+        .then((response) => {
+          this.download(response.data.data)
+        })
+        .catch(function () {})
     }
   }
 }

+ 1 - 0
unimall-launcher/pom.xml

@@ -136,6 +136,7 @@
 				<artifactId>spring-boot-maven-plugin</artifactId>
 				<configuration>
 					<executable>true</executable>
+					<includeSystemScope>true</includeSystemScope>
 				</configuration>
 				<executions>
 					<execution>