|
|
@ -232,7 +232,9 @@ public class ClockService implements IClockService { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public String getQRCode(QueryDto<JourneyDto.CreateQRCode> params) throws Exception { |
|
|
|
public ClockVo.SiteList getQRCode(QueryDto<JourneyDto.CreateQRCode> params) throws Exception { |
|
|
|
ClockVo.SiteList siteVo = new ClockVo.SiteList(); |
|
|
|
|
|
|
|
String qrcodePath = null; |
|
|
|
JourneyDto.CreateQRCode createQRCode = params.getParam(); |
|
|
|
//根据id查找场馆信息
|
|
|
@ -266,8 +268,31 @@ public class ClockService implements IClockService { |
|
|
|
//添加数据库
|
|
|
|
siteQrcodeDao.insertSelective(siteQrcode); |
|
|
|
} |
|
|
|
//返回的信息
|
|
|
|
siteVo.setId(site.getId()); |
|
|
|
siteVo.setSiteName(site.getSiteName()); |
|
|
|
siteVo.setSiteCode(site.getSiteCode()); |
|
|
|
siteVo.setLongitude(site.getLongitude()); |
|
|
|
siteVo.setLatitude(site.getLatitude()); |
|
|
|
//二维码
|
|
|
|
int a = createQRCode.getType() == 0 ? 1 : 0; |
|
|
|
SiteQrcodeExample url = new SiteQrcodeExample(); |
|
|
|
url.createCriteria().andSiteIdEqualTo(createQRCode.getId()) |
|
|
|
.andOutOrInEqualTo((byte) a); |
|
|
|
List<SiteQrcode> siteQrcodes = siteQrcodeDao.selectByExample(url); |
|
|
|
if(a == 0){ |
|
|
|
siteVo.setOutUrl(qrcodePath); |
|
|
|
if(CollectionUtil.isNotEmpty(siteQrcodes)){ |
|
|
|
siteVo.setInUrl(siteQrcodes.get(0).getQrcodePath()); |
|
|
|
} |
|
|
|
}else { |
|
|
|
siteVo.setInUrl(qrcodePath); |
|
|
|
if(CollectionUtil.isNotEmpty(siteQrcodes)){ |
|
|
|
siteVo.setOutUrl(siteQrcodes.get(0).getQrcodePath()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return qrcodePath; |
|
|
|
return siteVo; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|