Bladeren bron

商户功能开发

user5 1 jaar geleden
bovenliggende
commit
0b96742a0d
61 gewijzigde bestanden met toevoegingen van 3585 en 0 verwijderingen
  1. 5 0
      jeeplus-modules/jeeplus-test/pom.xml
  2. 62 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/core/excel/converter/ExcelSettledPlatformListDTOConverter.java
  3. 51 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/utils/excel/MerchantCompanyEasyExcel.java
  4. 74 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/utils/excel/MerchantCompanyExcelListener.java
  5. 158 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/MerchantCompanyController.java
  6. 87 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/SettledPlatformController.java
  7. 49 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/MerchantCompany.java
  8. 25 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/SettledPlatform.java
  9. 55 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/MerchantCompanyMapper.java
  10. 34 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/SettledPlatformMapper.java
  11. 80 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/MerchantCommanyMapper.xml
  12. 40 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/SettledPlatformMapper.xml
  13. 118 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/MerchantCompanyService.java
  14. 66 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/SettledPlatformService.java
  15. 127 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantCompanyDTO.java
  16. 37 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/SettledPlatformDTO.java
  17. 31 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/mapstuct/MerchantCompanyWrapper.java
  18. 33 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/mapstuct/SettledPlatformWrapper.java
  19. 44 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/Demo.java
  20. 130 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/WdtClient.java
  21. 27 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/LogisticsQuery.java
  22. 31 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/PurchaseProviderCreate.java
  23. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/PurchaseProviderQuery.java
  24. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/ShopQuery.java
  25. 30 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/WarehouseQuery.java
  26. 48 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/goods/ApiGoodsSpecPush.java
  27. 53 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/goods/GoodsPush.java
  28. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/goods/GoodsQuery.java
  29. 55 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseOrderPush.java
  30. 27 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseOrderQuery.java
  31. 47 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseReturnOrderPush.java
  32. 49 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseReturnPush.java
  33. 30 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseReturnQuery.java
  34. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/StockinOrderQueryPurchase.java
  35. 46 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/StockinPurchasePush.java
  36. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/StockoutReturnOrderQuery.java
  37. 29 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/refund/RefundQuery.java
  38. 54 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/refund/SalesRefundPush.java
  39. 51 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/refund/StockinRefundPush.java
  40. 29 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/refund/StockinRefundQuery.java
  41. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockPDOrderQuery.java
  42. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockQuery.java
  43. 43 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockSyncByPD.java
  44. 46 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockTransferPush.java
  45. 46 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockinOrderPush.java
  46. 29 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockinOrderQuery.java
  47. 46 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockinTransferPush.java
  48. 49 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockoutOrderPush.java
  49. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockoutOrderQuery.java
  50. 45 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockoutTransferPush.java
  51. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StokcTransferQuery.java
  52. 40 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/ApiGoodsStockChangeAck.java
  53. 28 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/ApiGoodsStockChangeQuery.java
  54. 40 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/LogisticsSyncAck.java
  55. 29 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/LogisticsSyncQuery.java
  56. 29 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/StockoutOrderQueryTrade.java
  57. 76 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/TradePush.java
  58. 32 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/TradeQuery.java
  59. 146 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/utils/FileItem.java
  60. 129 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/utils/StringUtils.java
  61. 568 0
      jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/utils/WebUtils.java

+ 5 - 0
jeeplus-modules/jeeplus-test/pom.xml

@@ -34,6 +34,11 @@
             <artifactId>jeeplus-flowable</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.73</version>
+        </dependency>
 
 
     </dependencies>

+ 62 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/core/excel/converter/ExcelSettledPlatformListDTOConverter.java

@@ -0,0 +1,62 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.test.core.excel.converter;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.data.ReadCellData;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+import com.google.common.collect.Lists;
+import com.jeeplus.test.wdt.merchantCompany.domain.SettledPlatform;
+import com.jeeplus.test.wdt.merchantCompany.service.SettledPlatformService;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.SettledPlatformWrapper;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 岗位类型转换
+ *
+ * @author jeeplus
+ * @version 2016-03-10
+ */
+
+public class ExcelSettledPlatformListDTOConverter implements Converter <List <SettledPlatformDTO>> {
+
+    @Override
+    public Class <?> supportJavaTypeKey() {
+        return List.class;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey() {
+        return CellDataTypeEnum.STRING;
+    }
+
+    @Override
+    public List <SettledPlatformDTO> convertToJavaData(ReadCellData <?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+
+        List <SettledPlatformDTO> postList = Lists.newArrayList ( );
+        String val = cellData.getStringValue ( );
+        for (String postName : StrUtil.split ( val, "," )) {
+            SettledPlatformDTO postDTO = SettledPlatformWrapper.INSTANCE.toDTO ( SpringUtil.getBean ( SettledPlatformService.class ).lambdaQuery ( ).eq ( SettledPlatform::getName, postName ).one ( ) );
+            postList.add ( postDTO );
+        }
+        return postList.size ( ) > 0 ? postList : null;
+    }
+
+    @Override
+    public WriteCellData <?> convertToExcelData(List <SettledPlatformDTO> postDTOList, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
+        List <String> postNames = postDTOList.stream ( ).map ( postDTO -> postDTO.getName ( ) ).collect ( Collectors.toList ( ) );
+        return new WriteCellData <> ( StrUtil.join ( ",", postNames ) );
+    }
+
+
+}
+

+ 51 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/utils/excel/MerchantCompanyEasyExcel.java

@@ -0,0 +1,51 @@
+package com.jeeplus.test.utils.excel;
+
+import com.alibaba.excel.EasyExcel;
+import com.jeeplus.core.excel.EasyExcelUtils;
+import com.jeeplus.test.wdt.merchantCompany.service.MerchantCompanyService;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantCompanyWrapper;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+
+public class MerchantCompanyEasyExcel extends EasyExcelUtils <MerchantCompanyDTO> {
+
+    public static MerchantCompanyEasyExcel newInstance() {
+        return new MerchantCompanyEasyExcel( );
+    }
+
+    public static MerchantCompanyEasyExcel newInstance(MerchantCompanyService service, MerchantCompanyWrapper wrapper) {
+        return new MerchantCompanyEasyExcel( service, wrapper );
+    }
+
+    public MerchantCompanyEasyExcel() {
+        super ( );
+    }
+
+    public MerchantCompanyEasyExcel(MerchantCompanyService service, MerchantCompanyWrapper wrapper) {
+        super ( service, wrapper );
+    }
+
+
+    /**
+     * 功能描述:根据接收的Excel文件来导入Excel,并封装成实体类
+     *
+     * @param file      上传的文件
+     * @param pojoClass Excel实体类
+     * @return
+     * @author Steel.D
+     * @Date 2019-7-31 11:30
+     */
+
+    public String importExcel(MultipartFile file, Class <MerchantCompanyDTO> pojoClass) throws IOException {
+        if ( file == null ) {
+            return "上传文件不能为空!";
+        }
+        MerchantCompanyExcelListener merchantCompanyExcelListener = new MerchantCompanyExcelListener ( this.getService ( ), this.getWrapper ( ) );
+        EasyExcel.read ( file.getInputStream ( ), pojoClass, merchantCompanyExcelListener ).sheet ( ).doRead ( );
+        return merchantCompanyExcelListener.getMessage ( );
+
+    }
+
+}

+ 74 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/utils/excel/MerchantCompanyExcelListener.java

@@ -0,0 +1,74 @@
+package com.jeeplus.test.utils.excel;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jeeplus.common.beanvalidator.BeanValidators;
+import com.jeeplus.core.excel.ExcelListener;
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.test.wdt.merchantCompany.service.MerchantCompanyService;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.validation.ConstraintViolationException;
+import javax.validation.Validator;
+import java.util.List;
+
+@Slf4j
+public class MerchantCompanyExcelListener extends ExcelListener <MerchantCompanyDTO> {
+
+    /**
+     * 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来
+     *
+     * @param service
+     */
+    public MerchantCompanyExcelListener(IService service, EntityWrapper wrapper) {
+        super ( service, wrapper );
+    }
+
+
+    /**
+     * 加上存储数据库
+     */
+    public void saveData() {
+        try {
+            int successNum = 0;
+            int failureNum = 0;
+            StringBuilder failureMsg = new StringBuilder ( );
+            List <MerchantCompanyDTO> list = this.getCachedDataList ( );
+            for (MerchantCompanyDTO merchantCompany : list) {
+                //获取商户信息
+                MerchantCompanyDTO byCompanyName = SpringUtil.getBean(MerchantCompanyService.class).getByCompanyName(merchantCompany.getCompanyName());
+                try {
+                    if ( null == byCompanyName ) {
+                        Validator validator = SpringUtil.getBean ( Validator.class );
+                        BeanValidators.validateWithException ( validator, merchantCompany );
+                        ((MerchantCompanyService) this.getService ( )).saveOrUpdate ( merchantCompany );
+                        successNum++;
+                    } else {
+                        failureMsg.append ( "<br/>公司名称 " + byCompanyName.getCompanyName ( ) + " 已存在; " );
+                        failureNum++;
+                    }
+                } catch (ConstraintViolationException ex) {
+                    failureMsg.append ( "<br/>公司名称 " + merchantCompany.getCompanyName ( ) + " 导入失败:" );
+                    List <String> messageList = BeanValidators.extractPropertyAndMessageAsList ( ex, ": " );
+                    for (String message : messageList) {
+                        failureMsg.append ( message + "; " );
+                        failureNum++;
+                    }
+                } catch (Exception ex) {
+                    failureNum++;
+                    failureMsg.append ( "<br/>公司名称 " + merchantCompany.getCompanyName ( )+ " 导入失败:" + ex.getMessage ( ) );
+                }
+                if ( failureNum > 0 ) {
+                    failureMsg.insert ( 0, ",失败 " + failureNum + " 条公司信息,导入信息如下:" );
+                }
+            }
+            this.setMessage ( "已成功导入 " + successNum + " 条公司信息" + failureMsg );
+            log.info ( this.getMessage ( ) );
+        } catch (Exception e) {
+            e.printStackTrace ( );
+            this.setMessage ( "导入公司信息失败!失败信息:" + e.getMessage ( ) );
+            log.info ( this.getMessage ( ) );
+        }
+    }
+}

+ 158 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/MerchantCompanyController.java

@@ -0,0 +1,158 @@
+package com.jeeplus.test.wdt.merchantCompany.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.google.common.collect.Lists;
+import com.jeeplus.aop.logging.annotation.ApiLog;
+import com.jeeplus.core.excel.EasyExcelUtils;
+import com.jeeplus.core.excel.ExcelOptions;
+import com.jeeplus.core.excel.annotation.ExportMode;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.test.utils.excel.MerchantCompanyEasyExcel;
+import com.jeeplus.test.wdt.merchantCompany.service.MerchantCompanyService;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantCompanyWrapper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.io.IOException;
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+/**
+ * 入驻商家controller
+ * @author: 徐滕
+ * @version: 2024-01-04 10:40
+ */
+
+@Api("入驻商家管理")
+@RestController
+@RequestMapping(value = "/wdt/merchantCompany")
+public class MerchantCompanyController {
+    @Autowired
+    private MerchantCompanyService merchantCompanyService;
+
+    @Autowired
+    private MerchantCompanyWrapper merchantCompanyWrapper;
+
+    /**
+     * 入驻商家列表数据
+     */
+    @ApiLog("查询入驻商家列表数据")
+    @ApiOperation(value = "查询入驻商家列表数据")
+    @PreAuthorize("hasAuthority('wdt:merchantCompany:list')")
+    @GetMapping("list")
+    public ResponseEntity<IPage<MerchantCompanyDTO>> list(MerchantCompanyDTO merchantCompanyDTO, Page<MerchantCompanyDTO> page) throws Exception {
+        IPage<MerchantCompanyDTO> result = merchantCompanyService.findPage (page, merchantCompanyDTO);
+        return ResponseEntity.ok (result);
+    }
+
+    /**
+     * 根据Id获取商家基本信息
+     */
+    @ApiLog("根据Id获取商家基本信息")
+    @ApiOperation(value = "根据Id获取商家基本信息")
+    @PreAuthorize("hasAnyAuthority('wdt:merchantCompany:view','wdt:merchantCompany:add','wdt:merchantCompany:edit')")
+    @GetMapping("queryById")
+    public ResponseEntity<MerchantCompanyDTO> queryById(String id) {
+        MerchantCompanyDTO byId = merchantCompanyService.findById(id);
+        return ResponseEntity.ok ( byId);
+    }
+
+
+
+    /**
+     * 保存请假表单
+     */
+    @ApiLog("保存商家基本信息")
+    @ApiOperation(value = "保存商家基本信息")
+    @PreAuthorize("hasAnyAuthority('wdt:merchantCompany:add','wdt:merchantCompany:edit')")
+    @PostMapping("save")
+    public  ResponseEntity <String> save(@Valid @RequestBody MerchantCompanyDTO merchantCompanyDTO) {
+        //新增或编辑表单保存
+        merchantCompanyService.saveOrUpdate (merchantCompanyDTO);
+        return ResponseEntity.ok ( "保存商家基本信息成功" );
+    }
+
+
+    /**
+     * 删除请假表单
+     */
+    @ApiLog("删除商家基本信息")
+    @ApiOperation(value = "删除商家基本信息")
+    @PreAuthorize("hasAuthority('wdt:merchantCompany:del')")
+    @DeleteMapping("delete")
+    public ResponseEntity <String> delete(String ids) {
+        String idArray[] = ids.split(",");
+        merchantCompanyService.removeByIds ( Lists.newArrayList ( idArray ) );
+        return ResponseEntity.ok( "删除商家基本信息成功" );
+    }
+
+
+
+    /**
+     * 导入入驻商家数据
+     *
+     * @return
+     */
+    @PreAuthorize("hasAnyAuthority('wdt:merchantCompany:import')")
+    @PostMapping("import")
+    public ResponseEntity importFile(MultipartFile file) throws IOException {
+        String result = MerchantCompanyEasyExcel.newInstance ( merchantCompanyService, MerchantCompanyWrapper.INSTANCE ).importExcel ( file, MerchantCompanyDTO.class );
+        return ResponseEntity.ok ( result );
+    }
+
+    /**
+     * 下载导入入驻商家数据模板
+     *
+     * @param response
+     * @return
+     */
+    @PreAuthorize ("hasAnyAuthority('wdt:merchantCompany:import')")
+    @GetMapping("import/template")
+    public void importFileTemplate(HttpServletResponse response) throws IOException {
+        String fileName = "入驻商家数据导入模板.xlsx";
+        List<MerchantCompanyDTO> list = Lists.newArrayList();
+        EasyExcelUtils.newInstance ( merchantCompanyService, merchantCompanyWrapper ).exportExcel ( list,  "入驻商家数据", MerchantCompanyDTO.class, fileName, null, response );
+    }
+
+
+    /**
+     * 导出入驻商家数据
+     *
+     * @param merchantCompanyDTO
+     * @param page
+     * @param response
+     * @throws Exception
+     */
+    @ApiLog("导出入驻商家数据")
+    @PreAuthorize("hasAnyAuthority('wdt:merchantCompany:export')")
+    @GetMapping("export")
+    public void exportFile(MerchantCompanyDTO merchantCompanyDTO, Page <MerchantCompanyDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename ( );
+        QueryWrapper queryWrapper = QueryWrapperGenerator.buildQueryCondition (merchantCompanyDTO, MerchantCompanyDTO.class);
+        List<MerchantCompanyDTO> result;
+        if (ExportMode.current.equals(options.getMode())) {
+            result = merchantCompanyService.findPage(page, merchantCompanyDTO).getRecords();
+        } else if (ExportMode.selected.equals(options.getMode())) {
+            result = merchantCompanyService.findPage(page, merchantCompanyDTO).getRecords().stream().filter(merchantCompanyDTO1 ->
+                    options.getSelectIds().contains(merchantCompanyDTO1.getId())
+            ).collect(Collectors.toList());
+        } else {
+            page.setSize(-1);
+            page.setCurrent(0);
+            result = merchantCompanyService.findPage(page, merchantCompanyDTO).getRecords();
+        }
+        EasyExcelUtils.newInstance ( merchantCompanyService, merchantCompanyWrapper ).exportExcel ( result,  options.getSheetName ( ), MerchantCompanyDTO.class, fileName,options.getExportFields (), response );
+    }
+
+}

+ 87 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/controller/SettledPlatformController.java

@@ -0,0 +1,87 @@
+package com.jeeplus.test.wdt.merchantCompany.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.google.common.collect.Lists;
+import com.jeeplus.aop.logging.annotation.ApiLog;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.test.wdt.merchantCompany.service.SettledPlatformService;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.SettledPlatformWrapper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 入驻平台controller
+ * @author: 徐滕
+ * @version: 2024-01-04 15:12
+ */
+@Api("入驻平台管理")
+@RestController
+@RequestMapping(value = "/wdt/settledPlatform")
+public class SettledPlatformController {
+    @Autowired
+    private SettledPlatformService settledPlatformService;
+
+    @Autowired
+    private SettledPlatformWrapper settledPlatformWrapper;
+
+    /**
+     * 入驻平台列表数据
+     */
+    @ApiLog("查询入驻平台列表数据")
+    @ApiOperation(value = "查询入驻平台列表数据")
+    @PreAuthorize("hasAuthority('wdt:settledPlatform:list')")
+    @GetMapping("list")
+    public ResponseEntity<IPage<SettledPlatformDTO>> list(SettledPlatformDTO settledPlatformDTO, Page<SettledPlatformDTO> page) throws Exception {
+        IPage<SettledPlatformDTO> result = settledPlatformService.findPage (page, settledPlatformDTO);
+        return ResponseEntity.ok (result);
+    }
+
+    /**
+     * 根据Id获取商家基本信息
+     */
+    @ApiLog("根据Id获取入驻平台基本信息")
+    @ApiOperation(value = "根据Id获取入驻平台基本信息")
+    @PreAuthorize("hasAnyAuthority('wdt:settledPlatform:view','wdt:settledPlatform:add','wdt:settledPlatform:edit')")
+    @GetMapping("queryById")
+    public ResponseEntity<SettledPlatformDTO> queryById(String id) {
+        return ResponseEntity.ok ( settledPlatformService.findById ( id ) );
+    }
+
+
+
+    /**
+     * 保存请假表单
+     */
+    @ApiLog("保存入驻平台基本信息")
+    @ApiOperation(value = "保存入驻平台基本信息")
+    @PreAuthorize("hasAnyAuthority('wdt:settledPlatform:add','wdt:settledPlatform:edit')")
+    @PostMapping("save")
+    public ResponseEntity<String> save(@Valid @RequestBody SettledPlatformDTO settledPlatformDTO) {
+        //新增或编辑表单保存
+        settledPlatformService.saveOrUpdate (settledPlatformWrapper.toEntity (settledPlatformDTO));
+        return ResponseEntity.ok ( "保存入驻平台基本信息成功" );
+    }
+
+
+    /**
+     * 删除请假表单
+     */
+    @ApiLog("删除入驻平台基本信息")
+    @ApiOperation(value = "删除入驻平台基本信息")
+    @PreAuthorize("hasAuthority('wdt:settledPlatform:del')")
+    @DeleteMapping("delete")
+    public ResponseEntity <String> delete(String ids) {
+        String idArray[] = ids.split(",");
+        settledPlatformService.removeByIds ( Lists.newArrayList ( idArray ) );
+        return ResponseEntity.ok( "删除入驻平台基本信息成功" );
+    }
+}

+ 49 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/MerchantCompany.java

@@ -0,0 +1,49 @@
+package com.jeeplus.test.wdt.merchantCompany.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+ * 入驻商家表
+ * @author: 徐滕
+ * @version: 2024-01-04 10:41
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("merchant_company_info")
+public class MerchantCompany extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 公司名称
+     */
+    private String companyName;
+
+    /**
+     * 联系人名称
+     */
+    private String linkmanName;
+
+    /**
+     * 联系人电话
+     */
+    private String linkmanPhone;
+
+    /**
+     * 从业人员
+     */
+    private Integer practitionerCount;
+
+    /**
+     * 年销售额
+     */
+    private String annualSales;
+
+    /**
+     * 网络零售额
+     */
+    private String onlineRetailSales;
+}

+ 25 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/domain/SettledPlatform.java

@@ -0,0 +1,25 @@
+package com.jeeplus.test.wdt.merchantCompany.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author: 徐滕
+ * @version: 2024-01-04 14:54
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("merchant_settled_platform")
+public class SettledPlatform extends BaseEntity {
+
+    /**
+     * 入驻平台名称
+     */
+    String name;
+    /**
+     * 入驻平台排序
+     */
+    String sort;
+}

+ 55 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/MerchantCompanyMapper.java

@@ -0,0 +1,55 @@
+package com.jeeplus.test.wdt.merchantCompany.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantCompany;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 入驻商家mapper
+ * @author: 徐滕
+ * @version: 2024-01-04 10:59
+ */
+public interface MerchantCompanyMapper extends BaseMapper<MerchantCompany> {
+
+
+    /**
+     * 根据id获取入驻商家信息
+     * @param id
+     * @return
+     */
+    MerchantCompanyDTO findById(String id);
+
+    /**
+     * 根据商户名称获取入驻商家信息
+     * @param companyName
+     * @return
+     */
+    MerchantCompanyDTO getByCompanyName(String companyName);
+
+
+    /**
+     * 获取入驻商家表单列表
+     *
+     * @param queryWrapper
+     * @return
+     */
+    IPage<MerchantCompanyDTO> findList(Page<MerchantCompanyDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
+    /**
+     * 根据商户id删除入驻平台信息
+     * @param id
+     */
+    void deleteSettledPlatform(String id);
+
+    /**
+     * 根据商户id和入驻平台id新增数据
+     * @param id
+     * @param settledPlatformId
+     */
+    void insertSettledPlatform(@Param("id") String id ,@Param("settledPlatformId") String settledPlatformId);
+}

+ 34 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/SettledPlatformMapper.java

@@ -0,0 +1,34 @@
+package com.jeeplus.test.wdt.merchantCompany.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.test.wdt.merchantCompany.domain.SettledPlatform;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 入驻平台mapper
+ * @author: 徐滕
+ * @version: 2024-01-04 15:59
+ */
+public interface SettledPlatformMapper extends BaseMapper<SettledPlatform> {
+
+    /**
+     * 根据id获取入驻平台信息
+     * @param id
+     * @return
+     */
+    SettledPlatformDTO findById(String id);
+
+
+    /**
+     * 获取入驻平台表单列表
+     *
+     * @param queryWrapper
+     * @return
+     */
+    IPage<SettledPlatformDTO> findList(Page<SettledPlatformDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+}

+ 80 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/MerchantCommanyMapper.xml

@@ -0,0 +1,80 @@
+<?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.jeeplus.test.wdt.merchantCompany.mapper.MerchantCompanyMapper">
+
+    <resultMap id="merchantCompanyResult" type="com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO">
+        <id property="id" column="id"/>
+        <result property="companyName" column="companyName"/>
+        <result property="linkmanName" column="linkmanName"/>
+        <result property="linkmanPhone" column="linkmanPhone"/>
+        <result property="practitionerCount" column="practitionerCount"/>
+        <result property="annualSales" column="annualSales"/>
+        <result property="onlineRetailSales" column="onlineRetailSales"/>
+        <collection property="settledPlatformDTOList" javaType="java.util.List" ofType="com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO">
+            <id property="id" column="settledPlatformDTO.id"/>
+            <result property="name" column="settledPlatformDTO.name"/>
+            <result property="sort" column="settledPlatformDTO.sort"/>
+        </collection>
+    </resultMap>
+
+    <sql id="merchantCompanyColumns">
+		a.id AS "id",
+		a.create_by_id AS "createBy.id",
+		a.create_time AS "createTime",
+		a.update_by_id AS "updateBy.id",
+		a.update_time AS "updateTime",
+		a.del_flag AS "delFlag",
+		a.remarks AS "remarks",
+        a.company_name AS "companyName",
+        a.linkman_name AS "linkmanName",
+        a.linkman_phone AS "linkmanPhone",
+        a.practitioner_count AS "practitionerCount",
+        a.annual_sales AS "annualSales",
+        a.online_retail_sales AS "onlineRetailSales"
+	</sql>
+
+    <sql id="merchantCompanyJoins">
+		LEFT JOIN sys_user user ON user.id = a.create_by_id
+	</sql>
+
+
+
+    <select id="findById" resultMap="merchantCompanyResult">
+        SELECT
+        <include refid="merchantCompanyColumns"/>
+        ,msp.id AS "settledPlatformDTO.id",
+        msp.sort AS "settledPlatformDTO.sort",
+        msp.name AS "settledPlatformDTO.name"
+        FROM merchant_company_info a
+        <include refid="merchantCompanyJoins"/>
+        left join merchant_company_occupancy_relation_info mcori on mcori.company_id = a.id
+        left join merchant_settled_platform msp on msp.id = mcori.occupancy_id
+        WHERE a.id = #{id} and a.del_flag = 0
+    </select>
+
+    <select id="getByCompanyName" resultType="com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO">
+        SELECT
+        <include refid="merchantCompanyColumns"/>
+        FROM merchant_company_info a
+        <include refid="merchantCompanyJoins"/>
+        WHERE a.company_name = #{companyName} and a.del_flag = 0
+    </select>
+
+    <select id="findList" resultType="com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO">
+        SELECT
+        <include refid="merchantCompanyColumns"/>
+        FROM merchant_company_info a
+        <include refid="merchantCompanyJoins"/>
+        ${ew.customSqlSegment}
+    </select>
+
+    <delete id="deleteSettledPlatform">
+        delete from merchant_company_occupancy_relation_info where company_id = #{id}
+    </delete>
+
+    <insert id="insertSettledPlatform">
+        INSERT INTO merchant_company_occupancy_relation_info(company_id, occupancy_id)
+        VALUES (#{id}, #{settledPlatformId})
+    </insert>
+
+</mapper>

+ 40 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/mapper/xml/SettledPlatformMapper.xml

@@ -0,0 +1,40 @@
+<?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.jeeplus.test.wdt.merchantCompany.mapper.SettledPlatformMapper">
+
+
+    <sql id="merchantSettledPlatformColumns">
+		a.id AS "id",
+		a.create_by_id AS "createBy.id",
+		a.create_time AS "createTime",
+		a.update_by_id AS "updateBy.id",
+		a.update_time AS "updateTime",
+		a.del_flag AS "delFlag",
+		a.remarks AS "remarks",
+        a.name AS "name",
+        a.sort AS "sort"
+	</sql>
+
+    <sql id="merchantSettledPlatformJoins">
+		LEFT JOIN sys_user user ON user.id = a.create_by_id
+	</sql>
+
+
+
+    <select id="findById" resultType="com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO">
+        SELECT
+        <include refid="merchantSettledPlatformColumns"/>
+        FROM merchant_settled_platform a
+        <include refid="merchantSettledPlatformJoins"/>
+        WHERE a.id = #{id} and a.del_flag = 0
+    </select>
+
+    <select id="findList" resultType="com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO">
+        SELECT
+        <include refid="merchantSettledPlatformColumns"/>
+        FROM merchant_settled_platform a
+        <include refid="merchantSettledPlatformJoins"/>
+        ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 118 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/MerchantCompanyService.java

@@ -0,0 +1,118 @@
+package com.jeeplus.test.wdt.merchantCompany.service;
+
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantCompany;
+import com.jeeplus.test.wdt.merchantCompany.mapper.MerchantCompanyMapper;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantCompanyWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * 入驻商家service
+ * @author: 徐滕
+ * @version: 2024-01-04 10:56
+ */
+@Service
+@Transactional
+public class MerchantCompanyService extends ServiceImpl<MerchantCompanyMapper, MerchantCompany> {
+
+    @Autowired
+    private MerchantCompanyWrapper merchantCompanyWrapper;
+
+    /**
+     * 自定义分页检索
+     * @param page
+     * @param merchantCompanyDTO
+     * @return
+     */
+    public IPage<MerchantCompanyDTO> findPage(Page<MerchantCompanyDTO> page, MerchantCompanyDTO merchantCompanyDTO) throws Exception {
+        QueryWrapper<MerchantCompany> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( MerchantCompanyWrapper.INSTANCE.toEntity(merchantCompanyDTO), MerchantCompany.class );
+
+        queryWrapper.eq ("a.del_flag", 0 ); // 排除已经删除
+        queryWrapper.orderByDesc("a.update_time");
+        if(StringUtils.isNotBlank(merchantCompanyDTO.getCompanyName())){
+            queryWrapper.like("a.company_name",merchantCompanyDTO.getCompanyName());
+        }
+        if(StringUtils.isNotBlank(merchantCompanyDTO.getLinkmanName())){
+            queryWrapper.like("a.linkman_name",merchantCompanyDTO.getLinkmanName());
+        }
+        if(StringUtils.isNotBlank(merchantCompanyDTO.getLinkmanPhone())){
+            queryWrapper.like("a.linkman_phone",merchantCompanyDTO.getLinkmanPhone());
+        }
+        if (merchantCompanyDTO.getAnnualSalesList() != null && merchantCompanyDTO.getAnnualSalesList().length > 0) {
+            if(merchantCompanyDTO.getAnnualSalesList().length == 1){
+                queryWrapper.ge("a.annual_sales",merchantCompanyDTO.getAnnualSalesList()[0]);
+            }else{
+                queryWrapper.between("a.annual_sales", merchantCompanyDTO.getAnnualSalesList()[0], merchantCompanyDTO.getAnnualSalesList()[1]);
+            }
+        }
+        if (merchantCompanyDTO.getOnlineRetailSalesList() != null && merchantCompanyDTO.getOnlineRetailSalesList().length > 0) {
+            if(merchantCompanyDTO.getOnlineRetailSalesList().length == 1){
+                queryWrapper.ge("a.online_retail_sales",merchantCompanyDTO.getOnlineRetailSalesList()[0]);
+            }else {
+                queryWrapper.between("a.online_retail_sales", merchantCompanyDTO.getOnlineRetailSalesList()[0], merchantCompanyDTO.getOnlineRetailSalesList()[1]);
+            }
+        }
+        if (merchantCompanyDTO.getDates() != null && merchantCompanyDTO.getDates().length > 0) {
+            if(merchantCompanyDTO.getDates().length == 1){
+                queryWrapper.ge("a.create_time",merchantCompanyDTO.getDates()[0]);
+            }else {
+                queryWrapper.between("a.create_time", merchantCompanyDTO.getDates()[0], merchantCompanyDTO.getDates()[1]);
+            }
+        }
+        return  baseMapper.findList (page, queryWrapper);
+    }
+
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    public MerchantCompanyDTO findById(String id) {
+        return baseMapper.findById ( id );
+    }
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    public MerchantCompanyDTO getByCompanyName(String companyName) {
+        return baseMapper.getByCompanyName ( companyName );
+    }
+
+
+
+
+    /**
+     * 保存或者更新商户信息
+     *
+     * @param merchantCompanyDTO
+     */
+    public void saveOrUpdate(MerchantCompanyDTO merchantCompanyDTO) {
+        MerchantCompany merchantCompany = merchantCompanyWrapper.toEntity ( merchantCompanyDTO );
+        super.saveOrUpdate ( merchantCompany );
+        if ( StrUtil.isBlank ( merchantCompanyDTO.getId ( ) ) ) {
+            merchantCompanyDTO.setId ( merchantCompany.getId ( ) );
+        }
+        // 更新商户与入驻平台关系
+        baseMapper.deleteSettledPlatform ( merchantCompanyDTO.getId ( ) );
+        if ( merchantCompanyDTO.getSettledPlatformDTOList ( ) != null ) {
+            merchantCompanyDTO.getSettledPlatformDTOList ( ).forEach ( SettledPlatformDTO -> {
+                baseMapper.insertSettledPlatform ( merchantCompanyDTO.getId ( ), SettledPlatformDTO.getId ( ) );
+            } );
+        } else {
+            throw new RuntimeException ( merchantCompanyDTO.getCompanyName() + "没有入驻平台!" );
+        }
+    }
+
+}

+ 66 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/SettledPlatformService.java

@@ -0,0 +1,66 @@
+/**
+ * Copyright © 2021-2026 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.test.wdt.merchantCompany.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.sys.domain.Post;
+import com.jeeplus.sys.mapper.PostMapper;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantCompany;
+import com.jeeplus.test.wdt.merchantCompany.domain.SettledPlatform;
+import com.jeeplus.test.wdt.merchantCompany.mapper.SettledPlatformMapper;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.MerchantCompanyWrapper;
+import com.jeeplus.test.wdt.merchantCompany.service.mapstuct.SettledPlatformWrapper;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 入驻平台Service
+ * @author 徐滕
+ * @version 2024-01-04 15:18
+ */
+@Service
+@Transactional
+public class SettledPlatformService extends ServiceImpl <SettledPlatformMapper, SettledPlatform> {
+
+    /**
+     * 自定义分页检索
+     * @param page
+     * @param settledPlatformDTO
+     * @return
+     */
+    public IPage<SettledPlatformDTO> findPage(Page<SettledPlatformDTO> page, SettledPlatformDTO settledPlatformDTO) throws Exception {
+        QueryWrapper<SettledPlatform> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( SettledPlatformWrapper.INSTANCE.toEntity(settledPlatformDTO), SettledPlatform.class );
+        queryWrapper.eq ("a.del_flag", 0 ); // 排除已经删除
+        queryWrapper.orderByAsc("a.sort");
+        if(StringUtils.isNotBlank(settledPlatformDTO.getName())){
+            queryWrapper.like("a.name",settledPlatformDTO.getName());
+        }
+        if (settledPlatformDTO.getDates() != null && settledPlatformDTO.getDates().length > 0) {
+            if(settledPlatformDTO.getDates().length == 1){
+                queryWrapper.ge("a.create_time",settledPlatformDTO.getDates()[0]);
+            }else {
+                queryWrapper.between("a.create_time", settledPlatformDTO.getDates()[0], settledPlatformDTO.getDates()[1]);
+            }
+        }
+        return  baseMapper.findList (page, queryWrapper);
+    }
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    public SettledPlatformDTO findById(String id) {
+        return baseMapper.findById ( id );
+    }
+
+}

+ 127 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/MerchantCompanyDTO.java

@@ -0,0 +1,127 @@
+package com.jeeplus.test.wdt.merchantCompany.service.dto;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.google.common.collect.Lists;
+import com.jeeplus.core.query.Query;
+import com.jeeplus.core.query.QueryType;
+import com.jeeplus.core.service.dto.BaseDTO;
+import com.jeeplus.sys.service.dto.PostDTO;
+import com.jeeplus.test.core.excel.converter.ExcelSettledPlatformListDTOConverter;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+/**
+ * 入驻商家表
+ * @author: 徐滕
+ * @version: 2024-01-04 10:42
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class MerchantCompanyDTO extends BaseDTO {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 公司名称
+     */
+    @ExcelProperty("公司名称")
+    private String companyName;
+
+    /**
+     * 联系人名称
+     */
+    @ExcelProperty("联系人名称")
+    private String linkmanName;
+
+    /**
+     * 联系人电话
+     */
+    @ExcelProperty("联系人电话")
+    private String linkmanPhone;
+
+    /**
+     * 从业人员
+     */
+    @ExcelProperty("从业人员")
+    private Integer practitionerCount;
+
+    /**
+     * 年销售额
+     */
+    @ExcelProperty("年销售额")
+    private String annualSales;
+
+    /**
+     * 网络零售额
+     */
+    @ExcelProperty("网络零售额")
+    private String onlineRetailSales;
+
+
+    /**
+     * 年销售额区间
+     */
+    @ExcelIgnore
+    private String[] annualSalesList;
+
+    /**
+     * 网络零售额区间
+     */
+    @ExcelIgnore
+    private String[] onlineRetailSalesList;
+
+    /**
+     * 创建时间区间
+     */
+    @ExcelIgnore
+    private String[] dates;
+
+    /**
+     * 入驻平台
+     */
+    @ExcelIgnore
+    @Query(type = QueryType.EQ, javaField = "settledPlatformDTO.id", tableColumn = "msp.id")
+    private SettledPlatformDTO settledPlatformDTO;
+
+    /**
+     * 入驻平台列表
+     */
+    @ApiModelProperty(hidden = true)
+    @JsonIgnore
+    @ExcelProperty(value = "入驻平台", converter = ExcelSettledPlatformListDTOConverter.class)
+    private List<SettledPlatformDTO> settledPlatformDTOList = Lists.newArrayList ( );
+
+
+
+    /**
+     * 获取包含的入驻平台id列表
+     *
+     * @return
+     */
+    public List <String> getSettledPlatformIdList() {
+        if ( settledPlatformDTOList == null ) {
+            return Lists.newArrayList ( );
+        }
+        List <String> settledPlatformIdList = settledPlatformDTOList.stream ( ).map ( settledPlatformDTO -> settledPlatformDTO.getId ( ) ).collect ( Collectors.toList ( ) );
+        return settledPlatformIdList;
+    }
+
+    /**
+     * 设置入驻平台
+     *
+     * @param settledPlatformIdList
+     */
+    public void setSettledPlatformIdList(List <String> settledPlatformIdList) {
+        for (String settledPlatformId : settledPlatformIdList) {
+            SettledPlatformDTO postDTO = new SettledPlatformDTO ( settledPlatformId );
+            settledPlatformDTOList.add ( postDTO );
+        }
+    }
+}

+ 37 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/dto/SettledPlatformDTO.java

@@ -0,0 +1,37 @@
+package com.jeeplus.test.wdt.merchantCompany.service.dto;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author: 徐滕
+ * @version: 2024-01-04 14:54
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class SettledPlatformDTO extends BaseDTO {
+
+    /**
+     * 入驻平台名称
+     */
+    String name;
+    /**
+     * 入驻平台排序
+     */
+    String sort;
+
+    /**
+     * 创建时间区间
+     */
+    private String[] dates;
+
+
+    public SettledPlatformDTO() {
+        super ( );
+    }
+
+    public SettledPlatformDTO(String id) {
+        super ( id );
+    }
+}

+ 31 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/mapstuct/MerchantCompanyWrapper.java

@@ -0,0 +1,31 @@
+package com.jeeplus.test.wdt.merchantCompany.service.mapstuct;
+
+import com.jeeplus.core.mapstruct.TreeWrapper;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantCompany;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.Mappings;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+/**
+ * 入驻商家MAPPER接口
+ * @author 刘高峰
+ * @version 2024-01-04 10:42
+ */
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {} )
+public interface MerchantCompanyWrapper extends TreeWrapper<MerchantCompanyDTO, MerchantCompany> {
+
+    MerchantCompanyWrapper INSTANCE = Mappers.getMapper(MerchantCompanyWrapper.class);
+    @Mappings({
+            @Mapping(source = "createBy.id", target = "createById"),
+            @Mapping (source = "updateBy.id", target = "updateById")})
+    MerchantCompany toEntity(MerchantCompanyDTO dto);
+
+
+    @Mappings({
+            @Mapping (source = "createById", target = "createBy.id"),
+            @Mapping (source = "updateById", target = "updateBy.id")})
+    MerchantCompanyDTO toDTO(MerchantCompany entity);
+}

+ 33 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/merchantCompany/service/mapstuct/SettledPlatformWrapper.java

@@ -0,0 +1,33 @@
+package com.jeeplus.test.wdt.merchantCompany.service.mapstuct;
+
+import com.jeeplus.core.mapstruct.TreeWrapper;
+import com.jeeplus.test.wdt.merchantCompany.domain.MerchantCompany;
+import com.jeeplus.test.wdt.merchantCompany.domain.SettledPlatform;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.MerchantCompanyDTO;
+import com.jeeplus.test.wdt.merchantCompany.service.dto.SettledPlatformDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.Mappings;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+/**
+ * 入驻平台MAPPER接口
+ * @author 刘高峰
+ * @version 2024-01-04 10:42
+ */
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {} )
+public interface SettledPlatformWrapper extends TreeWrapper<SettledPlatformDTO, SettledPlatform> {
+
+    SettledPlatformWrapper INSTANCE = Mappers.getMapper(SettledPlatformWrapper.class);
+    @Mappings({
+            @Mapping(source = "createBy.id", target = "createById"),
+            @Mapping (source = "updateBy.id", target = "updateById")})
+    SettledPlatform toEntity(SettledPlatformDTO dto);
+
+
+    @Mappings({
+            @Mapping (source = "createById", target = "createBy.id"),
+            @Mapping (source = "updateById", target = "updateBy.id")})
+    SettledPlatformDTO toDTO(SettledPlatform entity);
+}

+ 44 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/Demo.java

@@ -0,0 +1,44 @@
+package com.jeeplus.test.wdt.wangdian.api;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Demo {
+
+	/*public static void main(String[] args) {
+        //sid appkey secret url
+		WdtClient client = new WdtClient("apidevnew2", "dttz1315-test", "0260abfd4", "https://sandbox.wangdian.cn/openapi2/");
+
+		Map<String, String> params = new HashMap<String, String>();
+		try {
+			String response = client.execute("warehouse.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}*/
+
+	@SuppressWarnings("unchecked")
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("apidevnew2", "dttz1315-test", "0260abfd4", "https://sandbox.wangdian.cn/openapi2/");
+		//测试环境sid、appkey、密钥请到旺店通开放平台-自助对接-申请测试环境内查看,测试环境url=https://sandbox.wangdian.cn/openapi2/
+		//调用正式环境时请将sid、appkey、appsecret切换为实际参数,参数在旺店通开放平台-自助对接-应用管理内应用状态为已上线的应用中查看,调用正式环境注意切换正式环境url=https://api.wangdian.cn/openapi2/
+
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("type", "1");
+		params.put("warehouse_no", "012");
+
+
+		try {
+			String response = client.execute("warehouse_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 130 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/WdtClient.java

@@ -0,0 +1,130 @@
+package com.jeeplus.test.wdt.wangdian.api;
+
+
+import com.jeeplus.test.wdt.wangdian.utils.WebUtils;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.security.GeneralSecurityException;
+import java.security.MessageDigest;
+import java.util.Arrays;
+import java.util.Map;
+
+public class WdtClient {
+	
+	private String appkey;
+	private String appsecret;
+	private String sid;
+	private String baseUrl;
+	
+	private int connectTimeout = 3000;//3秒
+	private int readTimeout = 15000;//15秒
+	
+	public WdtClient(String sid, String appkey, String appsecret, String baseUrl)
+	{
+		this.sid = sid;
+		this.appkey = appkey;
+		this.appsecret = appsecret;
+		this.baseUrl = baseUrl;
+		
+		if(!this.baseUrl.endsWith("/")) 
+			this.baseUrl = this.baseUrl+"/";
+	}
+	
+	public void setTimeout(int connectTimeout, int readTimeout)
+	{
+		this.connectTimeout = connectTimeout;
+		this.readTimeout = readTimeout;
+	}
+	
+	private static String getStringFromException(Throwable e) {
+		String result = "";
+		ByteArrayOutputStream bos = new ByteArrayOutputStream();
+		PrintStream ps = new PrintStream(bos);
+		e.printStackTrace(ps);
+		try {
+			result = bos.toString("UTF-8");
+		} catch (IOException ioe) {
+		}
+		return result;
+	}
+	
+	private static byte[] encryptMD5(String data) throws IOException {
+		byte[] bytes = null;
+		try {
+			MessageDigest md = MessageDigest.getInstance("MD5");
+			bytes = md.digest(data.getBytes("UTF-8"));
+		} catch (GeneralSecurityException gse) {
+			String msg = getStringFromException(gse);
+			throw new IOException(msg);
+		}
+		return bytes;
+	}
+	
+	private static String byte2hex(byte[] bytes) {
+		StringBuilder sign = new StringBuilder();
+		for (int i = 0; i < bytes.length; i++) {
+			String hex = Integer.toHexString(bytes[i] & 0xFF);
+			if (hex.length() == 1) {
+				//保证所有的16进制都是两位:00-ff,其中[80~ff]代表[-128,-1]
+				sign.append("0");
+			}
+			sign.append(hex);
+		}
+		return sign.toString();
+	}
+	
+	/**
+	 * 给TOP请求签名。
+	 * 
+	 * @param requestHolder 所有字符型的TOP请求参数
+	 * @param secret 签名密钥
+	 * @return 签名
+	 * @throws IOException 
+	 */
+	public static String signRequest(Map<String, String> params, String appsecret) throws IOException {
+		// 第一步:检查参数是否已经排序
+		String[] keys = params.keySet().toArray(new String[0]);
+		Arrays.sort(keys);
+
+		// 第二步:把所有参数名和参数值串在一起
+		StringBuilder query = new StringBuilder();
+		for (String key : keys) {
+			if("sign".equals(key))
+				continue;
+			
+			if(query.length() > 0)
+				query.append(';');
+			
+			int len = key.length();
+			query.append(String.format("%02d", len)).append('-').append(key).append(':');
+			
+			String value = params.get(key);
+			
+			len = value.length();
+			query.append(String.format("%04d", len)).append('-').append(value);
+			
+		}
+		
+		query.append(appsecret);
+		
+		// 第三步:使用MD5加密
+		byte[] bytes = encryptMD5(query.toString());
+
+		// 第四步:把二进制转化为大写的十六进制
+		return byte2hex(bytes);
+	}
+	
+	public String execute(String relativeUrl, Map<String, String> params) throws IOException {
+		
+		params.put("appkey", this.appkey);
+		params.put("sid", this.sid);
+		params.put("timestamp", Long.toString(System.currentTimeMillis()/1000));
+		
+		params.put("sign", signRequest(params, this.appsecret));
+		
+		return WebUtils.doPost(this.baseUrl + relativeUrl, params, "UTF-8", connectTimeout, readTimeout, null);
+		
+	}
+}

+ 27 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/LogisticsQuery.java

@@ -0,0 +1,27 @@
+package com.jeeplus.test.wdt.wangdian.api.basic;
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class LogisticsQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("logistics_no", "11");
+
+		try {
+			String response = client.execute("logistics.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 31 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/PurchaseProviderCreate.java

@@ -0,0 +1,31 @@
+package com.jeeplus.test.wdt.wangdian.api.basic;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class PurchaseProviderCreate {
+	public static void main(String[] args) {
+        //sid appkey secret url
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("provider_no", "ghs123");
+		params.put("provider_name", "sfa");
+		params.put("min_purchase_num", "1");
+		params.put("purchase_cycle_days", "1");
+		params.put("arrive_cycle_days", "1");
+		params.put("last_purchase_time", "2018-10-10 00:00:00");
+		try {
+			String response = client.execute("purchase_provider_create.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/PurchaseProviderQuery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.basic;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class PurchaseProviderQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("column", "provider_name,address,website,remark,is_disabled,deleted,modified,created");
+
+		try {
+			String response = client.execute("purchase_provider_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/ShopQuery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.basic;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ShopQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("shop_no", "ghs2test");
+
+		try {
+			String response = client.execute("shop.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 30 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/basic/WarehouseQuery.java

@@ -0,0 +1,30 @@
+package com.jeeplus.test.wdt.wangdian.api.basic;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class WarehouseQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("warehouse_type", "1");
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-11 00:00:00");
+
+		try {
+			String response = client.execute("shop.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 48 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/goods/ApiGoodsSpecPush.java

@@ -0,0 +1,48 @@
+package com.jeeplus.test.wdt.wangdian.api.goods;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ApiGoodsSpecPush {
+
+	@SuppressWarnings("unchecked")
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+
+		Map<String, Object> api_goods_info = new HashMap<String,Object>();
+		Map<String, Object>[] goods_list = new Map[1];
+
+		goods_list[0] = new HashMap<String,Object>();
+		goods_list[0].put("goods_id", "20151009100903");
+		goods_list[0].put("spec_id","20151009100903");
+		goods_list[0].put("goods_no", "stest");
+		goods_list[0].put("spec_no", "stes12");
+		goods_list[0].put("status", "1");
+		
+		api_goods_info.put("platform_id", "127");
+		api_goods_info.put("shop_no", "lx2test");
+		api_goods_info.put("goods_list", goods_list);
+		
+		//通过第三方json解析工具类fastjson将map解析成json
+		String api_goods_info_json = JSON.toJSONString(api_goods_info);
+		//System.out.println(goods_list_json);
+		
+		Map<String, String> params = new HashMap<String, String>(); 
+
+		params.put("api_goods_info", api_goods_info_json);
+		try {
+			String response = client.execute("api_goodsspec_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 53 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/goods/GoodsPush.java

@@ -0,0 +1,53 @@
+package com.jeeplus.test.wdt.wangdian.api.goods;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class GoodsPush {
+	
+	@SuppressWarnings("unchecked")
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+
+		Map<String, Object>[] goods_list = new Map[1];
+		Map<String, Object>[] spec_list = new Map[2];
+
+		
+		spec_list[0] = new HashMap<String, Object>();
+		spec_list[0].put("spec_no", "ghs2018120503");
+		spec_list[0].put("spec_code", "test001_01132");
+		spec_list[0].put("spec_name", "test001_01132");
+		
+		spec_list[1] = new HashMap<String, Object>();
+		spec_list[1].put("spec_no", "ghs2018120505");
+		spec_list[1].put("spec_code", "test001_01134");
+		spec_list[1].put("spec_name", "test001_01133");
+		
+		goods_list[0] = new HashMap<String,Object>();
+		goods_list[0].put("goods_no", "ghs1207");
+		goods_list[0].put("goods_type","1");
+		goods_list[0].put("goods_name", "stest");
+		goods_list[0].put("spec_list", spec_list);
+		
+		//通过第三方json解析工具类fastjson将map解析成json
+		String goods_list_json = JSON.toJSONString(goods_list);
+		//System.out.println(goods_list_json);
+		
+		Map<String, String> params = new HashMap<String, String>(); 
+		params.put("goods_list", goods_list_json);
+		try {
+			String response = client.execute("goods_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/goods/GoodsQuery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.goods;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class GoodsQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-06 00:00:00");
+		try {
+			String response = client.execute("goods_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 55 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseOrderPush.java

@@ -0,0 +1,55 @@
+package com.jeeplus.test.wdt.wangdian.api.purchase;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class PurchaseOrderPush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, Object> purchase_info = new HashMap<String, Object>();
+		List<Map<String, Object>> details_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> detail_1 = new HashMap<String, Object>();
+		detail_1.put("spec_no", "qqq");
+		detail_1.put("num", "2");
+		detail_1.put("price", 1);
+		detail_1.put("discount", 2);
+		detail_1.put("tax", "0.1");
+		detail_1.put("tax_price", "1.2");
+		detail_1.put("remark", "API测试");
+		detail_1.put("prop1", "011");
+		detail_1.put("prop2", "022");
+		
+		details_list.add(detail_1);
+		
+		purchase_info.put("provider_no", "001");
+		purchase_info.put("warehouse_no", "aiyi2test");
+		purchase_info.put("outer_no", "ghs2018121001");
+		purchase_info.put("is_check", "1");
+		purchase_info.put("contact", "啊啊啊");
+		purchase_info.put("details_list", details_list);
+		
+		String purchase_info_json = JSON.toJSONString(purchase_info);
+		//System.out.println(purchase_info_json);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("purchase_info", purchase_info_json);
+		try {
+			String response = client.execute("purchase_order_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 27 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseOrderQuery.java

@@ -0,0 +1,27 @@
+package com.jeeplus.test.wdt.wangdian.api.purchase;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class PurchaseOrderQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-06 00:00:00");
+		try {
+			String response = client.execute("purchase_order_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 47 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseReturnOrderPush.java

@@ -0,0 +1,47 @@
+package com.jeeplus.test.wdt.wangdian.api.purchase;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class PurchaseReturnOrderPush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, Object> purchase_return_info = new HashMap<String, Object>();
+		List<Map<String, Object>> details_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> details_1 = new HashMap<String, Object>();
+		details_1.put("spec_no", "kangxiwen1");
+		details_1.put("num", 2);
+		details_1.put("position_no", "A121");
+		details_1.put("price", 9.9);
+		
+		details_list.add(details_1);
+		
+		purchase_return_info.put("return_no", "CR201610110002");
+		purchase_return_info.put("outer_no", "ghs123");
+		purchase_return_info.put("logistics_code", "TTTT");
+		purchase_return_info.put("detail_list", details_list);
+		
+		String purchase_return_info_json = JSON.toJSONString(purchase_return_info);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("purchase_return_info", purchase_return_info_json);
+		try {
+			String response = client.execute("purchase_return_order_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 49 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseReturnPush.java

@@ -0,0 +1,49 @@
+package com.jeeplus.test.wdt.wangdian.api.purchase;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class PurchaseReturnPush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, Object> return_info = new HashMap<String, Object>();
+		List<Map<String, Object>> detail_list = new ArrayList<Map<String,Object>>();
+		
+		Map<String, Object> detail_1 = new HashMap<String, Object>();
+		detail_1.put("spec_no", "qqq");
+		detail_1.put("num", 6);
+		detail_1.put("price", 123);
+		detail_1.put("discount", 0);
+		
+		detail_list.add(detail_1);
+		
+		return_info.put("provider_no", "ghs123");
+		return_info.put("outer_no", "ghs23214");
+		return_info.put("warehouse_no", "ghs2test");
+		return_info.put("detail_list", detail_list);
+		
+		String return_info_json = JSON.toJSONString(return_info);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("return_info", return_info_json);
+		try {
+			String response = client.execute("purchase_return_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+	}
+
+}

+ 30 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/PurchaseReturnQuery.java

@@ -0,0 +1,30 @@
+package com.jeeplus.test.wdt.wangdian.api.purchase;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class PurchaseReturnQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-10 00:00:00");
+		
+		try {
+			String response = client.execute("purchase_return_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/StockinOrderQueryPurchase.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.purchase;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class StockinOrderQueryPurchase {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-06 00:00:00");
+		try {
+			String response = client.execute("stockin_order_query_purchase.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 46 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/StockinPurchasePush.java

@@ -0,0 +1,46 @@
+package com.jeeplus.test.wdt.wangdian.api.purchase;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class StockinPurchasePush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, Object> purchase_info = new HashMap<String, Object>();
+		List<Map<String, Object>> details_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> detail_1 = new HashMap<String, Object>();
+		detail_1.put("spec_no", "qqq");
+		detail_1.put("stockin_price", "2");
+		detail_1.put("stockin_num", 1);
+		
+		details_list.add(detail_1);
+		
+		purchase_info.put("purchase_no", "CG201812100001");
+		purchase_info.put("warehouse_no", "aiyi2test");
+		purchase_info.put("outer_no", "ghs2018121001");
+		purchase_info.put("details_list", details_list);
+		
+		String purchase_info_json = JSON.toJSONString(purchase_info);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("purchase_info", purchase_info_json);
+		try {
+			String response = client.execute("stockin_purchase_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/purchase/StockoutReturnOrderQuery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.purchase;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class StockoutReturnOrderQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-06 00:00:00");
+		try {
+			String response = client.execute("stockout_order_query_return.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 29 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/refund/RefundQuery.java

@@ -0,0 +1,29 @@
+package com.jeeplus.test.wdt.wangdian.api.refund;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class RefundQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("process_status", "90");
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-10 00:00:00");
+		try {
+			String response = client.execute("refund_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 54 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/refund/SalesRefundPush.java

@@ -0,0 +1,54 @@
+package com.jeeplus.test.wdt.wangdian.api.refund;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class SalesRefundPush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		List<Map<String, Object>> api_refund_list = new ArrayList<Map<String, Object>>();
+		List<Map<String, Object>> order_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> order_1 = new HashMap<String, Object>();
+		order_1.put("oid", "AD201812110009");
+		order_1.put("num", "1");
+		order_list.add(order_1);
+		
+		Map<String, Object> api_refund_1 = new HashMap<String, Object>();
+		api_refund_1.put("tid", "AT201812110001");
+		api_refund_1.put("platform_id", "127");
+		api_refund_1.put("shop_no", "ghs2test");
+		api_refund_1.put("refund_no", "sgsh1221g124");
+		api_refund_1.put("type", 3);
+		api_refund_1.put("status", "success");
+		api_refund_1.put("buyer_nick", "ghs");
+		api_refund_1.put("refund_time", "1212121");
+		api_refund_1.put("order_list", order_list);
+		
+
+		api_refund_list.add(api_refund_1);
+		
+		String api_refund_list_json = JSON.toJSONString(api_refund_list);
+		//System.out.println(purchase_info_json);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("api_refund_list", api_refund_list_json);
+		try {
+			String response = client.execute("sales_refund_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 51 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/refund/StockinRefundPush.java

@@ -0,0 +1,51 @@
+package com.jeeplus.test.wdt.wangdian.api.refund;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class StockinRefundPush {
+	@SuppressWarnings("unchecked")
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+
+		Map<String, Object> stockin_refund_info = new HashMap<String, Object>();
+		List<Map<String, Object>> detail_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> detail_1 = new HashMap<String, Object>();
+		
+		detail_1.put("spec_no", "ghs201812070212123");
+		detail_1.put("stockin_num", 2);
+		detail_1.put("stockin_price", 0.01);
+		
+		detail_list.add(detail_1);
+		
+		stockin_refund_info.put("refund_no", "TK1812110002");
+		stockin_refund_info.put("outer_no","gjs1121");
+		stockin_refund_info.put("warehouse_no", "ghs2test");
+		stockin_refund_info.put("logistics_code", "1213");
+		stockin_refund_info.put("is_created_batch", 1);
+		stockin_refund_info.put("detail_list", detail_list);
+		
+		//通过第三方json解析工具类fastjson将map解析成json
+		String stockin_refund_info_json = JSON.toJSONString(stockin_refund_info);
+		//System.out.println(goods_list_json);
+		
+		Map<String, String> params = new HashMap<String, String>(); 
+		params.put("stockin_refund_info", stockin_refund_info_json);
+		try {
+			String response = client.execute("stockin_refund_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+}

+ 29 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/refund/StockinRefundQuery.java

@@ -0,0 +1,29 @@
+package com.jeeplus.test.wdt.wangdian.api.refund;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class StockinRefundQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		//params.put("shop_no", "ghs2test");
+		params.put("start_time", "2018-12-04 00:00:00");
+		params.put("end_time", "2018-12-11 00:00:00");
+		try {
+			String response = client.execute("stockin_order_query_refund.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockPDOrderQuery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class StockPDOrderQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-10 00:00:00");
+		try {
+			String response = client.execute("stock_pd_order_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockQuery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class StockQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-10 00:00:00");
+		try {
+			String response = client.execute("stock_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 43 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockSyncByPD.java

@@ -0,0 +1,43 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class StockSyncByPD {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		List<Map<String, Object>> goods_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> goods_1 = new HashMap<String, Object>();
+		goods_1.put("spec_no", "ghs2018120701123");
+		goods_1.put("stock_num", "1000");
+		
+		goods_list.add(goods_1);
+		
+		String goods_list_json = JSON.toJSONString(goods_list);
+		//System.out.println(purchase_info_json);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("warehouse_no", "ghs2test");
+		params.put("outer_no", "ghs201812101203");
+		params.put("is_adjust_stock", "0");
+		params.put("goods_list", goods_list_json);
+		try {
+			String response = client.execute("stock_sync_by_pd.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 46 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockTransferPush.java

@@ -0,0 +1,46 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class StockTransferPush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, Object> transfer_info = new HashMap<String, Object>();
+		List<Map<String, Object>> skus = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> sku_1 = new HashMap<String, Object>();
+		sku_1.put("spec_no", "ghs201812070212123");
+		sku_1.put("num", "1");
+		
+		skus.add(sku_1);
+		
+		transfer_info.put("from_warehouse_no", "ghs2test");
+		transfer_info.put("to_warehouse_no", "lx2test");
+		transfer_info.put("outer_no", "ghs201812101205");
+		transfer_info.put("skus", skus);
+		
+		String transfer_info_json = JSON.toJSONString(transfer_info);
+		//System.out.println(purchase_info_json);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("transfer_info", transfer_info_json);
+		try {
+			String response = client.execute("stock_transfer_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 46 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockinOrderPush.java

@@ -0,0 +1,46 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class StockinOrderPush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, Object> stockin_info = new HashMap<String, Object>();
+		List<Map<String, Object>> goods_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> goods_1 = new HashMap<String, Object>();
+		goods_1.put("spec_no", "qqq");
+		goods_1.put("stockin_num", "2");
+		goods_1.put("stockin_price", 1);
+		goods_1.put("src_price", 1.2);
+		
+		goods_list.add(goods_1);
+		
+		stockin_info.put("warehouse_no", "ghs2test");
+		stockin_info.put("outer_no", "ghs201812101201");
+		stockin_info.put("goods_list", goods_list);
+		
+		String stockin_info_json = JSON.toJSONString(stockin_info);
+
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("stockin_info", stockin_info_json);
+		try {
+			String response = client.execute("stockin_order_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 29 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockinOrderQuery.java

@@ -0,0 +1,29 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class StockinOrderQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-11 00:00:00");
+		params.put("end_time", "2018-12-11 14:00:00");
+		params.put("order_type", "3");
+		try {
+			String response = client.execute("stockin_order_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 46 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockinTransferPush.java

@@ -0,0 +1,46 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class StockinTransferPush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, Object> stockin_info = new HashMap<String, Object>();
+		List<Map<String, Object>> goods_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> goods_1 = new HashMap<String, Object>();
+		goods_1.put("spec_no", "ghs201812070212123");
+		goods_1.put("num", "1");
+		
+		goods_list.add(goods_1);
+		
+		stockin_info.put("warehouse_no", "ghs2test");
+		stockin_info.put("src_order_type", "2");
+		stockin_info.put("src_order_no", "TF201812110001");
+		stockin_info.put("outer_no", "ghs201812101203");
+		stockin_info.put("goods_list", goods_list);
+		
+		String stockin_info_json = JSON.toJSONString(stockin_info);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("stockin_info", stockin_info_json);
+		try {
+			String response = client.execute("stockin_transfer_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 49 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockoutOrderPush.java

@@ -0,0 +1,49 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class StockoutOrderPush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, Object> stockout_info = new HashMap<String, Object>();
+		List<Map<String, Object>> detail_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> detail_1 = new HashMap<String, Object>();
+		detail_1.put("spec_no", "ghs201812070212123");
+		detail_1.put("num", "1");
+		detail_1.put("price", 11);
+		
+		detail_list.add(detail_1);
+		
+		stockout_info.put("warehouse_no", "ghs2test");
+		stockout_info.put("num", "2");
+		stockout_info.put("remark", "测试新增其他出库单");
+		stockout_info.put("outer_no", "ghs201812101205");
+		//stockin_info.put("logistics_code", "ZJS001");
+		stockout_info.put("detail_list", detail_list);
+		
+		String stockout_info_json = JSON.toJSONString(stockout_info);
+		//System.out.println(purchase_info_json);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("stockout_info", stockout_info_json);
+		try {
+			String response = client.execute("stockout_order_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockoutOrderQuery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class StockoutOrderQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-10 00:00:00");
+		try {
+			String response = client.execute("stockout_order_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 45 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StockoutTransferPush.java

@@ -0,0 +1,45 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class StockoutTransferPush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, Object> stockout_info = new HashMap<String, Object>();
+		List<Map<String, Object>> goods_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> goods_1 = new HashMap<String, Object>();
+		goods_1.put("spec_no", "ghs201812070212123");
+		goods_1.put("num", "1");
+		
+		goods_list.add(goods_1);
+		
+		stockout_info.put("warehouse_no", "ghs2test");
+		stockout_info.put("src_order_type", "2");
+		stockout_info.put("src_order_no", "TF201812110002");
+		stockout_info.put("goods_list", goods_list);
+		
+		String stockout_info_json = JSON.toJSONString(stockout_info);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("stockout_info", stockout_info_json);
+		try {
+			String response = client.execute("stockout_transfer_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/stock/StokcTransferQuery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.stock;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class StokcTransferQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-11 17:00:00");
+		try {
+			String response = client.execute("stock_transfer_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 40 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/ApiGoodsStockChangeAck.java

@@ -0,0 +1,40 @@
+package com.jeeplus.test.wdt.wangdian.api.trade;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ApiGoodsStockChangeAck {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		List<Map<String, Object>> stock_sync_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> stock_sync_1 = new HashMap<String, Object>();
+		stock_sync_1.put("rec_id", 1);
+		stock_sync_1.put("sync_stock", 100);
+		stock_sync_1.put("sstock_change_count", 123);
+		
+		stock_sync_list.add(stock_sync_1);
+		
+		String stock_sync_list_json = JSON.toJSONString(stock_sync_list);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("stock_sync_list", stock_sync_list_json);
+		try {
+			String response = client.execute("api_goods_stock_change_ack.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 28 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/ApiGoodsStockChangeQuery.java

@@ -0,0 +1,28 @@
+package com.jeeplus.test.wdt.wangdian.api.trade;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ApiGoodsStockChangeQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("shop_no", "ghs2test");
+		params.put("limit", "100");
+		try {
+			String response = client.execute("api_goods_stock_change_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 40 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/LogisticsSyncAck.java

@@ -0,0 +1,40 @@
+package com.jeeplus.test.wdt.wangdian.api.trade;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class LogisticsSyncAck {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+WdtClient client = new WdtClient("", "", "", "");
+		
+		List<Map<String, Object>> logistics_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> logistics_1 = new HashMap<String, Object>();
+		logistics_1.put("rec_id", 1);
+		logistics_1.put("status", 0);
+		logistics_1.put("message", "同步成功");
+		
+		logistics_list.add(logistics_1);
+		
+		String logistics_list_json = JSON.toJSONString(logistics_list);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("logistics_list", logistics_list_json);
+		try {
+			String response = client.execute("logistics_sync_ack.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 29 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/LogisticsSyncQuery.java

@@ -0,0 +1,29 @@
+package com.jeeplus.test.wdt.wangdian.api.trade;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class LogisticsSyncQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("shop_no", "mytest");
+		params.put("is_part_sync_able", "0");
+		params.put("limit", "100");
+		try {
+			String response = client.execute("logistics_sync_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 29 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/StockoutOrderQueryTrade.java

@@ -0,0 +1,29 @@
+package com.jeeplus.test.wdt.wangdian.api.trade;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class StockoutOrderQueryTrade {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("shop_no", "ghs2test");
+		params.put("start_time", "2018-12-01 00:00:00");
+		params.put("end_time", "2018-12-010 00:00:00");
+		try {
+			String response = client.execute("refund_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 76 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/TradePush.java

@@ -0,0 +1,76 @@
+package com.jeeplus.test.wdt.wangdian.api.trade;
+
+import com.alibaba.fastjson.JSON;
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class TradePush {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+WdtClient client = new WdtClient("", "", "", "");
+		
+		List<Map<String, Object>> trade_list = new ArrayList<Map<String, Object>>();
+		List<Map<String, Object>> order_list = new ArrayList<Map<String, Object>>();
+		
+		Map<String, Object> order_1 = new HashMap<String, Object>();
+		order_1.put("oid", "ghsTest121101");
+		order_1.put("num", 1);
+		order_1.put("price", 12);
+		order_1.put("status", 30);
+		order_1.put("refund_status", 0);
+		order_1.put("goods_id", "18344");
+		order_1.put("spec_id", "18656");
+		order_1.put("goods_no", "ghs2");
+		order_1.put("spec_no", "ghs201812070212123");
+		order_1.put("goods_name", "123");
+		order_1.put("discount", 0);		//子订单折扣
+		order_1.put("adjust_amount", 0);	//手工调整,特别注意:正的表示加价,负的表示减价
+		order_1.put("share_discount", 0);
+		
+		
+		order_list.add(order_1);
+		
+		Map<String, Object> trade_1 = new HashMap<String, Object>();
+		trade_1.put("tid", "AT201812110002");
+		trade_1.put("trade_status", 20);
+		trade_1.put("pay_status", "1");
+		trade_1.put("delivery_term", 2);
+		trade_1.put("trade_time", "2018-12-11 14:21:00");
+		trade_1.put("buyer_nick", "三国杀");
+		trade_1.put("receiver_province", "河南省");
+		trade_1.put("receiver_city", "周口市");
+		trade_1.put("receiver_district", "川汇区");
+		trade_1.put("receiver_address", "123");
+		trade_1.put("logistics_type", 4);
+		trade_1.put("post_amount", 12);
+		trade_1.put("cod_amount", 2);
+		trade_1.put("ext_cod_fee", 0);
+		trade_1.put("other_amount", 1);
+		trade_1.put("paid", 0);
+		trade_1.put("order_list", order_list);
+		
+
+		trade_list.add(trade_1);
+		
+		String trade_list_json = JSON.toJSONString(trade_list);
+		//System.out.println(purchase_info_json);
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("shop_no", "ghs2test");
+		params.put("trade_list", trade_list_json);
+		try {
+			String response = client.execute("trade_push.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+}

+ 32 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/api/trade/TradeQuery.java

@@ -0,0 +1,32 @@
+package com.jeeplus.test.wdt.wangdian.api.trade;
+
+
+
+import com.jeeplus.test.wdt.wangdian.api.WdtClient;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class TradeQuery {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		WdtClient client = new WdtClient("", "", "", "");
+		
+		Map<String, String> params = new HashMap<String, String>();
+		params.put("start_time", "2018-12-11 12:00:00");
+		params.put("end_time", "2018-12-11 13:00:00");
+		params.put("page_size", "30");
+		params.put("page_no", "0");
+		
+		try {
+			String response = client.execute("trade_query.php", params);
+			System.out.println(response);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

+ 146 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/utils/FileItem.java

@@ -0,0 +1,146 @@
+package com.jeeplus.test.wdt.wangdian.utils;
+
+import java.io.*;
+
+
+/**
+ * 文件元数据。
+ * 
+ */
+public class FileItem {
+
+	private String fileName;
+	private String mimeType;
+	private byte[] content;
+	private File file;
+
+	/**
+	 * 基于本地文件的构造器。
+	 * 
+	 * @param file 本地文件
+	 */
+	public FileItem(File file) {
+		this.file = file;
+	}
+
+	/**
+	 * 基于文件绝对路径的构造器。
+	 * 
+	 * @param filePath 文件绝对路径
+	 */
+	public FileItem(String filePath) {
+		this(new File(filePath));
+	}
+
+	/**
+	 * 基于文件名和字节流的构造器。
+	 * 
+	 * @param fileName 文件名
+	 * @param content 文件字节流
+	 */
+	public FileItem(String fileName, byte[] content) {
+		this.fileName = fileName;
+		this.content = content;
+	}
+
+	/**
+	 * 基于文件名、字节流和媒体类型的构造器。
+	 * 
+	 * @param fileName 文件名
+	 * @param content 文件字节流
+	 * @param mimeType 媒体类型
+	 */
+	public FileItem(String fileName, byte[] content, String mimeType) {
+		this(fileName, content);
+		this.mimeType = mimeType;
+	}
+
+	public String getFileName() {
+		if (this.fileName == null && this.file != null && this.file.exists()) {
+			this.fileName = file.getName();
+		}
+		return this.fileName;
+	}
+
+	public String getMimeType() throws IOException {
+		if (this.mimeType == null) {
+			this.mimeType = getMimeType(getContent());
+		}
+		return this.mimeType;
+	}
+
+	/**
+	 * 获取文件的真实后缀名。目前只支持JPG, GIF, PNG, BMP四种图片文件。
+	 * 
+	 * @param bytes 文件字节流
+	 * @return JPG, GIF, PNG or null
+	 */
+	public static String getFileSuffix(byte[] bytes) {
+		if (bytes == null || bytes.length < 10) {
+			return null;
+		}
+
+		if (bytes[0] == 'G' && bytes[1] == 'I' && bytes[2] == 'F') {
+			return "GIF";
+		} else if (bytes[1] == 'P' && bytes[2] == 'N' && bytes[3] == 'G') {
+			return "PNG";
+		} else if (bytes[6] == 'J' && bytes[7] == 'F' && bytes[8] == 'I' && bytes[9] == 'F') {
+			return "JPG";
+		} else if (bytes[0] == 'B' && bytes[1] == 'M') {
+			return "BMP";
+		} else {
+			return null;
+		}
+	}
+	
+	/**
+	 * 获取文件的真实媒体类型。目前只支持JPG, GIF, PNG, BMP四种图片文件。
+	 * 
+	 * @param bytes 文件字节流
+	 * @return 媒体类型(MEME-TYPE)
+	 */
+	public static String getMimeType(byte[] bytes) {
+		String suffix = getFileSuffix(bytes);
+		String mimeType;
+
+		if ("JPG".equals(suffix)) {
+			mimeType = "image/jpeg";
+		} else if ("GIF".equals(suffix)) {
+			mimeType = "image/gif";
+		} else if ("PNG".equals(suffix)) {
+			mimeType = "image/png";
+		} else if ("BMP".equals(suffix)) {
+			mimeType = "image/bmp";
+		}else {
+			mimeType = "application/octet-stream";
+		}
+
+		return mimeType;
+	}
+	
+	public byte[] getContent() throws IOException {
+		if (this.content == null && this.file != null && this.file.exists()) {
+			InputStream in = null;
+			ByteArrayOutputStream out = null;
+
+			try {
+				in = new FileInputStream(this.file);
+				out = new ByteArrayOutputStream();
+				int ch;
+				while ((ch = in.read()) != -1) {
+					out.write(ch);
+				}
+				this.content = out.toByteArray();
+			} finally {
+				if (out != null) {
+					out.close();
+				}
+				if (in != null) {
+					in.close();
+				}
+			}
+		}
+		return this.content;
+	}
+
+}

+ 129 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/utils/StringUtils.java

@@ -0,0 +1,129 @@
+package com.jeeplus.test.wdt.wangdian.utils;
+
+
+/**
+ * 字符串工具类。
+ * 
+ */
+public abstract class StringUtils {
+
+	private StringUtils() {}
+
+	/**
+	 * 检查指定的字符串是否为空。
+	 * <ul>
+	 * <li>SysUtils.isEmpty(null) = true</li>
+	 * <li>SysUtils.isEmpty("") = true</li>
+	 * <li>SysUtils.isEmpty("   ") = true</li>
+	 * <li>SysUtils.isEmpty("abc") = false</li>
+	 * </ul>
+	 * 
+	 * @param value 待检查的字符串
+	 * @return true/false
+	 */
+	public static boolean isEmpty(String value) {
+		int strLen;
+		if (value == null || (strLen = value.length()) == 0) {
+			return true;
+		}
+		for (int i = 0; i < strLen; i++) {
+			if ((Character.isWhitespace(value.charAt(i)) == false)) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * 检查对象是否为数字型字符串,包含负数开头的。
+	 */
+	public static boolean isNumeric(Object obj) {
+		if (obj == null) {
+			return false;
+		}
+		char[] chars = obj.toString().toCharArray();
+		int length = chars.length;
+		if(length < 1)
+			return false;
+		
+		int i = 0;
+		if(length > 1 && chars[0] == '-')
+			i = 1;
+		
+		for (; i < length; i++) {
+			if (!Character.isDigit(chars[i])) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * 检查指定的字符串列表是否不为空。
+	 */
+	public static boolean areNotEmpty(String... values) {
+		boolean result = true;
+		if (values == null || values.length == 0) {
+			result = false;
+		} else {
+			for (String value : values) {
+				result &= !isEmpty(value);
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * 把通用字符编码的字符串转化为汉字编码。
+	 */
+	public static String unicodeToChinese(String unicode) {
+		StringBuilder out = new StringBuilder();
+		if (!isEmpty(unicode)) {
+			for (int i = 0; i < unicode.length(); i++) {
+				out.append(unicode.charAt(i));
+			}
+		}
+		return out.toString();
+	}
+
+	public static String toUnderlineStyle(String name) {
+		StringBuilder newName = new StringBuilder();
+		for (int i = 0; i < name.length(); i++) {
+			char c = name.charAt(i);
+			if (Character.isUpperCase(c)) {
+				if (i > 0) {
+					newName.append("_");
+				}
+				newName.append(Character.toLowerCase(c));
+			} else {
+				newName.append(c);
+			}
+		}
+		return newName.toString();
+	}
+
+	public static String convertString(byte[] data, int offset, int length) {
+		if (data == null) {
+			return null;
+		} else {
+			try {
+				return new String(data, offset, length, "UTF-8");
+			} catch (Exception e) {
+				throw new RuntimeException(e);
+			}
+		}
+	}
+
+	public static byte[] convertBytes(String data) {
+		if (data == null) {
+			return null;
+		} else {
+			try {
+				return data.getBytes("UTF-8");
+			} catch (Exception e) {
+				throw new RuntimeException(e);
+			}
+		}
+	}
+
+}

+ 568 - 0
jeeplus-modules/jeeplus-test/src/main/java/com/jeeplus/test/wdt/wangdian/utils/WebUtils.java

@@ -0,0 +1,568 @@
+package com.jeeplus.test.wdt.wangdian.utils;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+//import java.security.SecureRandom;
+//import java.security.cert.Certificate;
+//import java.security.cert.CertificateException;
+//import java.security.cert.CertificateFactory;
+//import java.security.cert.X509Certificate;
+
+//import javax.net.ssl.HostnameVerifier;
+//import javax.net.ssl.HttpsURLConnection;
+//import javax.net.ssl.SSLContext;
+//import javax.net.ssl.SSLSession;
+//import javax.net.ssl.TrustManager;
+//import javax.net.ssl.X509TrustManager;
+
+
+/**
+ * 网络工具类。
+ * 
+ */
+public abstract class WebUtils {
+
+	private static final String DEFAULT_CHARSET = "UTF-8";
+	private static final String METHOD_POST = "POST";
+	private static final String METHOD_GET = "GET";
+	//private static final Certificate verisign; // 根证书
+	//private static boolean ignoreSSLCheck; // 忽略SSL检查
+
+//	static {
+//		InputStream input = null;
+//		try {
+//			CertificateFactory cf = CertificateFactory.getInstance("X.509");
+//			input = WebUtils.class.getResourceAsStream("/verisign.crt");
+//			verisign = cf.generateCertificate(input);
+//		} catch (Exception e) {
+//			throw new RuntimeException(e);
+//		} finally {
+//			if (input != null) {
+//				try {
+//					input.close();
+//				} catch (IOException e) {
+//				}
+//			}
+//		}
+//	}
+
+//	public static class VerisignTrustManager implements X509TrustManager {
+//		public X509Certificate[] getAcceptedIssuers() {
+//			return null;
+//		}
+//
+//		public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
+//		}
+//
+//		public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
+//			Exception exp = null;
+//
+//			for (X509Certificate cert : chain) {
+//				cert.checkValidity(); // 验证证书有效期
+//				try {
+//					cert.verify(verisign.getPublicKey());// 验证签名
+//					exp = null;
+//					break;
+//				} catch (Exception e) {
+//					exp = e;
+//				}
+//			}
+//
+//			if (exp != null) {
+//				throw new CertificateException(exp);
+//			}
+//		}
+//	}
+//
+//	public static class TrustAllTrustManager implements X509TrustManager {
+//		public X509Certificate[] getAcceptedIssuers() {
+//			return null;
+//		}
+//
+//		public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
+//		}
+//
+//		public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
+//		}
+//	}
+
+	private WebUtils() {
+	}
+
+//	public static void setIgnoreSSLCheck(boolean ignoreSSLCheck) {
+//		WebUtils.ignoreSSLCheck = ignoreSSLCheck;
+//	}
+
+	/**
+	 * 执行HTTP POST请求。
+	 * 
+	 * @param url 请求地址
+	 * @param params 请求参数
+	 * @return 响应字符串
+	 */
+	public static String doPost(String url, Map<String, String> params, int connectTimeout, int readTimeout) throws IOException {
+		return doPost(url, params, DEFAULT_CHARSET, connectTimeout, readTimeout);
+	}
+
+	/**
+	 * 执行HTTP POST请求。
+	 * 
+	 * @param url 请求地址
+	 * @param params 请求参数
+	 * @param charset 字符集,如UTF-8, GBK, GB2312
+	 * @return 响应字符串
+	 */
+	public static String doPost(String url, Map<String, String> params, String charset, int connectTimeout, int readTimeout) throws IOException {
+		return doPost(url, params, charset, connectTimeout, readTimeout, null);
+	}
+
+	public static String doPost(String url, Map<String, String> params, String charset, int connectTimeout, int readTimeout, Map<String, String> headerMap) throws IOException {
+		String ctype = "application/x-www-form-urlencoded;charset=" + charset;
+		String query = buildQuery(params, charset);
+		byte[] content = {};
+		if (query != null) {
+			content = query.getBytes(charset);
+		}
+		return _doPost(url, ctype, content, connectTimeout, readTimeout, headerMap);
+	}
+
+	/**
+	 * 执行HTTP POST请求。
+	 * 
+	 * @param url 请求地址
+	 * @param ctype 请求类型
+	 * @param content 请求字节数组
+	 * @return 响应字符串
+	 */
+	public static String doPost(String url, String ctype, byte[] content, int connectTimeout, int readTimeout) throws IOException {
+		return _doPost(url, ctype, content, connectTimeout, readTimeout, null);
+	}
+
+	private static String _doPost(String url, String ctype, byte[] content, int connectTimeout, int readTimeout, Map<String, String> headerMap) throws IOException {
+		HttpURLConnection conn = null;
+		OutputStream out = null;
+		String rsp = null;
+		try {
+			conn = getConnection(new URL(url), METHOD_POST, ctype, headerMap);
+			conn.setConnectTimeout(connectTimeout);
+			conn.setReadTimeout(readTimeout);
+			
+			out = conn.getOutputStream();
+			out.write(content);
+			
+			rsp = getResponseAsString(conn);
+		} finally {
+			if (out != null) {
+				out.close();
+			}
+			if (conn != null) {
+				conn.disconnect();
+			}
+		}
+
+		return rsp;
+	}
+
+	/**
+	 * 执行带文件上传的HTTP POST请求。
+	 * 
+	 * @param url 请求地址
+	 * @param textParams 文本请求参数
+	 * @param fileParams 文件请求参数
+	 * @return 响应字符串
+	 */
+	public static String doPost(String url, Map<String, String> params, Map<String, FileItem> fileParams, int connectTimeout, int readTimeout) throws IOException {
+		if (fileParams == null || fileParams.isEmpty()) {
+			return doPost(url, params, DEFAULT_CHARSET, connectTimeout, readTimeout);
+		} else {
+			return doPost(url, params, fileParams, DEFAULT_CHARSET, connectTimeout, readTimeout);
+		}
+	}
+
+	public static String doPost(String url, Map<String, String> params, Map<String, FileItem> fileParams, String charset, int connectTimeout, int readTimeout) throws IOException {
+		return doPost(url, params, fileParams, charset, connectTimeout, readTimeout, null);
+	}
+
+	/**
+	 * 执行带文件上传的HTTP POST请求。
+	 * 
+	 * @param url 请求地址
+	 * @param textParams 文本请求参数
+	 * @param fileParams 文件请求参数
+	 * @param charset 字符集,如UTF-8, GBK, GB2312
+	 * @param headerMap 需要传递的header头,可以为空
+	 * @return 响应字符串
+	 */
+	public static String doPost(String url, Map<String, String> params, Map<String, FileItem> fileParams, String charset,
+			int connectTimeout, int readTimeout, Map<String, String> headerMap) throws IOException {
+		if (fileParams == null || fileParams.isEmpty()) {
+			return doPost(url, params, charset, connectTimeout, readTimeout, headerMap);
+		} else {
+			return _doPostWithFile(url, params, fileParams, charset, connectTimeout, readTimeout, headerMap);
+		}
+	}
+
+	private static String _doPostWithFile(String url, Map<String, String> params, Map<String, FileItem> fileParams,
+			String charset, int connectTimeout, int readTimeout, Map<String, String> headerMap) throws IOException {
+		String boundary = String.valueOf(System.nanoTime()); // 随机分隔线
+		HttpURLConnection conn = null;
+		OutputStream out = null;
+		String rsp = null;
+		try {
+			String ctype = "multipart/form-data;charset=" + charset + ";boundary=" + boundary;
+			conn = getConnection(new URL(url), METHOD_POST, ctype, headerMap);
+			conn.setConnectTimeout(connectTimeout);
+			conn.setReadTimeout(readTimeout);
+
+			out = conn.getOutputStream();
+			byte[] entryBoundaryBytes = ("\r\n--" + boundary + "\r\n").getBytes(charset);
+
+			// 组装文本请求参数
+			Set<Entry<String, String>> textEntrySet = params.entrySet();
+			for (Entry<String, String> textEntry : textEntrySet) {
+				byte[] textBytes = getTextEntry(textEntry.getKey(), textEntry.getValue(), charset);
+				out.write(entryBoundaryBytes);
+				out.write(textBytes);
+			}
+
+			// 组装文件请求参数
+			Set<Entry<String, FileItem>> fileEntrySet = fileParams.entrySet();
+			for (Entry<String, FileItem> fileEntry : fileEntrySet) {
+				FileItem fileItem = fileEntry.getValue();
+				if (fileItem.getContent() == null) {
+					continue;
+				}
+				byte[] fileBytes = getFileEntry(fileEntry.getKey(), fileItem.getFileName(), fileItem.getMimeType(), charset);
+				out.write(entryBoundaryBytes);
+				out.write(fileBytes);
+				out.write(fileItem.getContent());
+			}
+
+			// 添加请求结束标志
+			byte[] endBoundaryBytes = ("\r\n--" + boundary + "--\r\n").getBytes(charset);
+			out.write(endBoundaryBytes);
+			rsp = getResponseAsString(conn);
+
+		} finally {
+			if (out != null) {
+				out.close();
+			}
+			if (conn != null) {
+				conn.disconnect();
+			}
+		}
+
+		return rsp;
+	}
+
+	private static byte[] getTextEntry(String fieldName, String fieldValue, String charset) throws IOException {
+		StringBuilder entry = new StringBuilder();
+		entry.append("Content-Disposition:form-data;name=\"");
+		entry.append(fieldName);
+		entry.append("\"\r\nContent-Type:text/plain\r\n\r\n");
+		entry.append(fieldValue);
+		return entry.toString().getBytes(charset);
+	}
+
+	private static byte[] getFileEntry(String fieldName, String fileName, String mimeType, String charset) throws IOException {
+		StringBuilder entry = new StringBuilder();
+		entry.append("Content-Disposition:form-data;name=\"");
+		entry.append(fieldName);
+		entry.append("\";filename=\"");
+		entry.append(fileName);
+		entry.append("\"\r\nContent-Type:");
+		entry.append(mimeType);
+		entry.append("\r\n\r\n");
+		return entry.toString().getBytes(charset);
+	}
+
+	/**
+	 * 执行HTTP GET请求。
+	 * 
+	 * @param url 请求地址
+	 * @param params 请求参数
+	 * @return 响应字符串
+	 */
+	public static String doGet(String url, Map<String, String> params) throws IOException {
+		return doGet(url, params, DEFAULT_CHARSET);
+	}
+
+	/**
+	 * 执行HTTP GET请求。
+	 * 
+	 * @param url 请求地址
+	 * @param params 请求参数
+	 * @param charset 字符集,如UTF-8, GBK, GB2312
+	 * @return 响应字符串
+	 */
+	public static String doGet(String url, Map<String, String> params, String charset) throws IOException {
+		HttpURLConnection conn = null;
+		String rsp = null;
+
+		try {
+			String ctype = "application/x-www-form-urlencoded;charset=" + charset;
+			String query = buildQuery(params, charset);
+			
+			conn = getConnection(buildGetUrl(url, query), METHOD_GET, ctype, null);
+
+			rsp = getResponseAsString(conn);
+
+		} finally {
+			if (conn != null) {
+				conn.disconnect();
+			}
+		}
+
+		return rsp;
+	}
+
+	private static HttpURLConnection getConnection(URL url, String method, String ctype, Map<String, String> headerMap) throws IOException {
+		HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+//		if (conn instanceof HttpsURLConnection) {
+//			HttpsURLConnection connHttps = (HttpsURLConnection) conn;
+//			if (ignoreSSLCheck) {
+//				try {
+//					SSLContext ctx = SSLContext.getInstance("TLS");
+//					ctx.init(null, new TrustManager[] { new TrustAllTrustManager() }, new SecureRandom());
+//					connHttps.setSSLSocketFactory(ctx.getSocketFactory());
+//					connHttps.setHostnameVerifier(new HostnameVerifier() {
+//						public boolean verify(String hostname, SSLSession session) {
+//							return true;
+//						}
+//					});
+//				} catch (Exception e) {
+//					throw new IOException(e);
+//				}
+//			} else {
+//				try {
+//					SSLContext ctx = SSLContext.getInstance("TLS");
+//					ctx.init(null, new TrustManager[] { new VerisignTrustManager() }, new SecureRandom());
+//					connHttps.setSSLSocketFactory(ctx.getSocketFactory());
+//				} catch (Exception e) {
+//					throw new IOException(e);
+//				}
+//			}
+//			conn = connHttps;
+//		}
+
+		conn.setRequestMethod(method);
+		conn.setDoInput(true);
+		conn.setDoOutput(true);
+		conn.setRequestProperty("Accept", "*/*");
+		conn.setRequestProperty("User-Agent", "wdt-java-sdk");
+		conn.setRequestProperty("Content-Type", ctype);
+		if (headerMap != null) {
+			for (Entry<String, String> entry : headerMap.entrySet()) {
+				conn.setRequestProperty(entry.getKey(), entry.getValue());
+			}
+		}
+		return conn;
+	}
+
+	private static URL buildGetUrl(String strUrl, String query) throws IOException {
+		URL url = new URL(strUrl);
+		if (StringUtils.isEmpty(query)) {
+			return url;
+		}
+
+		if (StringUtils.isEmpty(url.getQuery())) {
+			if (strUrl.endsWith("?")) {
+				strUrl = strUrl + query;
+			} else {
+				strUrl = strUrl + "?" + query;
+			}
+		} else {
+			if (strUrl.endsWith("&")) {
+				strUrl = strUrl + query;
+			} else {
+				strUrl = strUrl + "&" + query;
+			}
+		}
+
+		return new URL(strUrl);
+	}
+
+	public static String buildQuery(Map<String, String> params, String charset) throws IOException {
+		if (params == null || params.isEmpty()) {
+			return null;
+		}
+
+		StringBuilder query = new StringBuilder();
+		Set<Entry<String, String>> entries = params.entrySet();
+		boolean hasParam = false;
+
+		for (Entry<String, String> entry : entries) {
+			String name = entry.getKey();
+			String value = entry.getValue();
+			// 忽略参数名或参数值为空的参数
+			if (StringUtils.areNotEmpty(name, value)) {
+				if (hasParam) {
+					query.append("&");
+				} else {
+					hasParam = true;
+				}
+
+				query.append(name).append("=").append(URLEncoder.encode(value, charset));
+			}
+		}
+
+		return query.toString();
+	}
+
+	protected static String getResponseAsString(HttpURLConnection conn) throws IOException {
+		String charset = getResponseCharset(conn.getContentType());
+		InputStream es = conn.getErrorStream();
+		if (es == null) {
+			return getStreamAsString(conn.getInputStream(), charset);
+		} else {
+			String msg = getStreamAsString(es, charset);
+			if (StringUtils.isEmpty(msg)) {
+				throw new IOException(conn.getResponseCode() + ":" + conn.getResponseMessage());
+			} else {
+				throw new IOException(msg);
+			}
+		}
+	}
+
+	private static String getStreamAsString(InputStream stream, String charset) throws IOException {
+		try {
+			Reader reader = new InputStreamReader(stream, charset);
+			StringBuilder response = new StringBuilder();
+
+			final char[] buff = new char[1024];
+			int read = 0;
+			while ((read = reader.read(buff)) > 0) {
+				// 一次读取1024个字符
+				response.append(buff, 0, read);
+			}
+
+			return response.toString();
+		} finally {
+			if (stream != null) {
+				stream.close();
+			}
+		}
+	}
+
+	private static String getResponseCharset(String ctype) {
+		String charset = DEFAULT_CHARSET;
+
+		if (!StringUtils.isEmpty(ctype)) {
+			String[] params = ctype.split(";");
+			for (String param : params) {
+				param = param.trim();
+				if (param.startsWith("charset")) {
+					String[] pair = param.split("=", 2);
+					if (pair.length == 2) {
+						if (!StringUtils.isEmpty(pair[1])) {
+							charset = pair[1].trim();
+						}
+					}
+					break;
+				}
+			}
+		}
+
+		return charset;
+	}
+
+	/**
+	 * 使用默认的UTF-8字符集反编码请求参数值。
+	 * 
+	 * @param value 参数值
+	 * @return 反编码后的参数值
+	 */
+	public static String decode(String value) {
+		return decode(value, DEFAULT_CHARSET);
+	}
+
+	/**
+	 * 使用默认的UTF-8字符集编码请求参数值。
+	 * 
+	 * @param value 参数值
+	 * @return 编码后的参数值
+	 */
+	public static String encode(String value) {
+		return encode(value, DEFAULT_CHARSET);
+	}
+
+	/**
+	 * 使用指定的字符集反编码请求参数值。
+	 * 
+	 * @param value 参数值
+	 * @param charset 字符集
+	 * @return 反编码后的参数值
+	 */
+	public static String decode(String value, String charset) {
+		String result = null;
+		if (!StringUtils.isEmpty(value)) {
+			try {
+				result = URLDecoder.decode(value, charset);
+			} catch (IOException e) {
+				throw new RuntimeException(e);
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * 使用指定的字符集编码请求参数值。
+	 * 
+	 * @param value 参数值
+	 * @param charset 字符集
+	 * @return 编码后的参数值
+	 */
+	public static String encode(String value, String charset) {
+		String result = null;
+		if (!StringUtils.isEmpty(value)) {
+			try {
+				result = URLEncoder.encode(value, charset);
+			} catch (IOException e) {
+				throw new RuntimeException(e);
+			}
+		}
+		return result;
+	}
+
+	public static Map<String, String> getParamsFromUrl(String url) {
+		Map<String, String> map = null;
+		if (url != null && url.indexOf('?') != -1) {
+			map = splitUrlQuery(url.substring(url.indexOf('?') + 1));
+		}
+		if (map == null) {
+			map = new HashMap<String, String>();
+		}
+		return map;
+	}
+
+	/**
+	 * 从URL中提取所有的参数。
+	 * 
+	 * @param query URL地址
+	 * @return 参数映射
+	 */
+	public static Map<String, String> splitUrlQuery(String query) {
+		Map<String, String> result = new HashMap<String, String>();
+
+		String[] pairs = query.split("&");
+		if (pairs != null && pairs.length > 0) {
+			for (String pair : pairs) {
+				String[] param = pair.split("=", 2);
+				if (param != null && param.length == 2) {
+					result.put(param[0], param[1]);
+				}
+			}
+		}
+
+		return result;
+	}
+
+}