| | |
| | | <version>0.2.15</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>aliyun-java-sdk-core</artifactId> |
| | | <version>3.5.0</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>aliyun-java-sdk-dysmsapi</artifactId> |
| | | <version>1.1.0</version> |
| | | </dependency> |
| | | |
| | | <!-- <dependency> |
| | | <groupId>com.azure.spring</groupId> |
| | |
| | | public void refreshToken(String token,Member member) { |
| | | try { |
| | | if(Objects.nonNull(member)){ |
| | | redisTemplate.opsForValue().set(Constants.REDIS_TOKEN_KEY+token,JSONObject.toJSONString(member),jwtProperties.getExpiration(), TimeUnit.MILLISECONDS); |
| | | redisTemplate.expire(Constants.REDIS_TOKEN_KEY+token,jwtProperties.getExpiration(), TimeUnit.MILLISECONDS); |
| | | // redisTemplate.delete(Constants.REDIS_TOKEN_KEY+token); |
| | | // redisTemplate.opsForValue().set(Constants.REDIS_TOKEN_KEY+token,JSONObject.toJSONString(member),jwtProperties.getExpiration(), TimeUnit.MILLISECONDS); |
| | | } |
| | | } catch (Exception e) { |
| | | |
| | |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.model.IdentityInfo; |
| | | import com.doumee.dao.business.model.Orders; |
| | | import com.doumee.dao.business.model.WithdrawalOrders; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | private static String goodsOrderUrl = "pages/settlementDetails/settlementDetails?goodsOrderId="; |
| | | |
| | | private static String identityInfoUrl = "pages/mine/mine"; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | /** |
| | | * ä¿¡æ¯è®¤è¯ |
| | | * @param openid |
| | | * @param identityInfo |
| | | * @throws WxErrorException |
| | | */ |
| | | public void identityInfoMessage(String openid, IdentityInfo identityInfo) throws WxErrorException { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = WxMiniConfig.wxMaService.getAccessToken(); |
| | |
| | | //ç¨æ·çopenidï¼è¦åéç»é£ä¸ªç¨æ·ï¼ |
| | | wxMsgVO.setTouser(openid); |
| | | //订é
æ¶æ¯æ¨¡æ¿id |
| | | wxMsgVO.setTemplate_id("4H9ztG4E9BxJLwMuYSZ6oiM7yb4KX7u7bYhkhYJP0-Y"); |
| | | wxMsgVO.setTemplate_id("VJho7-lf-4_WZFfOzenDndgwNDIA0EvCiE6vqBnExpQ"); |
| | | Map<String, TemplateData> m = new HashMap<>(4); |
| | | m.put("thing11", new TemplateData(Constants.equalsInteger(identityInfo.getType(),Constants.ZERO)?"ç¨å·¥è®¤è¯":Constants.equalsInteger(identityInfo.getType(),Constants.ONE)?"è¿è´§è®¤è¯":"ä¾é¤è®¤è¯")); |
| | | m.put("phrase4", new TemplateData(Constants.equalsInteger(identityInfo.getAuditStatus(),Constants.TWO)?"认è¯éè¿":"è®¤è¯æªéè¿")); |
| | | m.put("date3", new TemplateData(DateUtil.getFomartDate(identityInfo.getAuditTime(),"yyyy-MM-dd HH:mm:ss"))); |
| | | m.put("thing5", new TemplateData(identityInfo.getAuditRemark())); |
| | | m.put("thing2", new TemplateData(Constants.equalsInteger(identityInfo.getType(),Constants.ZERO)?"ç¨å·¥è®¤è¯":Constants.equalsInteger(identityInfo.getType(),Constants.ONE)?"è¿è´§è®¤è¯":"ä¾é¤è®¤è¯")); |
| | | m.put("phrase6", new TemplateData(Constants.equalsInteger(identityInfo.getAuditStatus(),Constants.TWO)?"认è¯éè¿":"è®¤è¯æªéè¿")); |
| | | m.put("time12", new TemplateData(DateUtil.getFomartDate(identityInfo.getAuditTime(),"yyyy-MM-dd HH:mm"))); |
| | | m.put("thing14", new TemplateData(identityInfo.getAuditRemark())); |
| | | wxMsgVO.setPage(identityInfoUrl); |
| | | wxMsgVO.setData(m); |
| | | ResponseEntity<String> responseEntity = |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @param openidList |
| | | * @param orders |
| | | * @param cancelType åæ¶ç±»åï¼0=å¹³å°åæ¶ï¼1=å忹忶ï¼1=æ¥åæ¹åæ¶ |
| | | * @throws WxErrorException |
| | | */ |
| | | public void cancelMessage(List<String> openidList, Orders orders,Integer cancelType ) throws WxErrorException { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = WxMiniConfig.wxMaService.getAccessToken(); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ - 订ååæ¶ä¸å¡ -> accessTokenï¼{}",accessToken); |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+accessToken; |
| | | //æ¼æ¥æ¨éçæ¨¡ç |
| | | WxMsgVO wxMsgVO = new WxMsgVO(); |
| | | //订é
æ¶æ¯æ¨¡æ¿id |
| | | wxMsgVO.setTemplate_id("AA97cHjvlPiNO4viMkVe4JifCf9TD5b5Eb7s6El3VS8"); |
| | | Map<String, TemplateData> m = new HashMap<>(5); |
| | | m.put("character_string3", new TemplateData(orders.getCode())); |
| | | m.put("thing2", new TemplateData(Constants.orderType.getName(orders.getType()))); |
| | | m.put("thing1", new TemplateData(orders.getLocation() + (StringUtils.isNotBlank(orders.getLocationRemark())?orders.getLocationRemark():""))); |
| | | m.put("date8", new TemplateData(DateUtil.getFomartDate(orders.getCancelTime(),"yyyy-MM-dd HH:mm:ss"))); |
| | | m.put("thing6", new TemplateData(Constants.equalsInteger(cancelType,Constants.ZERO)?"å¹³å°åæ¶":Constants.equalsInteger(cancelType,Constants.ONE)?"å忹忶":"æ¥åæ¹åæ¶")); |
| | | //TODO 跳转å°å |
| | | wxMsgVO.setPage(""); |
| | | wxMsgVO.setData(m); |
| | | if(CollectionUtils.isNotEmpty(openidList)){ |
| | | for (String openid:openidList) { |
| | | //ç¨æ·çopenidï¼è¦åéç»é£ä¸ªç¨æ·ï¼ |
| | | wxMsgVO.setTouser(openid); |
| | | ResponseEntity<String> responseEntity = |
| | | restTemplate.postForEntity(url, wxMsgVO, String.class); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ è®¢ååæ¶ä¸å¡ï¼{}", JSONObject.toJSONString(responseEntity)); |
| | | } |
| | | }else{ |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ è®¢ååæ¶ä¸å¡ï¼{}", "æ 人åä¿¡æ¯"); |
| | | } |
| | | } |
| | | |
| | | |
| | | public void acceptMessage(String openid, Orders orders,String memberName,String memberPhone) throws WxErrorException { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = WxMiniConfig.wxMaService.getAccessToken(); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ - æ¥åä¸å¡ -> accessTokenï¼{}",accessToken); |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+accessToken; |
| | | //æ¼æ¥æ¨éçæ¨¡ç |
| | | WxMsgVO wxMsgVO = new WxMsgVO(); |
| | | wxMsgVO.setTouser(openid); |
| | | //订é
æ¶æ¯æ¨¡æ¿id |
| | | wxMsgVO.setTemplate_id("oVjOBLcHxIlGzOMJsdInmgI5CHGXh-UTvMzQqfFOnIg"); |
| | | Map<String, TemplateData> m = new HashMap<>(4); |
| | | m.put("character_string3", new TemplateData(orders.getCode())); |
| | | m.put("thing1", new TemplateData(Constants.orderType.getName(orders.getType()))); |
| | | m.put("thing15", new TemplateData(memberName)); |
| | | m.put("phone_number8", new TemplateData(memberPhone)); |
| | | //TODO 跳转å°å |
| | | wxMsgVO.setPage(""); |
| | | wxMsgVO.setData(m); |
| | | //ç¨æ·çopenidï¼è¦åéç»é£ä¸ªç¨æ·ï¼ |
| | | ResponseEntity<String> responseEntity = |
| | | restTemplate.postForEntity(url, wxMsgVO, String.class); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ è®¢ååæ¶ä¸å¡ï¼{}", JSONObject.toJSONString(responseEntity)); |
| | | } |
| | | |
| | | |
| | | public void orderUpdMessage(String openid, Orders orders) throws WxErrorException { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = WxMiniConfig.wxMaService.getAccessToken(); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ - 订ååæ´éç¥ -> accessTokenï¼{}",accessToken); |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+accessToken; |
| | | //æ¼æ¥æ¨éçæ¨¡ç |
| | | WxMsgVO wxMsgVO = new WxMsgVO(); |
| | | wxMsgVO.setTouser(openid); |
| | | //订é
æ¶æ¯æ¨¡æ¿id |
| | | wxMsgVO.setTemplate_id("3YSC7gouRlSjHXz4CrWOGFzPmGwEBtFj4snwdfMvKHk"); |
| | | Map<String, TemplateData> m = new HashMap<>(3); |
| | | m.put("character_string1", new TemplateData(orders.getCode())); |
| | | m.put("thing3", new TemplateData("åæ´è®¢åæ¥æ")); |
| | | //忴忥æï¼07-23è³07-25 |
| | | m.put("thing5", new TemplateData("忴忥æ:" +DateUtil.getFomartDate(orders.getStartDate(),"MM-dd") + "è³" +DateUtil.getFomartDate(orders.getEndDate(),"MM-dd"))); |
| | | //TODO 跳转å°å |
| | | wxMsgVO.setPage(""); |
| | | wxMsgVO.setData(m); |
| | | //ç¨æ·çopenidï¼è¦åéç»é£ä¸ªç¨æ·ï¼ |
| | | ResponseEntity<String> responseEntity = |
| | | restTemplate.postForEntity(url, wxMsgVO, String.class); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ è®¢ååæ´éç¥ï¼{}", JSONObject.toJSONString(responseEntity)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public void withdrawalMessage(String openid, WithdrawalOrders withdrawalOrders) throws WxErrorException { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = WxMiniConfig.wxMaService.getAccessToken(); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ - æç°æåéç¥ -> accessTokenï¼{}",accessToken); |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+accessToken; |
| | | //æ¼æ¥æ¨éçæ¨¡ç |
| | | WxMsgVO wxMsgVO = new WxMsgVO(); |
| | | wxMsgVO.setTouser(openid); |
| | | //订é
æ¶æ¯æ¨¡æ¿id |
| | | wxMsgVO.setTemplate_id("fNJy4545hcrH83bP3a1vszs7XEKWjXMsrfr2XCNsql0"); |
| | | Map<String, TemplateData> m = new HashMap<>(4); |
| | | m.put("phrase2", new TemplateData("å·²ææ¬¾")); |
| | | m.put("amount1", new TemplateData((new BigDecimal(withdrawalOrders.getAmount().toString()).divide(new BigDecimal("100"))).toString())); |
| | | m.put("time3", new TemplateData(DateUtil.getFomartDate(withdrawalOrders.getUpdateTime(),"yyyy.MM.dd HH.mm.ss"))); |
| | | m.put("thing4", new TemplateData("ææ¬¾æåï¼è¯·æ³¨ææ¥æ¶")); |
| | | //TODO 跳转å°å |
| | | wxMsgVO.setPage(""); |
| | | wxMsgVO.setData(m); |
| | | //ç¨æ·çopenidï¼è¦åéç»é£ä¸ªç¨æ·ï¼ |
| | | ResponseEntity<String> responseEntity = |
| | | restTemplate.postForEntity(url, wxMsgVO, String.class); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ æç°æåéç¥ï¼{}", JSONObject.toJSONString(responseEntity)); |
| | | } |
| | | |
| | | |
| | | public void revenueMessage(String openid, Orders orders) throws WxErrorException { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = WxMiniConfig.wxMaService.getAccessToken(); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ - è®¢åæ¶çéç¥ -> accessTokenï¼{}",accessToken); |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+accessToken; |
| | | //æ¼æ¥æ¨éçæ¨¡ç |
| | | WxMsgVO wxMsgVO = new WxMsgVO(); |
| | | wxMsgVO.setTouser(openid); |
| | | //订é
æ¶æ¯æ¨¡æ¿id |
| | | wxMsgVO.setTemplate_id("tDpYImlrdv-0d3euTrHbYZ1cEZvjVHTNlqHvV0tpLHg"); |
| | | Map<String, TemplateData> m = new HashMap<>(5); |
| | | m.put("character_string8", new TemplateData(orders.getCode())); |
| | | m.put("phrase3", new TemplateData("å·²æ¯ä»")); |
| | | m.put("phrase4", new TemplateData("微信æ¯ä»")); |
| | | m.put("amount6", new TemplateData((new BigDecimal(orders.getReceiveAccount().toString()).divide(new BigDecimal("100")))+"å
")); |
| | | m.put("date7", new TemplateData(DateUtil.getFomartDate(new Date(),"yyyy-MM-dd HH:mm:ss"))); |
| | | //TODO 跳转å°å |
| | | wxMsgVO.setPage(""); |
| | | wxMsgVO.setData(m); |
| | | //ç¨æ·çopenidï¼è¦åéç»é£ä¸ªç¨æ·ï¼ |
| | | ResponseEntity<String> responseEntity = |
| | | restTemplate.postForEntity(url, wxMsgVO, String.class); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ è®¢åæ¶çéç¥ï¼{}", JSONObject.toJSONString(responseEntity)); |
| | | } |
| | | |
| | | |
| | | public void autoDispatchMessage(String openid, Orders orders,BigDecimal distance) throws WxErrorException { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | String accessToken = WxMiniConfig.wxMaService.getAccessToken(); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ - æå¡æ´¾å -> accessTokenï¼{}",accessToken); |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+accessToken; |
| | | //æ¼æ¥æ¨éçæ¨¡ç |
| | | WxMsgVO wxMsgVO = new WxMsgVO(); |
| | | wxMsgVO.setTouser(openid); |
| | | //订é
æ¶æ¯æ¨¡æ¿id |
| | | wxMsgVO.setTemplate_id("1h6JYpQf-mDKV4tYQ6gGDONfx1awqtm3-y9W8vUraT4"); |
| | | Map<String, TemplateData> m = new HashMap<>(5); |
| | | m.put("thing2", new TemplateData(Constants.orderType.getName(orders.getType()))); |
| | | m.put("thing3", new TemplateData(orders.getOrderContent())); |
| | | m.put("phrase4", new TemplateData("æ¤å°è·ç¦»æ¨"+distance+"å
Ž")); |
| | | m.put("amount28", new TemplateData(orders.getEstimatedAccount().toString())); |
| | | m.put("thing12", new TemplateData("å·¥åå°äº"+DateUtil.getFomartDate(orders.getStartDate(),"MM-dd")+"å¼å§")); |
| | | //TODO 跳转å°å |
| | | wxMsgVO.setPage(""); |
| | | wxMsgVO.setData(m); |
| | | //ç¨æ·çopenidï¼è¦åéç»é£ä¸ªç¨æ·ï¼ |
| | | ResponseEntity<String> responseEntity = |
| | | restTemplate.postForEntity(url, wxMsgVO, String.class); |
| | | log.info("微信å°ç¨åº->å¾®ä¿¡æ¶æ¯éç¥ æå¡æ´¾åï¼{}", JSONObject.toJSONString(responseEntity)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public static WxMaService wxMaService; |
| | | /********微信å°ç¨åºæ¯ä»**********/ |
| | | public static JsapiService wxPayService; |
| | | public static WxPayService wxPayV2Service; |
| | | // public static WxPayService wxPayV2Service; |
| | | public static RefundService refundService; |
| | | public static JsapiServiceExtension jsapiExtService; |
| | | public static BillDownloadService billDownloadService; |
| | |
| | | void init() { |
| | | this.load_WxMaService(); |
| | | this.load_wxPayService(); |
| | | this.load_wxPayV2Service(); |
| | | this.load_transferToUser(); |
| | | // this.load_wxPayV2Service(); |
| | | this.load_transferToUser(); |
| | | this.wxProperties = wxPayProperties; |
| | | } |
| | |
| | | config.setAppid(StringUtils.trimToNull(wxPayProperties.getSubAppId())); |
| | | config.setSecret(StringUtils.trimToNull(wxPayProperties.getSubAppSecret())); |
| | | }else { |
| | | config.setAppid(StringUtils.trimToNull(wxPayProperties.getAppId())); |
| | | config.setSecret(StringUtils.trimToNull(wxPayProperties.getAppSecret())); |
| | | // config.setAppid(StringUtils.trimToNull(wxPayProperties.getAppId())); |
| | | // config.setSecret(StringUtils.trimToNull(wxPayProperties.getAppSecret())); |
| | | } |
| | | config.setMsgDataFormat("JSON"); |
| | | //config.setToken(""); |
| | |
| | | /** |
| | | * åå§å微信å°ç¨åºæ¯ä» |
| | | */ |
| | | public void load_wxPayV2Service() |
| | | { |
| | | WxPayConfig payConfig = new WxPayConfig(); |
| | | payConfig.setTradeType(WxPayConstants.TradeType.JSAPI); |
| | | payConfig.setSignType(WxPayConstants.SignType.MD5); |
| | | payConfig.setAppId(StringUtils.trimToNull(wxPayProperties.getAppId())); |
| | | payConfig.setSubAppId(StringUtils.trimToNull(wxPayProperties.getSubAppId())); |
| | | payConfig.setMchId(StringUtils.trimToNull(wxPayProperties.getMchId())); |
| | | payConfig.setSubMchId(StringUtils.trimToNull(wxPayProperties.getSubMchId())); |
| | | payConfig.setMchKey(StringUtils.trimToNull(wxPayProperties.getMchKey())); |
| | | // payConfig.setKeyPath(StringUtils.trimToNull(wxPayProperties.getKeyPath())); |
| | | payConfig.setNotifyUrl(StringUtils.trimToNull(wxPayProperties.getNotifyUrl())); |
| | | WxPayService wxPayService = new WxPayServiceImpl(); |
| | | wxPayService.setConfig(payConfig); |
| | | this.wxPayV2Service = wxPayService; |
| | | } |
| | | // public void load_wxPayV2Service() |
| | | // { |
| | | // WxPayConfig payConfig = new WxPayConfig(); |
| | | // payConfig.setTradeType(WxPayConstants.TradeType.JSAPI); |
| | | // payConfig.setSignType(WxPayConstants.SignType.MD5); |
| | | // payConfig.setAppId(StringUtils.trimToNull(wxPayProperties.getAppId())); |
| | | // payConfig.setSubAppId(StringUtils.trimToNull(wxPayProperties.getSubAppId())); |
| | | // payConfig.setMchId(StringUtils.trimToNull(wxPayProperties.getMchId())); |
| | | // payConfig.setSubMchId(StringUtils.trimToNull(wxPayProperties.getSubMchId())); |
| | | // payConfig.setMchKey(StringUtils.trimToNull(wxPayProperties.getMchKey())); |
| | | //// payConfig.setKeyPath(StringUtils.trimToNull(wxPayProperties.getKeyPath())); |
| | | // payConfig.setNotifyUrl(StringUtils.trimToNull(wxPayProperties.getNotifyUrl())); |
| | | // WxPayService wxPayService = new WxPayServiceImpl(); |
| | | // wxPayService.setConfig(payConfig); |
| | | // this.wxPayV2Service = wxPayService; |
| | | // } |
| | | |
| | | |
| | | /** |
| | |
| | | // } |
| | | |
| | | |
| | | //转账ä¸å¡ |
| | | public void load_transferToUser() |
| | | { |
| | | TransferToUser transferToUser = new TransferToUser( |
| | |
| | | /** |
| | | * æ¯ä»APIå¯é¥ |
| | | */ |
| | | private String subMchKey; |
| | | // private String subMchKey; |
| | | |
| | | /** |
| | | * æ¯ä»åè°å°å |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public enum orderType { |
| | | ygd(0, "ç¨å·¥å"), |
| | | hyd(1, "è´§è¿å"), |
| | | scd(2, "éé¤å"), |
| | | |
| | | ; |
| | | // æååé |
| | | private int key; |
| | | private String name; |
| | | |
| | | // æé æ¹æ³ |
| | | orderType(int key, String name) { |
| | | this.name = name; |
| | | this.key = key; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getName(int index) { |
| | | for (orderType c : orderType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | // get set æ¹æ³ |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public enum smsContent { |
| | | accept(0, "SMS_491325122","æ¨ç{order}订å已被æ¥åï¼æ¶é´ï¼{time1}-{time2}ï¼æ¥åæ¹ï¼{name}ã"), |
| | | receiveCancel(1, "SMS_491055243","æ¨ç{order}订åï¼æ¶é´ï¼{time1}-{time2}ï¼å·²è¢«æ¥åæ¹åæ¶ï¼è®¢å已鿰è¿å
¥æ¥å大å
ã"), |
| | | platformCancel(2, "SMS_491375152","æ¨ç{order}订åï¼æ¶é´ï¼{time1}-{time2},å·²ç±å¹³å°åæ¶ã妿çé®è¯·è系客æã"), |
| | | agreeUpd(3, "SMS_491190259","æ¥åæ¹å·²åææ¨å°{order}çè®¢åæ¶é´ä¿®æ¹ä¸º{time1}è³{time2}ã"), |
| | | disAgreeUpd(4, "SMS_491085252","æ¥åæ¹å·²æç»æ¨å°{order}çè®¢åæ¶é´ä¿®æ¹ä¸º{time1}-{time2}ãç³»ç»å·²éæ°å°è®¢åæ¾å
¥æ¥å大å
ã"), |
| | | orderUpd(5, "SMS_491010267","请注æï¼æ¨æ¿æ¥ç{order}订åï¼å®¢æ·å°è®¢åæ¶é´ä¿®æ¹ä¸º{time1}-{time2}ã请åå¾ç¡®è®¤æ¯å¦æ¥åï¼è¶
æ¶ä¸å¤çå°è§ä¸ºåæã"), |
| | | releaseCancel(6, "SMS_491150253","æ¨æ¿æ¥ç{order}订åï¼æ¶é´ï¼{time1}-{time2}ï¼å·²è¢«ååæ¹åæ¶ãæ¨å¯å徿¥å大å
éæ°æ¥åã"), |
| | | platformCancel2(7, "SMS_491420143","æ¨æ¿æ¥ç{order}订åï¼æ¶é´ï¼{time1}-{time2}ï¼å·²ç±å¹³å°åæ¶ã妿çé®è¯·è系客æã"), |
| | | dispatch(8, "SMS_491180276","å·²ä¸ºæ¨æºè½å¹é
订åã订åç±»åï¼{order}ï¼æ¶é´ï¼{time1}-{time2}ï¼è·ç¦»ï¼{distance}ï¼é¢è®¡è´¹ç¨{money}ã请åå¾ç¡®è®¤ã"), |
| | | pay(9, "SMS_491180278","æ¨æ¿æ¥ç{order}è®¢åæ¬¾é¡¹å·²å°è´¦ï¼å°è´¦éé¢ï¼{money}ãå¯å¨å°ç¨åºè´¦æ·ä½é¢è¿è¡æ¥çã"), |
| | | authentication(10, "SMS_491055290","æ¨ç³è¯·ç{authentication}ç{order}认è¯{status}ã请å¨å°ç¨åºæ¥ç详æ
ã"), |
| | | ; |
| | | // æååé |
| | | private int key; |
| | | private String code; |
| | | private String name; |
| | | |
| | | // æé æ¹æ³ |
| | | smsContent(int key,String code, String name) { |
| | | this.name = name; |
| | | this.code = code; |
| | | this.key = key; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static Constants.smsContent getSmsContent(int index) { |
| | | for (smsContent c : smsContent.values()) { |
| | | if (c.getKey() == index) { |
| | | return c; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | // get set æ¹æ³ |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyuncs.DefaultAcsClient; |
| | | import com.aliyuncs.IAcsClient; |
| | | import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest; |
| | | import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; |
| | | import com.aliyuncs.http.MethodType; |
| | | import com.aliyuncs.profile.DefaultProfile; |
| | | import com.aliyuncs.profile.IClientProfile; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.CategoryMapper; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.model.IdentityInfo; |
| | | import com.doumee.dao.business.model.Orders; |
| | | import com.doumee.dao.dto.CateringDTO; |
| | | import com.github.pagehelper.Constant; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/7/23 11:37 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class AliSmsService { |
| | | |
| | | protected Logger logger = LogManager.getLogger("sms"); |
| | | |
| | | private final static String ACCESS_KEY_ID = "LTAI5tMkg7wwV74a8H6Bm3Ej"; |
| | | private final static String ACCESS_KEY_SECRET = "FcHKST36sfwfo706L6bvrweGFIbp3n"; |
| | | private final static String SING_NAME = "æ©æ¡å¤©ä¸ç§æ"; |
| | | |
| | | |
| | | public void sendSms(int type, String phone, Orders orders, String receiveName, String businessPhone, BigDecimal distance, IdentityInfo identityInfo,CategoryMapper categoryMapper){ |
| | | Constants.smsContent smsContent = Constants.smsContent.getSmsContent(type); |
| | | Map<String,Object> tempParam = new HashMap<>(); |
| | | if(smsContent.getName().indexOf("time1")>=Constants.ZERO){ |
| | | tempParam.put("time1", DateUtil.formatDate(orders.getStartDate(),"MM-dd")); |
| | | } |
| | | if(smsContent.getName().indexOf("time2")>=Constants.ZERO){ |
| | | tempParam.put("time2", DateUtil.formatDate(orders.getEndDate(),"MM-dd")); |
| | | } |
| | | if(smsContent.getName().indexOf("name")>=Constants.ZERO){ |
| | | tempParam.put("name", receiveName); |
| | | } |
| | | if(smsContent.getName().indexOf("money")>=Constants.ZERO){ |
| | | tempParam.put("money", new BigDecimal(orders.getReceiveAccount().toString()).divide(new BigDecimal("100"),2,BigDecimal.ROUND_HALF_UP)+"å
"); |
| | | } |
| | | if(smsContent.getName().indexOf("distance")>=Constants.ZERO){ |
| | | tempParam.put("distance", distance +"km"); |
| | | } |
| | | //认è¯çä¿¡ ç¹æ®å¤ç |
| | | if(Constants.equalsInteger(smsContent.getKey(),Constants.smsContent.authentication.getKey())){ |
| | | //认è¯ç±»å |
| | | if(smsContent.getName().indexOf("authentication")>=Constants.ZERO){ |
| | | tempParam.put("authentication", Constants.equalsInteger(identityInfo.getAuthType(),Constants.ZERO)?"个人":identityInfo.getCompanyName()); |
| | | } |
| | | if(smsContent.getName().indexOf("order")>=Constants.ZERO){ |
| | | tempParam.put("order", Constants.orderType.getName(identityInfo.getType()).replace("å","")); |
| | | } |
| | | if(smsContent.getName().indexOf("status")>=Constants.ZERO){ |
| | | tempParam.put("status", Constants.equalsInteger(identityInfo.getAuditStatus(),Constants.TWO)?"å·²éè¿":"æªéè¿"); |
| | | } |
| | | }else{ |
| | | if(smsContent.getName().indexOf("order")>=Constants.ZERO){ |
| | | String order = ""; |
| | | //æ¥è¯¢è®¢åçç±»åä¿¡æ¯ |
| | | if(Constants.equalsInteger(orders.getType(),Constants.ZERO)){ |
| | | order = Constants.workType.getName(orders.getWorkType()); |
| | | Category category = categoryMapper.selectById(orders.getCategoryId()); |
| | | if(Objects.nonNull(category)){ |
| | | order = category.getName() + order; |
| | | } |
| | | }else if(Constants.equalsInteger(orders.getType(),Constants.ZERO)){ |
| | | order = "è¿è¾"; |
| | | Category category = categoryMapper.selectById(orders.getTransportTypeId()); |
| | | if(Objects.nonNull(category)){ |
| | | order = category.getName() + order; |
| | | } |
| | | }else{ |
| | | List<CateringDTO> cateringDTOList = JSONArray.parseArray(orders.getWayInfo(),CateringDTO.class); |
| | | if(CollectionUtils.isNotEmpty(cateringDTOList)){ |
| | | for (CateringDTO cateringDTO:cateringDTOList) { |
| | | if(StringUtils.isBlank(order)){ |
| | | order = cateringDTO.getName(); |
| | | }else{ |
| | | order = order + "/" +cateringDTO.getName(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | tempParam.put("order",order); |
| | | } |
| | | } |
| | | |
| | | if(smsContent.getName().indexOf("authentication")>=Constants.ZERO){ |
| | | tempParam.put("distance", distance +"km"); |
| | | } |
| | | AliSmsService.sendSms(phone,smsContent.getCode(), JSONObject.toJSONString(tempParam)); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | Map<String,Object> tempParam = new HashMap<>(); |
| | | tempParam.put("order","è¡èéæå·¥"); |
| | | tempParam.put("time1","07-23"); |
| | | tempParam.put("time2","07-24"); |
| | | AliSmsService.sendSms("18055151023","SMS_491055243", JSONObject.toJSONString(tempParam)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * åç信模æ¿(å¯ç¾¤å) |
| | | * |
| | | * @param phone 订å详æ
|
| | | * @param templateCode 模æ¿code |
| | | * @param templateParam 模æ¿åéjsonå符串 |
| | | * @return å¤çç»æ |
| | | */ |
| | | public static Boolean sendSms(String phone, String templateCode, String templateParam) { |
| | | try { |
| | | //设置è¶
æ¶æ¶é´-å¯èªè¡è°æ´ |
| | | System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); |
| | | System.setProperty("sun.net.client.defaultReadTimeout", "10000"); |
| | | //åå§åascClientéè¦çå ä¸ªåæ° |
| | | //çä¿¡API产ååç§°ï¼ç信产åååºå®ï¼æ éä¿®æ¹ï¼ |
| | | final String product = "Dysmsapi"; |
| | | //çä¿¡API产åååï¼æ¥å£å°ååºå®ï¼æ éä¿®æ¹ï¼ |
| | | final String domain = "dysmsapi.aliyuncs.com"; |
| | | //åå§åascClient,ææ¶ä¸æ¯æå¤regionï¼è¯·å¿ä¿®æ¹ï¼ |
| | | IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", ACCESS_KEY_ID, ACCESS_KEY_SECRET); |
| | | DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain); |
| | | IAcsClient acsClient = new DefaultAcsClient(profile); |
| | | //ç»è£
请æ±å¯¹è±¡ |
| | | SendSmsRequest request = new SendSmsRequest(); |
| | | //使ç¨postæäº¤ |
| | | request.setMethod(MethodType.POST); |
| | | //å¿
å¡«:å¾
åéææºå·ãæ¯æä»¥éå·åéçå½¢å¼è¿è¡æ¹éè°ç¨ï¼æ¹éä¸é为1000ä¸ªææºå·ç ,æ¹éè°ç¨ç¸å¯¹äºåæ¡è°ç¨åæ¶æ§ç¨æå»¶è¿,éªè¯ç ç±»åççä¿¡æ¨è使ç¨åæ¡è°ç¨çæ¹å¼ |
| | | request.setPhoneNumbers(phone); |
| | | //å¿
å¡«:çä¿¡ç¾å-å¯å¨çä¿¡æ§å¶å°ä¸æ¾å° |
| | | request.setSignName(SING_NAME); |
| | | //å¿
å¡«:ç信模æ¿-å¯å¨çä¿¡æ§å¶å°ä¸æ¾å° |
| | | request.setTemplateCode(templateCode); |
| | | //å¯é:模æ¿ä¸çåéæ¿æ¢JSON串,妿¨¡æ¿å
容为"亲ç±ç${name},æ¨çéªè¯ç 为${code}"æ¶,æ¤å¤çå¼ä¸º |
| | | //åæ
æç¤º:妿JSONä¸éè¦å¸¦æ¢è¡ç¬¦,请åç
§æ åçJSONå议对æ¢è¡ç¬¦çè¦æ±,æ¯å¦çä¿¡å
容ä¸å
å«\r\nçæ
åµå¨JSONä¸éè¦è¡¨ç¤ºæ\\r\\n,å¦åä¼å¯¼è´JSON卿å¡ç«¯è§£æå¤±è´¥ |
| | | request.setTemplateParam(templateParam); |
| | | //å¯é-ä¸è¡çä¿¡æ©å±ç (æ©å±ç åæ®µæ§å¶å¨7使以ä¸ï¼æ ç¹æ®éæ±ç¨æ·è¯·å¿½ç¥æ¤å段) |
| | | //dto.setSmsUpExtendCode("90997"); |
| | | //å¯é:outId为æä¾ç»ä¸å¡æ¹æ©å±å段,æç»å¨çä¿¡åæ§æ¶æ¯ä¸å°æ¤å¼å¸¦åç»è°ç¨è
|
| | | //dto.setOutId("yourOutId"); |
| | | //请æ±å¤±è´¥è¿é伿ClientExceptionå¼å¸¸ |
| | | SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request); |
| | | if (sendSmsResponse.getCode() != null && sendSmsResponse.getCode().equals("OK")) { |
| | | // logger.info(phone + "-" + templateCode + "-" + templateParam + " >>> " + JSON.toJSONString(sendSmsResponse)); |
| | | return true; |
| | | } else { |
| | | // logger.error(phone + "-" + templateCode + "-" + templateParam + " >>> " + JSON.toJSONString(sendSmsResponse)); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | // logger.error(e); |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | |
| | | // |
| | | void confirmUpd(ConfirmUpdOrderDTO confirmUpdOrderDTO); |
| | | |
| | | /** |
| | | * 订ååæ¶åç½®æç¤º |
| | | * @param orderId |
| | | * @param member |
| | | * @return |
| | | */ |
| | | String cancelTips(Integer orderId,Member member); |
| | | |
| | | void cancelOrder(Integer orderId,Member member); |
| | | |
| | | OrderReleaseVO doneOrder(DoneOrderDTO doneOrderDTO); |
| | |
| | | @Override |
| | | public List<Category> getCategoryList(Integer type){ |
| | | List<Category> categoryList = categoryMapper.selectList(new QueryWrapper<Category>().lambda().eq(Category::getDeleted,Constants.ZERO).eq(Category::getStatus,Constants.ZERO) |
| | | .eq(Objects.nonNull(type),Category::getType,type)); |
| | | .eq(Objects.nonNull(type),Category::getType,type) |
| | | .orderByAsc(Category::getSortnum) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(categoryList)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.CATEGORY_FILES).getCode(); |
| | |
| | | memberMapper.update(new UpdateWrapper<Member>().lambda() |
| | | .set(Member::getUpdateUser,user.getId()) |
| | | .set(Member::getUpdateTime,date) |
| | | .set(Constants.equalsInteger(auditDTO.getAuditStatus(),Constants.ZERO),Member::getAutoReceiveStatus,Constants.ONE) |
| | | .set(Constants.equalsInteger(identityInfo.getType(),Constants.ZERO),Member::getWorkerIdentity, auditDTO.getAuditStatus() ) |
| | | .set(Constants.equalsInteger(identityInfo.getType(),Constants.ONE),Member::getDriverIdentity , auditDTO.getAuditStatus() ) |
| | | .set(Constants.equalsInteger(identityInfo.getType(),Constants.TWO),Member::getChefIdentity , auditDTO.getAuditStatus() ) |
| | |
| | | .or().eq(Member::getDriverIdentity,Constants.TWO ); |
| | | }); |
| | | queryWrapper.lambda().ge(pageWrap.getModel().getStartTime()!=null, Member::getCreateTime,pageWrap.getModel().getStartTime()); |
| | | queryWrapper.lambda().ne(pageWrap.getModel().getEndTime()!=null,Member::getCreateTime,pageWrap.getModel().getEndTime()); |
| | | queryWrapper.lambda().le(pageWrap.getModel().getEndTime()!=null,Member::getCreateTime,pageWrap.getModel().getEndTime()); |
| | | |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | |
| | | |
| | | |
| | | /***************å°ç¨åºæ¥å£*************/ |
| | | |
| | | |
| | | |
| | | /** |
| | | * 微信å°ç¨åºç»å½ |
| | |
| | | member.setPublishNum(Constants.ZERO.longValue()); |
| | | member.setAutoReceiveStatus(Constants.ONE); |
| | | member.setUseIdentity(Constants.ZERO); |
| | | member.setOpenid(wxPhoneRequest.getOpenid()); |
| | | memberMapper.insert(member); |
| | | } |
| | | AccountResponse accountResponse = new AccountResponse(); |
| | |
| | | queryWrapper.eq(Objects.nonNull(model.getReleaseMemberId()),Orders::getReleaseMemberId, model.getReleaseMemberId()); |
| | | queryWrapper.eq(Objects.nonNull(model.getAcceptMemberId()),Orders::getAcceptMemberId, model.getAcceptMemberId()); |
| | | queryWrapper.eq(Objects.nonNull(model.getAcceptType()),Orders::getAcceptType, model.getAcceptType()); |
| | | queryWrapper.apply(org.apache.commons.lang3.StringUtils.isNotBlank(model.getReleaseName()),"m1.name", model.getReleaseName()); |
| | | queryWrapper.apply(org.apache.commons.lang3.StringUtils.isNotBlank(model.getReleaseName()),"m1.name like '%"+model.getReleaseName()+"%' or m1.TELEPHONE like '%"+model.getReleaseName()+"%' "); |
| | | queryWrapper.apply(org.apache.commons.lang3.StringUtils.isNotBlank(model.getAcceptName()),"( i.LINK_NAME like '%"+model.getAcceptName()+"%' or i.company_name like '%"+model.getAcceptName()+"%' or i.TELEPHONE like '%"+model.getAcceptName()+"%' ) "); |
| | | IPage<Orders> iPage = ordersMapper.selectJoinPage(page,Orders.class,queryWrapper); |
| | | for (Orders orders:iPage.getRecords()) { |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String cancelTips(Integer orderId,Member member){ |
| | | Orders orders = ordersMapper.selectById(orderId); |
| | | if(Objects.isNull(orders)||Constants.equalsInteger(orders.getDeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | Integer totalCancelTimes = Integer.valueOf(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.RELEASE_CANCEL_TIMES).getCode()); |
| | | Long cancelTimes = ordersMapper.selectCount(new QueryWrapper<Orders>().lambda() |
| | | .apply(" DATE(cancel_time) = DATE(NOW()) ") |
| | | .eq(Orders::getStatus,Constants.ordersStatus.cancel.getKey()) |
| | | .eq(Orders::getReleaseMemberId,member.getId())); |
| | | //æ¥è¯¢åæ¶æ¬¡æ° |
| | | if(totalCancelTimes<=cancelTimes){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"仿¥è®¢å主å¨åæ¶æ¬¡æ°å·²è¶
åº"+totalCancelTimes+"次,æ æ³åæ¶è®¢å,å¦éå¤ç请è系客æ"); |
| | | } |
| | | |
| | | Integer cancelTimeHour = Integer.valueOf(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.RELEASE_CANCEL_TIME).getCode()); |
| | | Long hours = DateUtil.getBetweenHours(new Date(),orders.getStartDate()); |
| | | if(hours < cancelTimeHour){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è·ç¦»è®¢åå¼å§æ¶é´ä¸è¶³"+cancelTimeHour+"å°æ¶,æ æ³åæ¶è®¢åï¼å¦éå¤ç请è系客æ"); |
| | | } |
| | | return "仿¥è¿å¯ä¸»å¨åæ¶"+(totalCancelTimes-cancelTimes)+"æ¬¡ï¼æ¯å¦ç¡®è®¤åæ¶"; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * ååæ¹åæ¶è®¢å |
| | |
| | | Constants.OrdersLog ordersLog = Constants.OrdersLog.RELEASE_CANCEL; |
| | | this.saveOrderLog(orders,ordersLog, |
| | | ordersLog.getInfo(),member.getId(),null); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | ########################微信æ¯ä»ç¸å
³é
ç½®######################## |
| | | wx: |
| | | pay: |
| | | #æå¡å---------start------- |
| | | appId: wx48fd8faa35cc8277 |
| | | mchId: 1661770902 |
| | | apiV3Key: iF3kC8pL8dZ9iU3hN5fX9zI6eF4xQ6fT |
| | | serialNumer: 368B835A194384FD583B83B77977B84127D2F655 |
| | | mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S |
| | | notifyUrl: http://xiaopiqiu2.natapp1.cc/web/wxPayNotify |
| | | refundNotifyUrl: http://xiaopiqiu2.natapp1.cc/web/wxRefundNotify |
| | | # notifyUrl: https://dmtest.ahapp.net/bike_h5_api/api/wxPayNotify |
| | | # refundNotifyUrl: https://dmtest.ahapp.net/bike_h5_api/api/wxRefundNotify |
| | | #keyPath: /usr/local/aliConfig/bike/apiclient_cert.p12 |
| | | #privateCertPath: /usr/local/aliConfig/bike/apiclient_cert.pem |
| | | #privateKeyPath: /usr/local/aliConfig/bike/apiclient_key.pem |
| | | keyPath: d://apiclient_cert.p12 |
| | | privateCertPath: d://apiclient_cert.pem |
| | | privateKeyPath: d://apiclient_key.pem |
| | | |
| | | |
| | | #åæ·ä¿¡æ¯ |
| | | wechatSerialNumer: 3C9A32FB6CD453FAAAF97F9737ECAEA9D6625727 |
| | | wechatPayPublicKeyId: 47E172124E73E8098A565E971064C20ACDE7C911 # PUB_KEY_ID_0116617720032025071800291849000801 #åæ·/平尿¯ä»å
¬é¥id |
| | | wechatPubKeyPath: d://pub_key.pem #åæ·æ¯ä»å
¬é¥ |
| | | #wechatPlatformPubKeyPath: d:/wechatpay_47E172124E73E8098A565E971064C20ACDE7C911.pem #平尿¯ä»å
¬é¥ |
| | | wechatPrivateKeyPath: d://wechatApiclient_key.pem #åæ·ç§é¥ |
| | | wechatNotifyUrl: http://xiaopiqiu2.natapp1.cc/web/wechat/transferNotify #åæ·è½¬è´¦åè°å°å |
| | | #wechatApiV3Key: V4PRKUBTK2BKNKJAD9NSI9YFG2Q0EOT1 #åæ·APIV3Key |
| | | |
| | | #æå¡å---------start------- åæ°è¯¦è§£å°å https://pay.weixin.qq.com/doc/v3/partner/4013080340 |
| | | mchId: 1700071922 #æå¡åå¨å¾®ä¿¡æ¯ä»ä¾§çå¯ä¸èº«ä»½æ è¯ |
| | | appId: wx332441ae5b12be7d #æå¡åå¨å¾®ä¿¡å¼æ¾å¹³å°ï¼ç§»å¨åºç¨ï¼æå
¬ä¼å¹³å°ï¼å
¬ä¼å·/å°ç¨åºï¼ä¸ç³è¯·çä¸ä¸ªå¯ä¸æ è¯ |
| | | apiV3Key: 0a056faa107c2b2944b9d6a9aa6d4142 #7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB |
| | | serialNumer: 7DCD480EB6DF3791721867A6EB57105DECEF38BE #38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #æå¡åè¯ä¹¦åºåå· |
| | | #mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S |
| | | notifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxPayNotify |
| | | refundNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxRefundNotify |
| | | keyPath: d://jinkuai/apiclient_cert.p12 |
| | | privateCertPath: d://jinkuai/apiclient_cert.pem |
| | | privateKeyPath: d://jinkuai/apiclient_key.pem |
| | | |
| | | #æå¡å-------------end--- |
| | | |
| | | #åæ·ä¿¡æ¯ |
| | | wechatSerialNumer: 38495CE0137D90E4DC4F64F7ECDE035A35470BE3 |
| | | wechatPayPublicKeyId: PUB_KEY_ID_0117233260692025072500181939000603 #åæ·/平尿¯ä»å
¬é¥id |
| | | wechatPubKeyPath: d://jinkuai/shanghu/pub_key.pem #åæ·æ¯ä»å
¬é¥ |
| | | wechatPrivateKeyPath: d://jinkuai/shanghu/apiclient_key.pem #åæ·ç§é¥ |
| | | wechatNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wechat/transferNotify #åæ·è½¬è´¦åè°å°å |
| | | |
| | | |
| | | existsSub: 1 |
| | | appSecret: 1ceb7c9dff3c4330d653adc3ca55ea24 |
| | | appSecret: |
| | | #ååæ·------------start---- |
| | | subAppId: wxcd2b89fd2ff065f8 #wxcd2b89fd2ff065f8 |
| | | subAppSecret: 3462fa186da7cb06c544df8d8664b63a #3336812504c830b1c3c5243f9ece407a |
| | | subMchId: 1661772003 |
| | | subMchKey: EVM8E15TKXE0OEMJFC0V6UFVIOZ5CSQS |
| | | subMchId: 1723326069 #ååæ·å· |
| | | subAppId: wx332441ae5b12be7d #å°ç¨åºid |
| | | subAppSecret: add86d6406f5c14501ac5bbb1a60e004 #å°ç¨åºç§é¥ |
| | | #ååæ·------------end---- |
| | | # mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM |
| | | typeId: gybike |
| | | |
| | | |
| | | #wx: |
| | | # pay: |
| | | # #æå¡å---------start------- |
| | | # appId: wx48fd8faa35cc8277 |
| | | # mchId: 1661770902 |
| | | # apiV3Key: iF3kC8pL8dZ9iU3hN5fX9zI6eF4xQ6fT |
| | | # serialNumer: 368B835A194384FD583B83B77977B84127D2F655 |
| | | # mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S |
| | | # notifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxPayNotify |
| | | # refundNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxRefundNotify |
| | | ## notifyUrl: https://dmtest.ahapp.net/bike_h5_api/api/wxPayNotify |
| | | ## refundNotifyUrl: https://dmtest.ahapp.net/bike_h5_api/api/wxRefundNotify |
| | | # #keyPath: /usr/local/aliConfig/bike/apiclient_cert.p12 |
| | | # #privateCertPath: /usr/local/aliConfig/bike/apiclient_cert.pem |
| | | # #privateKeyPath: /usr/local/aliConfig/bike/apiclient_key.pem |
| | | # keyPath: /usr/local/zhengshu/apiclient_cert.p12 #d://apiclient_cert.p12 |
| | | # privateCertPath: /usr/local/zhengshu/apiclient_cert.pem #d://apiclient_cert.pem |
| | | # privateKeyPath: /usr/local/zhengshu/apiclient_key.pem #d://apiclient_key.pem |
| | | # |
| | | # |
| | | # #åæ·ä¿¡æ¯ |
| | | # wechatSerialNumer: 3C9A32FB6CD453FAAAF97F9737ECAEA9D6625727 |
| | | # wechatPayPublicKeyId: 47E172124E73E8098A565E971064C20ACDE7C911 # PUB_KEY_ID_0116617720032025071800291849000801 #åæ·/平尿¯ä»å
¬é¥id |
| | | # wechatPubKeyPath: /usr/local/zhengshu/pub_key.pem #d://pub_key.pem #åæ·æ¯ä»å
¬é¥ |
| | | # #wechatPlatformPubKeyPath: d:/wechatpay_47E172124E73E8098A565E971064C20ACDE7C911.pem #平尿¯ä»å
¬é¥ |
| | | # wechatPrivateKeyPath: /usr/local/zhengshu/wechatApiclient_key.pem #d://wechatApiclient_key.pem #åæ·ç§é¥ |
| | | # wechatNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wechat/transferNotify #åæ·è½¬è´¦åè°å°å |
| | | # #wechatApiV3Key: V4PRKUBTK2BKNKJAD9NSI9YFG2Q0EOT1 #åæ·APIV3Key |
| | | # |
| | | # |
| | | # #æå¡å-------------end--- |
| | | # existsSub: 1 |
| | | # appSecret: 1ceb7c9dff3c4330d653adc3ca55ea24 |
| | | # #ååæ·------------start---- |
| | | # subAppId: wxcd2b89fd2ff065f8 #wxcd2b89fd2ff065f8 |
| | | # subAppSecret: 3462fa186da7cb06c544df8d8664b63a #3336812504c830b1c3c5243f9ece407a |
| | | # subMchId: 1661772003 |
| | | # subMchKey: EVM8E15TKXE0OEMJFC0V6UFVIOZ5CSQS |
| | | # #ååæ·------------end---- |
| | | # # mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM |
| | | # typeId: gybike |
| | | |
| | | upload: |
| | | type: ftp |
| | | |
| | |
| | | password: 111111 |
| | | |
| | | ########################微信æ¯ä»ç¸å
³é
ç½®######################## |
| | | |
| | | ########################微信æ¯ä»ç¸å
³é
ç½®######################## |
| | | wx: |
| | | pay: |
| | | #æå¡å---------start------- |
| | | appId: wx48fd8faa35cc8277 |
| | | mchId: 1661770902 |
| | | apiV3Key: iF3kC8pL8dZ9iU3hN5fX9zI6eF4xQ6fT |
| | | serialNumer: 368B835A194384FD583B83B77977B84127D2F655 |
| | | mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S |
| | | # notifyUrl: http://xiaopiqiu3.natapp1.cc/api/wxPayNotify |
| | | # refundNotifyUrl: http://xiaopiqiu3.natapp1.cc/api/wxRefundNotify |
| | | notifyUrl: https://dmtest.ahapp.net/bike_h5_api/api/wxPayNotify |
| | | refundNotifyUrl: https://dmtest.ahapp.net/bike_h5_api/api/wxRefundNotify |
| | | keyPath: /usr/local/aliConfig/bike/apiclient_cert.p12 |
| | | privateCertPath: /usr/local/aliConfig/bike/apiclient_cert.pem |
| | | privateKeyPath: /usr/local/aliConfig/bike/apiclient_key.pem |
| | | # keyPath: d://apiclient_cert.p12 |
| | | # privateCertPath: d://apiclient_cert.pem |
| | | # privateKeyPath: d://apiclient_key.pem |
| | | mchId: 1700071922 #æå¡ååæ·å· |
| | | appId: wx6cc1087ca79db7f6 #æå¡åAPPID |
| | | apiV3Key: 0a056faa107c2b2944b9d6a9aa6d4142 |
| | | serialNumer: 38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #æå¡åè¯ä¹¦åºåå· |
| | | #mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S |
| | | notifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxPayNotify |
| | | refundNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wxRefundNotify |
| | | keyPath: /usr/local/zhengshu/apiclient_cert.p12 |
| | | privateCertPath: /usr/local/zhengshu/apiclient_cert.pem |
| | | privateKeyPath: /usr/local/zhengshu/apiclient_key.pem |
| | | |
| | | #åæ·ä¿¡æ¯ |
| | | wechatSerialNumer: 12C0F0DD0F3D2B565B45586D3FEA225EBF723BEC |
| | | wechatPayPublicKeyId: PUB_KEY_ID_0117233260692025072500181939000603 #åæ·/平尿¯ä»å
¬é¥id |
| | | wechatPubKeyPath: /usr/local/zhengshu/pub_key.pem #åæ·æ¯ä»å
¬é¥ |
| | | wechatPrivateKeyPath: /usr/local/zhengshu/shanghu/apiclient_key.pem #åæ·ç§é¥ |
| | | wechatNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wechat/transferNotify #åæ·è½¬è´¦åè°å°å |
| | | |
| | | |
| | | #æå¡å-------------end--- |
| | | existsSub: 1 |
| | | appSecret: 1ceb7c9dff3c4330d653adc3ca55ea24 |
| | | appSecret: |
| | | #ååæ·------------start---- |
| | | subAppId: wxcd2b89fd2ff065f8 #wxcd2b89fd2ff065f8 |
| | | subAppSecret: 3462fa186da7cb06c544df8d8664b63a #3336812504c830b1c3c5243f9ece407a |
| | | subMchId: 1661772003 |
| | | subMchKey: EVM8E15TKXE0OEMJFC0V6UFVIOZ5CSQS |
| | | subAppId: wx332441ae5b12be7d #å°ç¨åºid |
| | | subAppSecret: add86d6406f5c14501ac5bbb1a60e004 #å°ç¨åºç§é¥ |
| | | subMchId: 1723326069 #ååæ·å· |
| | | #ååæ·------------end---- |
| | | # mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM |
| | | typeId: gybike |
| | |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "åæ¶åæç¤ºè¯ - ååæ¹", notes = "å°ç¨åºç«¯") |
| | | @GetMapping("/cancelTips") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse cancelTips(@RequestParam Integer orderId) { |
| | | ordersService.cancelTips(orderId,this.getMemberResponse()); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | |