作者 shenhailong

远程调用 移出订单 查询 订单号

  1 +FROM java:8u111
  2 +
  3 +VOLUME /tmp
  4 +
  5 +ADD *.jar app.jar
  6 +
  7 +EXPOSE 10003
  8 +
  9 +ENTRYPOINT ["java","-jar","/app.jar"]
  10 +
  11 +# Ubuntu 时区
  12 +RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
@@ -199,6 +199,25 @@ @@ -199,6 +199,25 @@
199 </execution> 199 </execution>
200 </executions> 200 </executions>
201 </plugin> 201 </plugin>
  202 +
  203 + <plugin>
  204 + <artifactId>maven-antrun-plugin</artifactId>
  205 + <executions>
  206 + <execution>
  207 + <id>gen-webadmin</id>
  208 + <phase>package</phase>
  209 + <configuration>
  210 + <tasks>
  211 + <copy todir="docker" file="target/${project.artifactId}-${project.version}.${project.packaging}" />
  212 + </tasks>
  213 + </configuration>
  214 + <goals>
  215 + <goal>run</goal>
  216 + </goals>
  217 + </execution>
  218 + </executions>
  219 + </plugin>
  220 +
202 </plugins> 221 </plugins>
203 </build> 222 </build>
204 223
@@ -6,6 +6,7 @@ import com.sunyo.energy.location.model.PayRecords; @@ -6,6 +6,7 @@ import com.sunyo.energy.location.model.PayRecords;
6 import com.sunyo.energy.location.service.PayOrderService; 6 import com.sunyo.energy.location.service.PayOrderService;
7 import io.swagger.annotations.Api; 7 import io.swagger.annotations.Api;
8 import io.swagger.annotations.ApiOperation; 8 import io.swagger.annotations.ApiOperation;
  9 +import io.swagger.models.auth.In;
9 import org.springframework.beans.factory.annotation.Autowired; 10 import org.springframework.beans.factory.annotation.Autowired;
10 import org.springframework.web.bind.annotation.*; 11 import org.springframework.web.bind.annotation.*;
11 12
@@ -24,8 +25,9 @@ public class PayOrderController { @@ -24,8 +25,9 @@ public class PayOrderController {
24 @ApiOperation(value = "查询缴费订单") 25 @ApiOperation(value = "查询缴费订单")
25 @RequestMapping("/list") 26 @RequestMapping("/list")
26 public PageInfo<PayRecords> getOrder(@RequestParam(value = "pageSize", required = false, defaultValue = "1") int pageSize, 27 public PageInfo<PayRecords> getOrder(@RequestParam(value = "pageSize", required = false, defaultValue = "1") int pageSize,
27 - @RequestParam(value = "pageNum", required = false, defaultValue = "5") int pageNum){  
28 - return payOrderService.getOrder(pageSize, pageNum); 28 + @RequestParam(value = "pageNum", required = false, defaultValue = "5") int pageNum,
  29 + @RequestParam(value = "orderNumber",required = false) String orderNumber){
  30 + return payOrderService.getOrder(pageSize, pageNum, orderNumber);
29 } 31 }
30 32
31 33
@@ -61,6 +63,6 @@ public class PayOrderController { @@ -61,6 +63,6 @@ public class PayOrderController {
61 if(result>0){ 63 if(result>0){
62 mgs=1; 64 mgs=1;
63 } 65 }
64 - return mgs==1? new ResultJson("200","订单信息删除成功"):new ResultJson("500","订单信息删除失败"); 66 + return mgs==1? new ResultJson("200","订单信息移出成功"):new ResultJson("500","订单信息删除失败");
65 } 67 }
66 } 68 }
1 package com.sunyo.energy.location.dao; 1 package com.sunyo.energy.location.dao;
2 2
3 import com.sunyo.energy.location.model.PayRecords; 3 import com.sunyo.energy.location.model.PayRecords;
  4 +import org.apache.ibatis.annotations.Param;
4 5
5 import java.util.List; 6 import java.util.List;
6 7
@@ -17,5 +18,5 @@ public interface PayRecordsMapper { @@ -17,5 +18,5 @@ public interface PayRecordsMapper {
17 18
18 int updateByPrimaryKey(PayRecords record); 19 int updateByPrimaryKey(PayRecords record);
19 20
20 - List<PayRecords> findAll(); 21 + List<PayRecords> findAll(@Param(value = "orderNumber") String orderNumber);
21 } 22 }
@@ -7,7 +7,7 @@ import com.sunyo.energy.location.model.PayRecords; @@ -7,7 +7,7 @@ import com.sunyo.energy.location.model.PayRecords;
7 * Created by XYH on 2019/12/16. 7 * Created by XYH on 2019/12/16.
8 */ 8 */
9 public interface PayOrderService { 9 public interface PayOrderService {
10 - PageInfo<PayRecords> getOrder(int pageSize, int pageNum); 10 + PageInfo<PayRecords> getOrder(int pageSize, int pageNum, String orderNumber);
11 11
12 int addOrder(PayRecords payRecords); 12 int addOrder(PayRecords payRecords);
13 13
@@ -8,6 +8,7 @@ import com.sunyo.energy.location.model.PayRecords; @@ -8,6 +8,7 @@ import com.sunyo.energy.location.model.PayRecords;
8 import com.sunyo.energy.location.service.PayOrderService; 8 import com.sunyo.energy.location.service.PayOrderService;
9 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
10 import org.springframework.stereotype.Service; 10 import org.springframework.stereotype.Service;
  11 +import org.springframework.util.StringUtils;
11 12
12 import java.util.List; 13 import java.util.List;
13 14
@@ -21,10 +22,18 @@ public class PayOrderImpl implements PayOrderService { @@ -21,10 +22,18 @@ public class PayOrderImpl implements PayOrderService {
21 22
22 23
23 @Override 24 @Override
24 - public PageInfo<PayRecords> getOrder(int pageSize, int pageNum) { 25 + public PageInfo<PayRecords> getOrder(int pageSize, int pageNum, String orderNumber) {
25 26
26 Page<PayRecords> page = PageHelper.startPage(pageNum,pageSize); 27 Page<PayRecords> page = PageHelper.startPage(pageNum,pageSize);
27 - List<PayRecords> list = recordsMapper.findAll(); 28 +
  29 + if (StringUtils.isEmpty(orderNumber)){
  30 +
  31 + }else if (!orderNumber.contains("-")){
  32 + StringBuffer stringBuffer = new StringBuffer(orderNumber);
  33 + orderNumber = stringBuffer.insert(3, "-").toString();
  34 + }
  35 +
  36 + List<PayRecords> list = recordsMapper.findAll(orderNumber);
28 37
29 PageInfo<PayRecords> result = new PageInfo<>(list); 38 PageInfo<PayRecords> result = new PageInfo<>(list);
30 return result; 39 return result;
@@ -145,14 +145,41 @@ public class HttpsUtils { @@ -145,14 +145,41 @@ public class HttpsUtils {
145 // 测试是否有效 145 // 测试是否有效
146 // public static void main(String[] args) { 146 // public static void main(String[] args) {
147 // // 接口地址 147 // // 接口地址
148 -// String requestUrl = "http://123.56.159.203:8023/mtfmset/allWMadd"; 148 +// String requestUrl = "http://localhost:8080/manifest/f5f5669bbdecefd3dacfaba194647c35";
149 // try { 149 // try {
150 // 150 //
151 -// String url = "http://123.56.159.203:8023/nowwmrd/getSelectNowwmrdbyProjectID";  
152 // Map<String, Object> datas = new HashMap<>(); 151 // Map<String, Object> datas = new HashMap<>();
153 -// datas.put("ProjectID", "33-99-00-00-00-00-01");  
154 -// List list = new ArrayList<>(); 152 +// datas.put("de_size", "dcdf38d9a5d6411985e49155481882f5");
  153 +// datas.put("waybillnomaster", "66611111111");
  154 +// datas.put("de_type", "001");
  155 +// datas.put("delivery_station", "001");
  156 +// datas.put("flightno", "CA9999");
  157 +// datas.put("flightdate", "2019-9-21 00:00:00");
  158 +// datas.put("originatingstation", "CGO");
  159 +// datas.put("destinationstation", "CGO");
  160 +// datas.put("totalpiece", "19");
  161 +// datas.put("totalweight", "19");
  162 +// datas.put("paymode", "PP");
  163 +// datas.put("customsstatus", "001");
  164 +// datas.put("customscode", "4604");
  165 +// datas.put("productname", "SHOUJI");
  166 +// datas.put("co_company", "测试");
  167 +// datas.put("co_address", "测试");
  168 +// datas.put("co_telephone", "00000000");
  169 +// datas.put("co_country", "CN");
  170 +// datas.put("sh_company", "测试");
  171 +// datas.put("sh_address", "测试");
  172 +// datas.put("sh_country", "CN");
  173 +// datas.put("sh_telephone", "0000000");
  174 +// datas.put("sh_city", "测试");
  175 +// datas.put("USER_ID", "1");
  176 +// datas.put("reach_station", "CGO");
  177 +// datas.put("de_volume", "000100003_MMM");
  178 +// datas.put("de_trstation", "APL,111");
155 // 179 //
  180 +// String param ="waybillnomaster=666-11111111&de_volume=66611111111_MMM&de_type=001&delivery_station=001&flightno=CV9765&flightdate=2019-12-20&originatingstation=CGO&destinationstation=ORD&totalpiece=1&totalweight=136.00&paymode=PP&customsstatus=001&customscode=4604&productname=CONSOL&co_company=DSV+AIR+%26+SEA+CO.%2c+LTD&co_address=8%269F%2c+RAFFLES+CITY+CHANGNING+OFFI.+TOWER+3%2c+NO.+1193+CHANGNING+RDSHANG&co_zipcode=200051&shpcusid=&shpaeo=&co_telephone=%2b86+21+33259800&co_country=CN&sh_company=ORD-DSV+AIR++SEA+INC&sh_address=1300+N+ARLINGTON+HEIGHTS+ROAD+SUITE+US&sh_zipcode=60143&cnecusid=&cneaeo=&sh_country=US&sh_telephone=8479568855&sh_fax=&sh_city=CHICAGO&USER_ID=1640&reach_station=ORD&de_trstation=BDX%2c111&de_packing=BDX%2c222&de_remarks=BDX%2c333&de_size=dcdf38d9a5d6411985e49155481882f5";
  181 +// String ss = HttpsUtils.sendPostHttpRequest(requestUrl, param);
  182 +// JSONArray jsonArray = JSON.parseArray(ss);
156 // } catch (Exception e) { 183 // } catch (Exception e) {
157 // e.printStackTrace(); 184 // e.printStackTrace();
158 // } 185 // }
@@ -103,14 +103,17 @@ eureka: @@ -103,14 +103,17 @@ eureka:
103 prefer-ip-address: true 103 prefer-ip-address: true
104 instance-id: ${spring.cloud.client.ip-address}:${server.port} 104 instance-id: ${spring.cloud.client.ip-address}:${server.port}
105 hostname: ${spring.cloud.client.ip-address} 105 hostname: ${spring.cloud.client.ip-address}
  106 + lease-renewal-interval-in-seconds: 15
  107 + lease-expiration-duration-in-seconds: 45
  108 +
106 client: 109 client:
107 #eureka注册中心服务器地址 110 #eureka注册中心服务器地址
108 service-url: 111 service-url:
109 # defaultZone: http://127.0.0.1:12345/eureka/ 112 # defaultZone: http://127.0.0.1:12345/eureka/
110 defaultZone: http://192.168.1.53:12345/eureka/ 113 defaultZone: http://192.168.1.53:12345/eureka/
  114 +# defaultZone: http://192.168.43.78:12345/eureka/
111 registry-fetch-interval-seconds: 30 115 registry-fetch-interval-seconds: 30
112 - lease-renewal-interval-in-seconds: 15  
113 - lease-expiration-duration-in-seconds: 45 116 +
114 117
115 118
116 119
@@ -133,7 +136,7 @@ logging: @@ -133,7 +136,7 @@ logging:
133 file: 136 file:
134 path: ./logs/ 137 path: ./logs/
135 name: system.log 138 name: system.log
136 - config: config/logback-dev.xml 139 + config: classpath:logback-dev.xml
137 #转移到logback配置文件中 140 #转移到logback配置文件中
138 #level: 141 #level:
139 #org.apache.tomcat: info 142 #org.apache.tomcat: info
@@ -34,12 +34,19 @@ @@ -34,12 +34,19 @@
34 select 34 select
35 <include refid="Base_Column_List" /> 35 <include refid="Base_Column_List" />
36 from pay_records 36 from pay_records
  37 + where reamke1 = '0'
  38 + <if test="orderNumber != '' and orderNumber != null">
  39 + and orderNumber = #{orderNumber,jdbcType=VARCHAR}
  40 + </if>
  41 + order by payTime desc
37 </select> 42 </select>
38 43
39 - <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >  
40 - delete from pay_records 44 + <update id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  45 + UPDATE pay_records
  46 + SET reamke1 = '1'
41 where id = #{id,jdbcType=INTEGER} 47 where id = #{id,jdbcType=INTEGER}
42 - </delete> 48 + </update>
  49 +
43 <insert id="insert" parameterType="com.sunyo.energy.location.model.PayRecords" > 50 <insert id="insert" parameterType="com.sunyo.energy.location.model.PayRecords" >
44 insert into pay_records (id, payFees, payUserId, 51 insert into pay_records (id, payFees, payUserId,
45 payTime, payLocationId, payStatus, 52 payTime, payLocationId, payStatus,