|
@@ -1,5 +1,7 @@
|
|
|
package com.tour.api.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.tour.api.service.ApiAgentCenterService;
|
|
|
import com.tour.api.vo.AgentVo;
|
|
@@ -39,12 +41,12 @@ public class AgentCenterApi extends BaseController {
|
|
|
|
|
|
@ApiOperation("订单列表")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(required = true, paramType = "query", name = "status", value = " 0 待出行 1出行中 2 已完成 -1取消"),
|
|
|
+ @ApiImplicitParam(required = true, paramType = "query", name = "status", value = " 0 待出行 1出行中 3 已完成 -1取消"),
|
|
|
@ApiImplicitParam(required = true, paramType = "query", name = "id", value = " 代理id")
|
|
|
})
|
|
|
- @PostMapping(value = "/list")
|
|
|
+ @GetMapping(value = "/list")
|
|
|
// @AccessToken
|
|
|
- public BaseResult<List<OmsOrderDto>> getList(Integer status, Long id) {
|
|
|
+ public BaseResult<List<OmsOrderDto>> getList(@RequestParam("status") Integer status, @RequestParam("id") Long id) {
|
|
|
SystemOrderDto order = new SystemOrderDto();
|
|
|
order.setStatus(status);
|
|
|
List<Long> agentIds = agentService.getIds(id);
|
|
@@ -164,4 +166,22 @@ public class AgentCenterApi extends BaseController {
|
|
|
return BaseResult.success(agent);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("修改密码")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(required = true, paramType = "query", name = "id", value = " 代理id"),
|
|
|
+ @ApiImplicitParam(required = true, paramType = "query", name = "oldPassword", value = "旧密码"),
|
|
|
+ @ApiImplicitParam(required = true, paramType = "query", name = "password", value = "新密码")
|
|
|
+ })
|
|
|
+ @PostMapping(value = "/updatePass")
|
|
|
+// @AccessToken
|
|
|
+ public BaseResult updatePass(@RequestBody String body) {
|
|
|
+ JSONObject json = JSON.parseObject(body);
|
|
|
+ Long agentId = json.getLongValue("id");
|
|
|
+ String oldPassword = json.getString("oldPassword");
|
|
|
+ String password = json.getString("password");
|
|
|
+ int result = apiAgentCenterService.updateAgentPass(agentId, oldPassword, password);
|
|
|
+ return result > 0 ? BaseResult.success() : BaseResult.error("修改失败");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|