Browse Source

处理站内信的bug及禅道中的bug

yujia 7 years ago
parent
commit
4bbb69518e

+ 1 - 4
src/main/java/com/uas/platform/b2c/advertise/ad/service/impl/RecommendProductServiceImpl.java

@@ -90,10 +90,6 @@ public class RecommendProductServiceImpl implements RecommendProductService {
 			productList = Collections.emptyList();
 		}
 
-		if (StringUtils.isEmpty(uuid)) {
-			return Collections.emptyList();
-		}
-
 		List<RecommendProduct> products = recommendProductDao.findByStoreUuidOrderByOrderAsc(uuid);
 		if (!CollectionUtils.isEmpty(products)) {
 			recommendProductDao.delete(products);
@@ -111,6 +107,7 @@ public class RecommendProductServiceImpl implements RecommendProductService {
 			recommendProduct.setStoreUuid(uuid);
 			recommendProduct.setCreateTime(nowDate);
 			recommendProduct.setUpdateTime(nowDate);
+			list.add(recommendProduct);
 		}
 		List<RecommendProduct> recommendProducts = recommendProductDao.save(list);
 

+ 12 - 0
src/main/java/com/uas/platform/b2c/common/psmessage/model/OrderCompleteInfo.java

@@ -21,6 +21,9 @@ public class OrderCompleteInfo implements Serializable {
     @Column(name = "order_id")
     private String orderId;
 
+    @Column(name = "remark")
+    private String remark;
+
     public Long getId() {
         return id;
     }
@@ -39,6 +42,15 @@ public class OrderCompleteInfo implements Serializable {
         return this;
     }
 
+    public String getRemark() {
+        return remark;
+    }
+
+    public OrderCompleteInfo setRemark(String remark) {
+        this.remark = remark;
+        return this;
+    }
+
     @Override
     public String toString() {
         return "OrderCompleteInfo{" +

+ 1 - 1
src/main/java/com/uas/platform/b2c/common/psmessage/service/MessageService.java

@@ -47,7 +47,7 @@ public interface MessageService {
      * @param smsType
      * @return
      */
-    MessageModel initMessage(String content, String type, Long receiverUu, Long receiverEnuu, String consumerType,String consumerApp, String smsType, Long... args);
+    MessageModel initMessage(String content, String type, Long receiverUu, Long receiverEnuu, String consumerType,String consumerApp, String smsType, String remark, Long... args);
 
 
     /**

+ 1 - 2
src/main/java/com/uas/platform/b2c/common/psmessage/task/MessageTask.java

@@ -54,7 +54,6 @@ public class MessageTask {
      * 根据订单信息获取
      */
     public void sendMessage() {
-        System.err.println("ok");
         List<OrderCompleteInfo> completeInfos = completeInfoDao.findAll();
         List<MessageNotifyPersonalManagement> managements = messageNotifyPersonalManagementService.findNotifyPersonalEnuuAndType(sysConf.getEnUU(), MessageType.APPLY_PAID.getType());
         List<MessageModel> sendMessageList = new ArrayList<>();
@@ -75,7 +74,7 @@ public class MessageTask {
                             for (String userUu : userUus) {
                                 try {
                                     Long useruu = Long.valueOf(userUu);
-                                    MessageModel model = messageService.initMessage(String.format(StringFormat.APPLYPAID, orderId), MessageType.APPLY_PAID.getType(), useruu, sysConf.getEnUU(), ConsumerType.SINGLE, ConsumerApp.MALL, SMSType.DONT_SEND, adminUu, sysConf.getEnUU());
+                                    MessageModel model = messageService.initMessage(String.format(StringFormat.APPLYPAID, orderId), MessageType.APPLY_PAID.getType(), useruu, sysConf.getEnUU(), ConsumerType.SINGLE, ConsumerApp.MALL, SMSType.DONT_SEND, completeInfo.getRemark(), adminUu, sysConf.getEnUU());
                                     sendMessageList.add(model);
                                 } catch (NumberFormatException e) {
                                     e.printStackTrace();

+ 1 - 1
src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/SettlementServiceImpl.java

@@ -360,7 +360,7 @@ public class SettlementServiceImpl implements SettlementService {
 				for (String useruu : useruus) {
 					try {
 						Long uu = Long.valueOf(useruu);
-						MessageModel model = messageService.initMessage(String.format(StringFormat.FINANCIAL_SETTLEMENT, paymentId), MessageType.FINANCIAL_SETTLEMENT.getType(), uu, sysConf.getEnUU(), ConsumerType.SINGLE, ConsumerApp.MALL, SMSType.DONT_SEND);
+						MessageModel model = messageService.initMessage(String.format(StringFormat.FINANCIAL_SETTLEMENT, paymentId), MessageType.FINANCIAL_SETTLEMENT.getType(), uu, sysConf.getEnUU(), ConsumerType.SINGLE, ConsumerApp.MALL, SMSType.DONT_SEND, "");
 						sendMessageModel.add(model);
 					} catch (NumberFormatException e) {
 						e.printStackTrace();

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/store/controller/StoreInController.java

@@ -209,7 +209,7 @@ public class StoreInController {
 	/**
 	 * 当卖家新增或修改产品推荐时,创建或更新产品推荐信息
 	 */
-	@RequestMapping(method = RequestMethod.POST, value = "/products//update_batch")
+	@RequestMapping(method = RequestMethod.POST, value = "/products/update_batch")
 	public List<RecommendProduct> saveProductsWhenSellerUpdate(String uuid, @RequestBody List<RecommendProduct> productList) {
 		return recommendProductService.saveProductsWhenSellerUpdate(uuid, productList);
 	}

+ 1 - 1
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java

@@ -3481,7 +3481,7 @@ public class OrderServiceImpl implements OrderService {
                     continue;
                 }
                 if (useruu != null) {
-                    model = messageService.initMessage(String.format(StringFormat.CONFIRMPAID, order.getOrderid()), com.uas.platform.b2c.trade.order.type.MessageType.CONFIRM_PAID.getType(), useruu, sysConf.getEnUU(), ConsumerType.SINGLE, ConsumerApp.MALL, SMSType.DONT_SEND);
+                    model = messageService.initMessage(String.format(StringFormat.CONFIRMPAID, order.getOrderid()), com.uas.platform.b2c.trade.order.type.MessageType.CONFIRM_PAID.getType(), useruu, sysConf.getEnUU(), ConsumerType.SINGLE, ConsumerApp.MALL, SMSType.DONT_SEND, "");
                     if (model != null) {
                         list.add(model);
                     }