doum
7 小时以前 59b1f0e9967902aa10f5e017d5a0bdfd1b60c9ea
server/web/src/main/java/com/doumee/api/web/ShopInfoApi.java
@@ -8,6 +8,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Member;
import com.doumee.dao.dto.ChangePasswordDTO;
import com.doumee.dao.dto.ShopApplyDTO;
import com.doumee.dao.dto.ShopDetailQueryDTO;
import com.doumee.dao.dto.ShopInfoMaintainDTO;
@@ -25,6 +26,7 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import javax.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -108,7 +110,7 @@
    @ApiOperation("维护门店信息(支付押金后)")
    @PostMapping("/maintain")
    public ApiResponse maintain(@RequestBody ShopInfoMaintainDTO dto) {
        shopInfoService.maintainShopInfo(this.getMemberId(), dto);
        shopInfoService.maintainShopInfo(this.getShopId(), dto);
        return ApiResponse.success("操作成功");
    }
@@ -136,9 +138,9 @@
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "门店token值", required = true),
    })
    public ApiResponse changePassword(@RequestParam String newPassword) {
    public ApiResponse changePassword(@RequestBody @Valid ChangePasswordDTO dto) {
        String token = this.getRequest().getHeader(JwtTokenUtil.HEADER_KEY);
        shopInfoService.changePassword(this.getShopId(), newPassword, token);
        shopInfoService.changePassword(this.getShopId(), dto.getOldPassword(), dto.getNewPassword(), token);
        return ApiResponse.success("密码修改成功,请重新登录");
    }