| @@ -269,6 +269,22 @@ public class BaseController { | |||||
| return null; | return null; | ||||
| } | } | ||||
| public int syncBasicInfoCity(WxCUserBasicInfo basicInfo,String city){ | |||||
| if(basicInfo == null || StringUtils.isBlank(city)){ | |||||
| return 0; | |||||
| } | |||||
| if(city.equals(basicInfo.getLocateCity())){ | |||||
| return 0; | |||||
| } | |||||
| WxCUserBasicInfo record = new WxCUserBasicInfo(); | |||||
| record.setId(basicInfo.getId()); | |||||
| record.setFinalTenantId(basicInfo.getFinalTenantId()); | |||||
| record.setLocateCity(city); | |||||
| wxCUserBasicInfoService.update(record); | |||||
| removeCacheMember(basicInfo.getId()); | |||||
| return 1; | |||||
| } | |||||
| public String getIpAddr() { | public String getIpAddr() { | ||||
| HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | ||||
| String ipaddress = IPUtil.getIpAddr(request); | String ipaddress = IPUtil.getIpAddr(request); | ||||
| @@ -334,6 +334,18 @@ public class WxUserGrantController extends BaseController { | |||||
| if (!StringUtils.isBlank(city)) | if (!StringUtils.isBlank(city)) | ||||
| user.setLocateCity(city); | user.setLocateCity(city); | ||||
| cuserFactory.getCUserService(user.getAppPlat()).updateLBS(user); | cuserFactory.getCUserService(user.getAppPlat()).updateLBS(user); | ||||
| if(StringUtils.isNotBlank(city)){ | |||||
| try { | |||||
| int i = syncBasicInfoCity(getCacheMember(),city); | |||||
| if(i > 0){ | |||||
| //todo同步猫酷 | |||||
| } | |||||
| }catch(Exception e){} | |||||
| } | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -698,7 +710,6 @@ public class WxUserGrantController extends BaseController { | |||||
| record.setWeight(wxCUserBasicInfo.getWeight()); | record.setWeight(wxCUserBasicInfo.getWeight()); | ||||
| record.setHeight(wxCUserBasicInfo.getHeight()); | record.setHeight(wxCUserBasicInfo.getHeight()); | ||||
| record.setAddress(wxCUserBasicInfo.getAddress()); | record.setAddress(wxCUserBasicInfo.getAddress()); | ||||
| record.setUpdateDate(new Date()); | |||||
| record.setFinalTenantId(tenantEntity.getFinalTenantId()); | record.setFinalTenantId(tenantEntity.getFinalTenantId()); | ||||
| wxCUserBasicInfoService.update(record); | wxCUserBasicInfoService.update(record); | ||||
| @@ -796,4 +807,5 @@ public class WxUserGrantController extends BaseController { | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -784,6 +784,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
| @Override | @Override | ||||
| public void update(WxCUserBasicInfo record) { | public void update(WxCUserBasicInfo record) { | ||||
| record.setUpdateDate(new Date()); | |||||
| wxCUserBasicInfoMapper.updateById(record); | wxCUserBasicInfoMapper.updateById(record); | ||||
| } | } | ||||