소스 검색

爱贝源bug修改

wangxiaoming 7 년 전
부모
커밋
5e4cad273c

+ 13 - 13
iamberry-common-core/src/main/java/com/iamberry/wechat/tools/SendMessageUtil.java

@@ -91,9 +91,9 @@ public class SendMessageUtil {
 			case 9:  //9、发货后 提醒
 				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.order_send_success, date, url);
 				break;
-			case 10:  //10、退款申请通知
-				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.order_refund_msg, date, url);
-				break;
+//			case 10:  //10、退款申请通知
+//				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.order_refund_msg, date, url);
+//				break;
 			default:
 				break;
 			}
@@ -156,16 +156,16 @@ public class SendMessageUtil {
 	 * @param openId
 	 * @param url
 	 */
-	public void orderRefundMsg(String first,String keyword1,String keyword2,String keyword3,String remark,String openId,String url){
-		String temp = ResultInfo.ORDERREFUNDMSG;
-		temp = temp.replaceFirst("firstValueIamberry", first)
-				.replaceFirst("keyword1Value",keyword1)
-				.replaceFirst("keyword2Value",keyword2)
-				.replaceFirst("keyword3Value",keyword3)
-				.replaceFirst("colorValue","#1C86EE")
-				.replaceFirst("remarkValue",remark);
-		sendTemplateMessageToOpenid(temp, openId, url,10);
-	}
+//	public void orderRefundMsg(String first,String keyword1,String keyword2,String keyword3,String remark,String openId,String url){
+//		String temp = ResultInfo.ORDERREFUNDMSG;
+//		temp = temp.replaceFirst("firstValueIamberry", first)
+//				.replaceFirst("keyword1Value",keyword1)
+//				.replaceFirst("keyword2Value",keyword2)
+//				.replaceFirst("keyword3Value",keyword3)
+//				.replaceFirst("colorValue","#1C86EE")
+//				.replaceFirst("remarkValue",remark);
+//		sendTemplateMessageToOpenid(temp, openId, url,10);
+//	}
 
 	/**
 	 * 退货

+ 1 - 1
iamberry-common-tool/src/main/java/com/iamberry/wechat/tools/ResultInfo.java

@@ -116,7 +116,7 @@ public class ResultInfo {
 	public static String SENDSUCCESS= "{'first':{'color':'#173177','value':'firstValueIamberry'}, 'keyword1':{'color':'#173177','value':'keyword1Value'}, 'keyword2':{'color':'#173177', 'value':'keyword2Value'}, 'keyword3':{'color':'#173177', 'value':'keyword3Value'}, 'keyword4':{'color':'#173177', 'value':'keyword4Value'},'remark':{'color':'colorValue','value':'remarkValue'}}";
 
 	/** 退款申请通知 **/
-	public static String ORDERREFUNDMSG= "{'first':{'color':'#173177','value':'firstValueIamberry'}, 'keyword1':{'color':'#173177','value':'keyword1Value'}, 'keyword2':{'color':'#173177', 'value':'keyword2Value'}, 'keyword3':{'color':'#173177', 'value':'keyword3Value'},'remark':{'color':'colorValue','value':'remarkValue'}}";
+	//public static String ORDERREFUNDMSG= "{'first':{'color':'#173177','value':'firstValueIamberry'}, 'keyword1':{'color':'#173177','value':'keyword1Value'}, 'keyword2':{'color':'#173177', 'value':'keyword2Value'}, 'keyword3':{'color':'#173177', 'value':'keyword3Value'},'remark':{'color':'colorValue','value':'remarkValue'}}";
 
 	//微信模板消息提示语
 	public static final String REWARDSWILLMESSAGE = "尊敬的客户您好~您有新的返现即将入账~";

+ 1 - 1
iamberry-wechat-service/src/main/java/com/iamberry/wechat/service/cart/CartServiceImpl.java

@@ -423,7 +423,7 @@ public class CartServiceImpl implements CartService {
 									orderId,
 									itemList.get(0).getItemProductName(),
 									productNum+"件",
-									order2.getSalesReturnDes(),
+									payMoney,
 									ResultInfo.returnRemark,
 									order2.getSalesOpenid(),
 									ResultInfo.ORDER_DETAIL+orderId

+ 3 - 2
iamberry-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/cartMapper.xml

@@ -40,7 +40,7 @@ PUBLIC
 		<result column="product_status" property="productStatus"/>
 		<result column="color_status" property="colorStatus"/>
 		<result column="color_name" property="productColor"/>
-		<result column="product_introduce_img" property="productIntroduceImg"/>
+		<result column="color_product_pic" property="productIntroduceImg"/>
 		<result column="product_remark" property="productRemark"/>
 		<result column="color_id" property="cartColorId"/>
 		<collection property="salesUserGiftList" column="color_id" ofType="SalesUserGift" select="listGift"/>
@@ -310,7 +310,8 @@ PUBLIC
 		SELECT
 			C.CART_ID cartId, G.PRODUCT_ID cartProductId, pc.COLOR_ID cartColorId, G.PRODUCT_STATUS productStatus,
 			C.CART_NUM cartNum, G.PRODUCT_NAME productName, pc.COLOR_DISCOUNT productPrice,
-			G.PRODUCT_INTRODUCE_IMG productIntroduceImg, pc.COLOR_PRICE productDiscount, PC.COLOR_69CODE productRemark,
+			PC.color_product_pic productIntroduceImg,
+			pc.COLOR_PRICE productDiscount, PC.COLOR_69CODE productRemark,
 			pc.COLOR_NAME productColor, G.PRODUCT_CHILD_TYPE productChildType, G.PRODUCT_TYPE productType,C.cart_is_source cartIsSource
 		FROM
 			TB_IAMBERRY_SHOP_CART C

+ 29 - 5
iamberry-wechat-web/src/main/java/com/iamberry/wechat/handles/admin/AdminOrderHandlers.java

@@ -435,11 +435,21 @@ public class AdminOrderHandlers {
 						DecimalFormat df=new DecimalFormat("0.00");
 						String payMoney = df.format((float)currentOrder.getSalesYetAmount()/100) + "元";
 						try {
-							sendMessageUtil.orderRefundMsg(
+//							sendMessageUtil.orderRefundMsg(
+//									"尊敬的用户,您的退款申请被退回",
+//									payMoney,
+//									itemList.get(0).getItemProductName(),
+//									order.getSalesOrderid(),
+//									ResultInfo.refundRejectRemark + ResultInfo.sendRemark1,
+//									currentOrder.getSalesOpenid(),
+//									ResultInfo.ORDER_DETAIL+order.getSalesOrderid()
+//							);
+							sendMessageUtil.orderApplyRefund(
 									"尊敬的用户,您的退款申请被退回",
 									payMoney,
 									itemList.get(0).getItemProductName(),
 									order.getSalesOrderid(),
+									currentOrder.getSalesReturnDes(),	//退款备注salesReturnDes
 									ResultInfo.refundRejectRemark + ResultInfo.sendRemark1,
 									currentOrder.getSalesOpenid(),
 									ResultInfo.ORDER_DETAIL+order.getSalesOrderid()
@@ -472,11 +482,21 @@ public class AdminOrderHandlers {
 						DecimalFormat df=new DecimalFormat("0.00");
 						String payMoney = df.format((float)currentOrder.getSalesYetAmount()/100) + "元";
 						try {
-							sendMessageUtil.orderRefundMsg(
+//							sendMessageUtil.orderRefundMsg(
+//									"尊敬的用户,您的退款申请已通过",
+//									payMoney,
+//									itemList.get(0).getItemProductName(),
+//									order.getSalesOrderid(),
+//									ResultInfo.refundAgreeRemark + ResultInfo.sendRemark1,
+//									currentOrder.getSalesOpenid(),
+//									ResultInfo.ORDER_DETAIL+order.getSalesOrderid()
+//							);
+							sendMessageUtil.orderApplyRefund(
 									"尊敬的用户,您的退款申请已通过",
 									payMoney,
 									itemList.get(0).getItemProductName(),
 									order.getSalesOrderid(),
+									currentOrder.getSalesReturnDes(),	//退款备注salesReturnDes
 									ResultInfo.refundAgreeRemark + ResultInfo.sendRemark1,
 									currentOrder.getSalesOpenid(),
 									ResultInfo.ORDER_DETAIL+order.getSalesOrderid()
@@ -515,6 +535,10 @@ public class AdminOrderHandlers {
 				}
 				// 执行修改操作
 				order.setSalesStatus(orderUtil.getOrderStatusByStr(actionDto.getToOrderStatus()));
+
+				DecimalFormat df=new DecimalFormat("0.00");
+				String payMoney = df.format((float)currentOrder.getSalesYetAmount()/100) + "元";
+
 				if (adminOrderService.updateOrderStatusByOrderId(order)) {
 					if(orderUtil.orderStatusIntToOrderStatusString(7).equals(actionDto.getToOrderStatus())){
 						mv.addObject("msgObj", new MessageDto(true, "订单申请退货成功", "恭喜您!同意订单:" + orderId + "退货,等待收到货物后确认退货!"));
@@ -528,7 +552,7 @@ public class AdminOrderHandlers {
 								orderId,
 								itemList.get(0).getItemProductName(),
 								productNum+"件",
-								currentOrder.getSalesReturnDes(),
+								payMoney,
 								ResultInfo.returnAgreeRemark,
 								currentOrder.getSalesOpenid(),
 								ResultInfo.ORDER_DETAIL+orderId
@@ -545,7 +569,7 @@ public class AdminOrderHandlers {
 								orderId,
 								itemList.get(0).getItemProductName(),
 								productNum+"件",
-								currentOrder.getSalesReturnDes(),
+								payMoney,
 								ResultInfo.returnRejectRemark,
 								currentOrder.getSalesOpenid(),
 								ResultInfo.ORDER_DETAIL+orderId
@@ -719,7 +743,7 @@ public class AdminOrderHandlers {
 						mv.addObject("msgObj", new MessageDto(true, "同意换货成功", "恭喜您!同意订单:" + orderId + "换货,请收货后录入物流信息并同意换货!"));
 						try {
 							sendMessageUtil.orderApplyBarter(
-									"尊敬的用户,您的退货申请已通过。",
+									"尊敬的用户,您的货申请已通过。",
 									orderId,
 									itemList.get(0).getItemProductName(),
 									ResultInfo.exchangeAgreeRemark,