| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | import com.panzhihua.service_community.service.RentingHourseFileService; |
| | | import com.panzhihua.service_community.service.RentingHourseRegisterService; |
| | | import com.panzhihua.service_community.util.NearbyUtil; |
| | | import com.panzhihua.service_community.util.QRCodeUtil; |
| | | import com.panzhihua.service_community.util.WxMaConfiguration; |
| | | import com.spatial4j.core.shape.Rectangle; |
| | | |
| | |
| | | @Service |
| | | public class RentingHourseRegisterServiceImpl extends ServiceImpl<RentingHourseRegisterDao, RentingHourseRegister> implements RentingHourseRegisterService { |
| | | |
| | | private static final String HOUSE_DETAIL_PAGE = "packageB/pages/house/houseDetails/houseDetails"; |
| | | |
| | | @Resource |
| | | private ComActVillageDAO comActVillageDAO; |
| | | @Resource |
| | |
| | | private RentingHourseContractConfigDao rentingHourseContractConfigDao; |
| | | @Resource |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | |
| | | @Value("${rentinghouse.min-app.jump-page}") |
| | | private String minAppJumpPage; |
| | | |
| | | /** |
| | | * 新增房源信息 |
| | |
| | | try { |
| | | WxMaQrcodeService qrCodeService = wxMaConfiguration.getMaService().getQrcodeService(); |
| | | byte[] bytes = qrCodeService.createWxaCodeUnlimitBytes("id=" + houseRegister.getId() + "&type=6", |
| | | HOUSE_DETAIL_PAGE, 30, true, null, false); |
| | | minAppJumpPage, 30, true, null, false); |
| | | String authCode = String.format("data:image/png;base64,%s", Base64.encode(bytes)); |
| | | houseRegister.setAuthCode(authCode); |
| | | } catch (WxErrorException e) { |
| | |
| | | try { |
| | | WxMaQrcodeService qrCodeService = wxMaConfiguration.getMaService().getQrcodeService(); |
| | | byte[] bytes = qrCodeService.createWxaCodeUnlimitBytes("id=" + houseRegister.getId() + "&type=6", |
| | | HOUSE_DETAIL_PAGE, 30, true, null, false); |
| | | minAppJumpPage, 30, true, null, false); |
| | | String authCode = String.format("data:image/png;base64,%s", Base64.encode(bytes)); |
| | | houseRegister.setAuthCode(authCode); |
| | | } catch (WxErrorException e) { |