瀏覽代碼

Merge remote-tracking branch 'origin/master'

xiao547607 4 年之前
父節點
當前提交
13eb2b015d
共有 37 個文件被更改,包括 2699 次插入100 次删除
  1. 66 0
      common/src/main/java/com/jpsoft/enterprise/config/AliPayJpsoftConfig.java
  2. 25 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dao/BillDetailInfoDAO.java
  3. 23 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dao/BillInfoDAO.java
  4. 25 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dao/OrderInfoDAO.java
  5. 4 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/CompanyInfoDetailDTO.java
  6. 2 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/CompanyInfoListDTO.java
  7. 42 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/OrderDetailDTO.java
  8. 47 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/OrderListDTO.java
  9. 8 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/RecruitInfoListDTO.java
  10. 29 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/WhisperingWallDTO.java
  11. 29 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/WhisperingWallListDTO.java
  12. 63 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/entity/BillDetailInfo.java
  13. 64 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/entity/BillInfo.java
  14. 2 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/entity/CooperationInfo.java
  15. 135 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/entity/OrderInfo.java
  16. 37 22
      common/src/main/java/com/jpsoft/enterprise/modules/base/entity/WhisperingWall.java
  17. 24 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/BillDetailInfoService.java
  18. 23 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/BillInfoService.java
  19. 27 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/OrderInfoService.java
  20. 74 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/BillDetailInfoServiceImpl.java
  21. 73 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/BillInfoServiceImpl.java
  22. 86 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/OrderInfoServiceImpl.java
  23. 125 0
      common/src/main/resources/mapper/base/BillDetailInfo.xml
  24. 105 0
      common/src/main/resources/mapper/base/BillInfo.xml
  25. 2 2
      common/src/main/resources/mapper/base/CooperationInfo.xml
  26. 182 0
      common/src/main/resources/mapper/base/OrderInfo.xml
  27. 17 4
      common/src/main/resources/mapper/base/WhisperingWall.xml
  28. 5 0
      web/src/main/java/com/jpsoft/enterprise/config/WebMvcConfig.java
  29. 247 0
      web/src/main/java/com/jpsoft/enterprise/modules/base/controller/CooperationInfoController.java
  30. 62 33
      web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/CompanyInfoApiController.java
  31. 165 0
      web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/OrderInfoApiController.java
  32. 97 30
      web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/RecruitInfoApiController.java
  33. 318 0
      web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/WhisperingWallApiController.java
  34. 238 0
      web/src/main/java/com/jpsoft/enterprise/modules/pay/alipay/AlipayController.java
  35. 219 0
      web/src/main/java/com/jpsoft/enterprise/modules/pay/weixin/WxPayController.java
  36. 7 7
      web/src/main/resources/application-production.yml
  37. 2 2
      web/src/main/resources/application.yml

+ 66 - 0
common/src/main/java/com/jpsoft/enterprise/config/AliPayJpsoftConfig.java

@@ -0,0 +1,66 @@
+package com.jpsoft.enterprise.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 9:54
+ */
+@Data
+@ConfigurationProperties(prefix = "alipay")
+@Component
+public class AliPayJpsoftConfig {
+
+    /**
+     * 支付宝网关
+     */
+    private String serviceUrl;
+
+    /**
+     * 应用appid
+     */
+    private String appId;
+
+    /**
+     * 应用私钥
+     */
+    private String privateKey;
+
+    /**
+     * 支付宝公钥
+     */
+    private String zfbPublicKey;
+
+    /**
+     * 编码
+     */
+    private String inputCharset;
+
+    /**
+     * 服务商id
+     */
+    private String mchId;
+
+    /**
+     * 授权token
+     */
+    private String appAuthToken;
+
+    /**
+     * 加密方式
+     */
+    private String signType;
+
+    /**
+     * 支付回调地址
+     */
+    private String notifyUrl;
+
+    /**
+     * 商品描述
+     */
+    private String body;
+
+}

+ 25 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dao/BillDetailInfoDAO.java

@@ -0,0 +1,25 @@
+package com.jpsoft.enterprise.modules.base.dao;
+
+import com.jpsoft.enterprise.modules.base.entity.BillDetailInfo;
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 16:05
+ */
+@Repository
+public interface BillDetailInfoDAO {
+
+    int insert(BillDetailInfo entity);
+    int update(BillDetailInfo entity);
+    int exist(String id);
+    BillDetailInfo get(String id);
+    int delete(String id);
+    List<BillDetailInfo> list();
+    List<BillDetailInfo> search(Map<String,Object> searchParams, List<Sort> sortList);
+}

+ 23 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dao/BillInfoDAO.java

@@ -0,0 +1,23 @@
+package com.jpsoft.enterprise.modules.base.dao;
+
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:32
+ */
+@Repository
+public interface BillInfoDAO {
+    int insert(BillInfo entity);
+    int update(BillInfo entity);
+    int exist(String id);
+    BillInfo get(String id);
+    int delete(String id);
+    List<BillInfo> list();
+    List<BillInfo> search(Map<String,Object> searchParams, List<Sort> sortList);
+}

+ 25 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dao/OrderInfoDAO.java

@@ -0,0 +1,25 @@
+package com.jpsoft.enterprise.modules.base.dao;
+
+import com.jpsoft.enterprise.modules.base.entity.OrderInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2020-10-17 12:46
+ */
+@Repository
+public interface OrderInfoDAO {
+    int insert(OrderInfo entity);
+    int update(OrderInfo entity);
+    int exist(String id);
+    OrderInfo get(String id);
+    int delete(String id);
+    List<OrderInfo> list();
+    List<OrderInfo> search(Map<String, Object> searchParams, List<Sort> sortList);
+
+    OrderInfo findByOutOrderNo(String outTradeNo);
+}

+ 4 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/CompanyInfoDetailDTO.java

@@ -32,6 +32,10 @@ public class CompanyInfoDetailDTO {
 
     private List<NewsInfoListDTO> newsInfoDTOList;
 
+    private List<RecruitInfoListDTO> recruitInfoListDTO;
+
+    private Long recruitInfoNum;
+
     private String positionName;
 
 }

+ 2 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/CompanyInfoListDTO.java

@@ -24,4 +24,6 @@ public class CompanyInfoListDTO {
     private String scaleName;
 
     private String industryName;
+
+    private String address;
 }

+ 42 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/OrderDetailDTO.java

@@ -0,0 +1,42 @@
+package com.jpsoft.enterprise.modules.base.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-23 10:02
+ */
+@Data
+public class OrderDetailDTO {
+
+    private String id;
+
+    private String billDetailId;
+
+    private String billName;
+
+    private String companyName;
+
+    private BigDecimal totalFee;
+
+    private String billRemark;
+
+    private String billDetail;
+
+    private Integer payStatus;
+
+    private String payName;
+
+    private String outOrderNo;
+
+    @ApiModelProperty(value = "支付时间")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+    private Date payTime;
+}

+ 47 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/OrderListDTO.java

@@ -0,0 +1,47 @@
+package com.jpsoft.enterprise.modules.base.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-23 9:03
+ */
+@Data
+public class OrderListDTO {
+
+    private String id;
+
+    private String billName;
+
+    private BigDecimal totalFee;
+
+    private Integer payStatus;
+
+    private String payStatusStr;
+
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    public String getPayStatusStr() {
+        if (payStatus.equals(10)){
+            return "未支付";
+        }
+        else if (payStatus.equals(20)){
+            return "已支付";
+        }
+        else if (payStatus.equals(30)){
+            return "已关闭";
+        }
+        else{
+            return "已退款";
+        }
+    }
+}

+ 8 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/RecruitInfoListDTO.java

@@ -17,12 +17,20 @@ public class RecruitInfoListDTO {
 
     private String companyName;
 
+    private String workRegion;
+
     private String workRegionName;
 
+    private String workYear;
+
     private String workYearName;
 
+    private String education;
+
     private String educationName;
 
+    private String salaryLevel;
+
     private String salaryLevelName;
 
     private String describe;

+ 29 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/WhisperingWallDTO.java

@@ -0,0 +1,29 @@
+package com.jpsoft.enterprise.modules.base.dto;
+
+import lombok.Data;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-19 9:43
+ */
+@Data
+public class WhisperingWallDTO {
+
+    private String id;
+
+    private String question;
+
+    private String questionCompanyName;
+
+    private Integer type;
+
+    private String typeName;
+
+    private String questionTime;
+
+    private CompanyInfoDetailDTO companyInfoDetailDTO;
+
+    private String answerTime;
+
+    private String answer;
+}

+ 29 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/WhisperingWallListDTO.java

@@ -0,0 +1,29 @@
+package com.jpsoft.enterprise.modules.base.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-19 9:02
+ */
+@Data
+public class WhisperingWallListDTO {
+
+    private String id;
+
+    private String question;
+
+    private String answer;
+
+    private String answerCompanyName;
+
+    private String typeName;
+
+    private Integer type;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    private Date createTime;
+}

+ 63 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/entity/BillDetailInfo.java

@@ -0,0 +1,63 @@
+package com.jpsoft.enterprise.modules.base.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:51
+ */
+@Data
+public class BillDetailInfo {
+
+   private String id;
+
+   private String billId;
+
+   private String orderId;
+
+   private String companyId;
+
+   private String billDetail;
+
+   @ApiModelProperty(value = "推送状态")
+   private String rushStatus;
+
+   /**
+    * 是否删除
+    */
+   @ApiModelProperty(value = "是否删除")
+   private Boolean delFlag;
+   /**
+    * 创建人
+    */
+   @ApiModelProperty(value = "创建人")
+   private String createBy;
+   /**
+    * 创建时间
+    */
+   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+   @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+   @ApiModelProperty(value = "创建时间")
+   private Date createTime;
+   /**
+    * 更新人
+    */
+   @ApiModelProperty(value = "更新人")
+   private String updateBy;
+   /**
+    * 更新时间
+    */
+   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+   @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+   @ApiModelProperty(value = "更新时间")
+   private Date updateTime;
+
+   private Integer sortNo;
+
+
+}

+ 64 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/entity/BillInfo.java

@@ -0,0 +1,64 @@
+package com.jpsoft.enterprise.modules.base.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:23
+ */
+@Data
+@ApiModel(value = "base_bill_info的实体类")
+public class BillInfo {
+
+    private String id;
+
+    @ApiModelProperty(value = "总账单名称")
+    private String billName;
+
+    @ApiModelProperty(value = "账单备注")
+    private String billRemark;
+
+    @ApiModelProperty(value = "手机端会费公示")
+    private Boolean wxShow;
+
+    @ApiModelProperty(value = "总账单的发送状态")
+    private String status;
+
+    /**
+     * 是否删除
+     */
+    @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+
+}

+ 2 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/entity/CooperationInfo.java

@@ -22,6 +22,8 @@ public class CooperationInfo {
 
     @ApiModelProperty(value = "类型")
     private String type;
+    @ApiModelProperty(value = "类型名称")
+    private String typeN;
 
     @ApiModelProperty(value = "图片地址")
     private String picUrl;

+ 135 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/entity/OrderInfo.java

@@ -0,0 +1,135 @@
+package com.jpsoft.enterprise.modules.base.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2020-10-17 12:33
+ */
+@Data
+public class OrderInfo {
+
+    private String id;
+
+    @ApiModelProperty(value = "商品描述")
+    private String body;
+
+    @ApiModelProperty(value = "订单费用")
+    private BigDecimal totalFee;
+
+    @ApiModelProperty(value = "支付状态")
+    private Integer payStatus;
+
+    @ApiModelProperty(value = "支付名称")
+    private String payName;
+
+    @ApiModelProperty(value = "支付金额")
+    private BigDecimal payFee;
+
+    @ApiModelProperty(value = "支付时间")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+    private Date payTime;
+
+    @ApiModelProperty(value = "系统订单号")
+    private String outOrderNo;
+
+    @ApiModelProperty(value = "微信订单号")
+    private String transactionId;
+
+    @ApiModelProperty(value = "支付人标识")
+    private String openId;
+
+
+    /**
+     *是否删除
+     */
+    @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+    /**
+     *创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     *创建时间
+     */
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     *更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     *更新时间
+     */
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "类别")
+    private String type;
+
+    @ApiModelProperty(value = "支付方式(string)")
+    private String payNameStr;
+
+    @ApiModelProperty(value = "退款时间")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+    private Date refundTime;
+
+    @ApiModelProperty(value = "支付金额")
+    private BigDecimal refundFee;
+
+
+    public String getPayNameStr() {
+        if (StringUtils.isBlank(payName)){
+            return "未支付";
+        }
+        else if ("wechat".equals(payName)){
+            return "微信支付";
+        }
+        else if ("alipay".equals(payName)){
+            return "支付宝支付";
+        }
+        else if ("cash".equals(payName)){
+            return "现金";
+        }
+        else if ("transfer".equals(payName)){
+            return "对公转账";
+        }
+        else if ("individual".equals(payName)){
+            return "个人账户";
+        }
+
+        return payNameStr;
+    }
+
+    public String getPayStatusStr() {
+        if (payStatus.equals(10)){
+            return "未支付";
+        }
+        else if (payStatus.equals(20)){
+            return "已支付";
+        }
+        else if (payStatus.equals(30)){
+            return "已关闭";
+        }
+        else{
+            return "已退款";
+        }
+    }
+
+
+}

+ 37 - 22
common/src/main/java/com/jpsoft/enterprise/modules/base/entity/WhisperingWall.java

@@ -4,6 +4,7 @@ import java.io.Serializable;
 import java.util.Date;
 import java.text.SimpleDateFormat;
 import java.math.BigDecimal;
+
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
@@ -11,43 +12,57 @@ import io.swagger.annotations.ApiModel;
 import lombok.Data;
 
 /**
-  描述:base_whispering_wall的实体类
+ * 描述:base_whispering_wall的实体类
  */
 @Data
 @ApiModel(value = "base_whispering_wall的实体类")
 public class WhisperingWall {
-        @ApiModelProperty(value = "编号")
+    @ApiModelProperty(value = "编号")
     private String id;
-        @ApiModelProperty(value = "提问")
+    @ApiModelProperty(value = "提问")
     private String question;
-        @ApiModelProperty(value = "提问人")
+    @ApiModelProperty(value = "提问人")
     private String questionBy;
-        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
-	    @ApiModelProperty(value = "提问时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "提问时间")
     private Date questionTime;
-        @ApiModelProperty(value = "回答")
+    @ApiModelProperty(value = "回答")
     private String answer;
-        @ApiModelProperty(value = "回答人")
+    @ApiModelProperty(value = "回答人")
     private String answerBy;
-        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
-	    @ApiModelProperty(value = "回答时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "回答时间")
     private Date answerTime;
-        @ApiModelProperty(value = "类型")
+    @ApiModelProperty(value = "类型")
     private Integer type;
-        @ApiModelProperty(value = "是否删除")
+    @ApiModelProperty(value = "是否删除")
     private Boolean delFlag;
-        @ApiModelProperty(value = "创建人")
+    @ApiModelProperty(value = "创建人")
     private String createBy;
-        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
-	    @ApiModelProperty(value = "创建时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
     private Date createTime;
-        @ApiModelProperty(value = "更新人")
+    @ApiModelProperty(value = "更新人")
     private String updateBy;
-        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
-	    @ApiModelProperty(value = "更新时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "更新时间")
     private Date updateTime;
+    @ApiModelProperty(value = "是否答复")
+    private Boolean status = false;
+
+
+    public String getTypeName(){
+        String typeName = "";
+        if (type == 1){
+            typeName = "建议意见";
+        }
+        if (type == 2){
+            typeName = "问题反馈";
+        }
+        return typeName;
+    }
 }

+ 24 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/BillDetailInfoService.java

@@ -0,0 +1,24 @@
+package com.jpsoft.enterprise.modules.base.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.entity.BillDetailInfo;
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 16:02
+ */
+public interface BillDetailInfoService {
+
+    BillDetailInfo get(String id);
+    boolean exist(String id);
+    int insert(BillDetailInfo model);
+    int update(BillDetailInfo model);
+    int delete(String id);
+    List<BillDetailInfo> list();
+    Page<BillDetailInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+}

+ 23 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/BillInfoService.java

@@ -0,0 +1,23 @@
+package com.jpsoft.enterprise.modules.base.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:29
+ */
+public interface BillInfoService {
+
+    BillInfo get(String id);
+    boolean exist(String id);
+    int insert(BillInfo model);
+    int update(BillInfo model);
+    int delete(String id);
+    List<BillInfo> list();
+    Page<BillInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+}

+ 27 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/OrderInfoService.java

@@ -0,0 +1,27 @@
+package com.jpsoft.enterprise.modules.base.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.entity.OrderInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2020-10-17 12:39
+ */
+public interface OrderInfoService {
+
+    OrderInfo get(String id);
+    boolean exist(String id);
+    int insert(OrderInfo model);
+    int update(OrderInfo model);
+    int delete(String id);
+    List<OrderInfo> list();
+    Page<OrderInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+
+    OrderInfo findByOutOrderNo(String outTradeNo);
+
+}

+ 74 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/BillDetailInfoServiceImpl.java

@@ -0,0 +1,74 @@
+package com.jpsoft.enterprise.modules.base.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.enterprise.modules.base.dao.BillDetailInfoDAO;
+import com.jpsoft.enterprise.modules.base.entity.BillDetailInfo;
+import com.jpsoft.enterprise.modules.base.service.BillDetailInfoService;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 16:03
+ */
+@Transactional
+@Component(value="billDetailInfoService")
+public class BillDetailInfoServiceImpl implements BillDetailInfoService {
+
+
+    @Resource(name="billDetailInfoDAO")
+    private BillDetailInfoDAO billDetailInfoDAO;
+
+    @Override
+    public BillDetailInfo get(String id) {
+        // TODO Auto-generated method stub
+        return billDetailInfoDAO.get(id);
+    }
+
+    @Override
+    public int insert(BillDetailInfo model) {
+
+        return billDetailInfoDAO.insert(model);
+    }
+
+    @Override
+    public int update(BillDetailInfo model) {
+        // TODO Auto-generated method stub
+        return billDetailInfoDAO.update(model);
+    }
+
+    @Override
+    public int delete(String id) {
+        // TODO Auto-generated method stub
+        return billDetailInfoDAO.delete(id);
+    }
+
+    @Override
+    public boolean exist(String id) {
+        // TODO Auto-generated method stub
+        int count = billDetailInfoDAO.exist(id);
+
+        return count > 0 ? true : false;
+    }
+
+    @Override
+    public List<BillDetailInfo> list() {
+        // TODO Auto-generated method stub
+        return billDetailInfoDAO.list();
+    }
+
+    @Override
+    public Page<BillDetailInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList) {
+        Page<BillDetailInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            billDetailInfoDAO.search(searchParams,sortList);
+        });
+
+        return page;
+    }
+}

+ 73 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/BillInfoServiceImpl.java

@@ -0,0 +1,73 @@
+package com.jpsoft.enterprise.modules.base.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.enterprise.modules.base.dao.BillInfoDAO;
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.base.service.BillInfoService;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:30
+ */
+@Transactional
+@Component(value="billInfoService")
+public class BillInfoServiceImpl implements BillInfoService {
+
+    @Resource(name="billInfoDAO")
+    private BillInfoDAO billInfoDAO;
+
+    @Override
+    public BillInfo get(String id) {
+        // TODO Auto-generated method stub
+        return billInfoDAO.get(id);
+    }
+
+    @Override
+    public int insert(BillInfo model) {
+
+        return billInfoDAO.insert(model);
+    }
+
+    @Override
+    public int update(BillInfo model) {
+        // TODO Auto-generated method stub
+        return billInfoDAO.update(model);
+    }
+
+    @Override
+    public int delete(String id) {
+        // TODO Auto-generated method stub
+        return billInfoDAO.delete(id);
+    }
+
+    @Override
+    public boolean exist(String id) {
+        // TODO Auto-generated method stub
+        int count = billInfoDAO.exist(id);
+
+        return count > 0 ? true : false;
+    }
+
+    @Override
+    public List<BillInfo> list() {
+        // TODO Auto-generated method stub
+        return billInfoDAO.list();
+    }
+
+    @Override
+    public Page<BillInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList) {
+        Page<BillInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            billInfoDAO.search(searchParams,sortList);
+        });
+
+        return page;
+    }
+}

+ 86 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/OrderInfoServiceImpl.java

@@ -0,0 +1,86 @@
+package com.jpsoft.enterprise.modules.base.service.impl;
+
+import cn.hutool.core.date.DateUtil;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.enterprise.modules.base.dao.OrderInfoDAO;
+import com.jpsoft.enterprise.modules.base.entity.OrderInfo;
+import com.jpsoft.enterprise.modules.base.service.OrderInfoService;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2020-10-17 12:42
+ */
+@Transactional
+@Component(value = "orderInfoService")
+@Slf4j
+public class OrderInfoServiceImpl implements OrderInfoService {
+    @Resource
+    private OrderInfoDAO orderInfoDAO;
+
+    @Override
+    public OrderInfo get(String id) {
+        return orderInfoDAO.get(id);
+    }
+
+    @Override
+    public int insert(OrderInfo model) {
+
+        return orderInfoDAO.insert(model);
+    }
+
+    @Override
+    public int update(OrderInfo model) {
+        // TODO Auto-generated method stub
+        return orderInfoDAO.update(model);
+    }
+
+
+    @Override
+    public int delete(String id) {
+        // TODO Auto-generated method stub
+        return orderInfoDAO.delete(id);
+    }
+
+    @Override
+    public boolean exist(String id) {
+        // TODO Auto-generated method stub
+        int count = orderInfoDAO.exist(id);
+
+        return count > 0 ? true : false;
+    }
+
+    @Override
+    public List<OrderInfo> list() {
+        // TODO Auto-generated method stub
+        return orderInfoDAO.list();
+    }
+
+
+    @Override
+    public Page<OrderInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList) {
+        Page<OrderInfo> page = PageHelper.startPage(pageNumber, pageSize, count).doSelectPage(() -> {
+            orderInfoDAO.search(searchParams, sortList);
+        });
+
+        return page;
+    }
+
+    @Override
+    public OrderInfo findByOutOrderNo(String outTradeNo) {
+        return orderInfoDAO.findByOutOrderNo(outTradeNo);
+    }
+
+
+}

+ 125 - 0
common/src/main/resources/mapper/base/BillDetailInfo.xml

@@ -0,0 +1,125 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.enterprise.modules.base.dao.BillDetailInfoDAO">
+    <resultMap id="BillDetailInfoMap" type="com.jpsoft.enterprise.modules.base.entity.BillDetailInfo">
+        <id property="id" column="id_" />
+        <result property="billId" column="bill_id" />
+        <result property="orderId" column="order_id" />
+        <result property="companyId" column="company_id"/>
+        <result property="billDetail" column="bill_detail" />
+        <result property="rushStatus" column="rush_status"/>
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="delFlag" column="del_flag" />
+        <result property="sortNo" column="sort_no"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.BillDetailInfo">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into base_bill_detail_info
+	    (id_,bill_id,order_id,company_id,bill_detail,rush_status,create_by,create_time,update_by,update_time,del_flag,sort_no)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{billId,jdbcType=VARCHAR}
+,#{orderId,jdbcType=VARCHAR}
+,#{companyId,jdbcType=NUMERIC}
+,#{billDetail,jdbcType=VARCHAR}
+,#{rushStatus,jdbcType=VARCHAR}
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+,#{sortNo,jdbcType=INTEGER}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_bill_detail_info where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.BillDetailInfo">
+        update base_bill_detail_info
+        <set>
+            <if test="billId!=null">
+                bill_id=#{billId,jdbcType=VARCHAR},
+            </if>
+            <if test="orderId!=null">
+                order_id=#{orderId,jdbcType=VARCHAR},
+            </if>
+            <if test="companyId!=null">
+                company_id=#{companyId,jdbcType=VARCHAR},
+            </if>
+            <if test="billDetail!=null">
+                bill_detail=#{billDetail,jdbcType=VARCHAR},
+            </if>
+            <if test="rushStatus != null">
+                rush_status = #{rushStatus,jdbcType=VARCHAR},
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="sortNo != null">
+                sort_no = #{sortNo,jdbcType=INTEGER}
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="BillDetailInfoMap">
+        select * from base_bill_detail_info where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_bill_detail_info where id_=#{0}
+    </select>
+    <select id="list" resultMap="BillDetailInfoMap">
+		select * from base_bill_detail_info where del_flag = 0 order by create_time asc
+	</select>
+    <select id="search" parameterType="hashmap" resultMap="BillDetailInfoMap">
+        <![CDATA[
+			SELECT
+				a.*
+			FROM
+				base_bill_detail_info a
+				left join base_bill_info b on b.id_ = a.bill_id
+				left join base_order_info c on c.id_ = a.order_id
+		]]>
+        <where>
+            a.del_flag = 0
+            and b.del_flag = 0
+            and c.del_flag = 0
+            <if test="searchParams.id != null">
+                and a.ID_ like #{searchParams.id}
+            </if>
+            <if test="searchParams.companyId != null ">
+                and a.company_id = #{searchParams.companyId}
+            </if>
+            <if test="searchParams.status != null">
+                and b.status_ = #{searchParams.status}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList"  open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+
+</mapper>

+ 105 - 0
common/src/main/resources/mapper/base/BillInfo.xml

@@ -0,0 +1,105 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.enterprise.modules.base.dao.BillInfoDAO">
+    <resultMap id="BillInfoMap" type="com.jpsoft.enterprise.modules.base.entity.BillInfo">
+        <id property="id" column="id_" />
+        <result property="billName" column="bill_name" />
+        <result property="billRemark" column="bill_remark" />
+        <result property="wxShow" column="wx_show"/>
+        <result property="status" column="status_" />
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="delFlag" column="del_flag" />
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.BillInfo">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into base_bill_info
+	    (id_,bill_name,bill_remark,wx_show,status_,create_by,create_time,update_by,update_time,del_flag)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{billName,jdbcType=VARCHAR}
+,#{billRemark,jdbcType=VARCHAR}
+,#{wxShow,jdbcType=NUMERIC}
+,#{status,jdbcType=VARCHAR}
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_bill_info where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.BillInfo">
+        update base_bill_info
+        <set>
+            <if test="billName!=null">
+                bill_name=#{billName,jdbcType=VARCHAR},
+            </if>
+            <if test="billRemark!=null">
+                bill_remark=#{billRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="wxShow!=null">
+                wx_show=#{wxShow,jdbcType=NUMERIC},
+            </if>
+            <if test="status!=null">
+                status_=#{status,jdbcType=VARCHAR},
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC }
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="BillInfoMap">
+        select * from base_bill_info where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_bill_info where id_=#{0}
+    </select>
+    <select id="list" resultMap="BillInfoMap">
+		select * from base_bill_info where del_flag = 0 order by create_time asc
+	</select>
+    <select id="search" parameterType="hashmap" resultMap="BillInfoMap">
+        <![CDATA[
+			SELECT
+				*
+			FROM
+				base_bill_info a
+		]]>
+        <where>
+            del_flag = 0
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList"  open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+
+</mapper>

+ 2 - 2
common/src/main/resources/mapper/base/CooperationInfo.xml

@@ -101,8 +101,8 @@
 		]]>
         <where>
             del_flag = 0
-            <if test="searchParams.id != null">
-                and ID_ like #{searchParams.id}
+            <if test="searchParams.title != null">
+                and title_ like #{searchParams.title}
             </if>
             <if test="searchParams.type != null">
                 and type_ = #{searchParams.type}

+ 182 - 0
common/src/main/resources/mapper/base/OrderInfo.xml

@@ -0,0 +1,182 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.enterprise.modules.base.dao.OrderInfoDAO">
+    <resultMap id="OrderInfoMap" type="com.jpsoft.enterprise.modules.base.entity.OrderInfo">
+        <id property="id" column="id_" />
+        <result property="totalFee" column="total_fee" />
+        <result property="body" column="body_" />
+        <result property="payStatus" column="pay_status" />
+        <result property="payName" column="pay_name" />
+        <result property="payFee" column="pay_fee" />
+        <result property="payTime" column="pay_time" />
+        <result property="outOrderNo" column="out_order_no" />
+        <result property="transactionId" column="transaction_id" />
+        <result property="openId" column="open_id" />
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="type" column="type_"/>
+        <result property="refundFee" column="refund_fee"/>
+        <result property="refundTime" column="refund_time"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.OrderInfo">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into base_order_info
+	    (id_,total_fee,body_,pay_status,pay_name,pay_fee,pay_time,out_order_no,transaction_id,open_id,del_flag,create_by,create_time,update_by,update_time,type_,refund_fee,refund_time)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{totalFee,jdbcType=DECIMAL}
+,#{body,jdbcType=VARCHAR}
+,#{payStatus,jdbcType=INTEGER,jdbcType=VARCHAR}
+,#{payName,jdbcType=VARCHAR}
+,#{payFee,jdbcType=DECIMAL }
+,#{payTime,jdbcType=TIMESTAMP }
+,#{outOrderNo,jdbcType=VARCHAR }
+,#{transactionId,jdbcType=VARCHAR }
+,#{openId,jdbcType=VARCHAR}
+,#{delFlag,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{type,jdbcType=VARCHAR}
+,#{refundFee,jdbcType=DECIMAL}
+,#{refundTime,jdbcType=TIMESTAMP}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_order_info where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.OrderInfo">
+        update base_order_info
+        <set>
+            <if test="totalFee!=null">
+                total_fee=#{totalFee,jdbcType=DECIMAL},
+            </if>
+            <if test="body!=null">
+                body_=#{body,jdbcType=VARCHAR},
+            </if>
+            <if test="payStatus!=null">
+                pay_status=#{payStatus,jdbcType=INTEGER},
+            </if>
+            <if test="payName!=null">
+                pay_name=#{payName,jdbcType=VARCHAR},
+            </if>
+            <if test="payFee!=null">
+                pay_fee=#{payFee,jdbcType=DECIMAL },
+            </if>
+            <if test="payTime!=null">
+                pay_time=#{payTime,jdbcType=TIMESTAMP },
+            </if>
+            <if test="outOrderNo!=null">
+                out_order_no=#{outOrderNo,jdbcType=VARCHAR },
+            </if>
+            <if test="transactionId!=null">
+                transaction_id=#{transactionId,jdbcType=VARCHAR },
+            </if>
+            <if test="openId!=null">
+                open_id=#{openId,jdbcType=VARCHAR },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="type!=null">
+                type_=#{type,jdbcType= VARCHAR },
+            </if>
+            <if test="refundFee!=null">
+                refund_fee = #{refundFee,jdbcType=DECIMAL}
+            </if>
+            <if test="refundTime != null">
+                refund_time = #{refundTime,jdbcType=TIMESTAMP}
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="OrderInfoMap">
+        select * from base_order_info where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_order_info where id_=#{0}
+    </select>
+    <select id="list" resultMap="OrderInfoMap">
+		select * from base_order_info where del_flag = 0
+	</select>
+    <select id="search" parameterType="hashmap" resultMap="OrderInfoMap">
+        <![CDATA[
+			select * from base_order_info
+		]]>
+        <where>
+            del_flag = false
+            <if test="searchParams.outOrderNo != null">
+                and out_order_no like #{searchParams.outOrderNo}
+            </if>
+            <if test="searchParams.payStatus != null">
+                and pay_status = #{searchParams.payStatus}
+            </if>
+            <if test="searchParams.name != null">
+                and name_ like #{searchParams.name}
+            </if>
+            <if test="searchParams.type != null">
+                and type_ = #{searchParams.type}
+            </if>
+            <if test="searchParams.transactionId != null">
+                and transaction_id like #{searchParams.transactionId}
+            </if>
+            <if test="searchParams.beginTime != null">
+                <![CDATA[
+                  and create_time >= #{searchParams.beginTime}
+            ]]>
+            </if>
+            <if test="searchParams.endTime != null">
+                <![CDATA[
+                  and create_time <= #{searchParams.endTime}
+            ]]>
+            </if>
+            <if test="searchParams.payBeginTime != null">
+                <![CDATA[
+                  and pay_time >= #{searchParams.payBeginTime}
+            ]]>
+            </if>
+            <if test="searchParams.payEndTime != null">
+                <![CDATA[
+                  and pay_time <= #{searchParams.payEndTime}
+            ]]>
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList"  open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+
+    <select id="findByOutOrderNo" resultMap="OrderInfoMap">
+        <![CDATA[
+        select * from base_order_info
+        where del_flag = 0
+        and out_order_no = #{outTradeNo}
+        ]]>
+    </select>
+
+</mapper>

+ 17 - 4
common/src/main/resources/mapper/base/WhisperingWall.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!-- namespace必须指向DAO接口 -->
 <mapper namespace="com.jpsoft.enterprise.modules.base.dao.WhisperingWallDAO">
@@ -17,6 +17,7 @@
 			<result property="createTime" column="create_time" />
 			<result property="updateBy" column="update_by" />
 			<result property="updateTime" column="update_time" />
+			<result property="status" column="status_"/>
 			</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.WhisperingWall">
 	<!--
@@ -26,7 +27,7 @@
 	-->
 	<![CDATA[
 		insert into base_whispering_wall
-	    (id_,question_,question_by,question_time,answer_,answer_by,answer_time,type_,del_flag,create_by,create_time,update_by,update_time)
+	    (id_,question_,question_by,question_time,answer_,answer_by,answer_time,type_,del_flag,create_by,create_time,update_by,update_time,status_)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -42,6 +43,7 @@
 ,#{createTime,jdbcType= TIMESTAMP }
 ,#{updateBy,jdbcType=VARCHAR}
 ,#{updateTime,jdbcType= TIMESTAMP }
+,#{status,jdbcType=NUMERIC}
 		)
 	]]>
 	</insert>
@@ -87,12 +89,14 @@
 				<if test="updateTime!=null">
 		update_time=#{updateTime,jdbcType= TIMESTAMP },
 		</if>
+			<if test="status!=null">
+				status_=#{status,jdbcType= NUMERIC },
+			</if>
 		</set>
 	where id_=#{id}
 	</update>
 	<select id="get" parameterType="string" resultMap="WhisperingWallMap">
-		select 
-id_,question_,question_by,question_time,answer_,answer_by,answer_time,type_,del_flag,create_by,create_time,update_by,update_time		from base_whispering_wall where id_=#{0}
+		select * from base_whispering_wall where id_=#{0} and del_flag = 0
 	</select>
 	<select id="exist" parameterType="string" resultType="int">
 		select count(*) from base_whispering_wall where id_=#{0}
@@ -109,6 +113,15 @@ id_,question_,question_by,question_time,answer_,answer_by,answer_time,type_,del_
 			<if test="searchParams.question != null">
 				and question_ like #{searchParams.question}
 			</if>
+			<if test="searchParams.questionBy != null">
+				and question_by = #{searchParams.questionBy}
+			</if>
+			<if test="searchParams.type != null">
+				and type_ = #{searchParams.type}
+			</if>
+			<if test="searchParams.status != null">
+				and status_ = #{searchParams.status}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 5 - 0
web/src/main/java/com/jpsoft/enterprise/config/WebMvcConfig.java

@@ -76,7 +76,12 @@ public class WebMvcConfig implements WebMvcConfigurer {
 				.excludePathPatterns("/mobile/cooperationInfoApi/cooperationInfoDetail")
 				.excludePathPatterns("/mobile/recruitInfoApi/recruitInfoList")
 				.excludePathPatterns("/mobile/recruitInfoApi/recruitInfoDetail")
+				.excludePathPatterns("/mobile/whisperingWallApi/whisperingWallInfoList")
+				.excludePathPatterns("/mobile/whisperingWallApi/whisperingWallInfoDetail")
 				.excludePathPatterns("/wechat/**")
+				.excludePathPatterns("/wxPay/**")
+				.excludePathPatterns("/aliPay/**")
+
 
         ;
 	}

+ 247 - 0
web/src/main/java/com/jpsoft/enterprise/modules/base/controller/CooperationInfoController.java

@@ -0,0 +1,247 @@
+package com.jpsoft.enterprise.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.common.utils.PojoUtils;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import com.jpsoft.enterprise.modules.common.dto.MessageResult;
+import com.jpsoft.enterprise.modules.base.entity.CooperationInfo;
+import com.jpsoft.enterprise.modules.base.service.CooperationInfoService;
+import com.jpsoft.enterprise.modules.sys.entity.User;
+import com.jpsoft.enterprise.modules.sys.service.DataDictionaryService;
+import com.jpsoft.enterprise.modules.sys.service.UserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/base/cooperationInfo")
+@Api(description = "cooperationInfo")
+public class CooperationInfoController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private CooperationInfoService cooperationInfoService;
+    @Autowired
+    private UserService userService;
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<CooperationInfo> create(){
+        MessageResult<CooperationInfo> msgResult = new MessageResult<>();
+
+        CooperationInfo cooperationInfo = new CooperationInfo();
+
+        msgResult.setData(cooperationInfo);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<CooperationInfo> add(@RequestBody CooperationInfo cooperationInfo,@RequestAttribute String subject){
+        MessageResult<CooperationInfo> msgResult = new MessageResult<>();
+        User user = userService.get(subject);
+
+        try {
+            cooperationInfo.setId(UUID.randomUUID().toString());
+            cooperationInfo.setCompanyId(user.getCompanyId());
+            cooperationInfo.setDelFlag(false);
+            cooperationInfo.setCreateBy(subject);
+            cooperationInfo.setCreateTime(new Date());
+            
+            int affectCount = cooperationInfoService.insert(cooperationInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(cooperationInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<CooperationInfo> edit(@PathVariable("id") String id){
+        MessageResult<CooperationInfo> msgResult = new MessageResult<>();
+
+        try {
+            CooperationInfo cooperationInfo = cooperationInfoService.get(id);
+
+            if (cooperationInfo != null) {
+                msgResult.setResult(true);
+                msgResult.setData(cooperationInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<CooperationInfo> update(@RequestBody CooperationInfo cooperationInfo,@RequestAttribute String subject){
+        MessageResult<CooperationInfo> msgResult = new MessageResult<>();
+
+        try {
+            cooperationInfo.setUpdateBy(subject);
+            cooperationInfo.setUpdateTime(new Date());
+            
+            int affectCount = cooperationInfoService.update(cooperationInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(cooperationInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            CooperationInfo cooperationInfo = cooperationInfoService.get(id);
+            cooperationInfo.setDelFlag(true);
+            cooperationInfo.setUpdateBy(subject);
+            cooperationInfo.setUpdateTime(new Date());
+
+            int affectCount = cooperationInfoService.update(cooperationInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                CooperationInfo cooperationInfo = cooperationInfoService.get(id);
+                cooperationInfo.setDelFlag(true);
+                cooperationInfo.setUpdateBy(subject);
+                cooperationInfo.setUpdateTime(new Date());
+
+                affectCount += cooperationInfoService.update(cooperationInfo);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String title, String type, String status,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+        User user = userService.get(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+        searchParams.put("companyId",user.getCompanyId());
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","asc"));
+
+        if (StringUtils.isNotEmpty(type)) {
+            searchParams.put("type",type);
+        }
+        if (StringUtils.isNotEmpty(status)) {
+            if(status.equals("false"))
+                searchParams.put("status",false);
+            if(status.equals("true"))
+                searchParams.put("status",true);
+        }
+        if (StringUtils.isNotEmpty(title)) {
+            searchParams.put("title","%" + title + "%");
+        }
+
+        Page<CooperationInfo> page = cooperationInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+        for(CooperationInfo cooperationInfo : page.getResult()){
+            cooperationInfo.setTypeN(dataDictionaryService.findNameByCatalogNameAndValue("互助类型",cooperationInfo.getType()));
+        }
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 62 - 33
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/CompanyInfoApiController.java

@@ -3,14 +3,8 @@ package com.jpsoft.enterprise.modules.mobile.controller;
 import cn.hutool.core.date.DateUtil;
 import com.github.pagehelper.Page;
 import com.jpsoft.enterprise.modules.base.dto.*;
-import com.jpsoft.enterprise.modules.base.entity.CompanyInfo;
-import com.jpsoft.enterprise.modules.base.entity.IndustryInfo;
-import com.jpsoft.enterprise.modules.base.entity.NewsInfo;
-import com.jpsoft.enterprise.modules.base.entity.NewsType;
-import com.jpsoft.enterprise.modules.base.service.CompanyInfoService;
-import com.jpsoft.enterprise.modules.base.service.IndustryInfoService;
-import com.jpsoft.enterprise.modules.base.service.NewsInfoService;
-import com.jpsoft.enterprise.modules.base.service.NewsTypeService;
+import com.jpsoft.enterprise.modules.base.entity.*;
+import com.jpsoft.enterprise.modules.base.service.*;
 import com.jpsoft.enterprise.modules.common.dto.MessageResult;
 import com.jpsoft.enterprise.modules.common.dto.Sort;
 import com.jpsoft.enterprise.modules.sys.entity.DataDictionary;
@@ -58,6 +52,9 @@ public class CompanyInfoApiController {
     @Autowired
     private IndustryInfoService industryInfoService;
 
+    @Autowired
+    private RecruitInfoService recruitInfoService;
+
     @PostMapping("companyNum")
     @ApiOperation(value = "注册公司数量(公开接口)")
     public MessageResult<Map> companyNum() {
@@ -122,17 +119,17 @@ public class CompanyInfoApiController {
 
             Map<String, Object> map = new HashMap<>();
             List<IndustryListDTO> list = new ArrayList<>();
-            if (StringUtils.isBlank(id)){
+            if (StringUtils.isBlank(id)) {
                 List<IndustryInfo> industryInfoList = industryInfoService.findParentIndustry();
-                if (industryInfoList.size()>0){
-                    for (IndustryInfo industryInfo : industryInfoList){
+                if (industryInfoList.size() > 0) {
+                    for (IndustryInfo industryInfo : industryInfoList) {
                         IndustryListDTO industryListDTO = new IndustryListDTO();
                         industryListDTO.setValue(industryInfo.getId());
                         industryListDTO.setText(industryInfo.getIndustryName());
                         List<IndustryInfo> industryInfoList1 = industryInfoService.findIndustryByParentId(industryInfo.getId());
                         List<IndustryInfoDTO> industryInfoDTOList = new ArrayList<>();
-                        if (industryInfoList1.size()>0){
-                            for (IndustryInfo industryInfo1 : industryInfoList1){
+                        if (industryInfoList1.size() > 0) {
+                            for (IndustryInfo industryInfo1 : industryInfoList1) {
                                 IndustryInfoDTO industryInfoDTO = new IndustryInfoDTO();
                                 industryInfoDTO.setValue(industryInfo1.getId());
                                 industryInfoDTO.setText(industryInfo1.getIndustryName());
@@ -143,10 +140,10 @@ public class CompanyInfoApiController {
                         list.add(industryListDTO);
                     }
                 }
-            }else {
+            } else {
                 List<IndustryInfo> industryInfoList = industryInfoService.findIndustryByParentId(id);
-                if (industryInfoList.size()>0){
-                    for (IndustryInfo industryInfo : industryInfoList){
+                if (industryInfoList.size() > 0) {
+                    for (IndustryInfo industryInfo : industryInfoList) {
                         IndustryListDTO industryListDTO = new IndustryListDTO();
                         industryListDTO.setValue(industryInfo.getId());
                         industryListDTO.setText(industryInfo.getIndustryName());
@@ -156,7 +153,7 @@ public class CompanyInfoApiController {
             }
 
 
-            map.put("list",list);
+            map.put("list", list);
 
             messageResult.setData(map);
             messageResult.setResult(true);
@@ -197,7 +194,7 @@ public class CompanyInfoApiController {
             if (StringUtils.isNotBlank(industry)) {
                 searchParams.put("industry", industry);
             }
-            searchParams.put("inside",0);
+            searchParams.put("inside", 0);
 
             List<Sort> sortList = new ArrayList<>();
             sortList.add(new Sort("create_time", "desc"));
@@ -217,10 +214,10 @@ public class CompanyInfoApiController {
                     IndustryInfo industryInfo = industryInfoService.get(companyInfo.getIndustry());
                     String industryName = industryInfo.getIndustryName();
                     //父行业
-                    if (StringUtils.isNotBlank(industryInfo.getParentId())){
+                    if (StringUtils.isNotBlank(industryInfo.getParentId())) {
                         IndustryInfo industryInfo1 = industryInfoService.get(industryInfo.getParentId());
-                        if (industryInfo1 != null){
-                            industryName = industryInfo1.getIndustryName()+"/"+industryName;
+                        if (industryInfo1 != null) {
+                            industryName = industryInfo1.getIndustryName() + "/" + industryName;
                         }
 
                     }
@@ -279,10 +276,10 @@ public class CompanyInfoApiController {
             IndustryInfo industryInfo = industryInfoService.get(companyInfo.getIndustry());
             String industryName = industryInfo.getIndustryName();
             //父行业
-            if (StringUtils.isNotBlank(industryInfo.getParentId())){
+            if (StringUtils.isNotBlank(industryInfo.getParentId())) {
                 IndustryInfo industryInfo1 = industryInfoService.get(industryInfo.getParentId());
-                if (industryInfo1 != null){
-                    industryName = industryInfo1.getIndustryName()+"/"+industryName;
+                if (industryInfo1 != null) {
+                    industryName = industryInfo1.getIndustryName() + "/" + industryName;
                 }
 
             }
@@ -290,29 +287,61 @@ public class CompanyInfoApiController {
 
             //企业风采
             List<NewsInfoListDTO> newsInfoDTOList = new ArrayList<>();
-            Map<String,Object> searchParams = new HashMap<>();
-            searchParams.put("companyId",companyInfo.getId());
+            Map<String, Object> searchParams = new HashMap<>();
+            searchParams.put("companyId", companyInfo.getId());
 
             List<Sort> sortList = new ArrayList<>();
-            sortList.add(new Sort("a.create_time","desc"));
+            sortList.add(new Sort("a.create_time", "desc"));
 
-            Page<NewsInfo> page = newsInfoService.pageSearch(searchParams,1,3,false,sortList);
+            Page<NewsInfo> page = newsInfoService.pageSearch(searchParams, 1, 3, false, sortList);
 
             List<NewsInfo> newsInfoList = page.getResult();
-            if (newsInfoList.size()>0){
-                for (NewsInfo newsInfo : newsInfoList){
+            if (newsInfoList.size() > 0) {
+                for (NewsInfo newsInfo : newsInfoList) {
                     NewsInfoListDTO newsInfoListDTO = new NewsInfoListDTO();
-                    BeanUtils.copyProperties(newsInfo,newsInfoListDTO);
+                    BeanUtils.copyProperties(newsInfo, newsInfoListDTO);
                     NewsType newsType = newsTypeService.get(newsInfo.getNewsTypeId());
                     newsInfoListDTO.setTypeName(newsType.getName());
-                    newsInfoListDTO.setCreateTime(DateUtil.format(newsInfo.getCreateTime(),"yyyy-MM-dd"));
+                    newsInfoListDTO.setCreateTime(DateUtil.format(newsInfo.getCreateTime(), "yyyy-MM-dd"));
                     newsInfoDTOList.add(newsInfoListDTO);
                 }
             }
 
+
+            List<RecruitInfoListDTO> recruitInfoListDTOList = new ArrayList<>();
+            Map<String, Object> searchParams1 = new HashMap<>();
+            searchParams1.put("companyId", companyInfo.getId());
+            searchParams1.put("status",1);
+
+
+            List<Sort> sortList1 = new ArrayList<>();
+            sortList1.add(new Sort("create_time", "desc"));
+            Page<RecruitInfo> page1 = recruitInfoService.pageSearch(searchParams1, 1, 3, true, sortList1);
+            List<RecruitInfo> recruitInfoList = page1.getResult();
+            if (recruitInfoList.size()>0){
+                for (RecruitInfo recruitInfo : recruitInfoList){
+                    RecruitInfoListDTO recruitInfoListDTO = new RecruitInfoListDTO();
+                    BeanUtils.copyProperties(recruitInfo,recruitInfoListDTO);
+                    recruitInfoListDTO.setCompanyName(companyInfo.getCompanyName());
+                    String workRegionName = dataDictionaryService.findNameByCatalogNameAndValue("区域", recruitInfo.getWorkRegion());
+                    recruitInfoListDTO.setWorkRegionName(workRegionName);
+                    String workYearName = dataDictionaryService.findNameByCatalogNameAndValue("工作年限", recruitInfo.getWorkYear());
+                    recruitInfoListDTO.setWorkYearName(workYearName);
+                    String educationName = dataDictionaryService.findNameByCatalogNameAndValue("学历", recruitInfo.getEducation());
+                    recruitInfoListDTO.setEducationName(educationName);
+                    String salaryLevelName = dataDictionaryService.findNameByCatalogNameAndValue("薪资水平", recruitInfo.getSalaryLevel());
+                    recruitInfoListDTO.setSalaryLevelName(salaryLevelName);
+                    recruitInfoListDTOList.add(recruitInfoListDTO);
+
+                }
+            }
+
+
             companyInfoDetailDTO.setNewsInfoDTOList(newsInfoDTOList);
+            companyInfoDetailDTO.setRecruitInfoListDTO(recruitInfoListDTOList);
+            companyInfoDetailDTO.setRecruitInfoNum(page1.getTotal());
 
-            map.put("companyInfo",companyInfoDetailDTO);
+            map.put("companyInfo", companyInfoDetailDTO);
 
             messageResult.setData(map);
             messageResult.setResult(true);

+ 165 - 0
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/OrderInfoApiController.java

@@ -0,0 +1,165 @@
+package com.jpsoft.enterprise.modules.mobile.controller;
+
+import cn.hutool.core.date.DateUtil;
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.dto.*;
+import com.jpsoft.enterprise.modules.base.entity.*;
+import com.jpsoft.enterprise.modules.base.service.*;
+import com.jpsoft.enterprise.modules.common.dto.MessageResult;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import com.jpsoft.enterprise.modules.common.utils.PojoUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:21
+ */
+@RestController
+@RequestMapping("/mobile/orderInfoApi")
+@Slf4j
+public class OrderInfoApiController {
+
+
+    @Autowired
+    private OrderInfoService orderInfoService;
+
+    @Autowired
+    private CompanyInfoService companyInfoService;
+
+    @Autowired
+    private PersonInfoService personInfoService;
+
+    @Autowired
+    private BillInfoService billInfoService;
+
+    @Autowired
+    private BillDetailInfoService billDetailInfoService;
+
+    @PostMapping("orderList")
+    @ApiOperation(value = "订单列表")
+    public MessageResult<Map> orderList(
+            String token,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="10") int pageSize,
+            @RequestAttribute String subject) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+
+            //查询人
+            PersonInfo personInfo = personInfoService.get(subject);
+            if (personInfo == null){
+                throw new Exception("个人信息有误");
+            }
+
+            List<OrderListDTO> list = new ArrayList<>();
+            CompanyInfo companyInfo = companyInfoService.get(personInfo.getCompanyId());
+            Map<String,Object> searchParams = new HashMap<>();
+            searchParams.put("companyId",companyInfo.getId());
+            searchParams.put("status","1");
+
+            List<Sort> sortList = new ArrayList<>();
+            sortList.add(new Sort("a.create_time", "desc"));
+            sortList.add(new Sort("c.pay_status","asc"));
+
+            Page<BillDetailInfo> page = billDetailInfoService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
+
+            List<BillDetailInfo> billDetailInfoList = page.getResult();
+            if (billDetailInfoList.size()>0){
+                for (BillDetailInfo billDetailInfo : billDetailInfoList){
+                    BillInfo billInfo = billInfoService.get(billDetailInfo.getBillId());
+                    OrderInfo orderInfo = orderInfoService.get(billDetailInfo.getOrderId());
+                    OrderListDTO orderListDTO = new OrderListDTO();
+
+                    orderListDTO.setId(billDetailInfo.getId());
+                    orderListDTO.setBillName(billInfo.getBillName());
+                    orderListDTO.setPayStatus(orderInfo.getPayStatus());
+                    orderListDTO.setPayStatusStr(orderListDTO.getPayStatusStr());
+                    orderListDTO.setTotalFee(orderInfo.getTotalFee());
+                    orderListDTO.setCreateTime(orderInfo.getCreateTime());
+                    list.add(orderListDTO);
+                }
+
+            }
+
+            Map<String, Object> pageMap = new HashMap<>();
+            pageMap.put("recordsTotal", page.getTotal());
+            pageMap.put("recordsFiltered", page.getTotal());
+            pageMap.put("totalPage", page.getPages());
+            pageMap.put("pageNumber", page.getPageNum());
+            pageMap.put("pageSize", page.getPageSize());
+            pageMap.put("data", list);
+
+            messageResult.setData(pageMap);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+
+    @PostMapping("orderDetail")
+    @ApiOperation(value = "账单详情")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "token", value = "令牌", required = true, paramType = "form")
+    })
+    public MessageResult<OrderDetailDTO> orderDetail(String id, String token, @RequestAttribute String subject) {
+        MessageResult<OrderDetailDTO> messageResult = new MessageResult<>();
+
+        try {
+
+            BillDetailInfo billDetailInfo = billDetailInfoService.get(id);
+            if (billDetailInfo == null){
+                throw new Exception("记录不存在");
+            }
+            BillInfo billInfo = billInfoService.get(billDetailInfo.getBillId());
+            OrderInfo orderInfo = orderInfoService.get(billDetailInfo.getOrderId());
+            CompanyInfo companyInfo = companyInfoService.get(billDetailInfo.getCompanyId());
+            OrderDetailDTO orderDetailDTO = new OrderDetailDTO();
+            orderDetailDTO.setId(orderInfo.getId());
+            orderDetailDTO.setBillDetailId(billDetailInfo.getId());
+            orderDetailDTO.setBillName(billInfo.getBillName());
+            orderDetailDTO.setCompanyName(companyInfo.getCompanyName());
+            orderDetailDTO.setTotalFee(orderInfo.getTotalFee());
+            orderDetailDTO.setBillRemark(billInfo.getBillRemark());
+            orderDetailDTO.setBillDetail(billDetailInfo.getBillDetail());
+            orderDetailDTO.setPayStatus(orderInfo.getPayStatus());
+            orderDetailDTO.setPayName(orderInfo.getPayName());
+            orderDetailDTO.setOutOrderNo(orderInfo.getOutOrderNo());
+            orderDetailDTO.setPayTime(orderInfo.getPayTime());
+
+            messageResult.setData(orderDetailDTO);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+
+
+}

+ 97 - 30
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/RecruitInfoApiController.java

@@ -83,6 +83,7 @@ public class RecruitInfoApiController {
             if (StringUtils.isNotBlank(key)) {
                 searchParams.put("key", "%" + key + "%");
             }
+            searchParams.put("status",1);
             List<Sort> sortList = new ArrayList<>();
             sortList.add(new Sort("create_time", "desc"));
             Page<RecruitInfo> page = recruitInfoService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
@@ -196,7 +197,7 @@ public class RecruitInfoApiController {
             Map<String, Object> searchParams = new HashMap<>();
             searchParams.put("companyId", companyInfo.getId());
             List<Sort> sortList = new ArrayList<>();
-            sortList.add(new Sort("status", "desc"));
+            sortList.add(new Sort("status_", "desc"));
             sortList.add(new Sort("create_time", "desc"));
             Page<RecruitInfo> page = recruitInfoService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
             List<RecruitInfo> recruitInfoList = page.getResult();
@@ -243,18 +244,19 @@ public class RecruitInfoApiController {
     @PostMapping("submitRecruitInfo")
     @ApiOperation(value = "个人招聘信息提交")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "positionName", value = "职务名称", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "workRegion", value = "区域", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "workYear", value = "工作年限", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "education", value = "学历", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "salaryLevel", value = "薪资水平", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "describe", value = "描述", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "contactPhone", value = "联系电话", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "status", value = "是否上架(0:否,1:是)", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "positionName", value = "职务名称", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "workRegion", value = "区域", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "workYear", value = "工作年限", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "education", value = "学历", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "salaryLevel", value = "薪资水平", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "describe", value = "描述", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "contactPhone", value = "联系电话", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "status", value = "是否上架(false:否,true:是)", required = false, paramType = "form"),
+            @ApiImplicitParam(name = "id", value = "主id", required = false, paramType = "form"),
             @ApiImplicitParam(name = "token", value = "令牌", required = true, paramType = "form"),
             @ApiImplicitParam(name = "subject", value = "目标(不传)", paramType = "form"),
     })
-    public MessageResult<Map> submitRecruitInfo(String positionName, String workRegion, String workYear, String education, String salaryLevel, String describe, String contactPhone, String status, String token, @RequestAttribute String subject) {
+    public MessageResult<Map> submitRecruitInfo(String positionName, String workRegion, String workYear, String education, String salaryLevel, String describe, String contactPhone, boolean status,String id, String token, @RequestAttribute String subject) {
         MessageResult<Map> messageResult = new MessageResult<>();
 
         try {
@@ -267,28 +269,93 @@ public class RecruitInfoApiController {
             if (companyInfo == null) {
                 throw new Exception("公司信息有误");
             }
-            RecruitInfo recruitInfo = new RecruitInfo();
-            recruitInfo.setId(UUID.randomUUID().toString());
-            recruitInfo.setCompanyId(companyInfo.getId());
-            recruitInfo.setPositionName(positionName);
-            recruitInfo.setWorkRegion(workRegion);
-            recruitInfo.setWorkYear(workYear);
-            recruitInfo.setEducation(education);
-            recruitInfo.setSalaryLevel(salaryLevel);
-            recruitInfo.setDescribe(describe);
-            recruitInfo.setContactPhone(contactPhone);
-            if ("0".equals(status)){
-                recruitInfo.setStatus(false);
-            }
-            if ("1".equals(status)){
-                recruitInfo.setStatus(true);
+
+            if (StringUtils.isBlank(id)){
+                RecruitInfo recruitInfo = new RecruitInfo();
+                recruitInfo.setId(UUID.randomUUID().toString());
+                recruitInfo.setCompanyId(companyInfo.getId());
+                recruitInfo.setPositionName(positionName);
+                recruitInfo.setWorkRegion(workRegion);
+                recruitInfo.setWorkYear(workYear);
+                recruitInfo.setEducation(education);
+                recruitInfo.setSalaryLevel(salaryLevel);
+                recruitInfo.setDescribe(describe);
+                recruitInfo.setContactPhone(contactPhone);
+                recruitInfo.setStatus(status);
+                recruitInfo.setCreateTime(new Date());
+                recruitInfo.setCreateBy(personInfo.getId());
+                recruitInfo.setDelFlag(false);
+                recruitInfo.setKey(companyInfo.getCompanyName()+"+"+positionName);
+                recruitInfoService.insert(recruitInfo);
+            }else {
+                RecruitInfo recruitInfo = recruitInfoService.get(id);
+                if (StringUtils.isNotBlank(positionName)){
+                    recruitInfo.setPositionName(positionName);
+                }
+                if (StringUtils.isNotBlank(workRegion)){
+                    recruitInfo.setWorkRegion(workRegion);
+                }
+                if (StringUtils.isNotBlank(workYear)){
+                    recruitInfo.setWorkYear(workYear);
+                }
+                if (StringUtils.isNotBlank(education)){
+                    recruitInfo.setEducation(education);
+                }
+                if (StringUtils.isNotBlank(salaryLevel)){
+                    recruitInfo.setSalaryLevel(salaryLevel);
+                }
+                if (StringUtils.isNotBlank(describe)){
+                    recruitInfo.setDescribe(describe);
+                }
+                if (StringUtils.isNotBlank(contactPhone)){
+                    recruitInfo.setContactPhone(contactPhone);
+                }
+                recruitInfo.setStatus(status);
+
+                recruitInfo.setUpdateTime(new Date());
+                recruitInfo.setUpdateBy(personInfo.getId());
+                recruitInfo.setKey(companyInfo.getCompanyName()+"+"+recruitInfo.getPositionName());
+                recruitInfoService.update(recruitInfo);
             }
-            recruitInfo.setCreateTime(new Date());
-            recruitInfo.setCreateBy(personInfo.getId());
-            recruitInfo.setDelFlag(false);
-            recruitInfo.setKey(companyInfo.getCompanyName()+"+"+positionName);
-            recruitInfoService.insert(recruitInfo);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
 
+        return messageResult;
+    }
+
+    @PostMapping("deleteRecruitInfo")
+    @ApiOperation(value = "个人招聘信息删除")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "token", value = "令牌", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "subject", value = "目标(不传)", paramType = "form")
+    })
+    public MessageResult<Map> deleteRecruitInfo(String id, String token, @RequestAttribute String subject) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+
+            PersonInfo personInfo = personInfoService.get(subject);
+            if (personInfo == null) {
+                throw new Exception("用户不存在");
+            }
+            CompanyInfo companyInfo = companyInfoService.get(personInfo.getCompanyId());
+            if (companyInfo == null) {
+                throw new Exception("公司信息有误");
+            }
+            RecruitInfo recruitInfo = recruitInfoService.get(id);
+            if (recruitInfo != null){
+                recruitInfo.setDelFlag(true);
+                recruitInfo.setUpdateBy(personInfo.getId());
+                recruitInfo.setUpdateTime(new Date());
+                recruitInfoService.update(recruitInfo);
+            }
 
             messageResult.setResult(true);
             messageResult.setCode(200);

+ 318 - 0
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/WhisperingWallApiController.java

@@ -1,17 +1,29 @@
 package com.jpsoft.enterprise.modules.mobile.controller;
 
+import cn.hutool.core.date.DateUtil;
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.dto.CompanyInfoDetailDTO;
+import com.jpsoft.enterprise.modules.base.dto.RecruitInfoListDTO;
+import com.jpsoft.enterprise.modules.base.dto.WhisperingWallDTO;
+import com.jpsoft.enterprise.modules.base.dto.WhisperingWallListDTO;
+import com.jpsoft.enterprise.modules.base.entity.CompanyInfo;
 import com.jpsoft.enterprise.modules.base.entity.PersonInfo;
+import com.jpsoft.enterprise.modules.base.entity.RecruitInfo;
 import com.jpsoft.enterprise.modules.base.entity.WhisperingWall;
+import com.jpsoft.enterprise.modules.base.service.CompanyInfoService;
 import com.jpsoft.enterprise.modules.base.service.PersonInfoService;
 import com.jpsoft.enterprise.modules.base.service.WhisperingWallService;
 import com.jpsoft.enterprise.modules.common.dto.MessageResult;
 import com.jpsoft.enterprise.modules.common.dto.Sort;
+import com.jpsoft.enterprise.modules.sys.entity.DataDictionary;
+import com.jpsoft.enterprise.modules.sys.service.DataDictionaryService;
 import com.jpsoft.enterprise.modules.sys.service.UserService;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -26,6 +38,12 @@ public class WhisperingWallApiController {
     @Autowired
     private PersonInfoService personInfoService;
 
+    @Autowired
+    private CompanyInfoService companyInfoService;
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+
     @ApiOperation(value="提问")
     @PostMapping("questions")
     @ApiImplicitParams({
@@ -106,4 +124,304 @@ public class WhisperingWallApiController {
 
         return msgResult;
     }
+
+    @PostMapping("whisperingWallInfoList")
+    @ApiOperation(value = "回音壁列表(公开接口)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型(0:全部,1:建议意见,2:困难反馈)", required = true, paramType = "form")
+    })
+    public MessageResult<Map> whisperingWallInfoList(String type, @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex, @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+            List<WhisperingWallListDTO> list = new ArrayList<>();
+
+            Map<String, Object> searchParams = new HashMap<>();
+
+            if (!"0".equals(type)){
+                searchParams.put("type",Integer.valueOf(type));
+            }
+
+            searchParams.put("status",1);
+
+            List<Sort> sortList = new ArrayList<>();
+            sortList.add(new Sort("create_time", "desc"));
+            Page<WhisperingWall> page = whisperingWallService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
+            List<WhisperingWall> whisperingWallList = page.getResult();
+            if (whisperingWallList.size() > 0) {
+
+                for (WhisperingWall whisperingWall : whisperingWallList) {
+                    WhisperingWallListDTO whisperingWallListDTO = new WhisperingWallListDTO();
+                    BeanUtils.copyProperties(whisperingWall, whisperingWallListDTO);
+                    //回答者
+                    PersonInfo personInfo = personInfoService.get(whisperingWall.getAnswerBy());
+                    //回答者的公司
+                    CompanyInfo companyInfo = companyInfoService.get(personInfo.getCompanyId());
+                    whisperingWallListDTO.setAnswerCompanyName(companyInfo.getCompanyName());
+                    if (whisperingWall.getType() == 1){
+                        whisperingWallListDTO.setTypeName("建议意见");
+                    }
+                    if (whisperingWall.getType() == 2){
+                        whisperingWallListDTO.setTypeName("困难反馈");
+                    }
+
+
+                    list.add(whisperingWallListDTO);
+
+                }
+            }
+            Map<String, Object> pageMap = new HashMap<>();
+            pageMap.put("recordsTotal", page.getTotal());
+            pageMap.put("recordsFiltered", page.getTotal());
+            pageMap.put("totalPage", page.getPages());
+            pageMap.put("pageNumber", page.getPageNum());
+            pageMap.put("pageSize", page.getPageSize());
+            pageMap.put("data", list);
+
+            messageResult.setData(pageMap);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+    @PostMapping("whisperingWallInfoDetail")
+    @ApiOperation(value = "回音壁详情(公开接口)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", required = true, paramType = "form")
+    })
+    public MessageResult<WhisperingWallDTO> whisperingWallInfoDetail(String id) {
+        MessageResult<WhisperingWallDTO> messageResult = new MessageResult<>();
+
+        try {
+
+            WhisperingWall whisperingWall = whisperingWallService.get(id);
+            if (whisperingWall == null){
+                throw new Exception("记录不存在");
+            }
+
+            WhisperingWallDTO whisperingWallDTO = new WhisperingWallDTO();
+            BeanUtils.copyProperties(whisperingWall,whisperingWallDTO);
+            //提问者
+            PersonInfo personInfo = personInfoService.get(whisperingWall.getQuestionBy());
+            //提问人的公司
+            CompanyInfo companyInfo = companyInfoService.get(personInfo.getCompanyId());
+            whisperingWallDTO.setQuestionCompanyName(companyInfo.getCompanyName());
+            whisperingWallDTO.setTypeName(whisperingWall.getTypeName());
+            whisperingWallDTO.setQuestionTime(DateUtil.format(whisperingWall.getQuestionTime(),"yyyy-MM-dd"));
+
+            if (StringUtils.isNotBlank(whisperingWall.getAnswerBy())){
+                //回答者
+                PersonInfo personInfo1 = personInfoService.get(whisperingWall.getAnswerBy());
+                //回答者的公司
+                CompanyInfo companyInfo1 = companyInfoService.get(personInfo1.getCompanyId());
+                CompanyInfoDetailDTO companyInfoDetailDTO = new CompanyInfoDetailDTO();
+                BeanUtils.copyProperties(companyInfo1,companyInfoDetailDTO);
+                String  positionName  = dataDictionaryService.findNameByCatalogNameAndValue("企联职务",companyInfo1.getPosition());
+                companyInfoDetailDTO.setPositionName(positionName);
+                whisperingWallDTO.setCompanyInfoDetailDTO(companyInfoDetailDTO);
+                whisperingWallDTO.setAnswerTime(DateUtil.format(whisperingWall.getAnswerTime(),"yyyy-MM-dd"));
+            }
+
+
+            messageResult.setData(whisperingWallDTO);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+
+
+    @PostMapping("whisperingWallInfoListByCompany")
+    @ApiOperation(value = "诉求列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "function", value = "功能(1:诉求反应,2:诉求回复)", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "status", value = "状态(1:待回复,2:已回复)", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "token", value = "令牌", required = true, paramType = "form")
+    })
+    public MessageResult<Map> whisperingWallInfoListByCompany(String function, String status, String token, @RequestAttribute String subject,@RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex, @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+            List<WhisperingWallListDTO> list = new ArrayList<>();
+
+            Map<String, Object> searchParams = new HashMap<>();
+
+            PersonInfo personInfo0 = personInfoService.get(subject);
+            if (personInfo0 == null) {
+                throw new Exception("用户不存在");
+            }
+            CompanyInfo companyInfo0 = companyInfoService.get(personInfo0.getCompanyId());
+            if (personInfo0 == null) {
+                throw new Exception("公司信息有误");
+            }
+
+            if ("1".equals(function)){
+                searchParams.put("questionBy",personInfo0.getId());
+            }
+
+            int statusB = 1;
+            if ("1".equals(status)){
+                statusB = 0;
+            }
+
+            searchParams.put("status",statusB);
+
+            List<Sort> sortList = new ArrayList<>();
+            sortList.add(new Sort("create_time", "desc"));
+            Page<WhisperingWall> page = whisperingWallService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
+            List<WhisperingWall> whisperingWallList = page.getResult();
+            if (whisperingWallList.size() > 0) {
+
+                for (WhisperingWall whisperingWall : whisperingWallList) {
+                    WhisperingWallListDTO whisperingWallListDTO = new WhisperingWallListDTO();
+                    BeanUtils.copyProperties(whisperingWall, whisperingWallListDTO);
+
+                    if (StringUtils.isNotBlank(whisperingWall.getAnswerBy())){
+                        //回答者
+                        PersonInfo personInfo = personInfoService.get(whisperingWall.getAnswerBy());
+                        //回答者的公司
+                        CompanyInfo companyInfo = companyInfoService.get(personInfo.getCompanyId());
+                        whisperingWallListDTO.setAnswerCompanyName(companyInfo.getCompanyName());
+                    }
+
+                    if (whisperingWall.getType() == 1){
+                        whisperingWallListDTO.setTypeName("建议意见");
+                    }
+                    if (whisperingWall.getType() == 2){
+                        whisperingWallListDTO.setTypeName("困难反馈");
+                    }
+
+
+                    list.add(whisperingWallListDTO);
+
+                }
+            }
+            Map<String, Object> pageMap = new HashMap<>();
+            pageMap.put("recordsTotal", page.getTotal());
+            pageMap.put("recordsFiltered", page.getTotal());
+            pageMap.put("totalPage", page.getPages());
+            pageMap.put("pageNumber", page.getPageNum());
+            pageMap.put("pageSize", page.getPageSize());
+            pageMap.put("data", list);
+
+            messageResult.setData(pageMap);
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+    @PostMapping("submitWhisperingWallInfo")
+    @ApiOperation(value = "提交诉求")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型(1:建议意见,2:困难反馈)", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "content", value = "内容", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "token", value = "令牌", required = true, paramType = "form")
+    })
+    public MessageResult<Map> submitWhisperingWallInfo(String type, String content, String token, @RequestAttribute String subject) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+
+            PersonInfo personInfo = personInfoService.get(subject);
+            if (personInfo == null) {
+                throw new Exception("用户不存在");
+            }
+            CompanyInfo companyInfo = companyInfoService.get(personInfo.getCompanyId());
+            if (companyInfo == null) {
+                throw new Exception("公司信息有误");
+            }
+
+            WhisperingWall whisperingWall = new WhisperingWall();
+            whisperingWall.setId(UUID.randomUUID().toString());
+            whisperingWall.setQuestion(content);
+            whisperingWall.setQuestionBy(personInfo.getId());
+            whisperingWall.setQuestionTime(new Date());
+            whisperingWall.setType(Integer.valueOf(type));
+            whisperingWall.setDelFlag(false);
+            whisperingWall.setCreateBy(personInfo.getId());
+            whisperingWall.setCreateTime(new Date());
+            whisperingWall.setStatus(false);
+            whisperingWallService.insert(whisperingWall);
+
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+    @PostMapping("replyWhisperingWallInfo")
+    @ApiOperation(value = "回复诉求")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "content", value = "回复内容", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "token", value = "令牌", required = true, paramType = "form")
+    })
+    public MessageResult<Map> replyWhisperingWallInfo(String id, String content, String token, @RequestAttribute String subject) {
+        MessageResult<Map> messageResult = new MessageResult<>();
+
+        try {
+
+            PersonInfo personInfo = personInfoService.get(subject);
+            if (personInfo == null) {
+                throw new Exception("用户不存在");
+            }
+            CompanyInfo companyInfo = companyInfoService.get(personInfo.getCompanyId());
+            if (companyInfo == null) {
+                throw new Exception("公司信息有误");
+            }
+
+            WhisperingWall whisperingWall = whisperingWallService.get(id);
+            if (whisperingWall == null){
+                throw new Exception("诉求不存在");
+            }
+            if (whisperingWall.getStatus()){
+                throw new Exception("诉求已回复");
+            }
+
+            whisperingWall.setAnswer(content);
+            whisperingWall.setAnswerBy(personInfo.getId());
+            whisperingWall.setAnswerTime(new Date());
+            whisperingWall.setUpdateBy(personInfo.getId());
+            whisperingWall.setUpdateTime(new Date());
+            whisperingWall.setStatus(true);
+            whisperingWallService.update(whisperingWall);
+
+            messageResult.setResult(true);
+            messageResult.setCode(200);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
 }

+ 238 - 0
web/src/main/java/com/jpsoft/enterprise/modules/pay/alipay/AlipayController.java

@@ -0,0 +1,238 @@
+package com.jpsoft.enterprise.modules.pay.alipay;
+
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.alipay.api.AlipayApiException;
+import com.alipay.api.AlipayClient;
+import com.alipay.api.DefaultAlipayClient;
+import com.alipay.api.internal.util.AlipaySignature;
+import com.alipay.api.request.AlipaySystemOauthTokenRequest;
+import com.alipay.api.request.AlipayTradeCreateRequest;
+import com.alipay.api.request.AlipayTradePrecreateRequest;
+import com.alipay.api.response.AlipaySystemOauthTokenResponse;
+import com.alipay.api.response.AlipayTradeCreateResponse;
+import com.alipay.api.response.AlipayTradePrecreateResponse;
+import com.ijpay.alipay.AliPayApi;
+import com.jpsoft.enterprise.config.AliPayJpsoftConfig;
+import com.jpsoft.enterprise.modules.base.entity.OrderInfo;
+import com.jpsoft.enterprise.modules.base.service.OrderInfoService;
+import com.jpsoft.enterprise.modules.common.dto.MessageResult;
+import com.jpsoft.enterprise.modules.wechat.vo.UserInfo;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2019-11-26 9:48
+ */
+
+@Slf4j
+@RequestMapping("/aliPay")
+@RestController
+public class AlipayController {
+
+
+    @Autowired
+    private AliPayJpsoftConfig aliPayJpsoftConfig;
+
+    @Autowired
+    private OrderInfoService orderInfoService;
+
+
+    @RequestMapping(value="/payNotify")
+    public String payNotify(HttpServletRequest request) {
+        try {
+            // 获取支付宝POST过来反馈信息
+
+            Map<String, String> params = AliPayApi.toMap(request);
+
+            for (Map.Entry<String, String> entry : params.entrySet()) {
+                System.out.println(entry.getKey() + " = " + entry.getValue());
+            }
+
+            boolean verifyResult = AlipaySignature.rsaCheckV1(params, aliPayJpsoftConfig.getZfbPublicKey(), "UTF-8", "RSA2");
+
+            if (verifyResult) {
+
+
+                OrderInfo orderInfo = orderInfoService.findByOutOrderNo(params.get("out_trade_no"));
+                String payFee = params.get("total_amount");
+                if (orderInfo == null) {
+                    throw new Exception("支付已完成,但未找到此订单号的流水");
+                }
+
+                orderInfo.setUpdateTime(new Date());
+                orderInfo.setUpdateBy(params.get("buyer_logon_id"));
+                orderInfo.setPayName("alipay");
+                orderInfo.setPayStatus(20);
+                orderInfo.setPayFee(new BigDecimal(payFee));
+                orderInfo.setTransactionId(params.get("trade_no"));
+                orderInfo.setPayTime(DateUtil.parse(params.get("gmt_payment")));
+                orderInfoService.update(orderInfo);
+              //  orderLogService.insert2(new OrderLog(orderInfo.getId(),"支付完成",orderInfo.getCreateBy()));
+
+
+                try {
+                    new Thread(() -> {
+
+
+                        try{
+                            //根据订单类型做各自处理
+                          //  orderInfoService.orderNotifyLogical(orderInfo);
+                        }catch (Exception ex){
+                            /*SysLog sysLog = new SysLog();
+                            sysLog.setRemark(ex.getMessage());
+                            sysLog.setData(orderInfo.toString());
+                            sysLog.setPointcut("支付");
+                            sysLog.setCreateTime(new Date());
+                            sysLogService.insert(sysLog);*/
+
+                        }
+
+                    }).start();
+                } catch (Exception e) {
+                    log.error(e.getMessage(), e);
+                }
+
+
+
+                return "success";
+            } else {
+                log.error("notify_url 验证失败");
+                return "failure";
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error(e.getMessage(), e);
+            return "failure";
+        }
+    }
+
+
+    @GetMapping(value="findUserInfo/{authCode}")
+    public MessageResult findUserInfo(@PathVariable(name="authCode") String authCode){
+
+        System.out.println("获取支付宝的userId");
+        try{
+
+            AlipayClient alipayClient = new DefaultAlipayClient(aliPayJpsoftConfig.getServiceUrl(),aliPayJpsoftConfig.getAppId(),aliPayJpsoftConfig.getPrivateKey(),"json",aliPayJpsoftConfig.getInputCharset(),aliPayJpsoftConfig.getZfbPublicKey(),aliPayJpsoftConfig.getSignType());
+
+            AlipaySystemOauthTokenRequest request = new AlipaySystemOauthTokenRequest();
+            request.setCode(authCode);
+            request.setGrantType("authorization_code");
+
+            AlipaySystemOauthTokenResponse oauthTokenResponse = alipayClient.execute(request);
+
+            System.out.println(oauthTokenResponse.getUserId());
+
+            HashMap<String,Object> dataMap = new HashMap<String,Object>();
+
+            UserInfo userInfo = new UserInfo();
+            userInfo.setOpenid(oauthTokenResponse.getUserId());
+       //     dataMap.put("openId", oauthTokenResponse.getUserId());
+
+         //   HashMap<String,Object> resultMap = new HashMap<String,Object>();
+
+        //    resultMap.put("userInfo", dataMap);
+
+            return new MessageResult(true, "获取支付宝信息成功", userInfo,200);
+        } catch (AlipayApiException e) {
+
+
+
+            //处理异常
+            e.printStackTrace();
+            return new MessageResult(false, "获取支付宝授权失败", "",400);
+        } catch (Exception e) {
+            //处理异常
+            e.printStackTrace();
+            return new MessageResult(false, "获取支付宝授权失败", "",400);
+        }
+    }
+
+
+    @ApiOperation(value = "支付宝扫码支付")
+    @GetMapping("/tradePrecreatePay")
+    public MessageResult tradePrecreatePay(String orderId,String openId) {
+
+        MessageResult result = new MessageResult();
+
+        try {
+            AlipayClient alipayClient = new DefaultAlipayClient(aliPayJpsoftConfig.getServiceUrl(), aliPayJpsoftConfig.getAppId(), aliPayJpsoftConfig.getPrivateKey(), "json", aliPayJpsoftConfig.getInputCharset(), aliPayJpsoftConfig.getZfbPublicKey(), aliPayJpsoftConfig.getSignType());
+            AlipayTradePrecreateRequest request = new AlipayTradePrecreateRequest();
+            request.setNotifyUrl(aliPayJpsoftConfig.getNotifyUrl());
+
+            OrderInfo orderInfo = orderInfoService.get(orderId);
+
+            if (orderInfo == null) {
+                throw new Exception("订单不存在");
+            }
+            if (orderInfo.getTotalFee().compareTo(BigDecimal.ZERO) != 1) {
+                throw new Exception("金额有误");
+            }
+            if (orderInfo.getPayStatus() != 10) {
+                throw new Exception("订单状态有误");
+            }
+
+            orderInfo.setOpenId(openId);
+            orderInfoService.update(orderInfo);
+
+            String appAuthToken = aliPayJpsoftConfig.getAppAuthToken();
+
+
+
+
+
+            Map<String, Object> maps = new HashMap<>();
+            maps.put("out_trade_no", orderInfo.getOutOrderNo());
+            maps.put("total_amount", String.valueOf(orderInfo.getTotalFee()));
+            maps.put("subject", orderInfo.getBody());
+            maps.put("timeout_express", "5m");
+
+            JSONObject extendParams = new JSONObject();
+
+            extendParams.put("sys_service_provider_id", aliPayJpsoftConfig.getMchId());
+            maps.put("extend_params", extendParams);
+            request.putOtherTextParam("app_auth_token",appAuthToken);
+            //把订单信息转换为json对象的字符串
+            String postdata = JSONObject.toJSONString(maps);
+            request.setBizContent(postdata);
+            AlipayTradePrecreateResponse response = alipayClient.execute(request);
+            String body = response.getBody();
+            JSONObject jsonObject = JSONObject.parseObject(body);
+            String alipayTradePrecreateResponse = jsonObject.getString("alipay_trade_precreate_response");
+            JSONObject jsonResponse = JSONObject.parseObject(alipayTradePrecreateResponse);
+
+            if (!jsonResponse.getString("code").equals("10000")) {
+                throw new Exception(jsonResponse.getString("sub_msg"));
+            }
+
+            String qr_code = jsonObject.getJSONObject("alipay_trade_precreate_response").getString("qr_code");
+            result.setResult(true);
+
+            log.warn("qr_code=" + qr_code);
+            result.setData(qr_code);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error(e.getMessage(), e);
+            result.setResult(false);
+            result.setMessage(e.getMessage());
+        }
+        return result;
+
+    }
+
+
+}

+ 219 - 0
web/src/main/java/com/jpsoft/enterprise/modules/pay/weixin/WxPayController.java

@@ -0,0 +1,219 @@
+package com.jpsoft.enterprise.modules.pay.weixin;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
+import com.ijpay.core.enums.SignType;
+import com.ijpay.core.enums.TradeType;
+import com.ijpay.core.kit.HttpKit;
+import com.ijpay.core.kit.WxPayKit;
+import com.ijpay.wxpay.WxPayApi;
+import com.ijpay.wxpay.model.UnifiedOrderModel;
+import com.jfinal.kit.StrKit;
+import com.jpsoft.enterprise.config.WxJpsoftConfig;
+import com.jpsoft.enterprise.modules.base.entity.OrderInfo;
+import com.jpsoft.enterprise.modules.base.entity.PersonInfo;
+import com.jpsoft.enterprise.modules.base.service.OrderInfoService;
+import com.jpsoft.enterprise.modules.base.service.PersonInfoService;
+import com.jpsoft.enterprise.modules.common.dto.MessageResult;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import net.sf.json.JSONObject;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2019-11-26 10:35
+ */
+
+@RequestMapping("/wxPay")
+@RestController
+@Slf4j
+public class WxPayController {
+
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private WxJpsoftConfig wxJpsoftConfig;
+
+    @Autowired
+    private OrderInfoService orderInfoService;
+
+    @Autowired
+    private PersonInfoService personInfoService;
+
+
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+
+    @ApiOperation(value = "微信JSAPI支付公用方法")
+    @GetMapping("/wxJsapiPay")
+    public MessageResult wxJsapiPay(String orderId,String openId) {
+        MessageResult msgResult = new MessageResult<>();
+        try {
+            OrderInfo orderInfo = orderInfoService.get(orderId);
+
+            if (orderInfo == null) {
+                throw new Exception("订单不存在");
+            }
+            if (StringUtils.isBlank(openId)){
+                throw new Exception("openId为空");
+            }
+
+            orderInfo.setOpenId(openId);
+
+            String subMchId = wxJpsoftConfig.getSubMchId();
+
+            PersonInfo personInfo = personInfoService.findByOpenId(openId);
+
+            if (personInfo == null) {
+                throw new Exception("订单支付人不存在");
+            }
+
+            if (StrUtil.isBlank(personInfo.getOpenId())) {
+                throw new Exception("openId不存在");
+            }
+            if (orderInfo.getTotalFee().compareTo(BigDecimal.ZERO) != 1) {
+                throw new Exception("金额有误");
+            }
+            if (orderInfo.getPayStatus() != 10) {
+                throw new Exception("订单状态有误");
+            }
+            String outOrderNo = orderInfo.getOutOrderNo();
+            if (StringUtils.isNotBlank(wxJpsoftConfig.getUrlKey()) && !outOrderNo.contains(wxJpsoftConfig.getUrlKey())) {
+                outOrderNo = wxJpsoftConfig.getUrlKey() + outOrderNo;
+                orderInfo.setOutOrderNo(outOrderNo);
+            }
+            orderInfoService.update(orderInfo);
+            //金额处理
+            int wxTotalTee = orderInfo.getTotalFee().multiply(new BigDecimal(100)).intValue();
+            Map<String, String> params = UnifiedOrderModel
+                    .builder()
+                    .appid(wxJpsoftConfig.getAppId())
+                    .mch_id(wxJpsoftConfig.getMchId())
+                    .sub_mch_id(subMchId)
+                    //     .sub_appid(wxConfig.getAppId())
+                    .nonce_str(WxPayKit.generateStr())
+                    .body(orderInfo.getBody())
+                    .out_trade_no(orderInfo.getOutOrderNo())
+                    .total_fee(String.valueOf(wxTotalTee))
+                    .spbill_create_ip(wxJpsoftConfig.getIp())
+                    .notify_url(wxJpsoftConfig.getNotifyUrl())
+                    .trade_type(TradeType.JSAPI.getTradeType())
+                    .sub_openid(personInfo.getOpenId())
+                    //    .openid(orderInfo.getOpenId())
+                    .build()
+                    .createSign(wxJpsoftConfig.getMchKey(), SignType.HMACSHA256);
+
+            String xmlResult = WxPayApi.pushOrder(false, params);
+
+            Map<String, String> resultMap = WxPayKit.xmlToMap(xmlResult);
+            String returnCode = resultMap.get("return_code");
+            String returnMsg = resultMap.get("return_msg");
+            if (!WxPayKit.codeIsOk(returnCode)) {
+                logger.error(returnCode);
+                throw new Exception(returnMsg);
+            }
+            String resultCode = resultMap.get("result_code");
+            if (!WxPayKit.codeIsOk(resultCode)) {
+                String errCode = resultMap.get("err_code_des");
+                logger.error(errCode);
+                throw new Exception(errCode);
+            }
+
+            // 以下字段在 return_code 和 result_code 都为 SUCCESS 的时候有返回
+
+            String prepayId = resultMap.get("prepay_id");
+
+            Map<String, String> packageParams = WxPayKit.prepayIdCreateSign(prepayId, wxJpsoftConfig.getAppId(),
+                    wxJpsoftConfig.getMchKey(), SignType.HMACSHA256);
+
+            msgResult.setData(packageParams);
+            msgResult.setResult(true);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.error(e.getMessage(), e);
+            msgResult.setResult(false);
+            msgResult.setMessage(e.getMessage());
+        }
+        return msgResult;
+    }
+
+    @RequestMapping(value = "/wxJsapiPayNotify", method = {RequestMethod.POST, RequestMethod.GET})
+    @ResponseBody
+    public String wxJsapiPayNotify(HttpServletRequest request) {
+        String xmlMsg = HttpKit.readData(request);
+        logger.warn("支付通知=" + xmlMsg);
+        Map<String, String> params = WxPayKit.xmlToMap(xmlMsg);
+
+        String returnCode = params.get("return_code");
+        String outTradeNo = params.get("out_trade_no");
+        String payTimeStr = params.get("time_end");
+        String openId = params.get("openid");
+        Date payTime = DateUtil.parse(payTimeStr);
+
+        // 注意此处签名方式需与统一下单的签名类型一致 WxPayApiConfigKit.getWxPayApiConfig().getPartnerKey()
+        if (WxPayKit.verifyNotify(params, wxJpsoftConfig.getMchKey(), SignType.HMACSHA256)) {
+            if (WxPayKit.codeIsOk(returnCode)) {
+                // 更新订单信息
+
+                try {
+                    OrderInfo orderInfo = orderInfoService.findByOutOrderNo(outTradeNo);
+                    if (orderInfo == null) {
+                        throw new Exception("支付已完成,但未找到此订单号的流水");
+                    }
+                    if (orderInfo.getTotalFee().multiply(new BigDecimal(100)).compareTo(new BigDecimal(params.get("total_fee"))) != 0) {
+                        throw new Exception("支付金额与系统金额不一致");
+                    }
+
+                    orderInfo.setUpdateTime(new Date());
+                    orderInfo.setUpdateBy(params.get("openid"));
+                    orderInfo.setPayName("wechat");
+                    orderInfo.setPayStatus(20);
+                    orderInfo.setPayFee(new BigDecimal(params.get("total_fee")).divide(new BigDecimal(100)));
+                    orderInfo.setTransactionId(params.get("transaction_id"));
+                    orderInfo.setPayTime(payTime);
+                    orderInfo.setOpenId(openId);
+                    orderInfoService.update(orderInfo);
+                    //    orderLogService.insert2(new OrderLog(orderInfo.getId(), "支付完成", orderInfo.getCreateBy()));
+
+                    new Thread(() -> {
+                        try {
+                            //根据订单类型做各自处理
+                          //  orderInfoService.orderNotifyLogical(orderInfo);
+                        } catch (Exception ex) {
+
+                        }
+                    }).start();
+
+                    // 发送通知等
+                    Map<String, String> xml = new HashMap<String, String>(2);
+                    xml.put("return_code", "SUCCESS");
+                    xml.put("return_msg", "OK");
+                    return WxPayKit.toXml(xml);
+                } catch (Exception e) {
+                    logger.error(e.getMessage(), e);
+                    e.printStackTrace();
+                }
+            }
+        }
+
+        return null;
+    }
+
+
+}

+ 7 - 7
web/src/main/resources/application-production.yml

@@ -13,12 +13,12 @@ spring:
     # Redis数据库索引(默认为0)
     database: 4
     # Redis服务器地址
-    host: 192.168.16.1
+    host: myredis
     # Redis服务器连接端口
     port: 6379
-    password: jp123456
+    # password:
   rabbitmq:
-    host: rabbmitmq
+    host: rabbitmq
     port: 5672
     username: admin
     password: jpsoft
@@ -32,17 +32,17 @@ springfox:
   documentation:
     swagger:
       v2:
-        host: qylhhapi.xiaoxinda.com
+        host: xpgjapi.xiaoxinda.com
 
 wx:
   #荆楚云服务器内不能访问自身域名
-  commonAccessTokenUrl: http://ykt.xiaoxinda.com/weixin/token
+  commonAccessTokenUrl: http://192.168.0.1:8080/weixin/token
   pay:
     #企业联合会
     appId: wx343bf93d2a3dc8af
     appSecret: ac61fa669a7a79c7d2a8188ff7ddaef6
-    #    appId: wx0b3c41a903053808
-    #    appSecret: 43557bd62f77b0c3d6670e991872f0e7
+#    appId: wx0b3c41a903053808
+#    appSecret: 43557bd62f77b0c3d6670e991872f0e7
     mchId: 1500160622
     subMchId: 1505070291
     mchKey: jpsoft11111111111111111111111111

+ 2 - 2
web/src/main/resources/application.yml

@@ -27,10 +27,10 @@ spring:
       minEvictableIdleTimeMillis: 300000
       validationQuery: SELECT 1
       testWhileIdle: true
-      testOnBorrow: false
+      testOnBorrow: true
       testOnReturn: false
       # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
+      poolPreparedStatements: false
       maxPoolPreparedStatementPerConnectionSize: 20
       # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
       filters: stat,wall