| | |
| | | import com.doumee.core.wx.WxPayProperties; |
| | | import com.doumee.dao.business.model.Goodsorder; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.service.business.GoodsorderService; |
| | | import com.doumee.service.business.MemberRidesService; |
| | | import com.doumee.service.business.SitesService; |
| | | import com.doumee.service.business.WxBillService; |
| | | import com.doumee.service.business.*; |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.util.ThreadContext; |
| | | import org.apache.shiro.web.mgt.DefaultWebSecurityManager; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private RefundService refundService; |
| | | |
| | | @Autowired |
| | | private SystemDictDataService systemDictDataService; |
| | |
| | | ThreadContext.bind(manager); |
| | | String appId = wxPayProperties.getAppId(); |
| | | String appSecret = wxPayProperties.getAppSecret(); |
| | | if(wxPayProperties.getExistsSub() ==1){ |
| | | //如果是服务商支付,取子商户信息 |
| | | appId = StringUtils.trimToNull(wxPayProperties.getSubMchId()); |
| | | appSecret =StringUtils.trimToNull(wxPayProperties.getSubAppSecret()); |
| | | } |
| | | //生成微信token |
| | | String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appId+"&secret="+appSecret; |
| | | String response = HttpsUtil.doGet(url,null); |
| | |
| | | systemDictDataService.updateById(systemDictData); |
| | | } |
| | | } |
| | | /** |
| | | * 更新微信 ACCESS_TOKEN |
| | | */ |
| | | @Scheduled(fixedDelay = 1000L * 60L ) |
| | | public void autoCancelRefunOrder(){ |
| | | log.info("=====================开始 自動取消未推送退款状态的退款单状态======================="); |
| | | refundService.autoCancelRefunOrder();; |
| | | log.info("=====================结束 自動取消未推送退款状态的退款单状态======================="); |
| | | } |
| | | |
| | | |
| | | } |