old mode 100644
new mode 100755
| | |
| | | package com.java110.common.thread; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.smo.common.IApplicationKeyInnerServiceSMO; |
| | | import com.java110.intf.common.IApplicationKeyInnerServiceSMO; |
| | | import com.java110.dto.machine.ApplicationKeyDto; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.factory.ApplicationContextFactory; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | |
| | | applicationKeyDto.setEndTime(DateUtil.getFormatTimeString(new Date(), DateUtil.DATE_FORMATE_STRING_A)); |
| | | //查询订单信息 |
| | | List<ApplicationKeyDto> applicationKeyDtos = applicationKeyInnerServiceSMOImpl.queryApplicationKeys(applicationKeyDto); |
| | | String url = ServiceConstant.SERVICE_API_URL + "/api/applicationKey.updateApplicationKey"; |
| | | String url = "applicationKey.updateApplicationKey"; |
| | | for (ApplicationKeyDto tmpApplicationKeyDto : applicationKeyDtos) { |
| | | try { |
| | | logger.debug("开始处理订单" + JSONObject.toJSONString(tmpApplicationKeyDto)); |
| | |
| | | responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); |
| | | } finally { |
| | | logger.debug("请求地址为,{} 请求中心服务信息,{},中心服务返回信息,{}", url, httpEntity, responseEntity); |
| | | return responseEntity; |
| | | } |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | /** |
| | |
| | | Random random = new Random(); |
| | | String result = ""; |
| | | for (int i = 0; i < 6; i++) { |
| | | result += random.nextInt(10); |
| | | result += (random.nextInt(9) + 1);; |
| | | } |
| | | return result; |
| | | } |
| | |
| | | return calendar.get(Calendar.DAY_OF_MONTH) == 1; |
| | | } |
| | | |
| | | public static void main(String[]args){ |
| | | String a="?"; |
| | | String value = "'${nextUserId}'"; |
| | | if(value.contains("${")){ |
| | | value = value.replace("${","\\${"); |
| | | } |
| | | System.out.println(a.replaceFirst("\\?",value)); |
| | | } |
| | | } |