|
|
|
@@ -35,6 +35,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
@@ -45,6 +46,8 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe |
|
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
|
|
|
|
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DDTHH:mm:ss+TIMEZONE"); |
|
|
|
|
|
|
|
private final String WX_CIRCLE_KEY = "CIRCLE:WX:"; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@@ -405,7 +408,6 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe |
|
|
|
request.setAppid(wxPayService.getConfig().getAppId()); |
|
|
|
request.setOpenid(record.getOpenid()); |
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'+'mm:ss", Locale.CHINA); |
|
|
|
if(record.getIncreasedPoints() != null && record.getIncreasedPoints() > 0 ){ |
|
|
|
request.setEarnPoints(true); |
|
|
|
request.setIncreasedPoints(record.getIncreasedPoints()); |
|
|
|
@@ -482,15 +484,17 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe |
|
|
|
updCuser.updateTenantInfo(tenantEntity); |
|
|
|
updCuser.setOpenId(authorizations.getOpenid()); |
|
|
|
updCuser.setAuthorizeState(authorizeState.getCode()); |
|
|
|
String formaStr = "yyyy-MM-dd'T'HH:mm:ss'+'mm:ss"; |
|
|
|
updCuser.setAuthorizeTime(DateUtils.stringToDate(authorizations.getAuthorizeTime(),formaStr)); |
|
|
|
updCuser.setDeauthorizeTime(DateUtils.stringToDate(authorizations.getDeauthorizeTime(),formaStr)); |
|
|
|
updCuser.setAuthorizeTime(sdf.parse(authorizations.getAuthorizeTime())); |
|
|
|
updCuser.setDeauthorizeTime(sdf.parse(authorizations.getDeauthorizeTime())); |
|
|
|
wxCUserService.updateAuthorizeStateByOpenId(updCuser); |
|
|
|
} |
|
|
|
return new ResultData(authorizeState); |
|
|
|
} catch (WxPayException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(),e.getMessage()); |
|
|
|
} catch (ParseException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
return new ResultData(ErrorCode.SYS_CLASSCAST_ERROR.getCode(),"时间转换异常"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -538,8 +542,7 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe |
|
|
|
request.setOpenid(openId); |
|
|
|
request.setPlateNumber(plate_number); |
|
|
|
request.setState(state); |
|
|
|
String formaStr = "yyyy-MM-dd'T'HH:mm:ss'+'mm:ss"; |
|
|
|
request.setTime(DateUtils.date2String(time,formaStr)); |
|
|
|
request.setTime(sdf.format(time)); |
|
|
|
|
|
|
|
wxPayService.getBusinessCircleService().notifyParkings(request); |
|
|
|
return new ResultData(); |
|
|
|
|