From eec7e789a87863c25d92c10ad5dfc22ad80c448d Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 14 七月 2020 12:36:48 +0800
Subject: [PATCH] 系统区分BUG修复

---
 fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetsPayAdminController.java |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetsPayAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetsPayAdminController.java
index b6df234..2692db0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetsPayAdminController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetsPayAdminController.java
@@ -7,6 +7,7 @@
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
+import com.yeshi.fanli.entity.accept.AdminAcceptData;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.yeshi.utils.JsonUtil;
@@ -14,9 +15,11 @@
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.reflect.TypeToken;
+import com.yeshi.fanli.entity.shop.BanLiShopGoodsSets;
 import com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay;
 import com.yeshi.fanli.exception.shop.BanLiShopGoodsSetPayException;
 import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetPayService;
+import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetService;
 import com.yeshi.fanli.tag.PageEntity;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.StringUtil;
@@ -30,11 +33,14 @@
 	@Resource
 	private BanLiShopGoodsSetPayService banLiShopGoodsSetPayService;
 	
+	@Resource
+	private BanLiShopGoodsSetService banLiShopGoodsSetService;
+	
 	
 	@RequestMapping(value = "save")
-	public void save(String callback, BanLiShopGoodsSetsPay record, HttpServletRequest request, PrintWriter out) {
+	public void save(AdminAcceptData acceptData, String callback, BanLiShopGoodsSetsPay record, HttpServletRequest request, PrintWriter out) {
 		try {
-			banLiShopGoodsSetPayService.addSetPay(record);
+			banLiShopGoodsSetPayService.saveObject(record);
 			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("淇濆瓨鎴愬姛"));
 		} catch (BanLiShopGoodsSetPayException e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
@@ -52,7 +58,7 @@
 	 * @param out
 	 */
 	@RequestMapping(value = "delete")
-	public void delete(String callback, String idArray, PrintWriter out) {
+	public void delete(AdminAcceptData acceptData,String callback, String idArray, PrintWriter out) {
 		try {
 			if (StringUtil.isNullOrEmpty(idArray)) {
 				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇烽�夋嫨鎿嶄綔鐨勬暟鎹�"));
@@ -84,7 +90,7 @@
 	 * @param out
 	 */
 	@RequestMapping(value = "query")
-	public void query(String callback, Integer pageIndex, Integer pageSize, Long setId, String key, Integer payType, PrintWriter out) {
+	public void query(AdminAcceptData acceptData,String callback, Integer pageIndex, Integer pageSize, Long setId, String key, Integer payType, PrintWriter out) {
 		try {
 			if (pageIndex == null || pageIndex < 1)
 				pageIndex = 1;
@@ -98,6 +104,13 @@
 				return;
 			}
 			
+			for (BanLiShopGoodsSetsPay setsPay: list) {
+				BanLiShopGoodsSets goodsSet = setsPay.getGoodsSet();
+				if (goodsSet != null) {
+					setsPay.setGoodsSet(banLiShopGoodsSetService.selectByPrimaryKey(goodsSet.getId()));
+				}
+			}
+			
 			long count = banLiShopGoodsSetPayService.countQuery(key, payType, setId);
 			
 			int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);

--
Gitblit v1.8.0