12 changed files with 214 additions and 9 deletions
@ -0,0 +1,49 @@ |
|||
package com.ccsens.carbasics.api; |
|||
|
|||
import com.ccsens.common.bean.dto.CMemberDto; |
|||
import com.ccsens.common.service.IMemberService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParams; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* @author zy |
|||
*/ |
|||
@Api(tags = "用户") |
|||
@RestController |
|||
@RequestMapping("/user") |
|||
@Slf4j |
|||
public class UserController { |
|||
@Resource |
|||
private IMemberService memberService; |
|||
|
|||
@ApiOperation(value = "根据手机号更新成员的userId",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value="/memberWithPhone",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse memberWithPhone(@ApiParam @Validated @RequestBody CMemberDto.PhoneAndUserId params) throws Exception { |
|||
log.info("根据手机号更新成员userId"); |
|||
memberService.relevancePhone(params); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@ApiOperation(value = "合并用户后修改userId",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value="/mergeUser",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse mergeUser(@ApiParam @Validated @RequestBody CMemberDto.MergeUser params) throws Exception { |
|||
log.info("合并用户后修改userId"); |
|||
memberService.mergeUser(params); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
} |
Loading…
Reference in new issue