|
@@ -1,20 +1,20 @@
|
|
package com.hxgc.controller;
|
|
package com.hxgc.controller;
|
|
|
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
|
-
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
+
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("company")
|
|
@RequestMapping("company")
|
|
public class company {
|
|
public class company {
|
|
-
|
|
|
|
-
|
|
|
|
@PostMapping(value = "/save")
|
|
@PostMapping(value = "/save")
|
|
- public Map save(@RequestBody Jifen jifen) {
|
|
|
|
|
|
+ public Map save() {
|
|
|
|
|
|
System.out.println("调用了积分保存接口");
|
|
System.out.println("调用了积分保存接口");
|
|
- System.out.println(jifen);
|
|
|
|
|
|
+ //System.out.println(jifen);
|
|
return new HashMap(){{
|
|
return new HashMap(){{
|
|
put("isSuccess",true);
|
|
put("isSuccess",true);
|
|
put("msg","save success");
|
|
put("msg","save success");
|
|
@@ -23,53 +23,14 @@ public class company {
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/update")
|
|
@PostMapping(value = "/update")
|
|
- public Map update(@RequestBody Jifen jifen) {
|
|
|
|
|
|
+ public Map update() {
|
|
|
|
|
|
- System.out.println(jifen);
|
|
|
|
- return new HashMap(){{
|
|
|
|
- put("isSuccess",true);
|
|
|
|
- put("msg","update success");
|
|
|
|
- }};
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- @GetMapping(value = "/delete")
|
|
|
|
- public Map deleteById(Integer jifenId) {
|
|
|
|
- System.out.println("删除id为"+jifenId+"的积分信息");
|
|
|
|
- return new HashMap(){{
|
|
|
|
- put("isSuccess",true);
|
|
|
|
- put("msg","delete success");
|
|
|
|
|
|
+ //System.out.println(jifen);
|
|
|
|
+ return new HashMap() {{
|
|
|
|
+ put("isSuccess", true);
|
|
|
|
+ put("msg", "update success");
|
|
}};
|
|
}};
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- @GetMapping(value = "/{jifenId}")
|
|
|
|
- public Jifen findJifenById(@PathVariable Integer jifenId) {
|
|
|
|
- System.out.println("已经查询到"+jifenId+"积分数据");
|
|
|
|
- return new Jifen(jifenId, 12,jifenId+"号积分");
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- @GetMapping(value = "/search")
|
|
|
|
- public Jifen search(Integer uid,String type) {
|
|
|
|
- System.out.println("uid:"+uid+"type:"+type);
|
|
|
|
- return new Jifen(uid, 12,type);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @PostMapping(value = "/searchByEntity")
|
|
|
|
- public List<Jifen> searchMap(@RequestBody Jifen jifen) {
|
|
|
|
-
|
|
|
|
- System.out.println(jifen);
|
|
|
|
-
|
|
|
|
- List<Jifen> jifens = new ArrayList<Jifen>();
|
|
|
|
- jifens.add(new Jifen(110,12,"下单积分"));
|
|
|
|
- jifens.add(new Jifen(111,18,"支付积分"));
|
|
|
|
- return jifens;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
}
|
|
}
|