|
|
|
@ -3,8 +3,12 @@ package com.zdxt.knowledge.controller; |
|
|
|
import com.zdxt.common.ZDResponse; |
|
|
|
import com.zdxt.common.controller.BaseController; |
|
|
|
import com.zdxt.common.util.TableDataInfo; |
|
|
|
import com.zdxt.knowledge.domain.SceneManage; |
|
|
|
import com.zdxt.knowledge.domain.SceneMedal; |
|
|
|
import com.zdxt.knowledge.domain.WechatUser; |
|
|
|
import com.zdxt.knowledge.service.ISceneManageService; |
|
|
|
import com.zdxt.knowledge.service.ISceneMedalService; |
|
|
|
import com.zdxt.knowledge.service.WechatService; |
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
@ -29,6 +33,8 @@ public class SceneMedalController extends BaseController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ISceneMedalService sceneMedalService; |
|
|
|
@Autowired private ISceneManageService sceneManageService; |
|
|
|
@Autowired private WechatService wechatService; |
|
|
|
|
|
|
|
@RequiresPermissions("project:medal:view") |
|
|
|
@GetMapping("/view") |
|
|
|
@ -48,13 +54,14 @@ public class SceneMedalController extends BaseController { |
|
|
|
List<SceneMedal> list = sceneMedalService.selectSceneMedalList(sceneMedal); |
|
|
|
return getDataTable(list); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询 |
|
|
|
*/ |
|
|
|
@PostMapping("/listAll") |
|
|
|
@ResponseBody |
|
|
|
public ZDResponse listAll(@RequestBody SceneMedal sceneMedal) { |
|
|
|
// WechatUser wu = wechatService.selectUserById(sceneMedal.getCreator());
|
|
|
|
// List<SceneMedal> list = sceneMedalService.selectSceneMedalByIds(wu.getMedal());
|
|
|
|
List<SceneMedal> list = sceneMedalService.selectSceneMedalList(sceneMedal); |
|
|
|
return ZDResponse.success("成功", list); |
|
|
|
} |
|
|
|
@ -74,7 +81,9 @@ public class SceneMedalController extends BaseController { |
|
|
|
* 新增 |
|
|
|
*/ |
|
|
|
@GetMapping("/add") |
|
|
|
public String add() { |
|
|
|
public String add(ModelMap mmap) { |
|
|
|
List<SceneManage> sceneList = sceneManageService.selectSceneManageListAll(new SceneManage()); |
|
|
|
mmap.put("sceneList", sceneList); |
|
|
|
return prefix + "/add"; |
|
|
|
} |
|
|
|
|
|
|
|
@ -96,6 +105,8 @@ public class SceneMedalController extends BaseController { |
|
|
|
public String edit(@PathVariable("guid") String guid, ModelMap mmap) { |
|
|
|
SceneMedal sceneMedal = sceneMedalService.selectSceneMedalById(guid); |
|
|
|
mmap.put("sceneMedal", sceneMedal); |
|
|
|
List<SceneManage> sceneList = sceneManageService.selectSceneManageListAll(new SceneManage()); |
|
|
|
mmap.put("sceneList", sceneList); |
|
|
|
return prefix + "/edit"; |
|
|
|
} |
|
|
|
|
|
|
|
|