修复二维码健身房参数问题
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.sv.service.oms;
|
package com.sv.service.oms;
|
||||||
|
|
||||||
|
import com.enums.VenueTypeEnum;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.sv.dto.oms.VenueOmsDTO;
|
import com.sv.dto.oms.VenueOmsDTO;
|
||||||
import com.sv.entity.Platform;
|
import com.sv.entity.Platform;
|
||||||
@@ -195,8 +196,14 @@ public class VenueService extends BaseServiceImpl {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void generateCodeUrl(Integer venueId) {
|
public void generateCodeUrl(Integer venueId) {
|
||||||
Venue venue = findById(venueId);
|
Venue venue = findById(venueId);
|
||||||
|
Integer venueType = venue.getType();
|
||||||
Platform platform = platformService.findById(1);
|
Platform platform = platformService.findById(1);
|
||||||
InputStream inputStream = WxXCXService.getNewInstance(platform.getAppId(), platform.getSecret(), "wx_xcx_token", cacheService).getXCXQrCode("pages/basketballGym/index", venueId.toString(), "1280");
|
InputStream inputStream = null;
|
||||||
|
if (venueType.equals(VenueTypeEnum.BASKETBALL.value)){
|
||||||
|
inputStream = WxXCXService.getNewInstance(platform.getAppId(), platform.getSecret(), "wx_xcx_token", cacheService).getXCXQrCode("pages/basketballGym/index", venueId.toString(), "1280");
|
||||||
|
}else {
|
||||||
|
inputStream = WxXCXService.getNewInstance(platform.getAppId(), platform.getSecret(), "wx_xcx_token", cacheService).getXCXQrCode("pages/gymnasium/index", venueId.toString(), "1280");
|
||||||
|
}
|
||||||
String url = ossClientUtil.uploadImg(inputStream, "qrcode.png");
|
String url = ossClientUtil.uploadImg(inputStream, "qrcode.png");
|
||||||
venue.setCodeUrl(url);
|
venue.setCodeUrl(url);
|
||||||
venueMapper.update(venue);
|
venueMapper.update(venue);
|
||||||
|
|||||||
Reference in New Issue
Block a user