|
|
@ -5,6 +5,7 @@ import com.mashibing.internalcommon.dto.ResponseResult;
|
|
|
|
import com.mashibing.servicedriveruser.service.DriverUserService;
|
|
|
|
import com.mashibing.servicedriveruser.service.DriverUserService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
@ -16,8 +17,12 @@ public class UserController {
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/user")
|
|
|
|
@PostMapping("/user")
|
|
|
|
public ResponseResult saveUser(@RequestBody DriverUser driverUser){
|
|
|
|
public ResponseResult saveUser(@RequestBody DriverUser driverUser){
|
|
|
|
|
|
|
|
|
|
|
|
return service.saveUser(driverUser);
|
|
|
|
return service.saveUser(driverUser);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PutMapping("/user")
|
|
|
|
|
|
|
|
public ResponseResult updateUser(@RequestBody DriverUser driverUser){
|
|
|
|
|
|
|
|
return service.updateUser(driverUser);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|