|
@@ -1,6 +1,8 @@
|
|
|
package com.xynet.marketing.controller.merc;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.xynet.marketing.enums.PromotionStatusEnum;
|
|
|
+import com.xynet.marketing.enums.PromotionTypeEnum;
|
|
|
import com.xynet.marketing.service.PromotionService;
|
|
|
import com.xynet.marketing.utils.MercAuthUtils;
|
|
|
import com.xynet.marketing.utils.R;
|
|
@@ -48,12 +50,35 @@ public class PromotionController {
|
|
|
return R.ok(promotionService.saveOrUpdate(jParam));
|
|
|
}
|
|
|
|
|
|
- @PostMapping("updateSimple")
|
|
|
- private R updateSimple(@RequestBody Map<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
|
+ @PostMapping("updateEnableStatus")
|
|
|
+ private R updateEnableStatus(@RequestBody Map<String, Object> param, @RequestHeader Map<String, String> headers) {
|
|
|
Integer mercId = MercAuthUtils.getMercId(headers);
|
|
|
JMap<String, Object> jParam = new JHashMap<>(param);
|
|
|
jParam.put("mercId", mercId);
|
|
|
- promotionService.updateSimple(jParam);
|
|
|
+ promotionService.updateEnableStatus(jParam);
|
|
|
return R.ok();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取活动类型列表
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("typeMaps")
|
|
|
+ private R typeMaps() {
|
|
|
+ Map<String, String> maps = PromotionTypeEnum.maps();
|
|
|
+ return R.ok(maps);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取活动状态列表
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("statusMaps")
|
|
|
+ private R statusMaps() {
|
|
|
+ Map<String, String> maps = PromotionStatusEnum.maps();
|
|
|
+ return R.ok(maps);
|
|
|
+ }
|
|
|
+
|
|
|
}
|