ソースを参照

Merge remote-tracking branch 'origin/master'

xiao547607 4 年 前
コミット
d4853af632
20 ファイル変更322 行追加35 行削除
  1. 3 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dao/BillInfoDAO.java
  2. 2 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dao/PersonInfoDAO.java
  3. 6 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/BillDetailDTO.java
  4. 21 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/DueListDTO.java
  5. 2 2
      common/src/main/java/com/jpsoft/enterprise/modules/base/dto/WhisperingWallDTO.java
  6. 6 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/entity/BillInfo.java
  7. 3 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/BillInfoService.java
  8. 2 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/PersonInfoService.java
  9. 16 8
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/BillInfoServiceImpl.java
  10. 5 0
      common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/PersonInfoServiceImpl.java
  11. 27 2
      common/src/main/resources/mapper/base/BillInfo.xml
  12. 6 0
      common/src/main/resources/mapper/base/PersonInfo.xml
  13. 2 1
      web/src/main/java/com/jpsoft/enterprise/config/WebMvcConfig.java
  14. 111 9
      web/src/main/java/com/jpsoft/enterprise/modules/base/controller/BillDetailController.java
  15. 28 0
      web/src/main/java/com/jpsoft/enterprise/modules/base/controller/BillInfoController.java
  16. 68 0
      web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/BillInfoApiController.java
  17. 2 2
      web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/WhisperingWallApiController.java
  18. 3 3
      web/src/main/java/com/jpsoft/enterprise/modules/pay/weixin/WxPayController.java
  19. 6 6
      web/src/main/resources/application-dev.yml
  20. 3 2
      web/src/main/resources/application-production.yml

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

@@ -1,5 +1,6 @@
 package com.jpsoft.enterprise.modules.base.dao;
 
+import com.jpsoft.enterprise.modules.base.dto.DueListDTO;
 import com.jpsoft.enterprise.modules.base.entity.BillInfo;
 import com.jpsoft.enterprise.modules.common.dto.Sort;
 import org.springframework.stereotype.Repository;
@@ -20,4 +21,6 @@ public interface BillInfoDAO {
     int delete(String id);
     List<BillInfo> list();
     List<BillInfo> search(Map<String,Object> searchParams, List<Sort> sortList);
+    List<DueListDTO> dueList(String billId);
+    BillInfo getDueDetail();
 }

+ 2 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dao/PersonInfoDAO.java

@@ -22,4 +22,6 @@ public interface PersonInfoDAO {
 	PersonInfo findByUserName(String userName);
 
 	PersonInfo findByOpenId(String openId);
+
+	List<PersonInfo> findByCompanyId(String companyId);
 }

+ 6 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/BillDetailDTO.java

@@ -25,5 +25,11 @@ public class BillDetailDTO {
     @ApiModelProperty(value = "支付状态")
     private String payStatusN;
 
+    @ApiModelProperty(value = "是否上传发票")
+    private Boolean isTicketUrl;
+
+    @ApiModelProperty(value = "发票地址")
+    private String ticketUrl;
+
     private List<Map<String,String>> billDetailList;
 }

+ 21 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dto/DueListDTO.java

@@ -0,0 +1,21 @@
+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.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@Data
+public class DueListDTO {
+    @ApiModelProperty(value = "企业名称")
+    private String companyName;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @ApiModelProperty(value = "缴费时间")
+    private Date payTime;
+}

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

@@ -22,9 +22,9 @@ public class WhisperingWallDTO {
 
     private String questionTime;
 
-    private PersonInfo answerPersonInfo;
+    private PersonInfo questionPersonInfo;
 
-    private CompanyInfoDetailDTO answerCompanyInfoDetailDTO;
+    private CompanyInfoDetailDTO questionCompanyInfoDetailDTO;
 
     private CompanyInfoDetailDTO companyInfoDetailDTO;
 

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

@@ -60,5 +60,11 @@ public class BillInfo {
     @ApiModelProperty(value = "更新时间")
     private Date updateTime;
 
+    @ApiModelProperty(value = "微信展示头部图片")
+    private String picUrl;
+
+    @ApiModelProperty(value = "是否支付")
+    private Boolean isPay;
+
 
 }

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

@@ -1,6 +1,7 @@
 package com.jpsoft.enterprise.modules.base.service;
 
 import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.dto.DueListDTO;
 import com.jpsoft.enterprise.modules.base.entity.BillInfo;
 import com.jpsoft.enterprise.modules.common.dto.Sort;
 
@@ -21,4 +22,6 @@ public interface BillInfoService {
     int delete(String id);
     List<BillInfo> list();
     Page<BillInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+    List<DueListDTO> dueList(String billId);
+    BillInfo getDueDetail();
 }

+ 2 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/PersonInfoService.java

@@ -20,4 +20,6 @@ public interface PersonInfoService {
 	PersonInfo findByUserName(String userName);
 
 	PersonInfo findByOpenId(String openId);
+
+	List<PersonInfo> findByCompanyId(String companyId);
 }

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

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper;
 import com.jpsoft.enterprise.modules.base.dao.BillDetailInfoDAO;
 import com.jpsoft.enterprise.modules.base.dao.BillInfoDAO;
 import com.jpsoft.enterprise.modules.base.dao.OrderInfoDAO;
+import com.jpsoft.enterprise.modules.base.dto.DueListDTO;
 import com.jpsoft.enterprise.modules.base.entity.BillDetailInfo;
 import com.jpsoft.enterprise.modules.base.entity.BillInfo;
 import com.jpsoft.enterprise.modules.base.entity.OrderInfo;
@@ -54,9 +55,6 @@ public class BillInfoServiceImpl implements BillInfoService {
 
     @Override
     public int updateDelOrderInfo(BillInfo model){
-
-        int affectCount = 0;
-
         List<BillDetailInfo> list = billDetailInfoDAO.findByBillId(model.getId());
 
         for (BillDetailInfo billDetailInfo:list) {
@@ -71,15 +69,13 @@ public class BillInfoServiceImpl implements BillInfoService {
                     billDetailInfo.setDelFlag(true);
                     billDetailInfo.setUpdateBy(model.getUpdateBy());
                     billDetailInfo.setUpdateTime(model.getUpdateTime());
-                    int countBillDetail = billDetailInfoDAO.update(billDetailInfo);
-
-                    if(countBillDetail>0){
-                        affectCount = billInfoDAO.update(model);
-                    }
+                    billDetailInfoDAO.update(billDetailInfo);
                 }
             }
         }
 
+        int affectCount = billInfoDAO.update(model);
+
         return affectCount;
     }
 
@@ -111,4 +107,16 @@ public class BillInfoServiceImpl implements BillInfoService {
 
         return page;
     }
+
+    @Override
+    public List<DueListDTO> dueList(String billId) {
+        // TODO Auto-generated method stub
+        return billInfoDAO.dueList(billId);
+    }
+
+    @Override
+    public BillInfo getDueDetail() {
+        // TODO Auto-generated method stub
+        return billInfoDAO.getDueDetail();
+    }
 }

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

@@ -84,4 +84,9 @@ public class PersonInfoServiceImpl implements PersonInfoService {
 	public PersonInfo findByOpenId(String openId) {
 		return personInfoDAO.findByOpenId(openId);
 	}
+
+	@Override
+	public List<PersonInfo> findByCompanyId(String companyId){
+		return personInfoDAO.findByCompanyId(companyId);
+	}
 }

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

@@ -14,6 +14,7 @@
         <result property="updateBy" column="update_by" />
         <result property="updateTime" column="update_time" />
         <result property="delFlag" column="del_flag" />
+        <result property="picUrl" column="pic_url"/>
     </resultMap>
     <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.BillInfo">
         <!--
@@ -23,7 +24,7 @@
         -->
         <![CDATA[
 		insert into base_bill_info
-	    (id_,bill_name,bill_remark,wx_show,status_,create_by,create_time,update_by,update_time,del_flag)
+	    (id_,bill_name,bill_remark,wx_show,status_,create_by,create_time,update_by,update_time,del_flag,pic_url)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -36,6 +37,7 @@
 ,#{updateBy,jdbcType=VARCHAR}
 ,#{updateTime,jdbcType= TIMESTAMP }
 ,#{delFlag,jdbcType= NUMERIC }
+,#{picUrl,jdbcType=VARCHAR}
 		)
 	]]>
     </insert>
@@ -70,7 +72,10 @@
                 update_time=#{updateTime,jdbcType= TIMESTAMP },
             </if>
             <if test="delFlag!=null">
-                del_flag=#{delFlag,jdbcType= NUMERIC }
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="picUrl != null">
+                pic_url = #{picUrl,jdbcType=VARCHAR}
             </if>
         </set>
         where id_=#{id}
@@ -101,5 +106,25 @@
             ${sort.name} ${sort.order}
         </foreach>
     </select>
+    <select id="getDueDetail" resultMap="BillInfoMap">
+        SELECT * FROM base_bill_info
+        WHERE del_flag = 0
+        AND wx_show = TRUE
+        ORDER BY create_time DESC
+        LIMIT 1
+    </select>
 
+    <resultMap id="DueListDTOMap" type="com.jpsoft.enterprise.modules.base.dto.DueListDTO">
+        <result property="companyName" column="company_name" />
+        <result property="payTime" column="pay_time" />
+    </resultMap>
+    <select id="dueList" parameterType="string" resultMap="DueListDTOMap">
+        SELECT c.company_name,d.pay_time FROM base_bill_info a
+        LEFT JOIN base_bill_detail_info b ON a.id_ = b.bill_id
+        LEFT JOIN base_company_info c ON b.company_id = c.id_
+        LEFT JOIN base_order_info d ON b.order_id = d.id_
+        WHERE a.id_ = #{0}
+        AND d.pay_time IS NOT NULL
+        ORDER BY d.pay_time ASC
+    </select>
 </mapper>

+ 6 - 0
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -191,4 +191,10 @@
 		and open_id = #{openId}
 		]]>
 	</select>
+	<select id="findByCompanyId" resultMap="PersonInfoMap">
+		select * from base_person_info
+		where del_flag = 0
+		and company_id = #{0}
+	</select>
+
 </mapper>

+ 2 - 1
web/src/main/java/com/jpsoft/enterprise/config/WebMvcConfig.java

@@ -78,7 +78,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
 				.excludePathPatterns("/mobile/recruitInfoApi/recruitInfoDetail")
 				.excludePathPatterns("/mobile/whisperingWallApi/whisperingWallInfoList")
 				.excludePathPatterns("/mobile/whisperingWallApi/whisperingWallInfoDetail")
-				.excludePathPatterns("/wechat/**")
+                .excludePathPatterns("/mobile/billInfoApi/dueList")
+                .excludePathPatterns("/wechat/**")
 				.excludePathPatterns("/wxPay/**")
 				.excludePathPatterns("/aliPay/**")
 

+ 111 - 9
web/src/main/java/com/jpsoft/enterprise/modules/base/controller/BillDetailController.java

@@ -4,14 +4,8 @@ import com.github.pagehelper.Page;
 import com.github.pagehelper.util.StringUtil;
 import com.jpsoft.enterprise.config.OSSConfig;
 import com.jpsoft.enterprise.modules.base.dto.BillDetailDTO;
-import com.jpsoft.enterprise.modules.base.entity.BillDetailInfo;
-import com.jpsoft.enterprise.modules.base.entity.BillInfo;
-import com.jpsoft.enterprise.modules.base.entity.CompanyInfo;
-import com.jpsoft.enterprise.modules.base.entity.OrderInfo;
-import com.jpsoft.enterprise.modules.base.service.BillDetailInfoService;
-import com.jpsoft.enterprise.modules.base.service.BillInfoService;
-import com.jpsoft.enterprise.modules.base.service.CompanyInfoService;
-import com.jpsoft.enterprise.modules.base.service.OrderInfoService;
+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.OSSUtil;
@@ -55,6 +49,12 @@ public class BillDetailController {
     @Autowired
     private OrderInfoService orderInfoService;
 
+    @Autowired
+    private  PersonInfoService personInfoService;
+
+    @Autowired
+    private MessageReceiverService messageReceiverService;
+
     @Autowired
     private OSSConfig ossConfig;
 
@@ -279,10 +279,26 @@ public class BillDetailController {
             for (BillDetailInfo billDetailInfo:list) {
                 billDetailInfo.setRushStatus("1");
                 billDetailInfo.setUpdateBy(subject);
-                billDetailInfo.setUpdateTime(new Date());
+                Date now = new Date();
+                billDetailInfo.setUpdateTime(now);
 
                 affectCount += billDetailInfoService.update(billDetailInfo);
 
+                //推送站内消息
+                 List<PersonInfo> personInfoList = personInfoService.findByCompanyId(billDetailInfo.getCompanyId());
+
+                for (PersonInfo personInfo:personInfoList) {
+                    MessageReceiver messageReceiver = new MessageReceiver();
+                    messageReceiver.setId(UUID.randomUUID().toString());
+                    messageReceiver.setReadStatus(false);
+                    messageReceiver.setDelFlag(false);
+                    messageReceiver.setMessageId("2");//账单推送消息
+                    messageReceiver.setPersonId(personInfo.getId());
+                    messageReceiver.setCreateBy(subject);
+                    messageReceiver.setCreateTime(now);
+
+                    messageReceiverService.insert(messageReceiver);
+                }
             }
 
             if (affectCount > 0) {
@@ -423,6 +439,15 @@ public class BillDetailController {
             }
             dto.setRushStatus(billDetailInfo.getRushStatus());
 
+            if(StringUtils.isNotEmpty(billDetailInfo.getTicketUrl())){
+                dto.setIsTicketUrl(true);
+            }
+            else{
+                dto.setIsTicketUrl(false);
+            }
+
+            dto.setTicketUrl(billDetailInfo.getTicketUrl());
+
             pageDto.add(dto);
         }
 
@@ -557,4 +582,81 @@ public class BillDetailController {
 
         return msgResult;
     }
+
+
+
+    @ApiOperation(value="上传发票")
+    @PostMapping("uploadTicket")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "uploadFile",value = "上传文件", required = true,paramType="form", dataType = "__file")
+    })
+    public MessageResult<BillDetailInfo> uploadTicket(MultipartFile uploadFile,String id,String subFolder,
+                                           @RequestAttribute String subject){
+        MessageResult<BillDetailInfo> msgResult = new MessageResult<>();
+
+        try {
+            String retFileUrl = OSSUtil.upload(ossConfig,"/" + subFolder,uploadFile.getOriginalFilename(),uploadFile.getInputStream());
+
+
+            BillDetailInfo billDetailInfo = billDetailInfoService.get(id);
+            billDetailInfo.setTicketUrl(retFileUrl);
+            billDetailInfo.setUpdateBy(subject);
+            billDetailInfo.setUpdateTime(new Date());
+
+            int affectCount = billDetailInfoService.update(billDetailInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(billDetailInfo);
+            } 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("getBillInfo/{billId}")
+    public MessageResult<Boolean> getBillInfo(@PathVariable("billId") String billId){
+        MessageResult<Boolean> msgResult = new MessageResult<>();
+
+        try {
+            boolean showPushBtn = false;
+
+            List<BillDetailInfo> list = billDetailInfoService.findByBillId(billId);
+
+            for (BillDetailInfo billDetailInfo:list) {
+                OrderInfo orderInfo = orderInfoService.get(billDetailInfo.getOrderId());
+                if(orderInfo!=null){
+                    if(orderInfo.getPayStatus()==20){
+                        showPushBtn = true;
+                        break;
+                    }
+                }
+            }
+
+            msgResult.setResult(true);
+            msgResult.setData(showPushBtn);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }

+ 28 - 0
web/src/main/java/com/jpsoft/enterprise/modules/base/controller/BillInfoController.java

@@ -2,8 +2,12 @@ package com.jpsoft.enterprise.modules.base.controller;
 
 
 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.base.entity.OrderInfo;
+import com.jpsoft.enterprise.modules.base.service.BillDetailInfoService;
 import com.jpsoft.enterprise.modules.base.service.BillInfoService;
+import com.jpsoft.enterprise.modules.base.service.OrderInfoService;
 import com.jpsoft.enterprise.modules.common.dto.MessageResult;
 import com.jpsoft.enterprise.modules.common.dto.Sort;
 import com.jpsoft.enterprise.modules.common.utils.PojoUtils;
@@ -27,6 +31,12 @@ public class BillInfoController {
     @Autowired
     private BillInfoService billInfoService;
 
+    @Autowired
+    private BillDetailInfoService billDetailInfoService;
+
+    @Autowired
+    private OrderInfoService orderInfoService;
+
     @ApiOperation(value="创建空记录")
     @GetMapping("create")
     public MessageResult<BillInfo> create(){
@@ -218,6 +228,24 @@ public class BillInfoController {
 
         Page<BillInfo> page = billInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
 
+        for (BillInfo billInfo:page) {
+            List<BillDetailInfo> list = billDetailInfoService.findByBillId(billInfo.getId());
+
+            for (BillDetailInfo billDetailInfo:list) {
+                OrderInfo orderInfo = orderInfoService.get(billDetailInfo.getOrderId());
+                if(orderInfo!=null){
+                    if(orderInfo.getPayStatus()==20){
+                        billInfo.setIsPay(true);
+                    }
+                    break;
+                }
+            }
+
+            if(billInfo.getIsPay() == null){
+                billInfo.setIsPay(false);
+            }
+        }
+
 
         msgResult.setResult(true);
         msgResult.setData(PojoUtils.pageWrapper(page));

+ 68 - 0
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/BillInfoApiController.java

@@ -0,0 +1,68 @@
+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.DueListDTO;
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.base.service.BillInfoService;
+import com.jpsoft.enterprise.modules.common.dto.MessageResult;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+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.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-4 9:24
+ */
+@RestController
+@RequestMapping("/mobile/billInfoApi")
+@Slf4j
+public class BillInfoApiController {
+    @Autowired
+    private BillInfoService billInfoService;
+
+    @PostMapping("dueList")
+    @ApiOperation(value = "会费缴费列表(公开接口)")
+    public MessageResult<Map> dueList() {
+        MessageResult<Map> messageResult = new MessageResult<>();
+        Map<String,Object> map = new HashMap<>();
+
+        try {
+            BillInfo billInfo = billInfoService.getDueDetail();
+            if(billInfo != null) {
+                map.put("info", billInfo);
+                List<DueListDTO> listDTOS = billInfoService.dueList(billInfo.getId());
+                map.put("list", listDTOS);
+
+                messageResult.setData(map);
+                messageResult.setResult(true);
+                messageResult.setCode(200);
+            }
+            else {
+                messageResult.setResult(false);
+                messageResult.setMessage("无展示信息!");
+            }
+        } catch (Exception ex) {
+            log.error(ex.getMessage(),ex);
+            messageResult.setCode(400);
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+}

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

@@ -214,8 +214,8 @@ public class WhisperingWallApiController {
             CompanyInfo companyInfo = companyInfoService.get(personInfo.getCompanyId());
             CompanyInfoDetailDTO answerCompanyInfo = new CompanyInfoDetailDTO();
             BeanUtils.copyProperties(companyInfo,answerCompanyInfo);
-            whisperingWallDTO.setAnswerPersonInfo(personInfo);
-            whisperingWallDTO.setAnswerCompanyInfoDetailDTO(answerCompanyInfo);
+            whisperingWallDTO.setQuestionPersonInfo(personInfo);
+            whisperingWallDTO.setQuestionCompanyInfoDetailDTO(answerCompanyInfo);
             whisperingWallDTO.setQuestionCompanyName(companyInfo.getCompanyName());
             whisperingWallDTO.setTypeName(whisperingWall.getTypeName());
             whisperingWallDTO.setQuestionTime(DateUtil.format(whisperingWall.getQuestionTime(),"yyyy-MM-dd"));

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

@@ -104,7 +104,7 @@ public class WxPayController {
                     .builder()
                     .appid(wxJpsoftConfig.getAppId())
                     .mch_id(wxJpsoftConfig.getMchId())
-                    .sub_mch_id(subMchId)
+                   // .sub_mch_id(subMchId)
                     //     .sub_appid(wxConfig.getAppId())
                     .nonce_str(WxPayKit.generateStr())
                     .body(orderInfo.getBody())
@@ -113,8 +113,8 @@ public class WxPayController {
                     .spbill_create_ip(wxJpsoftConfig.getIp())
                     .notify_url(wxJpsoftConfig.getNotifyUrl())
                     .trade_type(TradeType.JSAPI.getTradeType())
-                    .sub_openid(personInfo.getOpenId())
-                    //    .openid(orderInfo.getOpenId())
+                   // .sub_openid(personInfo.getOpenId())
+                    .openid(orderInfo.getOpenId())
                     .build()
                     .createSign(wxJpsoftConfig.getMchKey(), SignType.HMACSHA256);
 

+ 6 - 6
web/src/main/resources/application-dev.yml

@@ -7,9 +7,9 @@ spring:
   datasource:
 
     #开发环境
-     url: jdbc:log4jdbc:mysql://192.168.33.20:3306/enterprises_federation?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
-     username: root
-     password: jpsoft2016
+#     url: jdbc:log4jdbc:mysql://192.168.33.20:3306/enterprises_federation?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+#     username: root
+#     password: jpsoft2016
 
     #测试环境
 #     url: jdbc:log4jdbc:mysql://47.92.161.104:3336/jp_housekeeper_2.0?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
@@ -17,9 +17,9 @@ spring:
 #     password: jpsoft8121234
 
     #正式环境
-#     url: jdbc:log4jdbc:mysql://122.189.98.152:3336/jp_housekeeper?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
-#     username: root
-#     password: jpsoft8121234
+     url: jdbc:log4jdbc:mysql://122.189.98.152:3336/jp_housekeeper?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+     username: root
+     password: jpsoft8121234
 
 
 

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

@@ -58,9 +58,10 @@ wx:
   jpsoft:
     appId: wx343bf93d2a3dc8af
     appSecret: ac61fa669a7a79c7d2a8188ff7ddaef6
-    mchId: 1509055881
+    #mchId: 1509055881
+    mchId: 1531793091
     subMchId: 1523544111
-    mchKey: xxd33333333333333333333333333333
+    mchKey: jpsoft11111111111111111111111111
     notifyUrl: http://xpgjapi.xiaoxinda.com/wxPay/wxJsapiPayNotify
     refundUrl: http://xpgjapi.xiaoxinda.com/wxPay/wxJsapiRefundNotify
     ip: 101.37.31.116