|
@@ -7,7 +7,6 @@ import com.xynet.marketing.service.PromotionService;
|
|
import com.xynet.marketing.utils.MercAuthUtils;
|
|
import com.xynet.marketing.utils.MercAuthUtils;
|
|
import com.xynet.marketing.utils.R;
|
|
import com.xynet.marketing.utils.R;
|
|
import com.xynet.marketing.utils.collections.map.JHashMap;
|
|
import com.xynet.marketing.utils.collections.map.JHashMap;
|
|
-import com.xynet.marketing.utils.collections.map.JMap;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -37,36 +36,32 @@ public class PromotionController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping("page")
|
|
@PostMapping("page")
|
|
- private R page(@RequestBody Map<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
|
|
|
|
+ private R page(@RequestBody JHashMap<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
Integer mercId = MercAuthUtils.getMercId(headers);
|
|
Integer mercId = MercAuthUtils.getMercId(headers);
|
|
- JMap<String, Object> jParam = new JHashMap<>(param);
|
|
|
|
- jParam.put("mercId", mercId);
|
|
|
|
- Page<Map<String, Object>> data = promotionService.page(jParam);
|
|
|
|
|
|
+ param.put("mercId", mercId);
|
|
|
|
+ Page<Map<String, Object>> data = promotionService.page(param);
|
|
return R.ok(data);
|
|
return R.ok(data);
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("obj")
|
|
@PostMapping("obj")
|
|
- private R obj(@RequestBody Map<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
|
|
|
|
+ private R obj(@RequestBody JHashMap<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
Integer mercId = MercAuthUtils.getMercId(headers);
|
|
Integer mercId = MercAuthUtils.getMercId(headers);
|
|
- JMap<String, Object> jParam = new JHashMap<>(param);
|
|
|
|
- jParam.put("mercId", mercId);
|
|
|
|
- return R.ok(promotionService.obj(jParam));
|
|
|
|
|
|
+ param.put("mercId", mercId);
|
|
|
|
+ return R.ok(promotionService.obj(param));
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("saveOrUpdate")
|
|
@PostMapping("saveOrUpdate")
|
|
- private R saveOrUpdate(@RequestBody Map<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
|
|
|
|
+ private R saveOrUpdate(@RequestBody JHashMap<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
Integer mercId = MercAuthUtils.getMercId(headers);
|
|
Integer mercId = MercAuthUtils.getMercId(headers);
|
|
- JMap<String, Object> jParam = new JHashMap<>(param);
|
|
|
|
- jParam.put("mercId", mercId);
|
|
|
|
- return R.ok(promotionService.saveOrUpdate(jParam));
|
|
|
|
|
|
+ param.put("mercId", mercId);
|
|
|
|
+ return R.ok(promotionService.saveOrUpdate(param));
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("updateEnableStatus")
|
|
@PostMapping("updateEnableStatus")
|
|
- private R updateEnableStatus(@RequestBody Map<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
|
|
|
|
+ private R updateEnableStatus(@RequestBody JHashMap<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
Integer mercId = MercAuthUtils.getMercId(headers);
|
|
Integer mercId = MercAuthUtils.getMercId(headers);
|
|
- JMap<String, Object> jParam = new JHashMap<>(param);
|
|
|
|
- jParam.put("mercId", mercId);
|
|
|
|
- promotionService.updateEnableStatus(jParam);
|
|
|
|
|
|
+ param.put("mercId", mercId);
|
|
|
|
+ promotionService.updateEnableStatus(param);
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|
|
|
|
|