mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 10:38:42 +08:00 
			
		
		
		
	🎨 优化代码
This commit is contained in:
		| @ -16,7 +16,7 @@ import java.io.IOException; | ||||
| public abstract class QrcodeRequestExecutor<H, P> implements RequestExecutor<File, AbstractWxMaQrcodeWrapper> { | ||||
|   protected RequestHttp<H, P> requestHttp; | ||||
|  | ||||
|   public QrcodeRequestExecutor(RequestHttp<H, P> requestHttp) { | ||||
|   protected QrcodeRequestExecutor(RequestHttp<H, P> requestHttp) { | ||||
|     this.requestHttp = requestHttp; | ||||
|   } | ||||
|  | ||||
| @ -30,10 +30,9 @@ public abstract class QrcodeRequestExecutor<H, P> implements RequestExecutor<Fil | ||||
|     switch (requestHttp.getRequestType()) { | ||||
|       case APACHE_HTTP: | ||||
|         return new ApacheQrcodeFileRequestExecutor(requestHttp, path); | ||||
|       case JODD_HTTP: | ||||
|         return null; | ||||
|       case OK_HTTP: | ||||
|         return new OkHttpQrcodeFileRequestExecutor(requestHttp, path); | ||||
|       case JODD_HTTP: | ||||
|       default: | ||||
|         return null; | ||||
|     } | ||||
|  | ||||
| @ -35,13 +35,13 @@ public class WxMaLiveGoodsServiceImplTest { | ||||
|     WxMaLiveGoodInfo goods = new WxMaLiveGoodInfo(); | ||||
|     goods.setCoverImgUrl(mediaUpload.getMediaId()); | ||||
|     goods.setName("宫廷奢华真丝四件套"); | ||||
|     goods.setPrice(new BigDecimal("1599")); | ||||
|     goods.setPrice2(new BigDecimal("0")); | ||||
|     goods.setPrice(BigDecimal.valueOf(1599)); | ||||
|     goods.setPrice2(BigDecimal.ZERO); | ||||
|     goods.setPriceType(1); | ||||
|     goods.setUrl("pages/goods/goods?id=b7c4fbf95493bd294054fe4296d0d9ad"); | ||||
|     WxMaLiveResult liveResult = this.wxService.getLiveGoodsService().addGoods(goods); | ||||
|     assertNotNull(liveResult); | ||||
|     System.out.println(liveResult.toString()); | ||||
|     System.out.println(liveResult); | ||||
|   } | ||||
|  | ||||
|   @Test | ||||
| @ -69,8 +69,8 @@ public class WxMaLiveGoodsServiceImplTest { | ||||
|     goods.setGoodsId(8); | ||||
|     goods.setName("宫廷奢华真丝四件套"); | ||||
|     goods.setCoverImgUrl("http://mmbiz.qpic.cn/mmbiz_png/omYktZNGamuUQE0WPVfqdnLV61JDhluXOac7PiaoZeticFpcR7wvicC0aXUC2VXkl7r1gN0QSKosv2satn6oCFeiaQ/0"); | ||||
|     goods.setPrice(new BigDecimal("2299")); | ||||
|     goods.setPrice2(new BigDecimal("0")); | ||||
|     goods.setPrice(BigDecimal.valueOf(2299)); | ||||
|     goods.setPrice2(BigDecimal.ZERO); | ||||
|     goods.setPriceType(1); | ||||
|     goods.setUrl("pages/goods/goods?id=b7c4fbf95493bd294054fe4296d0d9ad"); | ||||
|     boolean maLiveInfo = this.wxService.getLiveGoodsService().updateGoods(goods); | ||||
| @ -81,13 +81,13 @@ public class WxMaLiveGoodsServiceImplTest { | ||||
|   public void getGoodsWareHouse() throws Exception { | ||||
|     WxMaLiveResult liveResult = this.wxService.getLiveGoodsService().getGoodsWareHouse(Arrays.asList(1, 2)); | ||||
|     assertNotNull(liveResult); | ||||
|     System.out.println(liveResult.toString()); | ||||
|     System.out.println(liveResult); | ||||
|   } | ||||
|  | ||||
|   @Test | ||||
|   public void getApprovedGoods() throws Exception { | ||||
|     WxMaLiveResult liveResult = this.wxService.getLiveGoodsService().getApprovedGoods(0, 4, 2); | ||||
|     assertNotNull(liveResult); | ||||
|     System.out.println(liveResult.toString()); | ||||
|     System.out.println(liveResult); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -70,7 +70,7 @@ public interface WxMpService extends WxService { | ||||
|    * | ||||
|    * @return token access token | ||||
|    * @throws WxErrorException . | ||||
|    * @see #getAccessToken(boolean) #getAccessToken(boolean) | ||||
|    * @see #getAccessToken(boolean) #getAccessToken(boolean)#getAccessToken(boolean) | ||||
|    */ | ||||
|   String getAccessToken() throws WxErrorException; | ||||
|  | ||||
| @ -98,7 +98,7 @@ public interface WxMpService extends WxService { | ||||
|    * @param type ticket 类型 | ||||
|    * @return ticket ticket | ||||
|    * @throws WxErrorException . | ||||
|    * @see #getTicket(TicketType, boolean) #getTicket(TicketType, boolean) | ||||
|    * @see #getTicket(TicketType, boolean) #getTicket(TicketType, boolean)#getTicket(TicketType, boolean) | ||||
|    */ | ||||
|   String getTicket(TicketType type) throws WxErrorException; | ||||
|  | ||||
| @ -120,7 +120,7 @@ public interface WxMpService extends WxService { | ||||
|    * | ||||
|    * @return jsapi ticket | ||||
|    * @throws WxErrorException . | ||||
|    * @see #getJsapiTicket(boolean) #getJsapiTicket(boolean) | ||||
|    * @see #getJsapiTicket(boolean) #getJsapiTicket(boolean)#getJsapiTicket(boolean) | ||||
|    */ | ||||
|   String getJsapiTicket() throws WxErrorException; | ||||
|  | ||||
| @ -563,7 +563,7 @@ public interface WxMpService extends WxService { | ||||
|   /** | ||||
|    * 返回电子发票报销方相关接口 | ||||
|    * | ||||
|    * @return WxMpReimburseInvoiceService | ||||
|    * @return WxMpReimburseInvoiceService reimburse invoice service | ||||
|    */ | ||||
|   WxMpReimburseInvoiceService getReimburseInvoiceService(); | ||||
|  | ||||
| @ -804,4 +804,18 @@ public interface WxMpService extends WxService { | ||||
|    * @param guideMassedJobService the guide service | ||||
|    */ | ||||
|   void setGuideMassedJobService(WxMpGuideMassedJobService guideMassedJobService); | ||||
|  | ||||
|   /** | ||||
|    * Gets merchant invoice service. | ||||
|    * | ||||
|    * @return the merchant invoice service | ||||
|    */ | ||||
|   WxMpMerchantInvoiceService getMerchantInvoiceService(); | ||||
|  | ||||
|   /** | ||||
|    * Sets merchant invoice service. | ||||
|    * | ||||
|    * @param merchantInvoiceService the merchant invoice service | ||||
|    */ | ||||
|   void setMerchantInvoiceService(WxMpMerchantInvoiceService merchantInvoiceService); | ||||
| } | ||||
|  | ||||
| @ -101,7 +101,7 @@ public class WxPayUnifiedOrderV3Result implements Serializable { | ||||
|     private String sign; | ||||
|  | ||||
|     private String getSignStr() { | ||||
|       return String.format("%s\n%s\n%s\n%s\n", appid, timestamp, noncestr, prepayid); | ||||
|       return String.format("%s\n%s\n%s\n%s\n", appid, timestamp, noncestr, prepayId); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Binary Wang
					Binary Wang