Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into baseCopy1

wangjun 3 years ago
parent
commit
c1661b1da3
18 changed files with 767 additions and 25 deletions
  1. 2 0
      business/base-service/src/main/java/com/yihu/jw/order/dao/BusinessOrderDao.java
  2. 1 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/pay/WxPayHttpLogDao.java
  3. 105 0
      business/base-service/src/main/java/com/yihu/jw/pay/service/CloudCarePayService.java
  4. 6 1
      common/common-entity/sql记录
  5. 9 0
      common/common-entity/src/main/java/com/yihu/jw/entity/order/BusinessOrderDO.java
  6. 10 1
      common/common-entity/src/main/java/com/yihu/jw/entity/order/BusinessOrderRefundDO.java
  7. 117 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/order/PayOrderEndpoint.java
  8. 220 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/order/PayService.java
  9. 21 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientEndpoint.java
  10. 40 8
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/platForm/PatientInfoPlatFormEndpoint.java
  11. 9 2
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/doorCoach/PatientDoorCoachOrderService.java
  12. 52 4
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/patient/CarePatientService.java
  13. 12 7
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/pay/PayService.java
  14. 55 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachOrderDao.java
  15. 13 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/dao/lifeCare/LifeCareOrderDao.java
  16. 10 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/event/ApplicationEvent.java
  17. 81 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/order/CancelPayOrderJob.java
  18. 4 1
      svr/svr-cloud-job/src/main/resources/system.properties

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/order/dao/BusinessOrderDao.java

@ -35,4 +35,6 @@ public interface BusinessOrderDao extends PagingAndSortingRepository<BusinessOrd
    @Query("from BusinessOrderDO w where w.patient = ?1 and w.status=?2  and w.orderCategory =?3")
    List<BusinessOrderDO> selectByPatientAndStatusAndOrderCategory(String patient,Integer status,String orderCategory);
    @Query("from BusinessOrderDO  w where w.status=0 and w.lastPayTime<=?1")
    List<BusinessOrderDO> selectByLastPayTime(Long lastPayTime);
}

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/pay/WxPayHttpLogDao.java

@ -1,4 +1,4 @@
package com.yihu.jw.care.dao.pay;
package com.yihu.jw.pay.dao;
import com.yihu.jw.entity.care.common.WxPayHttpLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

+ 105 - 0
business/base-service/src/main/java/com/yihu/jw/pay/service/CloudCarePayService.java

@ -0,0 +1,105 @@
package com.yihu.jw.pay.service;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.wx.WxWechatDO;
import com.yihu.jw.entity.care.common.WxPayHttpLogDO;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.order.BusinessOrderRefundDO;
import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.order.dao.BusinessOrderRefundDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.pay.dao.WxPayHttpLogDao;
import com.yihu.jw.wechat.dao.WechatDao;
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.stereotype.Service;
import java.util.*;
import static jxl.biff.FormatRecord.logger;
/**
 * Created with IntelliJ IDEA.
 * @Author: yeshijie
 * @Date: 2021/6/28
 * @Description:
 */
@Service
public class CloudCarePayService {
    private Logger log = LoggerFactory.getLogger(CloudCarePayService.class);
    @Autowired
    private BasePatientDao patientDao;
    @Autowired
    private BusinessOrderDao businessOrderDao;
//    @Value("${wechat.id}")
    public String wechatId="hz_yyyzh_wx";
    @Autowired
    private WxPayHttpLogDao wxPayHttpLogDao;
    @Autowired
    private BusinessOrderService businessOrderService;
    @Autowired
    private WechatDao wechatDao;
    @Autowired
    private BusinessOrderRefundDao orderRefundDao;
    /**
     * 微信退款
     * @param orderNo
     * @return
     * @throws Exception
     */
    public void orderRefund(String orderNo) throws Exception {
        WxWechatDO wxWechatDO = wechatDao.findById(wechatId);
        if (wxWechatDO==null){
            throw new Exception("this wechatId is null");
        }
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        if (businessOrderDO==null){
            throw new Exception("this orderId not exit");
        }
        BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient());
        if (patientDO==null){
            throw new Exception("this patient not exit");
        }
        BusinessOrderRefundDO orderRefundDO = orderRefundDao.selectByOrderNo(orderNo);
        if (orderRefundDO==null){
            throw new Exception("this refund not exit");
        }
        Integer orderPrice = orderRefundDO.getOrderPrice().intValue();
        Integer refundPrice1 = orderRefundDO.getRefundPrice().intValue();
        Map<String,Object> map = businessOrderService.refund(wechatId,orderRefundDO.getOrderNo(),orderRefundDO.getOutRefundNo(),orderPrice.toString(),refundPrice1.toString(),orderRefundDO.getRefundDesc());
        logger.info("map"+map);
        addHttpLog("1",businessOrderDO.getOrderNo(),null,map.toString());
        if (map.get("return_code").toString().equalsIgnoreCase("SUCCESS")){
            //退款申请提交成功
            throw new Exception(map.get("return_msg").toString());
        }
    }
    /**
     * 添加支付日志
     * @param type
     * @param orderNo
     * @param res
     * @param req
     */
    public void addHttpLog(String type,String orderNo,String res,String req){
        WxPayHttpLogDO logDO = new WxPayHttpLogDO();
        logDO.setType(type);
        logDO.setOrderNo(orderNo);
        logDO.setOrderReq(req);
        logDO.setOrderRes(res);
        wxPayHttpLogDao.save(logDO);
    }
    public String getOrderNo(){
        return ""+System.currentTimeMillis()+(int)(Math.random()*900)+100;
    }
}

+ 6 - 1
common/common-entity/sql记录

@ -1081,4 +1081,9 @@ CREATE TABLE `base_wx_pay_http_log` (
-- 2021-06-30
alter table base.base_door_coach_order add column pay_status TINYINT(2) DEFAULT null COMMENT '0待扣费 1已支付 2已退款';
alter table base.base_life_care_order add column pay_status TINYINT(2) DEFAULT null COMMENT '0待扣费 1已支付 2已退款';
alter table base.base_life_care_order add column pay_status TINYINT(2) DEFAULT null COMMENT '0待扣费 1已支付 2已退款';
-- 2021-07-01 lb
alter table base.base_business_order_refund add column refuse_desc varchar(255) DEFAULT null COMMENT '拒绝退款说明';
ALTER table base.base_business_order_pay add column last_pay_time BIGINT(13) COMMENT '截至支付日期'
ALTER table base.base_business_order_pay add INDEX index_status_last_pay(status,last_pay_time)

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/order/BusinessOrderDO.java

@ -53,6 +53,7 @@ public class BusinessOrderDO extends IntegerIdentityEntity {
    private String ykOrderNo;
    private String ykOrderId;
    private String traceNo;//支付平台的订单号
    private Long lastPayTime;//订单截至支付日期 13位时间戳
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "create_time", nullable = false, length = 0,updatable = false)
@ -293,4 +294,12 @@ public class BusinessOrderDO extends IntegerIdentityEntity {
    public void setTraceNo(String traceNo) {
        this.traceNo = traceNo;
    }
    public Long getLastPayTime() {
        return lastPayTime;
    }
    public void setLastPayTime(Long lastPayTime) {
        this.lastPayTime = lastPayTime;
    }
}

+ 10 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/order/BusinessOrderRefundDO.java

@ -27,9 +27,10 @@ public class BusinessOrderRefundDO extends IntegerIdentityEntity {
    private String appId;//公众号id
    private String mchId;//商户号
    private String refundDesc;//退款原因
    private Integer status;//状态1待退款2已退款 3同意退款
    private Integer status;//状态1待退款2已退款 3同意退款 4拒绝退款
    private Date refundTime;//退款时间
    private String enclosure;//附件
    private String refuseDesc;//拒绝退款说明
    private Date createTime;
    private String createUser;
    private String createUserName;
@ -203,4 +204,12 @@ public class BusinessOrderRefundDO extends IntegerIdentityEntity {
    public void setEnclosure(String enclosure) {
        this.enclosure = enclosure;
    }
    public String getRefuseDesc() {
        return refuseDesc;
    }
    public void setRefuseDesc(String refuseDesc) {
        this.refuseDesc = refuseDesc;
    }
}

+ 117 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/order/PayOrderEndpoint.java

@ -0,0 +1,117 @@
package com.yihu.jw.base.endpoint.order;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.base.service.order.PayService;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import oracle.jdbc.proxy.annotation.Post;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
 * Created by Bing on 2021/7/1.
 */
@RestController
@Api(description = "支付订单管理")
@RequestMapping(value = "payManage")
public class PayOrderEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private PayService payService;
    @GetMapping(value = "getOrderList")
    @ApiOperation("查询订单列表")
    public PageEnvelop getOrderList(
            @ApiParam(name="name",value = "姓名")
            @RequestParam(value = "name",required = false)String name,
            @ApiParam(name="orderNo",value = "订单号")
            @RequestParam(value = "orderNo",required = false)String orderNo,
            @ApiParam(name="status",value = "订单状态")
            @RequestParam(value = "status",required = false)String status,
            @ApiParam(name="payType",value = "支付方式支付类型1微信2支付宝3易联众支付")
            @RequestParam(value = "payType",required = false)String payType,
            @ApiParam(name="orderType",value = "订单类型")
            @RequestParam(value = "orderType",required = false)Integer orderType,
            @ApiParam(name="orderCategory",value = "订单分类")
            @RequestParam(value = "orderCategory",required = false)Integer orderCategory,
            @ApiParam(name="page")
            @RequestParam(value = "page")Integer page,
            @ApiParam(name="pageSize")
            @RequestParam(value = "pageSize")Integer pageSize
    ){
        try {
            return payService.getOrderList(name, orderNo, status,payType, orderType, orderCategory, page, pageSize);
        }catch (Exception e){
            return failedPageEnvelopException2(e);
        }
    }
    @GetMapping(value = "getRefundOrderList")
    @ApiOperation("查询退款订单列表")
    public PageEnvelop getRefundOrderList(
            @ApiParam(name="name",value = "姓名")
            @RequestParam(value = "name",required = false)String name,
            @ApiParam(name="orderNo",value = "订单号")
            @RequestParam(value = "orderNo",required = false)String orderNo,
            @ApiParam(name="status",value = "订单状态")
            @RequestParam(value = "status",required = false)String status,
            @ApiParam(name="payType",value = "支付方式支付类型1微信2支付宝3易联众支付")
            @RequestParam(value = "payType",required = false)String payType,
            @ApiParam(name="orderType",value = "订单类型")
            @RequestParam(value = "orderType",required = false)Integer orderType,
            @ApiParam(name="orderCategory",value = "订单分类")
            @RequestParam(value = "orderCategory",required = false)Integer orderCategory,
            @ApiParam(name="page")
            @RequestParam(value = "page")Integer page,
            @ApiParam(name="pageSize")
            @RequestParam(value = "pageSize")Integer pageSize
    ){
        try {
            return payService.getRefundOrderList(name, orderNo, status, payType, orderType, orderCategory, page, pageSize);
        }catch (Exception e){
            return failedPageEnvelopException2(e);
        }
    }
    @PostMapping(value = "refuseRefund")
    @ApiOperation("拒绝退款")
    public ObjEnvelop refuseRefund(
            @ApiParam(name = "orderNo",required = true)
            @RequestParam(value = "orderNo")String orderNo,
            @ApiParam(name="refuseDesc")
            @RequestParam(value = "refuseDesc")String refuseDesc
    ){
        try {
            JSONObject result =  payService.refuseRefund(orderNo,refuseDesc);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return ObjEnvelop.getError( result.getString(ResponseContant.resultMsg));
            }
            return ObjEnvelop.getSuccess("操作成功",result.get(ResponseContant.resultMsg));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }
    }
    @PostMapping(value = "agreeRefund")
    @ApiOperation("同意退款")
    public ObjEnvelop agreeRefund(
            @ApiParam(name = "orderNo",required = true)
            @RequestParam(value = "orderNo")String orderNo
    ){
        try {
            JSONObject result =  payService.agreeRefund(orderNo);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return ObjEnvelop.getError( result.getString(ResponseContant.resultMsg));
            }
            return ObjEnvelop.getSuccess("操作成功",result.get(ResponseContant.resultMsg));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }
    }
}

+ 220 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/order/PayService.java

@ -0,0 +1,220 @@
package com.yihu.jw.base.service.order;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.order.BusinessOrderRefundDO;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.order.dao.BusinessOrderRefundDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.pay.service.CloudCarePayService;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.PageEnvelop;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
 * Created by Bing on 2021/7/1.
 */
@Service
public class PayService {
    private Logger log = LoggerFactory.getLogger(PayService.class);
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private BusinessOrderDao businessOrderDao;
    @Autowired
    private BusinessOrderRefundDao businessOrderRefundDao;
    @Autowired
    private BasePatientDao patientDao;
    @Autowired
    private CloudCarePayService payService;
    /**
     * 订单列表
     * @param name
     * @param orderNo
     * @param status
     * @param payType
     * @param orderType
     * @param orderCategory
     * @param page
     * @param pageSize
     * @return
     */
    public PageEnvelop getOrderList(String name,String orderNo,String status,String payType,Integer orderType,Integer orderCategory,
                                    Integer page,Integer pageSize){
        page = page>0?page-1:0;
        String sql = " select *,DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') create_time from base_business_order_pay where 1=1 ";
        String sqlCount = "select count(id) from base_business_order_pay where 1=1 ";
        String fliter="";
        if (StringUtils.isNotBlank(name)){
            fliter += " and patient_name like '%"+name+"%' ";
        }
        if (StringUtils.isNotBlank(orderNo)){
            fliter += " and order_no = '"+orderNo+"' ";
        }
        if (StringUtils.isNotBlank(status)){
            fliter += " and status = "+status;
        }
        if (StringUtils.isNotBlank(payType)){
            fliter += " and pay_type = "+payType;
        }
        if (orderType != null){
            fliter +=" and order_type = "+orderType;
        }
        if (orderCategory != null){
            fliter +=" and order_category = "+orderCategory;
        }
        Long count = jdbcTemplate.queryForObject(sqlCount+fliter,Long.class);
        fliter += " Order by create_time desc limit "+page*pageSize+","+pageSize;
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql+fliter);
        return PageEnvelop.getSuccessListWithPage("查询成功",list,page,pageSize,count);
    }
    /**
     * 售后订单列表
     * @param name
     * @param orderNo
     * @param status
     * @param payType
     * @param orderType
     * @param orderCategory
     * @param page
     * @param pageSize
     * @return
     */
    public PageEnvelop getRefundOrderList(String name,String orderNo,String status,String payType,Integer orderType,Integer orderCategory,
                                    Integer page,Integer pageSize){
        page = page>0?page-1:0;
        String sql = " select pay.patient,pay.patient_name,pay.order_no,pay.order_type,pay.order_category,pay.relation_code, " +
                " pay.relation_name,pay.description,pay.pay_type,pay.pay_price,pay.yk_order_id,DATE_FORMAT(re.create_time,'%Y-%m-%d %H:%i:%S') create_time, " +
                " re.enclosure,re.refund_desc,re.`status` from base_business_order_pay pay inner JOIN base_business_order_refund re on  " +
                " pay.order_no = re.order_no where pay.status>=3  ";
        String sqlCount = "select count(re.id) from base_business_order_pay pay inner JOIN " +
                " base_business_order_refund re on pay.order_no = re.order_no where pay.status>=3 ";
        String fliter="";
        if (StringUtils.isNotBlank(name)){
            fliter += " and pay.patient_name like '%"+name+"%' ";
        }
        if (StringUtils.isNotBlank(orderNo)){
            fliter += " and pay.order_no = '"+orderNo+"' ";
        }
        if (StringUtils.isNotBlank(status)){
            fliter += " and pay.status = "+status;
        }
        if (StringUtils.isNotBlank(payType)){
            fliter += " and pay.pay_type = "+payType;
        }
        if (orderType != null){
            fliter +=" and pay.order_type = "+orderType;
        }
        if (orderCategory != null){
            fliter +=" and pay.order_category = "+orderCategory;
        }
        Long count = jdbcTemplate.queryForObject(sqlCount+fliter,Long.class);
        fliter += " Order by create_time desc limit "+page*pageSize+","+pageSize;
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql+fliter);
        return PageEnvelop.getSuccessListWithPage("查询成功",list,page,pageSize,count);
    }
    /**
     * 拒绝退款
     * @param orderNo
     * @param refuseDesc
     * @return
     */
    public JSONObject refuseRefund(String orderNo,String refuseDesc){
        JSONObject result = new JSONObject();
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        if ( null== businessOrderDO){
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, "订单不存在");
            return result;
        }
        BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient());
        if (patientDO==null){
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, "患者不存在");
            return result;
        }
        if ( 3 != businessOrderDO.getStatus()){
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, "订单未申请退款或已退款,无法操作");
            return result;
        }
        BusinessOrderRefundDO businessOrderRefundDO = businessOrderRefundDao.selectByOrderNo(orderNo);
        if (null == businessOrderRefundDO){
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, "订单不存在");
            return result;
        }
        businessOrderDO.setStatus(4);
        businessOrderRefundDO.setStatus(4);
        businessOrderRefundDO.setRefuseDesc(refuseDesc);
        businessOrderDao.save(businessOrderDO);
        businessOrderRefundDao.save(businessOrderRefundDO);
        result.put(ResponseContant.resultFlag, ResponseContant.fail);
        result.put(ResponseContant.resultMsg, "success");
        return result;
    }
    @Transactional(rollbackFor = Exception.class)
    public JSONObject agreeRefund(String orderNo) throws Exception {
        JSONObject result = new JSONObject();
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        if ( null== businessOrderDO){
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, "订单不存在");
            return result;
        }
        if ( 3 != businessOrderDO.getStatus()){
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, "订单未申请退款或已退款,无法操作");
            return result;
        }
        BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient());
        if (patientDO==null){
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, "患者不存在");
            return result;
        }
        BusinessOrderRefundDO businessOrderRefundDO = businessOrderRefundDao.selectByOrderNo(orderNo);
        if (null == businessOrderRefundDO){
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, "订单不存在");
            return result;
        }
        if (businessOrderRefundDO.getStatus()!=1){
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, "订单已处理");
            return result;
        }
        businessOrderDO.setStatus(4);
        businessOrderRefundDO.setStatus(3);
        //退款流程
        payService.orderRefund(orderNo);
        businessOrderRefundDO.setStatus(2);
        businessOrderDao.save(businessOrderDO);
        businessOrderRefundDao.save(businessOrderRefundDO);
        result.put(ResponseContant.resultFlag, ResponseContant.fail);
        result.put(ResponseContant.resultMsg, "success");
        return result;
    }
}

+ 21 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientEndpoint.java

@ -267,4 +267,25 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
            return failedException2(e);
        }
    }
    @PostMapping(value = "registerForFamily")
    @ApiOperation("注册账号--绑定家人不存在时注册")
    public ObjEnvelop registerForFamily(
            @ApiParam(name="archiveType")@RequestParam(value = "archiveType")Integer archiveType,
            @ApiParam(name="idcard")@RequestParam(value = "idcard")String idcard,
            @ApiParam(name="name")@RequestParam(value = "name")String name,
            @ApiParam(name="sex")@RequestParam(value = "sex")Integer sex,
            @ApiParam(name="mobile")@RequestParam(value = "mobile")String mobile
            ){
        try {
            JSONObject result = patientService.registerForFamily(archiveType,idcard,mobile,name,sex);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail){
                return ObjEnvelop.getError(result.getString(ResponseContant.resultMsg));
            }
            return ObjEnvelop.getSuccess("添加家人账号成功",result.get(ResponseContant.resultMsg));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }
    }
}

+ 40 - 8
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/platForm/PatientInfoPlatFormEndpoint.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.care.endpoint.BaseController;
import com.yihu.jw.care.service.assistance.EmergencyAssistanceService;
import com.yihu.jw.care.service.common.DictService;
import com.yihu.jw.care.service.doorCoach.DoctorDoorCoachOrderService;
import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
import com.yihu.jw.care.service.lifeCare.LifeCareOrderService;
@ -14,6 +15,7 @@ import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
@ -54,11 +56,13 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
    private EmergencyAssistanceService assistanceService;
    @Autowired
    private BaseServiceNewsService baseServiceNewsService;
    @Autowired
    private DictService dictService;
    private BaseController baseController = new BaseController();
    @GetMapping(value = "findOrgLocations")
    @ApiParam("查找机构坐标")
    @ApiOperation("查找机构坐标")
    public ListEnvelop findOrgLocations(){
        try {
            return ListEnvelop.getSuccess("查询成功",baseServiceNewsService.findOrgLocations());
@ -68,7 +72,7 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "findPatinetLocations")
    @ApiParam("查找所有居民坐标")
    @ApiOperation("查找所有居民坐标")
    public ListEnvelop findPatinetLocations(){
        try {
            return ListEnvelop.getSuccess("查询成功",baseServiceNewsService.findPatinetLocations());
@ -78,7 +82,7 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "findPatinetByName")
    @ApiParam("获取居民详情页")
    @ApiOperation("获取居民详情页")
    public ListEnvelop findPatinetByName(@ApiParam(name="name",value = "居民姓名",required = true)
                                @RequestParam(value = "name")String  name){
        try {
@ -89,7 +93,7 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "findNews")
    @ApiParam("获取居民详情页")
    @ApiOperation("获取居民详情页")
    public ListEnvelop findNews(@ApiParam(name="size",value = "页面大小",required = true)
                                     @RequestParam(value = "size")Integer size){
        try {
@ -100,7 +104,7 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "getPatientInfo")
    @ApiParam("获取居民详情页")
    @ApiOperation("获取居民详情页")
    public ObjEnvelop getPatientInfo(@ApiParam(name="patient",value = "居民id",required = true)
                                     @RequestParam(value = "patient")String patient,
                                     @ApiParam(name="patientType",value="患者类型 1老人 2 新生儿")
@ -113,7 +117,7 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "getPatientEvent")
    @ApiParam("获取就诊事件")
    @ApiOperation("获取就诊事件")
    public ObjEnvelop getPatientEvent(@ApiParam(name="patient",value = "居民id",required = true)
                                     @RequestParam(value = "patient")String patient,
                                     @ApiParam(name="patientType",value="患者类型 1老人 2 新生儿")
@ -130,7 +134,7 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "getServiceOrder")
    @ApiParam("获取服务工单列表")
    @ApiOperation("获取服务工单列表")
    public ObjEnvelop getServiceOrder(@ApiParam(name="patient",value = "居民id",required = true)
                                     @RequestParam(value = "patient")String patient,
                                     @ApiParam(name="patientType",value="患者类型 1老人 2 新生儿")
@ -147,7 +151,7 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "getHealthIndexInfo")
    @ApiParam("获取居民体征信息")
    @ApiOperation("获取居民体征信息")
    public String getHealthIndexInfo(@ApiParam(name="patient",value="患者代码",defaultValue = "eb0b478fbe9245428ecf63cd7517206f")
                                             @RequestParam(value="patient",required = true) String patient,
                                      @ApiParam(name="type",value="指标类型",defaultValue = "1")
@ -165,6 +169,17 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "getPatientMonitoringInfo")
    @ApiOperation("获取居民安监护信息")
    public String getHealthIndexInfo(@ApiParam(name="patient",value="患者代码",defaultValue = "808080eb7917a3be017918a979380055")
                                     @RequestParam(value="patient",required = true) String patient){
        try {
            return baseController.write (200,"查询成功","data",patientInfoPlatFormService.getPatientMonitoringInfo(patient));
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @GetMapping("getDoorCoachByOrderId")
    @ApiOperation(value = "根据工单id获取相应的工单,如果为空,则获取该患者当前最新一条的工单")
    public ObjEnvelop getByOrderId(
@ -253,5 +268,22 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
        }
    }
    @ApiOperation("查询字典")
    @GetMapping(value= "findDict")
    public MixEnvelop findDict(@ApiParam(name = "name", value = "name", required = false)
                               @RequestParam(value = "name", required = false)String name,
                               @ApiParam(name = "modelName", value = "modelName", required = false)
                               @RequestParam(value = "modelName", required = false)String modelName,
                               @ApiParam(name = "code", value = "code", required = false)
                               @RequestParam(value = "code", required = false)String code,
                               @ApiParam(name = "value", value = "value", required = false)
                               @RequestParam(value = "value", required = false)String value,
                               @ApiParam(name = "page", value = "page", required = false)
                               @RequestParam(value = "page", required = false) Integer page,
                               @ApiParam(name = "pageSize", value = "pageSize", required = false)
                               @RequestParam(value = "pageSize", required = false)Integer pageSize){
        return dictService.findDictsByNameCode(modelName,name,code,value,page,pageSize);
    }
}

+ 9 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/doorCoach/PatientDoorCoachOrderService.java

@ -872,8 +872,15 @@ public class PatientDoorCoachOrderService extends BaseJpaService<BaseDoorCoachOr
                    if (businessOrderDO!=null){
                        if (1 == businessOrderDO.getStatus()){
                            //退款流程
                            payService.orderRefund(businessOrderDO.getOrderNo(),"调度员拒单退款");
                            orderDO.setPayStatus(2);
                            try {
                                payService.orderRefund(businessOrderDO.getOrderNo(),"调度员拒单退款");
                                orderDO.setPayStatus(2);
                            }catch (Exception e){
                                e.printStackTrace();
                                result.put(ResponseContant.resultFlag, ResponseContant.fail);
                                result.put(ResponseContant.resultMsg,"退款失败,无法拒绝工单!");
                                return result;
                            }
                        }
                    }
                }

+ 52 - 4
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/patient/CarePatientService.java

@ -13,6 +13,7 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
import com.yihu.jw.entity.care.sign.CapacityAssessmentRecordDO;
import com.yihu.jw.entity.patient.Patient;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.service.BasePatientMedicardCardService;
import com.yihu.jw.restmodel.ResponseContant;
@ -27,10 +28,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
 * 
@ -341,4 +339,54 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
        }
        return result;
    }
    /**
     * 为家人注册账号
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    public JSONObject registerForFamily(Integer archiveType,String idcard,String mobile,String name,Integer sex){
        JSONObject result = new JSONObject();
        BasePatientDO patientDetail = new BasePatientDO();
        patientDetail.setArchiveType(archiveType);
        patientDetail.setIdcard(idcard);
        patientDetail.setMobile(mobile);
        patientDetail.setName(name);
        patientDetail.setSex(sex);
        if (StringUtils.isNotBlank(patientDetail.getIdcard())){
            if (null != patientDao.findByIdcard(patientDetail.getIdcard())){
                result.put(ResponseContant.resultFlag, ResponseContant.fail);
                result.put(ResponseContant.resultMsg,"此居民已存在,无法注册");
                return result;
            }
        }else {
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg,"身份证不能为空");
            return result;
        }
        if (StringUtils.isNotBlank(patientDetail.getMobile())){
            if (patientDao.findByMobileAndDel(patientDetail.getMobile(),"1").size()>0){
                result.put(ResponseContant.resultFlag, ResponseContant.fail);
                result.put(ResponseContant.resultMsg,"此居民已存在,无法注册");
                return result;
            }
        }
        idcard = patientDetail.getIdcard();
        String pw = idcard.substring(idcard.length()-6);
        String salt = UUID.randomUUID().toString().substring(0,5);
        patientDetail.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
        patientDetail.setSalt(salt);
        patientDetail.setDel("1");
        patientDetail.setEnabled(1);
        patientDetail.setArchiveStatus(3);
        patientDetail.setLocked(0);
        patientDetail.setCreateTime(new Date());
        patientDetail.setUpdateTime(new Date());
        patientDao.save(patientDetail);
        result.put(ResponseContant.resultFlag, ResponseContant.success);
        result.put(ResponseContant.resultMsg,patientDetail);
        return result;
    }
}

+ 12 - 7
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/pay/PayService.java

@ -8,7 +8,6 @@ import com.yihu.jw.care.dao.doorCoach.BaseDoorCoachFeeDetailDao;
import com.yihu.jw.care.dao.doorCoach.BaseDoorCoachOrderDao;
import com.yihu.jw.care.dao.lifeCare.LifeCareFeeDetailDao;
import com.yihu.jw.care.dao.lifeCare.LifeCareOrderDao;
import com.yihu.jw.care.dao.pay.WxPayHttpLogDao;
import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
import com.yihu.jw.care.service.lifeCare.LifeCareOrderService;
import com.yihu.jw.care.util.WxpayUtil;
@ -26,6 +25,7 @@ import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.order.dao.BusinessOrderRefundDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.pay.dao.WxPayHttpLogDao;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.util.common.IpUtil;
@ -57,7 +57,7 @@ import static jxl.biff.FormatRecord.logger;
 */
@Service
public class PayService {
    private Logger log = LoggerFactory.getLogger(PatientDoorCoachOrderService.class);
    private Logger log = LoggerFactory.getLogger(PayService.class);
    @Autowired
    private BasePatientDao patientDao;
@ -472,9 +472,10 @@ public class PayService {
        log.error("【支付通知】请求,payWater:{}", orderDO);
        String type = "";
        //防止重复支付
        if (orderDO.getStatus()!=0) {
        if (orderDO.getStatus()!=1) {
            return;
        }
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderDO.getOrderNo());
        switch (type){
            case "1":
                //desc = "招生报名";
@ -484,11 +485,11 @@ public class PayService {
                break;
            case "3":
                //desc = "上门辅导";
               // doorCoachOrderService.payOrderAfter(orderDO.getRelationCode());
                doorCoachOrderService.refundOrderAfter(businessOrderDO.getRelationCode());
                break;
            case "4":
                //desc = "生活照料服务";
               // lifeCareOrderService.payOrderAfter(orderDO.getRelationCode());
                lifeCareOrderService.refundOrderAfter(businessOrderDO.getRelationCode());
                break;
            default:
                break;
@ -698,16 +699,20 @@ public class PayService {
                relateName = "服务";
                break;
        }
        Date date = new Date();
        Long lastPayTime = date.getTime()+60*30;
        businessOrderDO.setDescription(desc);
        businessOrderDO.setRelationCode(relationCode);
        businessOrderDO.setRelationName(relateName);
        businessOrderDO.setCreateTime(new Date());
        businessOrderDO.setUpdateTime(new Date());
        businessOrderDO.setCreateTime(date);
        businessOrderDO.setUpdateTime(date);
        businessOrderDO.setStatus(0);
        businessOrderDO.setOrderNo(getOrderNo());
        businessOrderDO.setUploadStatus(0);
        businessOrderDO.setPayType(1);
        businessOrderDO.setPayPrice(Double.valueOf(price));
        businessOrderDO.setLastPayTime(lastPayTime);
        businessOrderService.save(businessOrderDO);
        return businessOrderDO;
    }

+ 55 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachOrderDao.java

@ -0,0 +1,55 @@
package com.yihu.jw.care.dao.doorCoach;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
/**
 * 
 * 上门辅导服务工单 数据库访问层
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * Administrator 	1.0  		2019年03月20日 	Created
 *
 * </pre>
 * @since 1.
 */
public interface BaseDoorCoachOrderDao extends PagingAndSortingRepository<BaseDoorCoachOrderDO, String>, JpaSpecificationExecutor<BaseDoorCoachOrderDO>  {
    boolean existsByPatientAndStatusNot(String patient, int status);
    boolean existsByPatientAndStatusIn(String patient, Integer[] status);
    @Modifying
    @Transactional
    @Query("update BaseDoorCoachOrderDO o set o.conclusionStatus = 1 where o.id = ?1")
    void updateConclusionStatus(String orderId);
    @Query("select o from BaseDoorCoachOrderDO o where o.doctor = ?1 and o.status in (2,3)")
    List<BaseDoorCoachOrderDO> getNotFinishOrderByDoctor(String doctor);
    @Modifying
    @Transactional
    @Query("update BaseDoorCoachOrderDO o set o.prescriptionStatus = 1,o.status = 4, o.prescriptionCode = ?2, o.prescriptionTime = ?3 where o.id = ?1")
    void updatePrescriptionById(String orderId, String prescriptionCode, Date prescriptionTime);
    @Query("select o from BaseDoorCoachOrderDO o where o.prescriptionCode like ?1 and o.status <> -1 ")
    List<BaseDoorCoachOrderDO> findByPrescriptionCode(String prescriptionCode);
    @Query("select o from BaseDoorCoachOrderDO o where o.relationCode = ?1 order by o.createTime desc")
    List<BaseDoorCoachOrderDO> findByRelationCode(String relationCode);
    @Query("select o from BaseDoorCoachOrderDO o where o.doctor = ?1 and o.status in (1,2,3,4,5)")
    List<BaseDoorCoachOrderDO> getUnFinishOrderByDoctor(String doctor);
    List<BaseDoorCoachOrderDO> queryByStatusIn(Integer[] status);
}

+ 13 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/dao/lifeCare/LifeCareOrderDao.java

@ -0,0 +1,13 @@
package com.yihu.jw.care.dao.lifeCare;
import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2021/3/26.
 */
public interface LifeCareOrderDao extends PagingAndSortingRepository<LifeCareOrderDO, String>, JpaSpecificationExecutor<LifeCareOrderDO> {
    boolean existsByPatientAndStatusIn(String patient, Integer[] status);
}

+ 10 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/event/ApplicationEvent.java

@ -4,6 +4,7 @@ import com.yihu.jw.care.job.QuartzHelper;
import com.yihu.jw.care.job.consult.FinishConsultJob;
import com.yihu.jw.care.job.message.DoctorSendUnreadJob;
import com.yihu.jw.care.job.message.PatientSendUnreadJob;
import com.yihu.jw.care.job.order.CancelPayOrderJob;
import com.yihu.jw.care.util.SystemConf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -54,6 +55,15 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
                logger.info("PATIENT_SEND_UNREAD_MES_JOB exist");
            }
            //#取消订单支付超时的订单,每3分钟执行一次
            if (!quartzHelper.isExistJob("CANCEL_PAY_ORDER_OVERTIME_JOB")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("CANCEL_PAY_ORDER_OVERTIME_JOB");
                quartzHelper.addJob(CancelPayOrderJob.class, trigger, "CANCEL_PAY_ORDER_OVERTIME_JOB", new HashMap<String, Object>());
                logger.info("CANCEL_PAY_ORDER_OVERTIME_JOB success");
            } else {
                logger.info("CANCEL_PAY_ORDER_OVERTIME_JOB exist");
            }
        } catch (Exception e) {
            logger.info(" job start failed");
        }

+ 81 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/order/CancelPayOrderJob.java

@ -0,0 +1,81 @@
package com.yihu.jw.care.job.order;
import com.yihu.jw.care.dao.doorCoach.BaseDoorCoachOrderDao;
import com.yihu.jw.care.dao.lifeCare.LifeCareOrderDao;
import com.yihu.jw.care.job.consult.FinishConsultJob;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.order.dao.BusinessOrderDao;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * Created by Bing on 2021/7/2.
 */
@DisallowConcurrentExecution//解决执行频率和间隔时间的问题。到了执行时间点前一任务还在执行中,不会执行下一次任务,直至该次任务完成
public class CancelPayOrderJob implements Job {
    private static Logger logger = LoggerFactory.getLogger(FinishConsultJob.class);
    @Autowired
    private BusinessOrderDao businessOrderDao;
    @Autowired
    private BaseDoorCoachOrderDao baseDoorCoachOrderDao;
    @Autowired
    private LifeCareOrderDao lifeCareOrderDao;
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        Long nowTime = System.currentTimeMillis();
        logger.info("CANCEL_PAY_ORDER_OVERTIME_JOB start 订单支付超时JOb开始----截至支付时间:"+nowTime);
        List<BusinessOrderDO> needFinishs= businessOrderDao.selectByLastPayTime(nowTime);
        List<BaseDoorCoachOrderDO> doorCoachOrderDOS = new ArrayList<>();
        List<LifeCareOrderDO> lifeCareOrderDOS = new ArrayList<>();
        for (BusinessOrderDO businessOrderDO:needFinishs) {
           businessOrderDO.setStatus(2);
           String type = businessOrderDO.getOrderCategory();
           String orderId = businessOrderDO.getRelationCode();
           switch (type){
               case "3":
                   BaseDoorCoachOrderDO doorOrderDO = baseDoorCoachOrderDao.findOne(orderId);
                   if (doorOrderDO!=null){
                       if(doorOrderDO.getStatus()==0){
                           doorOrderDO.setStatus(-1);
                           doorOrderDO.setCancelReason("支付超时");
                           doorOrderDO.setCancelTime(new Date());
                           doorCoachOrderDOS.add(doorOrderDO);
                       }
                   }
                   break;
               case "4":
                   LifeCareOrderDO lifeOrderDO = lifeCareOrderDao.findOne(orderId);
                   if (lifeOrderDO!=null){
                       if(lifeOrderDO.getStatus()==0){
                           lifeOrderDO.setStatus(-1);
                           lifeOrderDO.setCancelReason("支付超时");
                           lifeOrderDO.setCancelTime(new Date());
                           lifeCareOrderDOS.add(lifeOrderDO);
                       }
                   }
                   break;
           }
           businessOrderDO.setStatus(2);
           businessOrderDO.setUpdateTime(new Date());
        }
        businessOrderDao.save(needFinishs);
        baseDoorCoachOrderDao.save(doorCoachOrderDOS);
        lifeCareOrderDao.save(lifeCareOrderDOS);
        logger.info("CANCEL_PAY_ORDER_OVERTIME_JOB end 订单支付超时JOb结束----"+needFinishs.size());
    }
}

+ 4 - 1
svr/svr-cloud-job/src/main/resources/system.properties

@ -6,4 +6,7 @@ finish_consult_job=0 59 * * * ?
DOCTOR_SEND_UNREAD_MES_JOB=0 0 9 * * ?
#每天的早上9:00,给所有居民发送未读消息微信模板
PATIENT_SEND_UNREAD_MES_JOB=0 0 9 * * ?
PATIENT_SEND_UNREAD_MES_JOB=0 0 9 * * ?
#取消订单支付超时的订单,每3分钟执行一次
CANCEL_PAY_ORDER_OVERTIME_JOB=0 0/3 * * * ?