service-driver-user司机信息修改

main
topsun 2 years ago
parent cb7eafd3ac
commit f9c1a9eb8f

@ -5,6 +5,7 @@ import com.internal.dto.ResponseResult;
import com.taxi.servicedriveruser.service.DriverUserService;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;
@ -21,4 +22,9 @@ public class DriverUserController {
return driverUserService.addDriverUser(driverUser);
}
@PutMapping("/user")
public ResponseResult updateDriverUser(@RequestBody DriverUser driverUser){
return driverUserService.updateDriverUser(driverUser);
}
}

@ -22,4 +22,12 @@ public class DriverUserService {
return ResponseResult.success();
}
public ResponseResult updateDriverUser(DriverUser driverUser){
LocalDateTime localDate = LocalDateTime.now();
driverUser.setGmtCreate(localDate);
driverUser.setGmtModified(localDate);
driverUserMapper.updateById(driverUser);
return ResponseResult.success();
}
}

Loading…
Cancel
Save