|
@@ -16,6 +16,7 @@ import org.springframework.http.MediaType;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.net.URLDecoder;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -36,14 +37,10 @@ public class CardApi extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 获取卡信息
|
|
|
- *
|
|
|
- * @param mapData
|
|
|
- * @return
|
|
|
*/
|
|
|
- @RequestMapping(value = "/getCardByStatus", method = {RequestMethod.POST}, produces = {
|
|
|
- MediaType.APPLICATION_JSON_VALUE})
|
|
|
+ @RequestMapping(value = "/getCardByStatus", method = {RequestMethod.GET})
|
|
|
@ResponseBody
|
|
|
- public JSONObject storefrontAddCard(@RequestBody Map<String, String> mapData) {
|
|
|
+ public JSONObject storefrontAddCard(HttpServletRequest req) {
|
|
|
JSONObject ret = new JSONObject();
|
|
|
ret.put("retCode", "NO_DATA");
|
|
|
try {
|
|
@@ -66,19 +63,15 @@ public class CardApi extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 更新卡状态
|
|
|
- *
|
|
|
- * @param mapData
|
|
|
- * @return
|
|
|
*/
|
|
|
- @RequestMapping(value = "/updateCardStatus", method = {RequestMethod.POST}, produces = {
|
|
|
- MediaType.APPLICATION_JSON_VALUE})
|
|
|
+ @RequestMapping(value = "/updateCardStatus", method = {RequestMethod.GET})
|
|
|
@ResponseBody
|
|
|
- public JSONObject updateCardStatus(@RequestBody Map<String, String> mapData) {
|
|
|
+ public JSONObject updateCardStatus(HttpServletRequest req) {
|
|
|
JSONObject ret = new JSONObject();
|
|
|
ret.put("retCode", "NO_DATA");
|
|
|
try {
|
|
|
- String status = mapData.get("status");
|
|
|
- String cardId = mapData.get("cardId");
|
|
|
+ String status = req.getParameter("status");
|
|
|
+ String cardId = req.getParameter("cardId");
|
|
|
AgentCardInfo cardInfo = cardInfoService.findById(cardId);
|
|
|
if (cardInfo != null) {
|
|
|
cardInfo.setCardStatus(status);
|