From e57e32fc43da31917912eebb4e47d4e50df1a9e9 Mon Sep 17 00:00:00 2001
From: shiyj1101 <1098226878@qq.com>
Date: 星期四, 05 八月 2021 22:56:15 +0800
Subject: [PATCH] 完善格式化功能
---
service-acct/src/main/java/com/java110/acct/api/ShopVipAccountApi.java | 98 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 97 insertions(+), 1 deletions(-)
diff --git a/service-acct/src/main/java/com/java110/acct/api/ShopVipAccountApi.java b/service-acct/src/main/java/com/java110/acct/api/ShopVipAccountApi.java
index 649c22e..c8090bc 100644
--- a/service-acct/src/main/java/com/java110/acct/api/ShopVipAccountApi.java
+++ b/service-acct/src/main/java/com/java110/acct/api/ShopVipAccountApi.java
@@ -1,12 +1,18 @@
-package com.java110.store.api;
+package com.java110.acct.api;
import com.alibaba.fastjson.JSONObject;
import com.java110.acct.bmo.shopVipAccount.IDeleteShopVipAccountBMO;
import com.java110.acct.bmo.shopVipAccount.IGetShopVipAccountBMO;
import com.java110.acct.bmo.shopVipAccount.ISaveShopVipAccountBMO;
import com.java110.acct.bmo.shopVipAccount.IUpdateShopVipAccountBMO;
+import com.java110.acct.bmo.shopVipAccountDetail.IDeleteShopVipAccountDetailBMO;
+import com.java110.acct.bmo.shopVipAccountDetail.IGetShopVipAccountDetailBMO;
+import com.java110.acct.bmo.shopVipAccountDetail.ISaveShopVipAccountDetailBMO;
+import com.java110.acct.bmo.shopVipAccountDetail.IUpdateShopVipAccountDetailBMO;
import com.java110.dto.shopVipAccount.ShopVipAccountDto;
+import com.java110.dto.shopVipAccountDetail.ShopVipAccountDetailDto;
import com.java110.po.shopVipAccount.ShopVipAccountPo;
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import org.springframework.beans.factory.annotation.Autowired;
@@ -27,6 +33,16 @@
@Autowired
private IGetShopVipAccountBMO getShopVipAccountBMOImpl;
+
+ @Autowired
+ private ISaveShopVipAccountDetailBMO saveShopVipAccountDetailBMOImpl;
+ @Autowired
+ private IUpdateShopVipAccountDetailBMO updateShopVipAccountDetailBMOImpl;
+ @Autowired
+ private IDeleteShopVipAccountDetailBMO deleteShopVipAccountDetailBMOImpl;
+
+ @Autowired
+ private IGetShopVipAccountDetailBMO getShopVipAccountDetailBMOImpl;
/**
* 寰俊淇濆瓨娑堟伅妯℃澘
@@ -96,12 +112,92 @@
*/
@RequestMapping(value = "/queryShopVipAccount", method = RequestMethod.GET)
public ResponseEntity<String> queryShopVipAccount(@RequestParam(value = "shopId", required = false) String shopId,
+ @RequestParam(value = "vipId", required = false) String vipId,
@RequestParam(value = "page") int page,
@RequestParam(value = "row") int row) {
ShopVipAccountDto shopVipAccountDto = new ShopVipAccountDto();
shopVipAccountDto.setPage(page);
shopVipAccountDto.setRow(row);
shopVipAccountDto.setShopId(shopId);
+ shopVipAccountDto.setVipId(vipId);
return getShopVipAccountBMOImpl.get(shopVipAccountDto);
}
+
+
+ /**
+ * 寰俊淇濆瓨娑堟伅妯℃澘
+ *
+ * @param reqJson
+ * @return
+ * @serviceCode /shopVipAccount/saveShopVipAccountDetail
+ * @path /app/shopVipAccount/saveShopVipAccountDetail
+ */
+ @RequestMapping(value = "/saveShopVipAccountDetail", method = RequestMethod.POST)
+ public ResponseEntity<String> saveShopVipAccountDetail(@RequestBody JSONObject reqJson) {
+
+ Assert.hasKeyAndValue(reqJson, "vipAcctId", "璇锋眰鎶ユ枃涓湭鍖呭惈vipAcctId");
+ Assert.hasKeyAndValue(reqJson, "amount", "璇锋眰鎶ユ枃涓湭鍖呭惈amount");
+
+
+ ShopVipAccountDetailPo shopVipAccountDetailPo = BeanConvertUtil.covertBean(reqJson, ShopVipAccountDetailPo.class);
+ return saveShopVipAccountDetailBMOImpl.save(shopVipAccountDetailPo);
+ }
+
+ /**
+ * 寰俊淇敼娑堟伅妯℃澘
+ *
+ * @param reqJson
+ * @return
+ * @serviceCode /shopVipAccount/updateShopVipAccountDetail
+ * @path /app/shopVipAccount/updateShopVipAccountDetail
+ */
+ @RequestMapping(value = "/updateShopVipAccountDetail", method = RequestMethod.POST)
+ public ResponseEntity<String> updateShopVipAccountDetail(@RequestBody JSONObject reqJson) {
+
+ Assert.hasKeyAndValue(reqJson, "vipAcctId", "璇锋眰鎶ユ枃涓湭鍖呭惈vipAcctId");
+ Assert.hasKeyAndValue(reqJson, "amount", "璇锋眰鎶ユ枃涓湭鍖呭惈amount");
+ Assert.hasKeyAndValue(reqJson, "detailId", "detailId涓嶈兘涓虹┖");
+
+
+ ShopVipAccountDetailPo shopVipAccountDetailPo = BeanConvertUtil.covertBean(reqJson, ShopVipAccountDetailPo.class);
+ return updateShopVipAccountDetailBMOImpl.update(shopVipAccountDetailPo);
+ }
+
+ /**
+ * 寰俊鍒犻櫎娑堟伅妯℃澘
+ *
+ * @param reqJson
+ * @return
+ * @serviceCode /shopVipAccount/deleteShopVipAccountDetail
+ * @path /app/shopVipAccount/deleteShopVipAccountDetail
+ */
+ @RequestMapping(value = "/deleteShopVipAccountDetail", method = RequestMethod.POST)
+ public ResponseEntity<String> deleteShopVipAccountDetail(@RequestBody JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "communityId", "灏忓尯ID涓嶈兘涓虹┖");
+
+ Assert.hasKeyAndValue(reqJson, "detailId", "detailId涓嶈兘涓虹┖");
+
+
+ ShopVipAccountDetailPo shopVipAccountDetailPo = BeanConvertUtil.covertBean(reqJson, ShopVipAccountDetailPo.class);
+ return deleteShopVipAccountDetailBMOImpl.delete(shopVipAccountDetailPo);
+ }
+
+ /**
+ * 寰俊鍒犻櫎娑堟伅妯℃澘
+ *
+ * @param shopId 灏忓尯ID
+ * @return
+ * @serviceCode /shopVipAccount/queryShopVipAccountDetail
+ * @path /app/shopVipAccount/queryShopVipAccountDetail
+ */
+ @RequestMapping(value = "/queryShopVipAccountDetail", method = RequestMethod.GET)
+ public ResponseEntity<String> queryShopVipAccountDetail(@RequestParam(value = "shopId", required = false) String shopId,
+ @RequestParam(value = "page") int page,
+ @RequestParam(value = "row") int row) {
+ ShopVipAccountDetailDto shopVipAccountDetailDto = new ShopVipAccountDetailDto();
+ shopVipAccountDetailDto.setPage(page);
+ shopVipAccountDetailDto.setRow(row);
+ shopVipAccountDetailDto.setShopId(shopId);
+ return getShopVipAccountDetailBMOImpl.get(shopVipAccountDetailDto);
+ }
}
--
Gitblit v1.8.0